CN113746710B - Relay gateway control system and method based on intelligent central control system - Google Patents

Relay gateway control system and method based on intelligent central control system Download PDF

Info

Publication number
CN113746710B
CN113746710B CN202111006560.4A CN202111006560A CN113746710B CN 113746710 B CN113746710 B CN 113746710B CN 202111006560 A CN202111006560 A CN 202111006560A CN 113746710 B CN113746710 B CN 113746710B
Authority
CN
China
Prior art keywords
module
scanning
information
data
equipment
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
CN202111006560.4A
Other languages
Chinese (zh)
Other versions
CN113746710A (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.)
Guangdong Quancheng Information Technology Co ltd
Original Assignee
Guangdong Quancheng Information 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 Guangdong Quancheng Information Technology Co ltd filed Critical Guangdong Quancheng Information Technology Co ltd
Priority to CN202111006560.4A priority Critical patent/CN113746710B/en
Publication of CN113746710A publication Critical patent/CN113746710A/en
Application granted granted Critical
Publication of CN113746710B publication Critical patent/CN113746710B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2816Controlling appliance services of a home automation network by calling their functionalities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/283Processing of data at an internetworking point of a home automation network
    • H04L12/2834Switching of information between an external network and a home network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users
    • 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/165Combined use of TCP and UDP protocols; selection criteria therefor
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a relay gateway control system based on an intelligent central control system, which comprises a central control host, wherein one side inside the central control host is provided with a communication logic module, a first pushing module, a communication verification module, an automatic connection module, a synchronous updating module, an addition management module, an encryption module, a second pushing module and a central processing module.

Description

