CN105049302B - Household communication system and communication means based on public server - Google Patents
Household communication system and communication means based on public server Download PDFInfo
- Publication number
- CN105049302B CN105049302B CN201510351218.6A CN201510351218A CN105049302B CN 105049302 B CN105049302 B CN 105049302B CN 201510351218 A CN201510351218 A CN 201510351218A CN 105049302 B CN105049302 B CN 105049302B
- Authority
- CN
- China
- Prior art keywords
- home
- client
- public server
- communication
- sequence number
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000004891 communication Methods 0.000 title claims abstract description 81
- 238000012545 processing Methods 0.000 claims description 3
- 238000012546 transfer Methods 0.000 abstract description 5
- 238000000034 method Methods 0.000 description 7
- 230000008901 benefit Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 239000012141 concentrate Substances 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Landscapes
- Telephonic Communication Services (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The present invention provides a kind of Household communication system and communication means based on public server passes through public server and realizes the mobile phone terminal of home client and being in communication with each other for home gateway.Server can connect multiple client, and the communication between public server and home client is realized by Socket communication protocol.Mobile phone terminal and home gateway are all used as client and public server direct communication, forward data information by public server.It is more stable using public server communication, it is also relatively reliable, and effectively increase practicability.Public server connects more family home clients simultaneously, therefore public server can effectively identify different home, transmit data respectively.Public server can identify different home, subfamily's transfer data information according to the sequence number of home client.
Description
Technical field
The invention belongs to fields of communication technology, and in particular, to a kind of Household communication system based on public server and
Communication means
Background technique
The relationship of people's lives and information is further close, and intelligent residence has started to enter into people's lives and got over
Carry out more concerns.Smart home allows user that can manage household equipment with more easily means, helps user outside family
Portion also can keep smooth information to communicate with household internal, moreover it is possible to help people to carry out efficient time management, and improve people
Quality of life.
In smart home system, control command is sent home gateway by cell phone client, and home gateway passes through family again
Internal network controls smart home.Home gateway have public network IP or home gateway and mobile phone terminal in same local area network when,
It can successfully use a network for communicating.But if home gateway does not have public network IP and with mobile phone terminal not in the same office
It is to be connected to public network after internal composition local area network in the net of domain, such as in some cells and unit, what usual inner part was matched is
Home gateway cannot be accessed by private ip in private IP address, outside, then home gateway cannot directly and mobile phone
End is communicated.
Communication is realized in this case, and a solution is to utilize NAT through-transmission technique, i.e. network address translation
The communication of home gateway and mobile phone terminal may be implemented in technology, but this method is not sufficiently stable reliable.
Summary of the invention
In view of the above defects of the prior art, the purpose of the present invention is provide one kind for smart home system to be based on
The Household communication system and communication means of public server realize the phase intercommunication of mobile phone terminal and home gateway by public server
Letter.Home gateway can use public server and realize and be in communication with each other with mobile phone terminal in the case where no public network IP.
To achieve the above object, the present invention is achieved by the following technical solutions.
According to an aspect of the invention, there is provided a kind of Household communication system based on public server, including it is public
Server and at least one home client communicated to connect with public server, the public server and home client
Between communication be to be realized by Socket communication protocol;The home client includes mobile phone terminal and home gateway, institute
It states and data information is forwarded by public server between mobile phone terminal and home gateway.
Preferably, unique identification in the following way between the public server and home client: described in each
Home client is provided with unique sequence number, and the public server identifies different home visitor according to the sequence number of client
Family end, and family data information is transmitted according to unique sequence number.
Preferably, the mobile phone terminal and home gateway of the home client is equipped with identical as its affiliated home client
Sequence number, i.e. there is oneself individual sequence number in each household family;The sequence number is set as 6 character strings, belongs to same
The mobile phone terminal and home gateway of front yard client possess the same sequence number, and public server is according to the identical ability phase intercommunication of sequence number
The principle of letter, judgement are able to carry out the mobile phone terminal and home gateway of communication.
Preferably, the public server possesses public network IP, and public server is used for the mobile phone terminal of all home clients
The user data of data communication and all home clients of processing between home gateway.
Preferably, the Socket communication protocol uses the communication pattern of Client/Server, be based on IP address and
The network communication of port numbers;The server end that public server is communicated as Socket, the mobile phone terminal of all home clients and
The client that home gateway is all used as Socket to communicate is communicated with public server, from client to public service when communication
Device initiates the connection request, and public server establishes connection after receiving request respectively;Server end and client are all to pass through thread
Mode come realize Socket communication.
Preferably, the public server is equipped with Socket Serve program, and the Socket Serve program is adopted respectively
The Socket that each home client is sent is requested with independent thread and feedback is handled;Each home client
Online, the Socket Serve program of public server can all create a thread and be used to send and receive data.
Preferably, the server S ocket Serve program records the family when each home client is online first
The sequence number that the mobile phone terminal and home gateway of front yard client are sent, to judge which family family is the home client belong to;If family
The mobile phone terminal and home gateway of front yard client are without correct matched sequence number, then public server refusal transmits family visitor
The data information at family end.
According to another aspect of the present invention, a kind of communication party of Household communication system based on public server is provided
Method includes the following steps:
Step 1: after the mobile phone terminal of home client is online, sequence number information being sent to public server;
Step 2: after public server receives sequence number information, identifying the home client sequence number of the mobile phone terminal, sentence
Which family family the mobile phone terminal that breaks belongs to;
Step 3: control command is sent to public server by mobile phone terminal;
Step 4: control command is transmitted to the home gateway for possessing the home client of same sequence number by public server;
Step 5: home gateway receives control command and handles data, and feedback information is sent to public server;
Step 6: public server identifies the home client sequence number of the home gateway, and feedback information is sent to and is possessed
The mobile phone terminal of same sequence number, while making corresponding storage record.
Compared with prior art, the present invention have it is following the utility model has the advantages that
One, the present invention, which realizes home gateway and can use server end, directly to be communicated with mobile phone terminal, home gateway
It is not necessarily required to possess public network IP, more meets reality, more convenient subscriber household installs and uses smart home, while using server
Communication is more stable, also more reliable.
Two, public server communication pattern proposed by the present invention concentrates in together all familys, passes through server reality
It now controls, the smart home system of each family is no longer individually, to be easy to implement unified management.
Three, the method for identification different home proposed by the present invention is the sequence number judgement that server directly passes through client
Which family is the client belong to, and does not need the IP for judging client or other information, easy to operate in this way, it is easy to accomplish,
It is more convenient, more reliability.
Detailed description of the invention
Upon reading the detailed description of non-limiting embodiments with reference to the following drawings, other feature of the invention,
Objects and advantages will become more apparent upon:
Fig. 1 is that the present invention is based on the structural schematic diagrams of the Household communication system of public server.
Specific embodiment
Elaborate below to the embodiment of the present invention: the present embodiment carries out under the premise of the technical scheme of the present invention
Implement, the detailed implementation method and specific operation process are given.It should be pointed out that those skilled in the art
For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to guarantor of the invention
Protect range.
Embodiment
A kind of Household communication system based on public server is present embodiments provided, family is realized by public server
The mobile phone terminal of client and being in communication with each other for home gateway.Public server can connect multiple home clients, public server
Communication between home client is realized by Socket communication protocol.Mobile phone terminal and home gateway are all used as family
Client and public server direct communication, forward data information by public server.More using public server communication
Stablize, it is also more reliable, and effectively increase practicability.Public server connects more family home clients, therefore public clothes simultaneously
Business device can effectively identify different home, transmit data respectively.Public server can be known according to the sequence number of home client
Other different home, subfamily's transfer data information.
Further, public server refers to the server for possessing public network IP, and public server is as smart home
The data information center of system and back-stage management center connect more family familys end, be responsible for all families data communication and
Handle the user data of all families.
Further, Socket communication is a kind of communication pattern based on Client/Server, public server conduct
Socket communication server end, the mobile phone terminal and home gateway of all families be all used as Socket communicate client with it is public
Server communication, initiates the connection request from client to public server when communication, and public server receives the company of foundation after request
It connects.Server end and client are all to realize what Socket was communicated by way of thread.Since Socket is based on IP
The network communication of location and port numbers cannot be communicated directly with mobile phone terminal when home gateway does not have public network IP, but can benefit
The communication with mobile phone terminal is realized with server.
Further, the mobile phone terminal of the same family is needed to realize by public server and is in communication with each other with home gateway.It is public
Server can identify different home, subfamily's transfer data information according to sequence number altogether.
Further, each home client, including mobile phone terminal and home gateway have and its affiliated home client phase
There are oneself individual sequence number in the sequence number of corresponding (consistent) namely each household family.6 characters of Serial No. setting
String.All mobile phone terminals and home gateway for belonging to same family home client possess the same sequence number, and only sequence number is identical
It can just be in communication with each other.Public server can determine whether which family family it belongs to according to home client sequence number.
Further, independent thread is respectively adopted to each home client in public server Socket Serve program
The Socket request sent and feedback are handled.Each home client is online, and public server can all create a thread
For sending and receiving data, and the sequence number that the home client is sent is recorded first, to judge the home client category
In any family family.If home client will not transmit the home client without correct matched sequence number, server
Data information.
Household communication system provided in this embodiment based on public server, communication means step include:
Step 1: after the mobile phone terminal of home client is online, sequence number being sent to public server;
Step 2: after public server receives information, identifying the mobile phone terminal sequence number of the home client, judge the hand
Which family family is generator terminal belong to;
Step 3: control command is sent to public server by mobile phone terminal;
Step 4: control command is transmitted to the home gateway for possessing the family of same sequence number by public server;
Step 5: home gateway receives control command and handles data, and return information is sent to public server;
Step 6: public server identifies the home client sequence number, and return information is sent to and possesses same sequence number
Mobile phone terminal, while making the operations such as corresponding storage record.
The present embodiment is further described with reference to the accompanying drawing.
As shown in Figure 1, in the present embodiment, the smart home system proposed by the present invention based on public server communicates mould
Formula is that mobile phone terminal and home gateway are all used as client and server direct communication, forwards data information by server, realizes
Mobile phone terminal and home gateway are in communication with each other.Server can connect multiple client, and the communication between server and client side is logical
Cross the realization of Socket communication protocol.Server connects the client of more family families simultaneously, can be had according to the sequence number of client
Effect identification different home, subfamily's transfer data information.It is more stable using server communication, it is also more reliable, and effectively improve
Practicability.
Public server refers to the server for possessing public network IP, data of the public server as smart home system
Information centre and back-stage management center connect the client of more family families, are responsible for data communication and the processing institute of all families
There is the user data of family.The program of the public server can generally run directly in PC machine, be a base under Windows
In the socket serve end program of VC++.
Socket communication is a kind of communication pattern based on Client/Server, and public server is logical as Socket
The server end of letter, the client and server communication that the mobile phone terminal and home gateway of all families are all used as Socket to communicate,
Request is initiated the connection by user end to server when communication, server establishes connection after receiving request.Server end and client
It is all to realize what Socket was communicated by way of thread.Since Socket is that the network based on IP address and port numbers is logical
Letter, when home gateway does not have public network IP, cannot directly communicate with mobile phone terminal, but can use server realization and mobile phone
The communication at end.
The mobile phone terminal of the same family needs to realize by public server with home gateway to be in communication with each other.Server can root
Different home, subfamily's transfer data information are identified according to sequence number.
Each client, including mobile phone terminal and home gateway have sequence number corresponding with its affiliated family, namely every
There is oneself individual sequence number in family family.6 character strings of Serial No. setting.Belong to all clients of same family family
Possess the same sequence number, only sequence number is identical can just be in communication with each other.Server can determine whether it according to client sequence number
Any family family belonged to.
Server S ocket Serve program is respectively adopted independent thread and requests the Socket that each client is sent
It is handled with feedback.Each client is online, and server can all create a thread and be used to send and receive data, and first
The sequence number that the client is sent is recorded, to judge which family family is the client belong to.If client does not match correctly
Sequence number, then server will not transmit the data information of the client.
In a preferred embodiment, home client proposed by the present invention includes: by the step of public server communication
Step 1: after cell phone client is online, sequence number being sent to server;
Step 2: after server receives information, identifying the client sequence number, judge which family family is the client belong to;
Step 3: control command is sent to server by mobile phone terminal;
Step 4: server forwards the information to the home gateway for possessing the family of same sequence number;
Step 5: home gateway receives data information and handles data, and return information is sent to server;
Step 6: server identifies the client sequence number, and data information is sent to the mobile phone for possessing same sequence number
End, while making the operations such as corresponding storage record.
Specific embodiments of the present invention are described above.It is to be appreciated that the invention is not limited to above-mentioned
Particular implementation, those skilled in the art can make various deformations or amendments within the scope of the claims, this not shadow
Ring substantive content of the invention.
Claims (2)
1. a kind of Household communication system based on public server, which is characterized in that including public server and with public clothes
At least one home client of business device communication connection, the communication between the public server and home client is to pass through
Socket communication protocol is realized;The home client includes mobile phone terminal and home gateway, the mobile phone terminal and home network
Data information is forwarded by public server between pass;
Unique identification in the following way between the public server and home client: each described home client is equal
It is provided with unique sequence number, the public server identifies different home client according to the sequence number of client, and according to
Unique sequence number transmits family data information;
The mobile phone terminal and home gateway of the home client are equipped with sequence number identical with its affiliated home client, i.e.,
There is oneself individual sequence number in each household family;The sequence number is set as 6 character strings, belongs to the hand of the same family client
Generator terminal and home gateway possess the same sequence number, and public server is sentenced according to the identical principle that can be just in communication with each other of sequence number
The disconnected mobile phone terminal and home gateway for being able to carry out communication;
The public server possesses public network IP, public server for all home clients mobile phone terminal and home gateway it
Between data communication and all home clients of processing user data;
The Socket communication protocol uses the communication pattern of Client/Server, is the net based on IP address and port numbers
Network communication;The server end that public server is communicated as Socket, the mobile phone terminal and home gateway of all home clients are all
Client as Socket communication is communicated with public server, and when communication is initiated the connection from client to public server
Request, public server establish connection after receiving request respectively;Server end and client are all by way of thread come real
Existing Socket communication;
The public server is equipped with Socket Serve program, and independent thread is respectively adopted in the Socket Serve program
The Socket request and feedback send to each home client are handled;Each home client is online, public clothes
The Socket Serve program of business device can all create a thread and be used to send and receive data;
The server S ocket Serve program records the hand of the home client when each home client is online first
The sequence number that generator terminal and home gateway are sent, to judge which family family is the home client belong to;If the hand of home client
Generator terminal and home gateway are without correct matched sequence number, then public server refusal transmits the data letter of the home client
Breath.
2. a kind of communication means of the Household communication system described in claim 1 based on public server, which is characterized in that packet
Include following steps:
Step 1: after the mobile phone terminal of home client is online, sequence number information being sent to public server;
Step 2: after public server receives sequence number information, identifying the home client sequence number of the mobile phone terminal, judgement should
Which family family mobile phone terminal belongs to;
Step 3: control command is sent to public server by mobile phone terminal;
Step 4: control command is transmitted to the home gateway for possessing the home client of same sequence number by public server;
Step 5: home gateway receives control command and handles data, and feedback information is sent to public server;
Step 6: public server identifies the home client sequence number of the home gateway, feedback information is sent to possess it is identical
The mobile phone terminal of sequence number, while making corresponding storage record.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510351218.6A CN105049302B (en) | 2015-06-23 | 2015-06-23 | Household communication system and communication means based on public server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510351218.6A CN105049302B (en) | 2015-06-23 | 2015-06-23 | Household communication system and communication means based on public server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105049302A CN105049302A (en) | 2015-11-11 |
CN105049302B true CN105049302B (en) | 2019-01-11 |
Family
ID=54455523
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510351218.6A Expired - Fee Related CN105049302B (en) | 2015-06-23 | 2015-06-23 | Household communication system and communication means based on public server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105049302B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107395682B (en) * | 2017-06-23 | 2019-08-23 | 深圳市盛路物联通讯技术有限公司 | A kind of cell family interactive service end and data processing method |
CN108280917A (en) * | 2018-03-21 | 2018-07-13 | 首创置业股份有限公司 | A kind of access control system and equipment based on Internet of Things public service platform |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101859134A (en) * | 2009-04-09 | 2010-10-13 | 广州市聚晖电子科技有限公司 | Intelligent home appliance remote control system and method |
CN103024590A (en) * | 2012-12-11 | 2013-04-03 | 四川长虹电器股份有限公司 | Method and system for video call between smart terminal and smart TV (television) |
CN103327083A (en) * | 2013-06-08 | 2013-09-25 | 常州大学 | Embedded household monitoring system based on heterogeneous network Android platform |
CN103713605A (en) * | 2013-12-27 | 2014-04-09 | 广西瀚特信息产业股份有限公司 | Intelligent control platform and method |
CN104426951A (en) * | 2013-08-28 | 2015-03-18 | 樊继方 | Intelligent set top box remote network real-time monitoring system and method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9705729B2 (en) * | 2012-06-01 | 2017-07-11 | Dell Products L.P. | General client engine with load balancing for client-server communication |
-
2015
- 2015-06-23 CN CN201510351218.6A patent/CN105049302B/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101859134A (en) * | 2009-04-09 | 2010-10-13 | 广州市聚晖电子科技有限公司 | Intelligent home appliance remote control system and method |
CN103024590A (en) * | 2012-12-11 | 2013-04-03 | 四川长虹电器股份有限公司 | Method and system for video call between smart terminal and smart TV (television) |
CN103327083A (en) * | 2013-06-08 | 2013-09-25 | 常州大学 | Embedded household monitoring system based on heterogeneous network Android platform |
CN104426951A (en) * | 2013-08-28 | 2015-03-18 | 樊继方 | Intelligent set top box remote network real-time monitoring system and method |
CN103713605A (en) * | 2013-12-27 | 2014-04-09 | 广西瀚特信息产业股份有限公司 | Intelligent control platform and method |
Also Published As
Publication number | Publication date |
---|---|
CN105049302A (en) | 2015-11-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104980514B (en) | A kind of remote playing control method and device of wireless sound box | |
CN101138205B (en) | Data packet relay unit | |
CN102209302A (en) | System and method for realizing information push of mobile terminal | |
CN101951325A (en) | Network terminal configuration system based on automatic discovery and configuration method thereof | |
CN103647701B (en) | The control method and device of instantaneous communication system message forwarding | |
CN104320327A (en) | Method and system for enabling multiple roles of one account of social network to be online simultaneously | |
CN103312800A (en) | Method and device for controlling broadband customer premise equipment (CPE) through instant messaging | |
CN104954333A (en) | Method and system for message transmission | |
CN103414732B (en) | Application integration device and application integration processing method | |
CN104521211B (en) | The methods, devices and systems that a kind of session connection is established | |
CN103546593B (en) | Wireless sensor network node identifier resolution method based on IP Yu non-IP | |
CN106331187A (en) | NAT (Network Address Translation) penetration method, device and system | |
CN107730662A (en) | Gate inhibition's data processing method and device | |
CN104486174B (en) | The network-building method and device of a kind of intelligent terminal | |
JP4833995B2 (en) | Mobile online game system and communication method between mobile game terminals | |
CN105049302B (en) | Household communication system and communication means based on public server | |
CN104581977B (en) | WLAN user management method, apparatus and system | |
CN105049577A (en) | Electronic business card registration and exchange system and registration and exchange method | |
CN104660728B (en) | NAT penetrating methods based on intelligent home control system | |
CN202043130U (en) | Remote control system for power station | |
CN104506405B (en) | The method and device of cross-domain access | |
CN104539752B (en) | Access method and system between multilevel field platform | |
CN107800745A (en) | The method that service declaration and service discovery are carried out based on mDNS | |
CN103516820B (en) | Port mapping method and device based on MAC Address | |
CN105721274A (en) | Method and device for integrating variety of instant messaging |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20190111 |