CN114745400B - Dual-gateway multichannel Internet of things communication method - Google Patents
Dual-gateway multichannel Internet of things communication method Download PDFInfo
- Publication number
- CN114745400B CN114745400B CN202210241300.3A CN202210241300A CN114745400B CN 114745400 B CN114745400 B CN 114745400B CN 202210241300 A CN202210241300 A CN 202210241300A CN 114745400 B CN114745400 B CN 114745400B
- Authority
- CN
- China
- Prior art keywords
- gateway
- polling
- data
- cloud platform
- standby
- 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
Links
- 238000004891 communication Methods 0.000 title claims abstract description 124
- 238000000034 method Methods 0.000 title claims abstract description 27
- 238000004458 analytical method Methods 0.000 claims abstract description 9
- 230000009977 dual effect Effects 0.000 claims description 10
- 230000007246 mechanism Effects 0.000 claims description 6
- 230000003111 delayed effect Effects 0.000 claims description 3
- 230000005540 biological transmission Effects 0.000 description 10
- 230000008569 process Effects 0.000 description 3
- 230000005856 abnormality Effects 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000013480 data collection Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Classifications
-
- 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/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
-
- 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/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- 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/141—Setup of application sessions
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a double-gateway multichannel internet of things communication method, which comprises the following steps: s1, the cloud platform determines a working mode according to a working instruction and sends a polling instruction to equipment; s2, after receiving the polling command, the equipment acquires real-time data and generates a data packet, and the equipment sends the data packet to the two gateways through the data bus; s3, after the two gateways acquire the data packet, the data packet is processed into polling data according to the corresponding template and the analysis flow, and the polling data is sent to the cloud platform; s4, in the active/standby mode, the cloud platform acquires polling data sent by the active gateway and shields the polling data sent by the standby gateway; in the dual-master mode, the cloud platform acquires polling data of a gateway which is in priority communication in the two gateways. The communication method can switch the two working modes of the main mode and the standby mode according to the external instruction, can improve the timeliness and the reliability of communication between the equipment and the cloud platform, and greatly reduces the single-channel packet loss problem and the loss caused by single-channel faults.
Description
Technical Field
The invention relates to the technical field of communication, in particular to a double-gateway multichannel Internet of things communication method.
Background
Along with the continuous development of technology, the use of internet of things equipment in life of people is more and more. The existing internet of things equipment is generally connected with the cloud platform through a single gateway and other communication tools, so that data communication between the internet of things equipment end and the cloud platform end is achieved, but in the communication mode, once the gateway is damaged or communication abnormality is caused due to other reasons, the data communication between the internet of things equipment and the cloud platform cannot be completed. In the prior art, a method for simultaneously carrying out communication connection on the internet of things equipment and the cloud platform by utilizing multiple gateways exists, but in the communication mode, when the internet of things equipment and the cloud platform carry out data communication, the condition of data disorder is easy to occur, and timeliness and reliability of data between the internet of things equipment and the cloud platform are easy to influence.
Disclosure of Invention
The invention aims to solve the technical problems that: in order to solve the problem of low communication accuracy and reliability of Internet of things equipment and a cloud platform in the prior art, the invention provides a double-gateway multichannel Internet of things communication method for solving the problem.
The technical scheme adopted for solving the technical problems is as follows: the communication method of the Internet of things with the double gateways and multiple channels is characterized by comprising the following steps of:
s1, a cloud platform determines a working mode according to a working instruction, wherein the working mode comprises a main mode and a standby mode and a double main mode;
if the working mode is the main and standby mode, the cloud platform sends a polling instruction to a main gateway in the two gateways through a communication channel and records the sending time as acquisition time T by using the main gateway Z After receiving the polling command, the main gateway sends the polling command to the equipment through the data bus;
if the working mode is a double-master mode, the cloud platform simultaneously sends polling instructions to two gateways through a communication channel, and the two gateways send polling instructions to the equipment through a data bus after receiving the polling instructions;
s2, after receiving the polling command, the equipment acquires real-time data and generates a data packet, and the equipment sends the data packet to the two gateways through the data bus;
s3, after the two gateways acquire the data packet, the data packet is processed into polling data according to the corresponding template and the analysis flow, and the polling data is sent to the cloud platform through the communication channel;
s4, in a main-standby mode, the cloud platform acquires polling data sent by a main gateway in the two gateways and shields the polling data sent by a standby gateway in the two gateways;
under a double-master mode, the cloud platform acquires polling data of a gateway which is preferentially communicated in the two gateways;
s5, in the active/standby mode, the cloud platform judges whether polling data of the primary gateway are received within a preset time, and if so, the data acquisition times N of the primary gateway are updated 1 Step S9 is entered, if not, the cloud platform sends a polling instruction to the standby gateway through the communication channel and records the sending time as the acquisition time T of the standby gateway B Updating the switching times M of the main gateway 1 And calculates the loss time T of the main gateway by the following formula M1 :
T M1 =T B -T Z ;
Step S6 is entered;
in the double-master mode, the cloud platform checks the polling data which are preferentially acquired and judges whether the polling data are correct, if the data are correct, the polling is finished, otherwise, the cloud platform acquires the polling data of the gateway which is in delayed communication in the two gateways and judges whether the polling data are correct, if the data are correct, the polling is finished, otherwise, the communication is failed, and the polling is finished;
s6, the standby gateway receives the polling command and then sends the polling command to the equipment through the data bus, the equipment acquires real-time data and generates a data packet after receiving the polling command, and the equipment sends the data packet to the two gateways through the data bus;
s7, after the two gateways acquire the data packets, the data packets are processed into polling data according to the corresponding templates and the analysis flow, and the polling data are sent to the cloud platform through the communication channel;
s8, the cloud platform shields the polling data of the main gateway and judges whether the polling data of the standby gateway is received within a preset time, and if so, the data acquisition times N of the standby gateway are updated 2 Step S9 is entered, if not, the cloud platform sends a polling instruction to the main gateway through the communication channel and records the sending time as the acquisition time T of the main gateway Z Update the standby gateway switching times M 2 And calculates the standby gateway loss time T through the following formula M2 :
T M2 =T 1 -T 2 ;
After receiving the polling command, the main gateway sends the polling command to the equipment through the data bus, and the step S2 is entered;
s9, in the active/standby mode, calculating gateway performance parameters including a primary gateway usage contribution rate U by the following steps 1 Failure rate E of primary gateway communication 1 Contribution rate U for standby gateway 2 Communication failure rate E with primary gateway 2 :
Wherein:
l is the duration of the active-standby mode;
p is the polling frequency in seconds;
w is the theoretical data acquisition times in the L time;
D 1 losing acquisition times for the main gateway;
D 2 the acquisition times are lost for the backup gateway.
Preferably, step S51 is included between steps S5 and S6, and after entering step S6 in the active/standby mode, the cloud platform increases the polling number by 1;
the step S8 specifically comprises the following steps:
s801, the cloud platform judges whether polling data fed back by the standby gateway is received within preset time, and if so, the standby gateway data acquisition times N are updated 2 Step S9 is entered; otherwise, go to step S802;
s802, the cloud platform judges whether the polling number is smaller than a frequency threshold, if so, the step S803 is carried out, otherwise, the cloud platform judges that the communication is failed, and the polling is finished;
s803, the cloud platform sends a polling instruction to the main gateway through the communication channel and records the sending time as acquisition time T of the main gateway Z Update the standby gateway switching times M 2 And calculates the standby gateway loss time T through the following formula M2 :
T M2 =T 1 -T 2 ;
After receiving the polling command, the main gateway sends the polling command to the equipment through the data bus, and the step S2 is entered.
Preferably, after each polling is finished, the cloud platform records historical data, wherein the historical data comprises a working mode and a gateway ID.
Preferably, in the primary and standby modes, the communication mechanism of the communication channel used by the primary gateway is inconsistent with the communication mechanism of the communication channel used by the standby gateway.
Preferably, in the active/standby mode, the cloud platform determines the active gateway and the standby gateway according to a preset gateway priority.
Preferably, the data bus is 485 bus.
Preferably, the data packet includes a header, address bits for identifying a device address, and a channel ID for identifying a communication channel of the primary gateway or a communication channel of the backup gateway.
The dual-gateway multi-channel internet of things communication method has the advantages that the switching of the main mode and the standby mode and the switching of the dual-main mode can be performed according to external working instructions, the cloud platform can take priority of using the main gateway for communication in the main mode and the standby gateway for communication in the standby mode, and the communication stability between equipment and the cloud platform is improved; in the double-master mode, the cloud platform can acquire polling data in the fastest time, and when the polling data acquired preferentially is checked for errors, the other group of polling data can also be used as replacement data to be transmitted to the cloud platform, so that the timeliness and reliability of communication between the equipment and the cloud platform are improved; in the active/standby mode, the calculation of gateway performance parameters is also enabled, so that a user can know the working conditions of the active gateway and the standby gateway in the data layer conveniently, and the management of the user is facilitated.
Drawings
The invention will be further described with reference to the drawings and examples.
Fig. 1 is a system configuration diagram of a communication system of a communication method of a dual gateway multichannel internet of things of the present invention.
Fig. 2 is a flowchart of a first embodiment of a dual gateway multi-channel internet of things communication method according to the present invention.
Fig. 3 is a flowchart of a second embodiment of a dual gateway multi-channel internet of things communication method according to the present invention.
Fig. 4 is a flowchart of an optimal embodiment of a dual gateway multi-channel internet of things communication method according to the present invention.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the invention.
In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "axial", "radial", "circumferential", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings are merely for convenience in describing the present invention and simplifying the description, and do not indicate or imply that the device or element being referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present invention.
Furthermore, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In the description of the present invention, it should be noted that, unless explicitly specified and limited otherwise, the terms "connected," "connected," and "connected" are to be construed broadly, and may be either fixedly connected, detachably connected, or integrally connected, for example; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium. The specific meaning of the above terms in the present invention will be understood in specific cases by those of ordinary skill in the art. Furthermore, in the description of the present invention, unless otherwise indicated, the meaning of "a plurality" is two or more.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and further implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
The physical structure of the cloud server comprises CPU, ROM, RAM, a keyboard, a mouse, a display, a network interface and a USB interface, wherein the CPU is electrically connected with the ROM, the RAM, the keyboard, the mouse, the display, the network interface and the USB interface, the ROM stores various data in a cloud database, various data in a content alternative library, a computer program for controlling the cloud server, various settings, initial values and the like, and the RAM is used as a working area for loading various computer programs or a storage area for temporarily storing identification numbers.
As shown in fig. 1, the present invention provides a dual gateway multichannel internet of things communication system, including: database, cloud platform, two gateways, two communication channels and equipment. The database is connected with the cloud platform, the cloud platform is connected with a gateway through a communication channel, and the two gateways and the equipment are connected through 485 buses.
The cloud platform can send a polling instruction to the gateway through the communication channel, and the gateway can send the polling instruction to the equipment through the 485 bus after receiving the training instruction. The device is a sensor with a data acquisition function, the device sends data packets to the two gateways after receiving the polling command, the two gateways can analyze the data packets into polling data according to the corresponding templates and analysis flow, the polling data are sent to the cloud platform through respective communication channels, and the cloud platform can store the received polling data in the database. The user can access the cloud platform through an application program on the user equipment side to monitor the training condition and acquire the polling data.
In the invention, the dual-gateway multichannel internet of things communication system has two working modes, including a main mode and a standby mode and a dual-main mode.
When the working mode is the primary and standby modes, the cloud platform determines the primary gateway and the standby gateway in the two gateways according to the preset priority. In the invention, the main gateway is taken as a real-time transmission gateway by default, the standby gateway is taken as an alternative transmission gateway, the real-time transmission gateway is of a gateway type used by the cloud platform all the time, and the alternative transmission gateway is of a standby gateway type. When the transmission of the main gateway is abnormal, the cloud platform can take the standby gateway as a real-time transmission gateway and take the main gateway as an alternative transmission gateway; if the standby gateway also has transmission abnormality, the cloud platform takes the main gateway as a real-time transmission gateway again, and takes the standby gateway as an alternative transmission gateway, so that the operation is repeated.
In the active/standby mode, the two communication channels include an active communication channel and a standby communication channel, where the active communication channel and the standby communication channel are communication channels with different communication mechanisms, for example, the active communication channel is a wired communication channel, the standby communication channel is a mobile 4G communication channel, the active communication channel is a mobile 5G communication channel, and the standby communication channel is a telecommunication 4G communication channel. Correspondingly, the type of the main gateway and the type of the standby gateway are gateway types corresponding to the communication mechanisms of the respective communication channels, for example, when the main communication channel is a wired communication channel and the standby communication channel is a mobile 4G communication channel, the main gateway is a wired network gateway and the standby gateway is a 4G mobile gateway, which will not be described in detail herein.
In the active/standby mode, after sending a polling command to the active gateway or the standby gateway, the cloud platform shields polling data corresponding to the polling command fed back by the other gateway.
When the working mode is the double-main mode, the priorities of the two gateways are consistent, and the cloud platform does not shield polling data fed back by any gateway. The cloud platform can receive the polling data fed back first preferentially, check the polling data, discard or shield the other group of polling data if the polling data is checked correctly, and receive the other group of polling data if the polling data is checked incorrectly.
Based on the above-mentioned two-gateway multichannel internet of things communication system, the present invention provides an embodiment one of a two-gateway multichannel internet of things communication method, as shown in fig. 2, comprising the following steps:
s1, the cloud platform determines a working mode to be a main-standby mode according to a working instruction, and transmits a polling instruction to a main gateway through a main communication channel and records the time of transmitting the polling instruction as acquisition time T of using the main gateway Z After receiving the polling command, the main gateway sends the polling command to the equipment through the data bus;
s2, after receiving the polling command, the equipment acquires real-time data and generates a data packet, and the equipment sends the data packet to the two gateways through the data bus; in this embodiment, the data packet includes a header, an address bit for identifying an address of the device, and a channel ID for identifying the primary communication channel or the backup communication channel;
s3, after the two gateways acquire the data packets, the data packets are processed into polling data according to the corresponding templates and the analysis flow, and the polling data are sent to the cloud platform through the respective communication channels;
s4, the cloud platform acquires polling data sent by a main gateway in the two gateways and shields polling data sent by a standby gateway in the two gateways;
s5, the cloud platform judges whether polling data fed back by the main gateway is received within a preset time, and in the embodiment, the preset time is 3S;
if the cloud platform sends the polling command and is received in 3S, the cloud platform updates the data acquisition times N of the main gateway 1 The method comprises the steps of carrying out a first treatment on the surface of the The update in the present embodiment refers to an operation of overwriting old data with new data, for example, the update master gateway data acquisition number N here 1 Refers to the number N of the data acquisition times of the main gateway stored before the acquisition 1 The value added with 1 is used as new main gateway data acquisition times N 1 In this embodiment, the number of data collection times N of the primary gateway 1 Is 0; the cloud platform stores the data into a database and enters step S9;
if not, the cloud platform sends a polling instruction to the standby gateway through the standby communication channel and records the sending time as the acquisition time T of the standby gateway B Cloud platform updates master gateway switching times M 1 And calculates the loss time T of the main gateway by the following formula M1 :
T M1 =T B -T Z ;
S51, the cloud platform adds 1 to the polling number, in the embodiment, the initial output of the polling number is 0, and the cloud platform initializes the polling number when polling is performed each time;
s6, the standby gateway receives the polling command and then sends the polling command to the equipment through the data bus, the equipment acquires real-time data and generates a data packet after receiving the polling command, and the equipment sends the data packet to the two gateways through the data bus;
s7, after the two gateways acquire the data packets, the data packets are processed into polling data according to the corresponding templates and the analysis flow, and the polling data are sent to the cloud platform through the respective communication channels;
s8, the cloud platform shields the polling data of the main gateway, judges whether the polling data of the standby gateway is received in a preset time, and processes according to a judging result, and specifically comprises the following steps:
s801, the cloud platform judges whether polling data fed back by the standby gateway is received within preset time, and if so, the standby gateway data acquisition times N are updated 2 Step S9 is entered; otherwise, go to step S802;
s802, the cloud platform judges whether the polling number is smaller than a frequency threshold, if so, the step S803 is carried out, otherwise, the cloud platform judges that the communication is failed, and the polling is finished;
s803, the cloud platform sends a polling instruction to the main gateway through the communication channel and records the sending time as the time of acquisition by the main gatewayT-shaped engraving Z Update the standby gateway switching times M 2 And calculates the standby gateway loss time T through the following formula M2 :
T M2 =T 1 -T 2 ;
After receiving the polling command, the main gateway sends the polling command to the equipment through the data bus, and the step S2 is entered;
s9, calculating gateway performance parameters including a main gateway usage contribution rate U by the following steps 1 Failure rate E of primary gateway communication 1 Contribution rate U for standby gateway 2 Communication failure rate E with primary gateway 2 :
Wherein:
l is the duration of the active-standby mode;
p is the polling frequency in seconds;
w is the theoretical data acquisition times in the L time;
D 1 losing acquisition times for the main gateway;
D 2 the acquisition times are lost for the backup gateway.
Based on the above-mentioned two-gateway multichannel internet of things communication system, the present invention also provides a second embodiment of a two-gateway multichannel internet of things communication method, as shown in fig. 3, comprising the following steps:
s1, determining that a working mode is a double-master mode according to a working instruction by a cloud platform, sending polling instructions to two gateways through a communication channel at the same time, and sending the polling instructions to equipment through a data bus after the two gateways receive the polling instructions;
s2, after receiving the polling command, the equipment acquires real-time data and generates a data packet, and the equipment sends the data packet to the two gateways through the data bus; in this embodiment, the data packet includes a header, an address bit for identifying an address of the device, and a channel ID for identifying the primary communication channel or the backup communication channel;
s3, after the two gateways acquire the data packet, the data packet is processed into polling data according to the corresponding template and the analysis flow, and the polling data is sent to the cloud platform through the communication channel;
s4, the cloud platform acquires polling data of a gateway which is in priority communication in the two gateways, wherein in the embodiment, the priority communication refers to the situation that the cloud platform acquires the polling data first in the time dimension;
and S5, the cloud platform checks the polling data which are preferentially acquired and judges whether the polling data are correct, if the data are correct, the polling is finished, otherwise, the cloud platform acquires the polling data of the gateway which is in delayed communication in the two gateways and judges whether the polling data are correct, if the data are correct, the polling is finished, otherwise, the communication is failed, and the polling is finished.
According to a further embodiment, the cloud platform records historical data after each polling, the historical data including the working mode and the gateway ID.The cloud platform can acquire the communication times S under each working mode and the stored communication times S of the polling data of the gateway 1 through statistics of historical data 1 Stored number of communications S of the gateway 2 polling data 2
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the terms do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
With the above-described preferred embodiments according to the present invention as an illustration, the above-described descriptions can be used by persons skilled in the relevant art to make various changes and modifications without departing from the scope of the technical idea of the present invention. The technical scope of the present invention is not limited to the description, but must be determined according to the scope of claims.
Claims (7)
1. The communication method of the Internet of things with the double gateways and multiple channels is characterized by comprising the following steps of:
s1, a cloud platform determines a working mode according to a working instruction, wherein the working mode comprises a main mode and a standby mode and a double main mode;
if the working mode is the main and standby mode, the cloud platform sends a polling instruction to a main gateway in the two gateways through a communication channel and records the sending time as acquisition time T by using the main gateway Z After receiving the polling command, the main gateway sends the polling command to the equipment through the data bus;
if the working mode is a double-master mode, the cloud platform simultaneously sends polling instructions to two gateways through a communication channel, and the two gateways send polling instructions to the equipment through a data bus after receiving the polling instructions;
s2, after receiving the polling command, the equipment acquires real-time data and generates a data packet, and the equipment sends the data packet to the two gateways through the data bus;
s3, after the two gateways acquire the data packet, the data packet is processed into polling data according to the corresponding template and the analysis flow, and the polling data is sent to the cloud platform through the communication channel;
s4, in a main-standby mode, the cloud platform acquires polling data sent by a main gateway in the two gateways and shields the polling data sent by a standby gateway in the two gateways;
under a double-master mode, the cloud platform acquires polling data of a gateway which is preferentially communicated in the two gateways;
s5, in the active/standby mode, the cloud platform judges whether polling data of the primary gateway are received within a preset time, and if so, the data acquisition times N of the primary gateway are updated 1 Step S9 is entered, if not, the cloud platform sends a polling instruction to the standby gateway through the communication channel and records the sending time as the acquisition time T of the standby gateway B Updating the switching times M of the main gateway 1 And calculates the loss time T of the main gateway by the following formula M1 :
T M1 =T B -T Z ;
Step S6 is entered;
in the double-master mode, the cloud platform checks the polling data which are preferentially acquired and judges whether the polling data are correct, if the data are correct, the polling is finished, otherwise, the cloud platform acquires the polling data of the gateway which is in delayed communication in the two gateways and judges whether the polling data are correct, if the data are correct, the polling is finished, otherwise, the communication is failed, and the polling is finished;
s6, the standby gateway receives the polling command and then sends the polling command to the equipment through the data bus, the equipment acquires real-time data and generates a data packet after receiving the polling command, and the equipment sends the data packet to the two gateways through the data bus;
s7, after the two gateways acquire the data packets, the data packets are processed into polling data according to the corresponding templates and the analysis flow, and the polling data are sent to the cloud platform through the communication channel;
s8, cloudThe platform shields the polling data of the main gateway and judges whether the polling data of the standby gateway is received within a preset time, if so, the data acquisition times N of the standby gateway are updated 2 Step S9 is entered, if not, the cloud platform sends a polling instruction to the main gateway through the communication channel and records the sending time as the acquisition time T of the main gateway Z Update the standby gateway switching times M 2 And calculates the standby gateway loss time T through the following formula M2 :
T M2 =T Z -T B ;
After receiving the polling command, the main gateway sends the polling command to the equipment through the data bus, and the step S2 is entered;
s9, in the active/standby mode, calculating gateway performance parameters including a primary gateway usage contribution rate U by the following steps 1 Failure rate E of primary gateway communication 1 Contribution rate U for standby gateway 2 Communication failure rate E with primary gateway 2 :
Wherein:
l is the duration of the active-standby mode;
p is the polling frequency in seconds;
w is the theoretical data acquisition times in the L time;
D 1 losing acquisition times for the main gateway;
D 2 the acquisition times are lost for the backup gateway.
2. The dual gateway multichannel internet of things communication method of claim 1, wherein:
step S51 is included between the steps S5 and S6, and after the step S6 is entered in the active-standby mode, the cloud platform adds 1 to the polling number;
the step S8 specifically comprises the following steps:
s801, the cloud platform judges whether polling data fed back by the standby gateway is received within preset time, and if so, the standby gateway data acquisition times N are updated 2 Step S9 is entered; otherwise, go to step S802;
s802, the cloud platform judges whether the polling number is smaller than a frequency threshold, if so, the step S803 is carried out, otherwise, the cloud platform judges that the communication is failed, and the polling is finished;
s803, the cloud platform sends a polling instruction to the main gateway through the communication channel and records the sending time as acquisition time T of the main gateway Z Update the standby gateway switching times M 2 And calculates the standby gateway loss time T through the following formula M2 :
T M2 =T Z -T B ;
After receiving the polling command, the main gateway sends the polling command to the equipment through the data bus, and the step S2 is entered.
3. The internet of things communication method of any one of claims 1-2, wherein:
after each polling is finished, the cloud platform records historical data, wherein the historical data comprises a working mode and a gateway ID.
4. The dual gateway multichannel internet of things communication method of claim 1, wherein:
in the primary and standby modes, the communication mechanism of the communication channel used by the primary gateway is inconsistent with the communication mechanism of the communication channel used by the standby gateway.
5. The dual gateway multichannel internet of things communication method of claim 1, wherein:
in the active/standby mode, the cloud platform determines an active gateway and a standby gateway according to a preset gateway priority.
6. The dual gateway multichannel internet of things communication method of claim 1, wherein:
the data bus is a 485 bus.
7. The dual gateway multichannel internet of things communication method of claim 1, wherein:
the data packet includes a header, address bits for identifying a device address, and a channel ID for identifying a communication channel of a primary gateway or a communication channel of a backup gateway.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210241300.3A CN114745400B (en) | 2022-03-11 | 2022-03-11 | Dual-gateway multichannel Internet of things communication method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210241300.3A CN114745400B (en) | 2022-03-11 | 2022-03-11 | Dual-gateway multichannel Internet of things communication method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114745400A CN114745400A (en) | 2022-07-12 |
CN114745400B true CN114745400B (en) | 2023-10-27 |
Family
ID=82275555
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210241300.3A Active CN114745400B (en) | 2022-03-11 | 2022-03-11 | Dual-gateway multichannel Internet of things communication method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114745400B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115378830B (en) * | 2022-08-19 | 2024-03-26 | 百倍云(浙江)物联科技有限公司 | Ecological environment monitoring system stability monitoring method |
CN115801789B (en) * | 2023-02-08 | 2023-04-25 | 安徽朋德信息科技有限公司 | Internet of things data aggregation system and method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104579774A (en) * | 2014-12-31 | 2015-04-29 | 北京山石网科信息技术有限公司 | Switching method and device for main control equipment |
CN105450446A (en) * | 2015-11-17 | 2016-03-30 | 绵阳市维博电子有限责任公司 | Duplicated hot-redundancy system and arbitration switching method |
CN105471982A (en) * | 2015-11-20 | 2016-04-06 | 中国石油天然气股份有限公司华北油田分公司 | Interaction method and system for internet-of-things gateway and cloud platform |
CN106936929A (en) * | 2017-04-21 | 2017-07-07 | 深圳华制智能制造技术有限公司 | A kind of things-internet gateway equipment, internet of things equipment group network system and its network-building method |
CN110958158A (en) * | 2019-11-22 | 2020-04-03 | 江苏百倍云信息科技有限公司 | Internet of things platform communication evaluation method |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8990464B2 (en) * | 2011-10-05 | 2015-03-24 | Analog Devices, Inc. | Methods for discovery, configuration, and coordinating data communications between master and slave devices in a communication system |
US9451462B2 (en) * | 2014-08-10 | 2016-09-20 | Belkin International Inc. | Setup of multiple IoT network devices |
US20170302506A1 (en) * | 2016-04-15 | 2017-10-19 | Preetam JINKA | Methods and apparatus for fault detection |
EP3376737B1 (en) * | 2017-03-15 | 2020-11-25 | ABB Schweiz AG | Gateway configurations in industrial internet of things |
-
2022
- 2022-03-11 CN CN202210241300.3A patent/CN114745400B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104579774A (en) * | 2014-12-31 | 2015-04-29 | 北京山石网科信息技术有限公司 | Switching method and device for main control equipment |
CN105450446A (en) * | 2015-11-17 | 2016-03-30 | 绵阳市维博电子有限责任公司 | Duplicated hot-redundancy system and arbitration switching method |
CN105471982A (en) * | 2015-11-20 | 2016-04-06 | 中国石油天然气股份有限公司华北油田分公司 | Interaction method and system for internet-of-things gateway and cloud platform |
CN106936929A (en) * | 2017-04-21 | 2017-07-07 | 深圳华制智能制造技术有限公司 | A kind of things-internet gateway equipment, internet of things equipment group network system and its network-building method |
CN110958158A (en) * | 2019-11-22 | 2020-04-03 | 江苏百倍云信息科技有限公司 | Internet of things platform communication evaluation method |
Non-Patent Citations (1)
Title |
---|
工业物联网网关系统设计与实现;王灏楠;CNKI;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN114745400A (en) | 2022-07-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114745400B (en) | Dual-gateway multichannel Internet of things communication method | |
US5136715A (en) | Terminal apparatus for resetting by remote control | |
US7889989B2 (en) | Method for implementing tandem concatenation monitoring automatically and apparatus thereof | |
US20200344287A1 (en) | In-Service Quality Monitoring System with Intelligent Retransmission and Interpolation | |
DE60034493T2 (en) | Update the header compression state in packet transmission through the use of bit stealing | |
DE602005000118T2 (en) | Packet transmission system, wireless base station and route optimization method for packet transmission | |
US20070133397A1 (en) | Smart mechanism for multi-client bidirectional optical channel protection scheme | |
US20040202158A1 (en) | Packet communication network and packet transfer control method | |
CN109254788B (en) | Method for upgrading firmware of equipment under low bandwidth | |
CN110661708B (en) | Network optimization method, system and network equipment | |
DE112008000795B4 (en) | In-vehicle forwarding connection unit | |
EP2075955A1 (en) | A method and apparatus for monitoring network quality | |
DE19812708B4 (en) | Method for controlling the transmission power in a subarea of a base station | |
CN110971459B (en) | Session fault detection method and device, terminal equipment and readable storage medium | |
US20030084146A1 (en) | System and method for displaying network status in a network topology | |
DE19728469A1 (en) | Method and arrangement for coding digital data | |
CN113347096B (en) | Transmission processing method of third party payment data | |
EP1473849B1 (en) | Mobile station for determining amplification factors of a data channel and a control channel of a transmission system | |
EP2095149B1 (en) | Satellite navigation receiver | |
DE102022126238A1 (en) | CENTRALIZED HIGH-THROUGHPUT TOPOLOGY OPTIMIZATION SOLUTION FOR WIRELESS MESH NETWORKS | |
US20030079011A1 (en) | System and method for displaying network status in a network topology | |
WO2021115203A1 (en) | Data processing method and apparatus, device, and storage medium | |
CN112000085B (en) | Network transmission performance diagnosis system based on 5G big data | |
CN110677479B (en) | Equipment management method, system and storage medium of local area network | |
EP2263399B1 (en) | Method and communication system for determining the quality of at least one ip connection between a mobile device and a server connected to a public ip based communication network |
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 |