Relay gateway control system and method based on intelligent central control system
Technical Field
The invention relates to the technical field of intelligent home control, in particular to a relay gateway control system and method based on an intelligent central control system.
Background
In the intelligent home system, the device under the relay gateway and the relay gateway communicate through a ZigBee protocol or a Bluetooth protocol, and then the relay gateway communicates with the cloud, so that the functions of controlling the relay gateway and the device under the relay gateway, linking scenes and the like are realized through the APP.
The common intelligent home system relies on the management of the cloud platform to the equipment, if the uplink network link is disconnected, the equipment control and scene linkage functions are or will be disabled, so that the running stability and reliability of the equipment are greatly reduced, and the use under extreme conditions is not facilitated.
Disclosure of Invention
The invention aims to provide a relay gateway control system and a relay gateway control method based on an intelligent central control system, so as to solve the problems in the background technology.
In order to solve the technical problems, the invention provides the following technical scheme: the relay gateway control system based on the intelligent central control system comprises a central control host, wherein a communication logic module, a first pushing module, a communication verification module, an automatic connection module, a synchronous updating module, an addition management module, an encryption module, a second pushing module and a central processing module are arranged on one side inside the central control host.
Preferably, the communication verification module comprises an application module, a verification module, a matching module and a confirmation module, and the application module, the verification module, the matching module and the confirmation module are all installed on the communication verification module.
Preferably, the automatic connection module comprises a detection module, a timing sending module and an information backup module, and the detection module, the timing sending module and the information backup module are all installed on the automatic connection module.
Preferably, the synchronous updating module comprises an automatic checking module, an updating judging module, a first updating module and a state refreshing module, and the automatic checking module, the updating judging module, the first updating module and the state refreshing module are all installed on the synchronous updating module.
Preferably, the adding management module comprises a downloading module, a second updating module, a recording and storing module, a refuff refreshing module, an instruction receiving module, a TCP connection module and an information reporting module, and the downloading module, the second updating module, the recording and storing module, the refuff refreshing module, the instruction receiving module, the TCP connection module and the information reporting module are all arranged on the adding management module.
A relay gateway control method based on intelligent central control system includes the steps of firstly, automatically scanning; pushing and displaying; step three, communication verification; step four, data processing; step five, adding management; step six, encrypting data; step seven, data pushing; step eight, scanning equipment; step nine, automatic reconnection; step ten, synchronously updating; step eleven, the process daemon;
in the first step, the central control host creates a UDP socket by using a local server UDP in the communication logic module, and simultaneously automatically scans by using local area network UDP multicast or broadcast, in the process of automatic scanning, firstly judging whether an instruction for starting automatic discovery is received, if not, continuing to judge, and if so, starting the scanning flow of all Ethernet type sub-devices; then judging whether the equipment is scanned, if not, closing the scanning flow;
in the second step, after the related equipment is scanned in the automatic scanning process in the first step, the scanned equipment is pushed to the client APP by using the first pushing module for display;
in the third step, after the device information in the second step is pushed to the APP for display, the scanned device is verified by using the communication verification module, firstly, the application module sends a verification application, then the verification module verifies the device to see whether the device is in the same local area network, then the matching module is used for matching, after the matching is completed, the confirmation module is used for confirming, after the confirmation, the local TCP server is used for creating a TCP socket, then the local network card is monitored, a message is received and whether a new connection exists is judged, if not, the monitoring is continued, if not, a client information structure is added and the TCP connection is managed;
in the fourth step, after the information in the third step is confirmed, the information is transmitted to the central processing module, and the central processing module processes the information and then enters the next step;
in the fifth step, after the information is processed by the central processing module in the fourth step, the information is transferred to the addition management module, whether a specific device or an automatically found scanning instruction is received is firstly judged, after the instruction is received by the instruction receiving module, a scanning flow of the specific or all devices is started, scanned device information is reported after the scanned device is scanned, then whether an instruction for registering a certain device is issued is judged, if the instruction is not issued, the judgment of whether the scanning instruction is received is returned, if the instruction for registering the device is received, whether the instruction is an Ethernet device is judged, if the instruction is an Ethernet device, a TCP connection is established with the device through the TCP connection module, then whether the connection fails or is offline is judged again, if the connection fails or is offline, the connection is directly ended, and if the connection is established successfully, the registration success information is reported and then the connection is ended; if the device is not an Ethernet device, judging whether the corresponding relay device is registered and connected normally, if the device is not registered and connected normally, sending networking information to the relay device, if the device is registered and connected normally, ending networking by using a downloading module if the device is overtime, judging whether a cancel instruction is received in the period of time if the device is overtime, directly ending networking if the device is overtime, judging whether the device is an Ethernet communication type device or not if the device is not, reporting the device registration information by using an information reporting module if the device information is received, completing registration, completing connection addition of the device, when the offline device is judged in the scanning process, restarting the reconnection device, judging whether cloud data is synchronized or not after the scanning process is started or restarted, if the cloud data is not needed, continuing to circularly judge, and if the cloud data is not needed, judging whether the device in the file is an Ethernet communication type device by using a file read coverage type update and a local function setting is synchronously refreshed, and if the device in the file is not required to circularly judge whether the local data is needed to be updated; if the equipment in the file is the Ethernet communication type equipment, equipment information is recorded in the rebuff file by utilizing a record storage module, then, continuously and circularly judging whether cloud data are synchronized, judging whether the rebuff file is empty or not while the cloud data are synchronized, if so, indicating that the equipment is the first time of adding the central control equipment, no relay equipment and ending registration reconnection. If the rebuff file is non-empty, performing device scanning, then judging whether the UDP program scans the device matched with the record in the registry rebuff file, if not, returning to re-device scanning, if so, reconnecting the device, if reconnecting is successful, refreshing data in the rebuff by using a rebuff refreshing module, then continuing device scanning, and if not, directly returning to continuing device scanning;
in the sixth step, after the registration of the added device in the fifth step is completed, the information of the added device is transmitted to the encryption module for encryption;
in the seventh step, after the information is encrypted in the sixth step, the information is pushed to the client APP by using the second pushing module for display;
in the eighth step, when the device needs to be continuously scanned in the running process, the scanning flow is perfect, not only is the scanning added to the device, but also the state scanning mechanism of the added device is realized, firstly, whether the scanning is started or whether the offline occurs is judged, if the offline occurs is not, a period of time is delayed, then the judgment is carried out again, if the offline occurs, the scanning is carried out by using the specific UDP information, then, the blocking type data receiving is carried out, whether the blocking type data is blocked or abnormal is judged in the process, and if the blocking type data is blocked or abnormal, the new offline occurs or the new scanning is started is judged again after the time delay; if the blocking time-out or abnormality does not exist, the system receives the network message and stores the data such as the source address of the opposite terminal. Then judging the received message, judging whether the equipment MAC appears for the first time in the current counting cycle scanning, if not, returning to continue to block the received data after neglecting; if yes, judging whether the equipment is registered, if yes, judging whether the equipment is offline equipment, if yes, reconnecting the equipment, if not, judging whether reconnecting the equipment is restarted, if yes, reconnecting the equipment, otherwise, returning to judge whether offline occurrence or scanning starting occurs again; if the equipment registration is not selected, returning to re-block the received data, and carrying out next cycle judgment;
in the step nine, when the offline device is found to be reconnected by using the automatic connection module in the process of scanning the device in the step eight, firstly, the information backup module is used for recording the information of the offline device, then the socket is closed, reconnection is performed, and whether the state of the device is disconnected or not is judged by using the mode that the timing transmission module periodically transmits the heartbeat packet and the mode that the detection module detects the state of the socket, the heartbeat packet is repeatedly transmitted periodically without disconnection, if the abnormal disconnection of the connection occurs, new connection is established, then the next round of device state detection is performed, meanwhile, the sub-device off-line later-period upper device reports the state of the sub-device to a central control host, and the central control host transmits the state to the APP display device through the MQTT server to be offline;
in the step ten, when the program starts to run, checking whether a local specific path exists and can be accessed, if not, creating the local specific path of the path and giving a read-write permission, then detecting and judging whether cloud data are synchronized by using an updating judging module, if not, delaying and continuing to detect, if not, downloading a data table into a designated file, if not, detecting whether the downloading is successful by using an automatic checking module, if not, returning to continue to circularly judge whether the synchronization is successful, if the instruction is successful, setting a file updating mark, notifying a related thread, then reading file data, updating the file data into the operation by using a first updating module, refreshing the setting by using a state refreshing module, returning circularly to detect whether the cloud data are synchronized, and then storing the cloud data at a local end, and realizing synchronous updating of the local data and the cloud data by using a synchronous updating module;
in the above step eleven, after the device is running, the program enters the boot daemon, then the state of the background process of the system is obtained, then whether the service program is normal is judged, if not, the service program is restarted. If the service program runs normally or the service program is restarted, the service program is delayed and then returned to acquire the background process state of the system, and then judgment is carried out, so that the cycle is realized.
Preferably, in the sixth step, the information of the device includes a name, an IP address, a number, and the like of the device.
Compared with the prior art, the invention has the following beneficial effects: the invention relies on the ecological novel central control system of the Internet of things technology, the central control system is directly connected with a local relay gateway, the control and configuration of the APP relay gateway and the sub-equipment under the relay gateway are indirectly realized through the communication between the central control system and the cloud, the central control system manages the relay gateway and the sub-equipment under the relay gateway in the local network, whether the uplink network is on or off or not, the equipment under the central control system can operate according to a set program, thereby solving the problem that the intelligent home system cannot work normally under the condition of abnormal network, and greatly improving the reliability and stability of the operation of the equipment.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate the invention and together with the embodiments of the invention, serve to explain the invention. In the drawings:
FIG. 1 is a front cross-sectional view of the overall structure of the present invention;
FIG. 2 is a system flow diagram of the present invention;
FIG. 3 is a flow chart of the method of the present invention;
FIG. 4 is a functional block diagram of the local server UDP of the present invention;
FIG. 5 is a functional block diagram of a local TCP server of the present invention;
FIG. 6 is a functional block diagram of an auto-scan of the present invention;
FIG. 7 is a functional block diagram of a device scan of the present invention;
FIG. 8 is a functional block diagram of device registration of the present invention;
FIG. 9 is a functional block diagram of a registration reconnection of the present invention;
FIG. 10 is a schematic block diagram of an offline reconnection of the present invention;
FIG. 11 is a schematic block diagram of cloud synchronization according to the present invention;
FIG. 12 is a functional block diagram of a process daemon of the present invention;
in the figure: 1. a central control host; 2. a communication logic module; 3. a first pushing module; 4. a communication verification module; 5. an automatic connection module; 6. a synchronous updating module; 7. adding a management module; 8. an encryption module; 9. a second pushing module; 10. a central processing module; 401. an application module; 402. a checking module; 403. a matching module; 404. a confirmation module; 501. a detection module; 502. a timing transmission module; 503. an information backup module; 601. an automatic inspection module; 602. updating the judging module; 603. a first update module; 604. a state refreshing module; 701. downloading a module; 702. a second update module; 703. a record storage module; 704. a refff refresh module; 705. an instruction accepting module; 706. a TCP connection module; 707. and the information reporting module.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, the present invention provides a technical solution: a relay gateway control system based on an intelligent central control system comprises a central control host 1, wherein a communication logic module 2, a first pushing module 3, a communication verification module 4, an automatic connection module 5, a synchronous update module 6, an addition management module 7, an encryption module 8, a second pushing module 9 and a central processing module 10 are arranged on one side inside the central control host 1, the communication verification module 4 comprises an application module 401, a detection module 402, a matching module 403 and a confirmation module 404, the application module 401, the detection module 402, the matching module 403 and the confirmation module 404 are all arranged on the communication verification module 4, the automatic connection module 5 comprises a detection module 501, a timing transmission module 502 and an information backup module 503, the detection module 501, the timing transmission module 502 and the information backup module 503 are all arranged on the automatic connection module 5, the synchronous update module 6 comprises an automatic check module 601, an update judgment module 602, a first update module 603 and a state refreshing module 604, the automatic check module 601, the update judgment module 602, the first update module and the state refreshing module 604 are all arranged on the synchronous update module 6, the addition management module 7 comprises a downloading module 702, a second update module 502, a receiving module 702, a storage module 706, a TCP (transmission control protocol) and a storage module 706, a storage module 706 and a storage module 707 are all arranged on the information backup module 503, and a storage module 707 is connected to the TCP module is arranged on the information storage module 706.
Referring to fig. 2-12, the present invention provides a technical solution: a relay gateway control method based on intelligent central control system includes the steps of firstly, automatically scanning; pushing and displaying; step three, communication verification; step four, data processing; step five, adding management; step six, encrypting data; step seven, data pushing; step eight, scanning equipment; step nine, automatic reconnection; step ten, synchronously updating; step eleven, the process daemon;
in the first step, the central control host 1 uses the local server UDP in the communication logic module 2 to create a UDP socket, and uses the local area network UDP multicast or broadcast to perform automatic scanning, during the automatic scanning, it is first determined whether an instruction for starting automatic discovery is received, if not, the determination is continued, and if so, the scanning flow of all ethernet type sub-devices is started; then judging whether the equipment is scanned, if not, closing the scanning flow;
in the second step, after the related device is scanned in the automatic scanning process in the first step, the scanned device is pushed to the client APP by the first pushing module 3 for display;
in the third step, when the device information in the second step is pushed to APP for display, the communication verification module 4 is used to verify the scanned device, the application module 401 sends a verification application first, then verifies the device through the verification module 402 to see if the device is in the same lan, then uses the matching module 403 to perform matching, uses the verification module 404 to perform verification after the matching is completed, uses the local TCP server to create a TCP socket after the verification, then monitors the local network card, receives a message and judges if there is a new connection, if not, returns to continue monitoring, if there is a received message, adds a client information structure and manages TCP connection;
in the fourth step, after the information in the third step is confirmed, the information is transferred to the central processing module 10, and the central processing module 10 proceeds to the next step after processing;
in the fifth step, after the information is processed by the central processing module 10 in the fourth step, the information is transferred to the addition management module 7, it is firstly determined whether a specific device or an automatically discovered scanning instruction is received, after the instruction is received by the instruction receiving module 705, a scanning flow of the specific or all devices is started, scanned device information is reported after the scanned device is scanned, then it is determined whether an instruction for registering a certain device is issued, if no instruction is issued, the determination is returned to determine whether the scanning instruction is received, if the instruction for registering the device is received, it is determined whether the device is an ethernet device, if the device is an ethernet device, a TCP connection is established with the device through the TCP connection module 706, then it is determined whether the connection fails or is offline again, if the connection fails or is completed directly, if the connection is established successfully, the registration success information is reported and then the connection is completed; if the device is not an Ethernet device, judging whether the corresponding relay device is registered and connected normally, if the device is not registered and connected normally, then sending networking information to the relay device, if the device is registered and connected normally, ending networking if the device is sent overtime, judging whether a cancel instruction is received in the period of time if the device is not overtime, directly ending networking if the device is overtime, judging whether the device is an Ethernet communication type device or not if the device is not received in the overtime time, reporting the device registration information by using the information reporting module 707 if the device is received, completing registration, completing connection addition of the device, when the offline device is judged in the scanning process, restarting the reconnection device, judging whether cloud data is synchronized or not after a program is started or restarted, if the cloud data is not needed, continuing to circularly judge by using the downloading module 701, and then the second updating module 702 judges whether the device in the file is an Ethernet communication type device by using a file which is read for covering update and a local function setting is refreshed synchronously, and if the device in the file is not required to circularly judge whether the local data is needed to be updated continuously; if the device in the file is the device of the ethernet communication type, the record storage module 703 is used to record the device information in the rebuff file, then the circulation is continued to judge whether the cloud data is synchronized, and when the cloud data is synchronized, whether the rebuff file is empty is judged, if yes, the first addition of the central control device is indicated, no relay device is provided, and then the registration reconnection is ended. If the rebuff file is non-empty, performing device scanning, then judging whether the UDP program scans the device matched with the record in the registry rebuff file, if not, returning to re-device scanning, if so, reconnecting the device, if reconnecting is successful, refreshing data in the rebuff by using a rebuff refreshing module 704, then continuing device scanning, and if not, directly returning to continuing device scanning;
in the sixth step, after the registration of the added device in the fifth step is completed, the information of the added device is transferred to the encryption module 8 for encryption, and the information of the device includes the name, IP address, number, etc. of the device;
in the seventh step, after the information is encrypted in the sixth step, the information is pushed to the client APP by the second pushing module 9 for display;
in the eighth step, when the device needs to be continuously scanned in the running process, the scanning flow is perfect, not only is the scanning added to the device, but also the state scanning mechanism of the added device is realized, firstly, whether the scanning is started or whether the offline occurs is judged, if the offline occurs is not, a period of time is delayed, then the judgment is carried out again, if the offline occurs, the scanning is carried out by using the specific UDP information, then, the blocking type data receiving is carried out, whether the blocking type data is blocked or abnormal is judged in the process, and if the blocking type data is blocked or abnormal, the new offline occurs or the new scanning is started is judged again after the time delay; if the blocking time-out or abnormality does not exist, the system receives the network message and stores the data such as the source address of the opposite terminal. Then judging the received message, judging whether the equipment MAC appears for the first time in the current counting cycle scanning, if not, returning to continue to block the received data after neglecting; if yes, judging whether the equipment is registered, if yes, judging whether the equipment is offline equipment, if yes, reconnecting the equipment, if not, judging whether reconnecting the equipment is restarted, if yes, reconnecting the equipment, otherwise, returning to judge whether offline occurrence or scanning starting occurs again; if the equipment registration is not selected, returning to re-block the received data, and carrying out next cycle judgment;
in the step nine, when the offline device is found in the process of scanning the device in the step eight, the automatic connection module 5 is utilized to perform reconnection operation, the information backup module 503 is utilized to record the information of the offline device, then the socket is closed, reconnection is performed, the mode that the timing sending module 502 periodically sends the heartbeat packet and the mode that the detecting module 501 detects the state of the socket are utilized to judge whether the state of the device is disconnected, the heartbeat packet is repeatedly sent periodically without disconnection, if the abnormal disconnection of the connection occurs, a new connection is established, then the next round of device state detection is performed, meanwhile, the sub-device off-line later-stage upper device reports the state of the sub-device to the central control host 1, and the central control host 1 sends the state to the APP display device through the MQTT server to offline;
in the step ten, when the program starts to run, checking whether a local specific path exists and can be accessed, if not, creating the local specific path of the path and giving a read-write permission, then detecting and judging whether cloud data are synchronized by using the update judging module 602, if not, continuing to detect after time delay, if not, downloading the data table into a designated file, then detecting whether the downloading is successful by using the automatic checking module 601, if not, returning to continue to circularly judge whether the synchronization is performed, if the instruction is successfully issued, setting a file update mark, notifying a related thread, then reading file data, updating the file data into the operation memory by using the first updating module 603, refreshing the setting by using the state refreshing module 604, returning circularly to detect whether the cloud data are synchronized, then storing the cloud data at a local end, and realizing synchronous updating of the local and cloud data to the device by using the synchronous updating module 6;
in the above step eleven, after the device is running, the program enters the boot daemon, then the state of the background process of the system is obtained, then whether the service program is normal is judged, if not, the service program is restarted. If the service program runs normally or the service program is restarted, the service program is delayed and then returned to acquire the background process state of the system, and then judgment is carried out, so that the cycle is realized.
Based on the above, the intelligent home system has the advantages that the intelligent home system is based on the novel internet of things technology ecology when in use, the central control system is directly connected with the local relay gateway, the APP is indirectly used for controlling and configuring the relay gateway and the sub-equipment under the relay gateway through the communication between the central control system and the cloud, the central control system is used for managing the relay gateway and the sub-equipment under the relay gateway in the local network, no matter whether the uplink network is on or off, the equipment under the central control system can operate according to the set program, so that the problem that the intelligent home system cannot work normally under the condition of abnormal network is solved, and the reliability and stability of the operation of the equipment are greatly improved.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
Finally, it should be noted that: the foregoing description is only a preferred embodiment of the present invention, and the present invention is not limited thereto, but it is to be understood that modifications and equivalents of some of the technical features described in the foregoing embodiments may be made by those skilled in the art, although the present invention has been described in detail with reference to the foregoing embodiments. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (2)

1. The utility model provides a relay gateway control method based on intelligent central control system, relay gateway control system includes central control host computer (1), its characterized in that: a communication logic module (2), a first pushing module (3), a communication verification module (4), an automatic connection module (5), a synchronous updating module (6), an adding management module (7), an encryption module (8), a second pushing module (9) and a central processing module (10) are arranged on one side inside the central control host (1);
the communication verification module (4) comprises an application module (401), a verification module (402), a matching module (403) and a confirmation module (404), and the application module (401), the verification module (402), the matching module (403) and the confirmation module (404) are all arranged on the communication verification module (4);
the automatic connection module (5) comprises a detection module (501), a timing transmission module (502) and an information backup module (503), and the detection module (501), the timing transmission module (502) and the information backup module (503) are all arranged on the automatic connection module (5);
the synchronous updating module (6) comprises an automatic checking module (601), an updating judging module (602), a first updating module (603) and a state refreshing module (604), and the automatic checking module (601), the updating judging module (602), the first updating module (603) and the state refreshing module (604) are all arranged on the synchronous updating module (6);
the adding management module (7) comprises a downloading module (701), a second updating module (702), a recording and storing module (703), a refff refreshing module (704), an instruction receiving module (705), a TCP connecting module (706) and an information reporting module (707), wherein the downloading module (701), the second updating module (702), the recording and storing module (703), the refff refreshing module (704), the instruction receiving module (705), the TCP connecting module (706) and the information reporting module (707) are all arranged on the adding management module (7);
the control method of the relay gateway comprises the steps of firstly, automatically scanning; pushing and displaying; step three, communication verification; step four, data processing; step five, adding management; step six, encrypting data; step seven, data pushing; step eight, scanning equipment; step nine, automatic reconnection; step ten, synchronously updating; step eleven, the process daemon;
in the first step, the central control host (1) uses the local server UDP in the communication logic module (2) to create a UDP socket, and uses local network UDP multicast or broadcast to automatically scan, in the process of automatic scanning, firstly judging whether an instruction for starting automatic discovery is received, if not, continuing to judge, and if so, starting the scanning flow of all Ethernet type sub-devices; then judging whether the equipment is scanned, if not, closing the scanning flow;
in the second step, after the related equipment is scanned in the automatic scanning process in the first step, the scanned equipment is pushed to the client APP by using the first pushing module (3) for display;
in the third step, after the device information in the second step is pushed to APP for display, the scanned device is verified by using the communication verification module (4), firstly, the application module (401) sends a verification application, then the device is verified by using the verification module (402) to see whether the device is in the same local area network, then the matching module (403) is used for matching, after the matching is completed, the confirmation module (404) is used for confirming, after the confirmation, the local TCP server is used for creating a TCP socket, then the local network card is monitored, a message is received, whether new connection exists is judged, if not, the monitoring is continued, if not, a client information structure is added and the TCP connection is managed;
in the fourth step, after the information in the third step is confirmed, the information is transmitted to the central processing module (10), and the central processing module (10) performs processing and then enters the next step;
in the fifth step, after the central processing module (10) processes the information, the information is transferred to the addition management module (7), whether a specific device or an automatically found scanning instruction is received is firstly judged, after the instruction receiving module (705) receives the instruction, a scanning flow of the specific or all devices is started, scanned device information is reported after the scanned device is scanned, then whether an instruction for registering a certain device is issued is judged, if the scanned instruction is not issued, whether the scanned instruction is received is returned, if the instruction for registering the device is received, whether the device is an Ethernet device is judged, if the device is the Ethernet device, a TCP connection is established with the device through the TCP connection module (706), then whether the connection fails or is offline is judged again, if the connection fails or is off-line, if the connection is established successfully, the information for registering success is reported and then the connection is finished; if the device is not an Ethernet device, judging whether the corresponding relay device is registered and connected normally, if the device is not registered and connected normally, sending networking information to the relay device, if the device is registered and connected normally, ending networking if the device is overtime, judging whether a cancel instruction is received in the period of time if the device is overtime, directly ending networking if the device is overtime, judging whether the device is a device which is successful in networking or not if the device is not received in the overtime time, reporting the device registration information by using an information reporting module (707) if the device is not received, completing registration, adding from completing connection of the device, judging whether cloud data is synchronized or not after a scanning process is finished, if the device is judged to be offline, continuing to circularly judge if the cloud data is not needed, downloading a data file by using a downloading module (701), and then judging whether the device in the file is an Ethernet communication type device by using a file which is read and a local function setting is refreshed synchronously, and judging whether the device in the file is a local data communication type or not needed to be continuously circularly updated if the device is not received; if the device in the file is the Ethernet communication type device, the device information is recorded in the rebuff file by using a record storage module (703), then the circulation is continued to judge whether cloud data are synchronized, and whether the rebuff file is empty or not is judged while the cloud data are synchronized, if yes, the fact that the device is the first time of adding the central control device, no relay device is indicated, and then the registration reconnection is ended. If the rebuff file is non-empty, performing device scanning, then judging whether the UDP program scans the device matched with the record in the registry rebuff file, if not, returning to re-device scanning, if so, reconnecting the device, if reconnecting is successful, refreshing data in the rebuff by using a rebuff refreshing module (704), and then continuing device scanning, and if not, directly returning to continuing device scanning;
in the step six, after the registration of the added equipment in the step five is completed, the information of the added equipment is transmitted to an encryption module (8) for encryption;
in the seventh step, after the information is encrypted in the sixth step, the information is pushed to the client APP by using the second pushing module (9) for display;
in the eighth step, when the device needs to be continuously scanned in the running process, the scanning flow is perfect, not only is the scanning added to the device, but also the state scanning mechanism of the added device is realized, firstly, whether the scanning is started or whether the offline occurs is judged, if the offline occurs is not, a period of time is delayed, then the judgment is carried out again, if the offline occurs, the scanning is carried out by using the specific UDP information, then, the blocking type data receiving is carried out, whether the blocking type data is blocked or abnormal is judged in the process, and if the blocking type data is blocked or abnormal, the new offline occurs or the new scanning is started is judged again after the time delay; if the blocking time-out or abnormality does not exist, the system receives the network message and stores the data such as the source address of the opposite terminal. Then judging the received message, judging whether the equipment MAC appears for the first time in the current counting cycle scanning, if not, returning to continue to block the received data after neglecting; if yes, judging whether the equipment is registered, if yes, judging whether the equipment is offline equipment, if yes, reconnecting the equipment, if not, judging whether reconnecting the equipment is restarted, if yes, reconnecting the equipment, otherwise, returning to judge whether offline occurrence or scanning starting occurs again; if the equipment registration is not selected, returning to re-block the received data, and carrying out next cycle judgment;
in the step nine, when the offline device is found in the process of scanning the device in the step eight, the automatic connection module (5) is utilized to perform reconnection operation, firstly, the information backup module (503) is utilized to record the information of the offline device, then the socket is closed, reconnection is performed, the mode that the timing transmission module (502) periodically transmits the heartbeat packet and the mode that the detection module (501) detects the state of the socket are utilized to judge whether the state of the device is disconnected, the heartbeat packet is repeatedly and periodically transmitted without disconnection, if the abnormal disconnection condition occurs, new connection is established, then the next round of device state detection is performed, meanwhile, the sub-device offline later-stage upper device reports the state of the sub-device to the central control host (1), and the central control host (1) transmits the state to the APP display device offline through the MQTT server;
in the step ten, when the program starts to run, checking whether a local specific path exists and can be accessed, if not, creating the local specific path of the path and giving read-write permission, then detecting and judging whether cloud data are synchronized by using an update judging module (602), if not, continuing to detect after time delay, if not, downloading a data table into a designated file, then detecting whether the downloading is successful by using an automatic checking module (601), if not, returning to continue to circularly judge whether the synchronization is successful, if the instruction is issued successfully, setting a file update mark, informing a related thread, then reading file data, updating the file data into the operation by using a first updating module (603), refreshing the setting by using a state refreshing module (604), then returning circularly to detect whether the cloud data are synchronized, and then storing the cloud data in a local end, and realizing synchronous updating of the local and cloud data by using a synchronous updating module (6).
In the above step eleven, after the device is running, the program enters the boot daemon, then the state of the background process of the system is obtained, then whether the service program is normal is judged, if not, the service program is restarted. If the service program runs normally or the service program is restarted, the service program is delayed and then returned to acquire the background process state of the system, and then judgment is carried out, so that the cycle is realized.
2. The method for controlling a relay gateway based on an intelligent central control system according to claim 1, wherein the method comprises the following steps: in the sixth step, the information of the device includes the name, the IP address and the number of the devices.
CN202111006560.4A 2021-08-30 2021-08-30 Relay gateway control system and method based on intelligent central control system Active CN113746710B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111006560.4A CN113746710B (en) 2021-08-30 2021-08-30 Relay gateway control system and method based on intelligent central control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111006560.4A CN113746710B (en) 2021-08-30 2021-08-30 Relay gateway control system and method based on intelligent central control system

Publications (2)

Publication Number Publication Date
CN113746710A CN113746710A (en) 2021-12-03
CN113746710B true CN113746710B (en) 2023-05-26

Family

ID=78733994

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111006560.4A Active CN113746710B (en) 2021-08-30 2021-08-30 Relay gateway control system and method based on intelligent central control system

Country Status (1)

Country Link
CN (1) CN113746710B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338375B (en) * 2021-12-24 2024-03-12 深圳市创维软件有限公司 Device resetting method, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106131199A (en) * 2016-07-15 2016-11-16 深圳市丰巨泰科电子有限公司 A kind of intelligent home control system based on android system and control method
CN109270850A (en) * 2018-12-13 2019-01-25 桂林电子科技大学 A kind of intelligent household management system and method based on Internet of Things
CN110267243A (en) * 2019-04-30 2019-09-20 努比亚技术有限公司 Communication control method, communication equipment and storage medium
CN112637318A (en) * 2020-12-17 2021-04-09 哈尔滨工业大学(威海) Intelligent gateway system and device for storage integrity and control method thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210203397A1 (en) * 2020-02-13 2021-07-01 Intel Corporation Systems and methods for multiple-beam uplink transmission

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106131199A (en) * 2016-07-15 2016-11-16 深圳市丰巨泰科电子有限公司 A kind of intelligent home control system based on android system and control method
CN109270850A (en) * 2018-12-13 2019-01-25 桂林电子科技大学 A kind of intelligent household management system and method based on Internet of Things
CN110267243A (en) * 2019-04-30 2019-09-20 努比亚技术有限公司 Communication control method, communication equipment and storage medium
CN112637318A (en) * 2020-12-17 2021-04-09 哈尔滨工业大学(威海) Intelligent gateway system and device for storage integrity and control method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《基于MQTT的远程实验通信机制研究与实现》;谌建飞;《中国优秀硕士学位论文全文数据库——信息科技辑》;20190615;全文 *

