CN106534198B - A kind of intelligent domestic gateway and control terminal are in local area network many-many communication method - Google Patents

A kind of intelligent domestic gateway and control terminal are in local area network many-many communication method Download PDF

Info

Publication number
CN106534198B
CN106534198B CN201611200148.5A CN201611200148A CN106534198B CN 106534198 B CN106534198 B CN 106534198B CN 201611200148 A CN201611200148 A CN 201611200148A CN 106534198 B CN106534198 B CN 106534198B
Authority
CN
China
Prior art keywords
server
tcp
control terminal
gateway
address
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.)
Active
Application number
CN201611200148.5A
Other languages
Chinese (zh)
Other versions
CN106534198A (en
Inventor
李政沆
于晓亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHENZHEN EISEN VAIL TECHNOLOGY Co Ltd
Original Assignee
SHENZHEN EISEN VAIL TECHNOLOGY Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by SHENZHEN EISEN VAIL TECHNOLOGY Co Ltd filed Critical SHENZHEN EISEN VAIL TECHNOLOGY Co Ltd
Priority to CN201611200148.5A priority Critical patent/CN106534198B/en
Publication of CN106534198A publication Critical patent/CN106534198A/en
Application granted granted Critical
Publication of CN106534198B publication Critical patent/CN106534198B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a kind of intelligent domestic gateways and control terminal in local area network many-many communication method, one or more mobile phone matches connection with wireless router, further include one or more embedded gateway, uses self-defining communication protocol composition cluster between each embedded gateway;One or more smart machine is connect with embedded gateway, as soon as local TCP server is contained therein in an embedded gateway, control terminal need to only log in any embedded gateway can be with the smart device communication under all gateways.Present invention is primarily based on TCP communication (having a small amount of cast communication to assist), swarm algorithm (is deposited in a gateway) using special TCP connection equipment in local area network, the gateway of smart home system, control terminal (mobile phone, computer etc.) is allowed automatically to realize many-many communication in the case where no external network server.

Description

A kind of intelligent domestic gateway and control terminal are in local area network many-many communication method
Technical field
The invention belongs to computer fields, and in particular to a kind of intelligent domestic gateway and control terminal are in the multipair multi-pass of local area network Letter method.
Background technique
Smart home is from wireless parties such as pervious 315, zigbee, the z-wave of 433Mhz wireless mode till now Formula is generally all connected to control terminal (such as hand by embedded gateway (such as zigbee turns ethernet gateway) regardless of which kind of mode Mechanical, electrical brain).By taking the smart machine based on zigbee as an example, multiple smart machines are docked under gateway, control terminal passes through gateway and more A smart device communication, the control terminal of major part system can only allow a control terminal to dock multiple nets by manual switching at present It closes, i.e., it is enabled to accomplish that multiple control terminals correspond to multiple gateways automatically by software, it generally also will be by external network server.
Pervious smart home system can have the shortcomings that being described below:
Many smart home systems the control terminal same time can only by a gateway and gateway under multiple smart machines Communication, control terminal need to can only be taken by smart device communication under manual switching and multiple gateways or control terminal by outer net The automatic smart device communication under multiple gateways of business device
Some smart home systems allow multiple control terminals and multiple gateway communications by the cast communication of TCP/IP automatically, but This mode has the disadvantage in that
(1) cast communication uses UDP mode, and the people for being familiar with UDP communication will be appreciated that this communication mode is logical in WIFI etc. Letter environment has certain packet loss, and in the presence of having frequent TCP communication activity on network, UDP communication is easier packet loss;
(2) in order to reduce the power consumptions of the mobile devices such as mobile phone, plate, some equipment do not open multicast in system bottom, Some equipment can close WIFI in screen locking.
Summary of the invention
Technical problem to be solved by the invention is to provide a kind of not by external network server, uses TCP simultaneously in local area network The method for cooperating a small amount of cast communication mode to allow gateway and control terminal in local area network many-many communication.
The present invention is achieved through the following technical solutions: a kind of intelligent domestic gateway and control terminal are multipair in local area network More communication systems, one or more mobile phone match connection with wireless router, further include one or more embedded gateway, respectively Cluster is constituted using self-defining communication protocol between embedded gateway;One or more smart machine is connect with embedded gateway, As soon as local TCP server is contained therein in an embedded gateway, control terminal need to only log in any embedded gateway energy and institute There is the smart device communication under gateway.
(1) it is whether effective that physical internet ports are detected when any gateways and starting, are effectively then obtained within a certain period of time by multicast TCP server information on local area network, if receiving server response, the gateway is oneself being set as TCP Client and be connected to clothes Be engaged in device, if time-out can not receive response, the gateway oneself be set as TCP server and particular port monitor client connect;
(2), TCP server records the socket handle of the TCP Client of all connections, TCP visitor with dynamic structure chained list Its lower all smart machine managed of family end independent maintenance, and record the address of service of TCP server;
(3) when control terminal logs in some embedded gateway, gateway tells control terminal TCP server address, control End disconnects current connection, then goes connection TCP server, and TCP server records the control of all connections with dynamic structure chained list Hold socket handle;
(4) control terminal logs in every time network after the network of server and all TCP Clients is obtained from TCP server Location (address ip, mac address of nic (MAC)), control terminal gives these TCP equipment to distribute a friendly name respectively, all these Information is saved in control terminal;
(5) control terminal adds the information of all zigbee smart machines under multiple embedded gateways respectively, includes equipment 64 The position address IEEE, these smart machines that control terminal gives the differentiation of the address IEEE respectively distribute a friendly name, all these Information is saved in control terminal;
(6) by above step, control terminal is known that the address IEEE of smart machine and the embedded net belonging to it The network address of pass, the embedded gateway as TCP server know the network address of all gateways as TCP Client, Embedded gateway knows the address information of all smart machines under it, lays the foundation for communication later;
(7) control terminal controls some zigbee smart machine: TCP server is issued in order, server is directly order It is transmitted to matched embedded gateway, order is transmitted to smart machine again by gateway, and smart machine is former the status information of response Road returns to TCP server, and status information is issued institute using the multiple control terminal socket handles being previously saved by TCP server Some control terminals;
(8) control terminal passively receives the acquisition information of some zigbee smart machine: smart machine issues acquisition information Acquisition information is issued TCP server by embedded gateway thereon, gateway, and TCP server utilizes the multiple control terminals being previously saved Socket handle issues acquisition information all control terminals;
(9) TCP Client that first connects is set as secondary server, primary server and auxiliary clothes by TCP primary server Business device has heartbeat processing from each other, and when primary server finds the response of secondary server Lungs from Non-Heart-Beating, primary server will enable the The TCP Client of two connections is secondary server, and so on;
(10) when assisting TCP server discovery primary server Lungs from Non-Heart-Beating response, secondary server oneself will be set as main clothes Business device, is then said the word with multicast and other TCP Clients is notified to transfer to connect new primary server, new primary server equally handle The TCP Client of first connection is set as secondary server, and so on.
The beneficial effects of the present invention are: present invention is primarily based on TCP communication (having a small amount of cast communication to assist), in local area network Swarm algorithm (is deposited in a gateway) using special TCP connection equipment, allow smart home system gateway, (hand is mechanical, electrical for control terminal Brain etc.) in the case where no external network server automatically realize many-many communication.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is flow chart of the invention.
Specific embodiment
All features disclosed in this specification or disclosed all methods or in the process the step of, in addition to mutually exclusive Feature and/or step other than, can combine in any way.
Any feature disclosed in this specification (including any accessory claim, abstract and attached drawing), except non-specifically chatting It states, can be replaced by other alternative features that are equivalent or have similar purpose.That is, unless specifically stated, each feature is only It is an example in a series of equivalent or similar characteristics.
As shown in Figure 1, more mobile phones match connection with wireless router, customized communication is used between each embedded gateway Agreement constitutes cluster;One or more smart machine is connect with embedded gateway, local TCP server be contained therein one it is embedding Enter in formula gateway, control terminal need to only log in any embedded gateway can be with the smart device communication under all gateways.
Firstly, whether detection physical internet ports are effective when any gateways and starting,
Effectively, then the TCP server information on local area network is obtained by multicast within a certain period of time;
If receiving server response, the gateway is oneself being set as TCP Client and be connected to server;
If time-out can not receive response, the gateway oneself be set as TCP server and particular port monitor client connect;
TCP server records the socket handle of the TCP Client of all connections, TCP Client with dynamic structure chained list Its lower all smart machine managed of independent maintenance, and record the address of service of TCP server;
When control terminal logs in some embedded gateway, gateway tells control terminal, control terminal disconnected TCP server address Current connection is opened, then goes connection TCP server, TCP server records the control terminal of all connections with dynamic structure chained list Socket handle;
Control terminal log in every time network after from TCP server obtain server and all TCP Clients network address (ip Address, mac address of nic (MAC)), control terminal gives these TCP equipment to distribute a friendly name, all these information respectively It is saved in control terminal;
Control terminal adds the information of all zigbee smart machines under multiple embedded gateways respectively, includes equipment 64 The address IEEE, these smart machines that control terminal gives the differentiation of the address IEEE respectively distribute a friendly name, all these letters Breath is saved in control terminal;
By above step, the address IEEE and embedded gateway belonging to it that control terminal is known that smart machine Network address, the embedded gateway as TCP server know the network address of all gateways as TCP Client, insertion Formula gateway knows the address information of all smart machines under it, lays the foundation for communication later;
Control terminal controls some zigbee smart machine: TCP server is issued in order, server directly forwards order To matched embedded gateway, order is transmitted to smart machine again by gateway, and smart machine returns the status information original road of response Back to TCP server, TCP server issues status information using the multiple control terminal socket handles being previously saved all Control terminal;
Control terminal passively receives the acquisition information of some zigbee smart machine: smart machine is issued acquisition information thereon Acquisition information is issued TCP server by embedded gateway, gateway, and TCP server utilizes the multiple control terminals being previously saved Socket handle issues acquisition information all control terminals;
The TCP Client that first connects is set as secondary server, primary server and secondary server by TCP primary server There is heartbeat processing from each other, when primary server finds the response of secondary server Lungs from Non-Heart-Beating, primary server will enable second The TCP Client of connection is secondary server, and so on;
When assisting TCP server discovery primary server Lungs from Non-Heart-Beating response, oneself is set as primary server by secondary server, Then it is said the word with multicast and other TCP Clients is notified to transfer to connect new primary server, new primary server is equally first The TCP Client of a connection is set as secondary server, and so on.
The beneficial effects of the present invention are: present invention is primarily based on TCP communication (having a small amount of cast communication to assist), in local area network Swarm algorithm (is deposited in a gateway) using special TCP connection equipment, allow smart home system gateway, (hand is mechanical, electrical for control terminal Brain etc.) in the case where no external network server automatically realize many-many communication.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any The change or replacement expected without creative work, should be covered by the protection scope of the present invention.Therefore, of the invention Protection scope should be determined by the scope of protection defined in the claims.

Claims (1)

1. a kind of intelligent domestic gateway and control terminal are in local area network many-many communication method, comprising the following steps:
(1) it is whether effective that physical internet ports are detected when any gateways and starting, and local is then effectively obtained by multicast within a certain period of time Online TCP server information, if receiving server response, the gateway oneself being set as TCP Client and be connected to server, If time-out can not receive response, the gateway oneself be set as TCP server and particular port monitor client connect;
(2), TCP server records the socket handle of the TCP Client of all connections, TCP Client with dynamic structure chained list Its lower all smart machine managed of independent maintenance, and record the address of service of TCP server;
(3) when control terminal logs in some embedded gateway, gateway tells control terminal, control terminal disconnected TCP server address Current connection is opened, then goes connection TCP server, TCP server records the control terminal of all connections with dynamic structure chained list Socket handle;
(4) control terminal log in every time network after from TCP server obtain server and all TCP Clients network address (ip Address, mac address of nic (MAC)), control terminal gives these TCP equipment to distribute a friendly name, all these information respectively It is saved in control terminal;
(5) control terminal adds the information of all zigbee smart machines under multiple embedded gateways respectively, includes equipment 64 The address IEEE, these smart machines that control terminal gives the differentiation of the address IEEE respectively distribute a friendly name, all these letters Breath is saved in control terminal;
(6) by above step, the address IEEE and the embedded gateway belonging to it that control terminal is known that smart machine Network address, the embedded gateway as TCP server know the network address of all gateways as TCP Client, insertion Formula gateway knows the address information of all smart machines under it, lays the foundation for communication later;
(7) control terminal controls some zigbee smart machine: TCP server is issued in order, server directly forwards order To matched embedded gateway, order is transmitted to smart machine again by gateway, and smart machine returns the status information original road of response Back to TCP server, TCP server issues status information using the multiple control terminal socket handles being previously saved all Control terminal;
(8) control terminal passively receives the acquisition information of some zigbee smart machine: smart machine is issued acquisition information thereon Acquisition information is issued TCP server by embedded gateway, gateway, and TCP server utilizes the multiple control terminals being previously saved Socket handle issues acquisition information all control terminals;
(9) TCP Client that first connects is set as secondary server, primary server and secondary server by TCP primary server There is heartbeat processing from each other, when primary server finds the response of secondary server Lungs from Non-Heart-Beating, primary server will enable second The TCP Client of connection is secondary server, and so on;
(10) when assisting TCP server discovery primary server Lungs from Non-Heart-Beating response, oneself is set as primary server by secondary server, Then it is said the word with multicast and other TCP Clients is notified to transfer to connect new primary server, new primary server is equally first The TCP Client of a connection is set as secondary server, and so on.
CN201611200148.5A 2016-12-22 2016-12-22 A kind of intelligent domestic gateway and control terminal are in local area network many-many communication method Active CN106534198B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611200148.5A CN106534198B (en) 2016-12-22 2016-12-22 A kind of intelligent domestic gateway and control terminal are in local area network many-many communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611200148.5A CN106534198B (en) 2016-12-22 2016-12-22 A kind of intelligent domestic gateway and control terminal are in local area network many-many communication method

Publications (2)

Publication Number Publication Date
CN106534198A CN106534198A (en) 2017-03-22
CN106534198B true CN106534198B (en) 2019-10-08

Family

ID=58340374

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611200148.5A Active CN106534198B (en) 2016-12-22 2016-12-22 A kind of intelligent domestic gateway and control terminal are in local area network many-many communication method

Country Status (1)

Country Link
CN (1) CN106534198B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106992908A (en) * 2017-03-31 2017-07-28 上海斐讯数据通信技术有限公司 A kind of intelligent household management system and its management method
CN110581843B (en) * 2019-08-21 2020-12-15 浙江大学 Mimic Web gateway multi-application flow directional distribution method
CN110611706B (en) * 2019-09-03 2020-11-03 浙江口碑网络技术有限公司 Method and device for assisting intelligent equipment in network communication
CN110659009B (en) * 2019-09-19 2020-12-25 珠海格力电器股份有限公司 Communication method and system for display panel and multiple mainboards
CN111327668B (en) * 2019-09-25 2022-10-21 杭州海康威视系统技术有限公司 Network management method, device, equipment and storage medium
CN110730116B (en) * 2019-10-21 2021-10-29 杭州鸿雁智能科技有限公司 Operation method of communication equipment in local area network, communication equipment and gateway equipment
CN112787997A (en) * 2020-12-26 2021-05-11 广州保仕盾智能科技有限公司 Method for realizing intranet IP communication based on gateway serving as server side

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104811375A (en) * 2015-05-08 2015-07-29 三星电子(中国)研发中心 Smart home gateway and networking method thereof
CN104993990A (en) * 2015-07-12 2015-10-21 佛山博朗德技术有限公司 Multi-gateway technology of intelligent housing system
CN104991462A (en) * 2015-07-12 2015-10-21 佛山博朗德技术有限公司 Intelligent household system many-to-many control system structure arrangement and realization method
CN205003465U (en) * 2015-08-13 2016-01-27 田广礼 Possesses smart home systems who cascades gateway
CN105867314A (en) * 2015-01-20 2016-08-17 株式会社日立制作所 Remote monitoring system and communication method thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105867314A (en) * 2015-01-20 2016-08-17 株式会社日立制作所 Remote monitoring system and communication method thereof
CN104811375A (en) * 2015-05-08 2015-07-29 三星电子(中国)研发中心 Smart home gateway and networking method thereof
CN104993990A (en) * 2015-07-12 2015-10-21 佛山博朗德技术有限公司 Multi-gateway technology of intelligent housing system
CN104991462A (en) * 2015-07-12 2015-10-21 佛山博朗德技术有限公司 Intelligent household system many-to-many control system structure arrangement and realization method
CN205003465U (en) * 2015-08-13 2016-01-27 田广礼 Possesses smart home systems who cascades gateway

Also Published As

Publication number Publication date
CN106534198A (en) 2017-03-22

Similar Documents

Publication Publication Date Title
CN106534198B (en) A kind of intelligent domestic gateway and control terminal are in local area network many-many communication method
CN104656607B (en) One kind is based on stage multimachine without line coordination system
CN202364251U (en) Intelligent home remote control system based on Internet of Things
CN105337857A (en) Multi-path transmission method based on software-defined network
CN106789468A (en) A kind of appliances equipment control method and system based on intelligent terminal
CN103166814A (en) Smart home remote control system based on Internet of things
CN104518973B (en) A kind of reliable multicast transmission method of the data based on SDN environment
CN204652411U (en) A kind of coupling networking based on smart machine
CN106713084A (en) multi-gateway system of Internet of Things
CA2530340A1 (en) Server for routing connection to client machine
CN105163364A (en) Intelligent device WiFi connection system and intelligent device WiFi connection method based on intelligent gateway
CN103152183A (en) Electric modem switching device and method for mutual switching of electric signals and network signals
CN108683548A (en) A kind of convenient method and system into configuration of routers interface
CN106533934B (en) A kind of borde gateway suitable for interconnecting manufacture network entirely
CN106209524B (en) Communication means and its system in a kind of local area network of embedded device
CN206149319U (en) Internet video shared device
CN103414640B (en) A kind of method of the capacity of extended wireless controller equiment mac address forwarding table
CN109413120A (en) A kind of communication means and device, electronic equipment and server
CN105471612A (en) Household gateway remote control method and device and household gateway equipment
CN104301197B (en) It is a kind of to realize the method and system mutually found between user multiple terminals
CN103124227B (en) Forward spacer assembly and the Link State detection method of isolating gateway connected applications
CN106656813B (en) Data transmission method
CN105306259B (en) A kind of processing method and electronic equipment
CN105049302B (en) Household communication system and communication means based on public server
CN104104566A (en) Intelligent home automatic access system implemented on basis of multicast and unicast dual protocols and access method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant