CN110247844A - A kind of method that intelligent domestic gateway realizes multi-process multi-protocols - Google Patents
A kind of method that intelligent domestic gateway realizes multi-process multi-protocols Download PDFInfo
- Publication number
- CN110247844A CN110247844A CN201910433833.XA CN201910433833A CN110247844A CN 110247844 A CN110247844 A CN 110247844A CN 201910433833 A CN201910433833 A CN 201910433833A CN 110247844 A CN110247844 A CN 110247844A
- Authority
- CN
- China
- Prior art keywords
- client
- server
- unix
- protocols
- intelligent domestic
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/2803—Home automation networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/66—Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/10—Active monitoring, e.g. heartbeat, ping or trace-route
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/0815—Network architectures or network communication protocols for network security for authentication of entities providing single-sign-on or federations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/0876—Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/54—Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
- H04L69/162—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/18—Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/143—Termination or inactivation of sessions, e.g. event-controlled end of session
- H04L67/145—Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Automation & Control Theory (AREA)
- Power Engineering (AREA)
- Health & Medical Sciences (AREA)
- Cardiology (AREA)
- General Health & Medical Sciences (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a kind of method that intelligent domestic gateway realizes multi-process multi-protocols, which includes a UNIX server-side and multiple unix clients, and this method comprises the following steps: step S301: system starting;Step S302: load server-side starts script;Step S303: the server-side of the starting domain UNIX socket;Step S304: load client terminal start-up script listing;Step S304+N: successively start the client of the domain UNIX socket, and connect server, N represents client number;Step S305+N: abnormal restarting, N represent client number.The present invention is the method for realizing multi-process multi-protocols using an intelligent domestic gateway, while the smart machine of different brands being made to reach interconnection cross complaint, is effectively reduced Project in Operation cost, integrated level is higher, greatly increases the stability of whole system.
Description
Technical field
The present invention relates to intelligent domestic gateway technical fields, and in particular to a kind of intelligent domestic gateway realizes that multi-process is assisted more
The method of view.
Background technique
In the extensive use of smart home, intelligent domestic gateway is the core equipment for controlling smart machine, is often being answered
Used time can incorporate the smart machine of different brands, and interconnection cross complaint at this moment must be reached using the gateway of multiple and different brands
Purpose, this mode, which is realized, can substantially increase operation cost, while also reduced the performance of whole system.
Summary of the invention
In view of this, in order to solve the above problem in the prior art, the present invention proposes that a kind of intelligent domestic gateway is realized
The method of multi-process multi-protocols.
The present invention is solved the above problems by following technological means:
A kind of method that intelligent domestic gateway realizes multi-process multi-protocols, the intelligent domestic gateway include a UNIX service
End and multiple unix clients, this method comprises the following steps:
Step S301: system starting;
Step S302: load server-side starts script;
Step S303: the server-side of the starting domain UNIX socket;
Step S304: load client terminal start-up script listing;
Step S304+N: successively start the client of the domain UNIX socket, and connect server, N represents client number;
Step S305+N: abnormal restarting, N represent client number.
Further, the server-side design cycle of the domain UNIX socket is as follows:
Step S101: creation timer thread;
Step S102: creation UNIX communication thread;
Step S103: monitoring client log on request, if there is request message gos to step S104 immediately;
Step S104: judge to request client's code name whether correct, while returning to solicited status to client, if correctly jumped
To step S105, otherwise go to step S103;
Step S105: the record online list of client, then go to step S106;
Step S106: the equipment for waiting client to report subordinate, until finishing the S107 that gos to step;
Step S107: the data of client are monitored, and handle data forwarding;
Step S108: client heartbeat packet is monitored in timing, is recorded online heartbeat packet state, is then jumped to S109;
Step S109: judge whether client is offline, go to step S110 offline;
Step S110: the online list of client is nullified, then go to step S111;
Step S111: connection is exited.
Further, the Client Design process of the domain UNIX socket is as follows:
Step S201: creation timer thread;
Step S202: privately owned communication thread is created;
Step S203: creation UNIX communication thread;
Step S204: request game server;
Step S205: judgement returns to solicited status, returns to the S206 that successfully gos to step, and returns to unsuccessful go to step
S210;
Step S206: reporting the equipment of subordinate to server, and go to step S207 after reporting;
Step S207: the data of server-side are monitored, and handle data forwarding;
Step S208: heartbeat packet is regularly sent to server-side;
Step S209: judge whether server-side is offline, go to step S210 offline;
Step S210: connection is exited.
Compared with prior art, beneficial effects of the present invention include at least:
The present invention is the method for realizing multi-process multi-protocols using an intelligent domestic gateway, while making the intelligence of different brands
Energy equipment reaches interconnection cross complaint, is effectively reduced Project in Operation cost, integrated level is higher, greatly increases the steady of whole system
It is qualitative.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing.
Fig. 1 is the method flow diagram that intelligent domestic gateway of the present invention realizes multi-process multi-protocols;
Fig. 2 is the server-side design flow diagram of the domain UNIX of the present invention socket;
Fig. 3 is the Client Design flow chart of the domain UNIX of the present invention socket.
Specific embodiment
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, below in conjunction with attached drawing and specifically
Embodiment technical solution of the present invention is described in detail.It should be pointed out that described embodiment is only this hair
Bright a part of the embodiment, instead of all the embodiments, based on the embodiments of the present invention, those of ordinary skill in the art are not having
Every other embodiment obtained under the premise of creative work is made, shall fall within the protection scope of the present invention.
Embodiment
Fig. 1 is overall framework figure, and overall framework is the service for describing the domain intelligent domestic gateway start-up loading UNIX socket
The process of the client process of device and the domain UNIX socket, intelligent domestic gateway include a UNIX server-side and multiple UNIX visitor
Family end, the following are the specific steps after system starting.
Step S301: system starting.
Step S302: load server-side starts script.
Step S303: the server-side of the starting domain UNIX socket.
Step S304: load client terminal start-up script listing.
Step S304+N: successively start the client of the domain UNIX socket, and connect server.
Step S305+N: abnormal restarting.
Note: N represents client number.
Specifically, as shown in Fig. 2, the server-side design cycle of the domain UNIX socket is as follows:
Step S101: creation timer thread.
Step S102: creation UNIX communication thread.
Step S103: client log on request is monitored.If there is request message gos to step S104 immediately.
Step S104: judge to request client's code name whether correct, while returning to solicited status to client, if correctly jumped
To step S105, otherwise go to step S103.
Step S105: the record online list of client, then go to step S106.
Step S106: the equipment for waiting client to report subordinate, until finishing the S107 that gos to step.
Step S107: the data of client are monitored, and handle data forwarding.
Step S108: client heartbeat packet is monitored in timing.Online heartbeat packet state is recorded, S109 is then jumped to.
Step S109: judge whether client is offline, go to step S110 offline.
Step S110: the online list of client is nullified, then go to step S111.
Step S111: connection is exited.
Specifically, as shown in figure 3, the Client Design process of the domain UNIX socket is as follows:
Step S201: creation timer thread.
Step S202: privately owned communication thread is created.
Step S203: creation UNIX communication thread.
Step S204: request game server.
Step S205: judgement returns to solicited status, returns to the S206 that successfully gos to step, and returns to unsuccessful go to step
S210。
Step S206: reporting the equipment of subordinate to server, and go to step S207 after reporting.
Step S207: the data of server-side are monitored, and handle data forwarding.
Step S208: heartbeat packet is regularly sent to server-side.
Step S209: judge whether server-side is offline, go to step S210 offline.
Step S210: connection is exited.
Intelligent domestic gateway after the power-up, starts the server-side of the domain a UNIX socket first and creates a UNIX and lead to
The listening thread of letter, this thread mainly with the client communication of the different domains UNIX socket, then load the preset domain UNIX
The client of socket creates a UNIX communication thread when each client terminal start-up, and sends a log on request message
To server-side, whether when server-side receives the log on request message of client, and it is correct to verify client's code name, if incorrect
When, illegal login and compulsory withdrawal process are recorded, when correct, is recorded into the online list of client, while returning to log on request shape
State is to client.This server-side and client enter normal data interaction mode simultaneously, and client reports setting for subordinate at this time
It is standby to server-side (including equipment on-line whether, operating status etc.), client and server-side can normally interconnect cross complaint at this time.Client
It holds timing 30S to send a heartbeat packet and keeps connection status to server-side.If system occurs abnormal, client is exited by force
And the process of server-side, and reload starting.
The present invention is the method for realizing multi-process multi-protocols using an intelligent domestic gateway, while making the intelligence of different brands
Energy equipment reaches interconnection cross complaint, is effectively reduced Project in Operation cost, integrated level is higher, greatly increases the steady of whole system
It is qualitative.
The embodiments described above only express several embodiments of the present invention, and the description thereof is more specific and detailed, but simultaneously
Limitations on the scope of the patent of the present invention therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill 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.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.
Claims (3)
1. a kind of method that intelligent domestic gateway realizes multi-process multi-protocols, which includes a UNIX server-side
With multiple unix clients, which is characterized in that this method comprises the following steps:
Step S301: system starting;
Step S302: load server-side starts script;
Step S303: the server-side of the starting domain UNIX socket;
Step S304: load client terminal start-up script listing;
Step S304+N: successively start the client of the domain UNIX socket, and connect server, N represents client number;
Step S305+N: abnormal restarting, N represent client number.
2. the method that intelligent domestic gateway according to claim 1 realizes multi-process multi-protocols, which is characterized in that the domain UNIX
The server-side design cycle of socket is as follows:
Step S101: creation timer thread;
Step S102: creation UNIX communication thread;
Step S103: monitoring client log on request, if there is request message gos to step S104 immediately;
Whether step S104: judging to request client's code name correct, while returning to solicited status to client, if correctly jumping to step
Rapid S105, otherwise go to step S103;
Step S105: the record online list of client, then go to step S106;
Step S106: the equipment for waiting client to report subordinate, until finishing the S107 that gos to step;
Step S107: the data of client are monitored, and handle data forwarding;
Step S108: client heartbeat packet is monitored in timing, is recorded online heartbeat packet state, is then jumped to S109;
Step S109: judge whether client is offline, go to step S110 offline;
Step S110: the online list of client is nullified, then go to step S111;
Step S111: connection is exited.
3. the method that intelligent domestic gateway according to claim 1 realizes multi-process multi-protocols, which is characterized in that the domain UNIX
The Client Design process of socket is as follows:
Step S201: creation timer thread;
Step S202: privately owned communication thread is created;
Step S203: creation UNIX communication thread;
Step S204: request game server;
Step S205: judgement returns to solicited status, returns to the S206 that successfully gos to step, and returns to unsuccessful go to step
S210;
Step S206: reporting the equipment of subordinate to server, and go to step S207 after reporting;
Step S207: the data of server-side are monitored, and handle data forwarding;
Step S208: heartbeat packet is regularly sent to server-side;
Step S209: judge whether server-side is offline, go to step S210 offline;
Step S210: connection is exited.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910433833.XA CN110247844A (en) | 2019-05-23 | 2019-05-23 | A kind of method that intelligent domestic gateway realizes multi-process multi-protocols |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910433833.XA CN110247844A (en) | 2019-05-23 | 2019-05-23 | A kind of method that intelligent domestic gateway realizes multi-process multi-protocols |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110247844A true CN110247844A (en) | 2019-09-17 |
Family
ID=67884924
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910433833.XA Pending CN110247844A (en) | 2019-05-23 | 2019-05-23 | A kind of method that intelligent domestic gateway realizes multi-process multi-protocols |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110247844A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6839732B1 (en) * | 1999-12-22 | 2005-01-04 | International Business Machines Corporation | Efficient use of domain socket pairs in communication for tightly coupled transactions |
EP1499086A2 (en) * | 2003-07-18 | 2005-01-19 | Lg Electronics Inc. | Internet service synchronization method for mobile communication terminal |
CN104252136A (en) * | 2014-10-10 | 2014-12-31 | 中国联合网络通信集团有限公司 | Intelligent home control method and system |
CN106254179A (en) * | 2016-08-05 | 2016-12-21 | 深圳先进技术研究院 | A kind of heartbeat packet asynchronous controlling method and device |
CN107239353A (en) * | 2017-06-02 | 2017-10-10 | 浪潮金融信息技术有限公司 | Inter-process communication methods and system |
-
2019
- 2019-05-23 CN CN201910433833.XA patent/CN110247844A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6839732B1 (en) * | 1999-12-22 | 2005-01-04 | International Business Machines Corporation | Efficient use of domain socket pairs in communication for tightly coupled transactions |
EP1499086A2 (en) * | 2003-07-18 | 2005-01-19 | Lg Electronics Inc. | Internet service synchronization method for mobile communication terminal |
CN104252136A (en) * | 2014-10-10 | 2014-12-31 | 中国联合网络通信集团有限公司 | Intelligent home control method and system |
CN106254179A (en) * | 2016-08-05 | 2016-12-21 | 深圳先进技术研究院 | A kind of heartbeat packet asynchronous controlling method and device |
CN107239353A (en) * | 2017-06-02 | 2017-10-10 | 浪潮金融信息技术有限公司 | Inter-process communication methods and system |
Non-Patent Citations (3)
Title |
---|
季峰: "基于socket的物联网网关网络通信编程与实现", 《信息通信》 * |
杨永霞: "基于WINSOCKET技术的传真管理系统的设计", 《中国硕士学位论文全文数据库》 * |
秦攀科: "《Linux C程序设计基础》", 30 June 2011 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105677477B (en) | Method and device for optimizing application program resources and electronic equipment | |
CN108429629A (en) | Equipment fault restoration methods and device | |
CN105120005B (en) | A kind of hot update method of game server, server and system | |
CN101150541A (en) | A login method in instant communication tool | |
CN103516708B (en) | A kind of apparatus control method based on extension XMPP and system | |
KR20130108613A (en) | Method and device for interprocess communication and computer storage medium | |
US10037253B2 (en) | Fault handling methods in a home service system, and associated household appliances and servers | |
CN107508916B (en) | Server link management method for intelligent robot | |
CN108243222A (en) | Server network architecture method and device | |
CN104038390A (en) | Linux server cluster unified peripheral event monitoring method based on netlink | |
CN111651320A (en) | High-concurrency connection method and system | |
CN111224828A (en) | Network management method of intelligent CPE (customer premise equipment) | |
CN113783961A (en) | Remote terminal management method and device, computer equipment and storage medium | |
CN107333252B (en) | Communication exception handling method and device and smart card terminal | |
CN106330513A (en) | Processing method and apparatus for tr069 protocol information | |
CN106059787A (en) | State obtaining method and device of miniature machine servers | |
CN110247844A (en) | A kind of method that intelligent domestic gateway realizes multi-process multi-protocols | |
CN103001822A (en) | Network anomaly handling method and device | |
CN110166322B (en) | Detection method and related device for metering automation terminal | |
CN104378230A (en) | System and method for improving stability of Telnet server | |
CN114826981B (en) | System and method for realizing application resident in cloud mobile phone | |
CN113595824B (en) | Method for testing distribution network reliability of Wi-Fi Internet of things equipment and readable storage medium | |
CN115410580A (en) | Voice recognition method, device, equipment and medium for command scheduling system | |
CN107526670A (en) | Service automatic monitoring method, electronic equipment, computer-readable storage medium | |
CN112463494A (en) | Large-batch node AC (alternating current) cycle test method based on intelligent PDU (protocol data Unit) |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190917 |