Also Published As

Publication number Publication date
CN113746710A (en) 2021-12-03

Similar Documents

Publication Publication Date Title
CN100438491C (en) Packet transfer apparatus
CN100553213C (en) A kind of method and apparatus of WLAN abnormal quick restoring
CN103414916B (en) Fault diagnosis system and method
CN103249075B (en) Access point (AP) fault detecting and recovering method and device
CN109039518B (en) The ntp server address intelligent management of Android television system
CN109347590B (en) Synchronization method of DoIP entity in vehicle-mounted Ethernet and DoIP entity
US8873429B2 (en) Method and system to dynamically detect and form a master slave network
CN114866365B (en) Arbitration machine election method, device, intelligent equipment and computer readable storage medium
CN104090824B (en) Communication dispatch method, apparatus and system based on Tuxedo middlewares
CN110677282B (en) Hot backup method of distributed system and distributed system
CN113746710B (en) Relay gateway control system and method based on intelligent central control system
CN112512028A (en) Intelligent product replacement system and method based on Bluetooth Mesh network
CN113055225A (en) Method for acquiring network fault analysis data, terminal and server
CN109981404B (en) Ad hoc network structure and diagnosis method thereof
CN101778107B (en) State synchronization processing method and device
CN101841445A (en) User identifying method and device for internet connection sharing
CN107277043A (en) Network admittance control system based on cluster service
CN102014054A (en) Sending method and equipment for keep-alive messages
CN114143904B (en) CPE management method based on 5G fusion network shunt
CN100409645C (en) Broadband cut-in user managing method
KR100933251B1 (en) WLAN service failure and quality management system and method
JP3334032B2 (en) network
CN103595629A (en) Rapid gateway switching method and device for hosts in IRDP (ICMP Router Discovery Protocol) network
US20230162298A1 (en) Method for reconnecting a smart electricity meter and smart electricity meter implementing said method
CN100388694C (en) Loopback testing method

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
GR01 Patent grant
GR01 Patent grant