CN115134835B - Internet of things networking system and gateway selection method - Google Patents

Internet of things networking system and gateway selection method Download PDF

Info

Publication number
CN115134835B
CN115134835B CN202211043865.7A CN202211043865A CN115134835B CN 115134835 B CN115134835 B CN 115134835B CN 202211043865 A CN202211043865 A CN 202211043865A CN 115134835 B CN115134835 B CN 115134835B
Authority
CN
China
Prior art keywords
node
target data
gateway
data
electric quantity
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
CN202211043865.7A
Other languages
Chinese (zh)
Other versions
CN115134835A (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.)
Wuxi Xinglian Xintong Technology Co ltd
Xinjiang Starlink Core Technology Co ltd
Chengdu Xinglian Xintong Technology Co ltd
Original Assignee
Wuxi Xinglian Xintong Technology Co ltd
Xinjiang Starlink Core Technology Co ltd
Chengdu Xinglian Xintong 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 Wuxi Xinglian Xintong Technology Co ltd, Xinjiang Starlink Core Technology Co ltd, Chengdu Xinglian Xintong Technology Co ltd filed Critical Wuxi Xinglian Xintong Technology Co ltd
Priority to CN202211043865.7A priority Critical patent/CN115134835B/en
Publication of CN115134835A publication Critical patent/CN115134835A/en
Application granted granted Critical
Publication of CN115134835B publication Critical patent/CN115134835B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/24Reselection being triggered by specific parameters
    • H04W36/32Reselection being triggered by specific parameters by location or mobility data, e.g. speed data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/16Gateway arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides an Internet of things networking system and a gateway selection method, wherein the method is applied to the Internet of things networking system, the Internet of things networking system comprises a current gateway and a plurality of nodes, and the current gateway is in communication connection with each node; each node is used for acquiring an instruction according to target data sent by the current gateway and sending the target data to the current gateway, wherein the target data comprises node electric quantity data, node positioning information and node residual storage capacity of each node; the current gateway is used for judging whether a switching condition is met, sending a target data acquisition instruction to each node under the condition that the switching condition is met, receiving target data sent by each node, and selecting a target node from a plurality of nodes as a new gateway based on an election algorithm according to the target data. The Internet of things networking system and the gateway selection method provided by the invention can effectively improve the working efficiency of the Internet of things networking system.

Description

Internet of things networking system and gateway selection method
Technical Field
The invention relates to the technical field of Internet of things, in particular to an Internet of things networking system and a gateway selection method.
Background
With the rapid development of the internet of things technology, the internet of things is required to be used in each application scene, and in the internet of things technology, data collection is mainly carried out through a gateway.
In the prior art, when the internet of things is used in an external environment, such as working scenes of meteorological investigation, environmental ecological scientific research and the like, a fixed gateway is often used, so that the load of the gateway is large, and the overall working efficiency is reduced.
Disclosure of Invention
The object of the present invention includes, for example, providing a networking system of the internet of things, which can solve the above technical problems at least in part.
Embodiments of the invention may be implemented as follows:
in a first aspect, an embodiment of the present invention provides an internet of things networking system, where the internet of things networking system includes a current gateway and a plurality of nodes, and the current gateway is in communication connection with each of the nodes;
each node is used for sending target data to the current gateway according to a target data acquisition instruction sent by the current gateway, wherein the target data comprises node electric quantity data, node positioning information and node residual storage capacity of each node;
the current gateway is used for judging whether a switching condition is met, sending a target data acquisition instruction to each node under the condition that the switching condition is met, receiving target data sent by each node, and selecting a target node from the nodes as a new gateway based on an election algorithm according to the target data.
Optionally, the current gateway is configured to determine whether the handover condition is satisfied by:
monitoring self state information, wherein the state information comprises gateway electric quantity and gateway storage space;
judging whether the gateway electric quantity is lower than a preset electric quantity threshold value and/or whether the gateway storage space is lower than a preset storage space;
and if the gateway electric quantity is lower than a preset electric quantity threshold value and/or the gateway storage space is lower than a preset storage space, judging that the switching condition is met.
Optionally, the step of selecting a target node from a plurality of nodes as a new gateway based on an election algorithm includes:
respectively scoring the node electric quantity data, the node positioning information and the node residual storage amount included in each target data according to a preset strategy;
determining a plurality of data with the highest priority from each target data based on preset priorities of node electric quantity data, node positioning information and node residual storage amount in the target data, and determining first target data to be analyzed with the highest score from the data with the highest priority;
and taking the node corresponding to the first target data to be analyzed as the new gateway.
Optionally, the current gateway is further configured to:
if two or more first target data to be analyzed exist, determining a plurality of data with second highest priority from the target data corresponding to each first target data to be analyzed based on the preset priorities of the node electric quantity data, the node positioning information and the node residual storage volume in the target data, and determining second target data to be analyzed with highest score from the plurality of data with second highest priority; taking the node corresponding to the second target data to be analyzed as the new gateway;
and if two or more second target data to be analyzed exist, selecting a node corresponding to the target data with the highest total score of node electric quantity data, node positioning information and node residual storage capacity from the nodes corresponding to the second target data to be analyzed as the new gateway.
Optionally, the current gateway is further configured to:
judging whether each target data has abnormal target data or not;
and if so, discarding the abnormal target data.
Optionally, the step of determining whether there is abnormal target data in each of the target data includes:
judging whether the node electric quantity data is within a preset electric quantity range, and if not, judging that the node electric quantity data is the abnormal target data;
judging whether the node positioning information is within a preset position deviation range, if not, judging that the node positioning information is the abnormal target data;
and judging whether the node residual storage amount is in a preset storage range, if not, judging that the node residual storage amount is the abnormal target data.
Optionally, the preset priorities of the node electric quantity data, the node positioning information and the node remaining storage amount in the target data are as follows:
the priority of the node electric quantity data is highest;
the priority of the residual storage of the node is the second highest;
the priority of the node location information is lowest.
Optionally, the current gateway is further configured to:
after the new gateway is selected out, resetting and restarting are carried out, and the new gateway is converted into the node;
and the target node is used for resetting and restarting after being selected as the new gateway, and converting the new gateway into the current gateway.
In a second aspect, an embodiment of the present invention provides a gateway selection method, which is applied to an internet of things networking system, where the internet of things networking system includes a current gateway and a plurality of nodes, the current gateway is in communication connection with each of the nodes, and the method includes:
each node sends target data to the current gateway according to a target data acquisition instruction sent by the current gateway, wherein the target data comprises node electric quantity data, node positioning information and node residual storage capacity of each node;
the current gateway judges whether a switching condition is met, sends a target data acquisition instruction to each node under the condition that the switching condition is met, receives target data sent by each node, and selects a target node from a plurality of nodes as a new gateway based on an election algorithm according to the target data.
Optionally, after the election-based algorithm selects a target node from the plurality of nodes as a new gateway, the method further includes:
after a preset time, taking the new gateway as the current gateway to obtain target data sent by each node;
and selecting a target node from the nodes as a new gateway based on an election algorithm according to the target data.
The beneficial effects of the embodiment of the invention include, for example:
under the condition that the current gateway meets the switching condition, the target data of each node is acquired, and the target node is selected from the nodes to serve as a new gateway based on the election algorithm, so that the problems that the gateway load is too large and the working efficiency of the networking system of the internet of things is low due to the fact that only one fixed gateway exists in the networking system of the internet of things are solved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a framework diagram of a networking system of the internet of things according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating steps of a handover condition determining method according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating the steps of an election algorithm provided in accordance with an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for determining abnormal target data according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating steps of a gateway selection method according to an embodiment of the present invention.
Icon: 10-an internet of things networking system; 11-current gateway; 12-node.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Furthermore, the appearances of the terms "first," "second," and the like, if any, are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
It should be noted that the features of the embodiments of the present invention may be combined with each other without conflict.
The internet of things technology is mainly characterized in that each data collection module forms a plurality of nodes according to different functional requirements, and the plurality of nodes and a gateway form a networking system. Wherein the gateway is mainly responsible for receiving data contents transmitted by each node. In the prior art, a unified gateway is allocated to an internet of things device cluster to collect data content of the whole internet of things networking system.
However, with the development of the internet of things technology, nowadays, the internet of things technology is also needed in many outdoor scenes, for example, scenes in which scientific research teams investigate weather conditions, forest scientific research scenes, outdoor ecological research scenes, and the like, in which the supply of power sources cannot be provided in real time, generally, when the unified gateway is used up or the memory is insufficient, the work needs to be suspended, the gateway is charged and data is transferred, and when the gateway is full of electric quantity or the memory space is large enough, the work is continued. By using the Internet of things networking system, the working efficiency of the whole team can be greatly reduced.
Therefore, in order to solve the above problem, please refer to fig. 1, the embodiment provides an internet of things networking system 10, where the internet of things networking system 10 includes a current gateway 11 and a plurality of nodes 12, and the current gateway 11 is in communication connection with each node 12;
each node 12 is configured to send target data to the current gateway 11 according to a target data obtaining instruction sent by the current gateway 11, where the target data includes node electric quantity data of each node 12, node positioning information, and node remaining storage capacity.
As shown in table 1, each node 12 may be composed of a plurality of functional data modules, each for collecting data required by a user. For example, the node a is mainly responsible for collecting air temperature and humidity data, and then, a temperature and humidity sensor may be installed on the node a. In addition to the functional data modules, each node 12 may also obtain its own status, such as power data, current location, storage space size, and so forth. When each node 12 receives a target data acquisition instruction sent by the current gateway 11, it starts to send target data to the current gateway 11. The target data may include data collected by each functional data module, and may also include node power data, node location information, and node remaining storage capacity of each node 12. The node power data may be the current power remaining (e.g., 85%) of each node 12; the node location information may be the current location (e.g., latitude and longitude) of each node 12; the node remaining storage capacity may be the current remaining memory size of the node 12 (e.g., 100G or 75%).
TABLE 1 functional data Module and applications
Figure P_220825093923804_804027001
The current gateway 11 is configured to determine whether a handover condition is satisfied, send a target data obtaining instruction to each node 12 when the handover condition is satisfied, receive target data sent by each node 12, and select a target node from the plurality of nodes 12 as a new gateway based on an election algorithm according to the target data.
The current gateway 11 may be a node that is currently being used as a gateway. When certain conditions are met, that is, the handover conditions are met, the current gateway 11 sends a target data acquisition instruction to each node 12 in communication connection therewith, and then receives target data sent by each node 12. The switching condition may be a switching instruction sent by the user to the current gateway 11 through the terminal device in communication connection with the current gateway 11, or may be automatically triggered when the self state of the current gateway 11 reaches a certain threshold; it may also be that the current gateway 11 detects a failure of some component of itself.
After acquiring the target data, the current gateway 11 selects a target node from the nodes 12 according to the target data sent by the nodes 12 based on an election algorithm, and uses the target node as a new gateway.
Alternatively, as shown in fig. 2, the current gateway 11 is configured to determine whether the handover condition is satisfied by the following steps:
step S01: monitoring the state information of the gateway, wherein the state information comprises gateway electric quantity and gateway storage space.
Step S02: and judging whether the electric quantity of the gateway is lower than a preset electric quantity threshold value and/or whether the storage space of the gateway is lower than a preset storage space.
Step S03: and if the gateway electric quantity is lower than a preset electric quantity threshold value and/or the gateway storage space is lower than a preset storage space, judging that the switching condition is met.
As an alternative embodiment, the current gateway 11 may determine whether the handover condition is satisfied by detecting its own status information. The status information may include gateway power and gateway memory space. The current gateway 11 monitors the state information of itself in real time, and when it is monitored that the gateway electric quantity is lower than a preset electric quantity threshold value and/or the gateway storage space is lower than a preset storage space, it is determined that the switching condition is satisfied.
For example, the preset electric quantity threshold is 10%, the preset storage space is 15%, and if the current gateway 11 monitors that the electric quantity of the gateway is lower than 10%, it is determined that the preset condition is met; if the current gateway 11 monitors that the gateway storage space is lower than 15%, it is determined that the preset condition is met. It should be noted that if the state information of the current gateway 11 simultaneously satisfies that the power of the gateway is lower than the preset power threshold and the storage space of the gateway is lower than the preset storage space, it is still determined that the switching condition is satisfied.
Alternatively, as shown in fig. 3, the step of selecting the target node as the new gateway from the plurality of nodes 12 by the current gateway 11 based on the election algorithm includes:
step S11: and respectively scoring the node electric quantity data, the node positioning information and the node residual storage amount included by each target data according to a preset strategy.
Step S12: determining a plurality of data with the highest priority from each target data based on preset priorities of node electric quantity data, node positioning information and node residual storage volume in the target data, and determining first target data to be analyzed with the highest score from the data with the highest priority.
Step S13: and taking the node corresponding to the first target data to be analyzed as the new gateway.
The preset strategy can be a scoring standard preset by a user; the preset priorities of the node electric quantity data, the node positioning information and the node residual storage amount in the target data can be priorities of the node electric quantity data, the node positioning information and the node residual storage amount in the target data.
The current gateway 11 may respectively score three data, namely node electricity quantity data, node positioning information and node remaining storage amount, in the target data transmitted by each node 12 based on a preset policy. In one embodiment, the preset policy may be: when the node electric quantity data exceeds 10% by one percentage point, 1 point is obtained, for example, when the node electric quantity data of a certain node 12 is 86%, the node electric quantity data is 76 points; when the node residual storage capacity exceeds 10%, two percentage points each get 1 point, for example, when the node residual storage capacity of a certain node 12 is 90%, the node residual storage capacity is divided into 40 points; the node location information score may be given by a certain node 12, and if there is one other node 12, the score is given by 5, for example, if there are 4 other nodes 12 within a radius of 50m with a certain node 12 as the center, the node location information score of the node 12 is given by 20.
According to the preset priority, data with the highest priority of each node 12 is selected from the three data, namely the node electric quantity data, the node positioning information and the node residual storage capacity, and score comparison is carried out on the data, with the highest priority and the highest score, of the data (namely the first target data to be analyzed), corresponding to the node 12 serves as a new gateway.
For example, the preset priority is node electric quantity data > node remaining storage capacity > node positioning information, the existing A, B, C nodes have the respective score conditions of each node: the node electric quantity data of the node A is divided into 60 points, the node positioning information is divided into 5 points, and the node residual storage capacity is divided into 25 points; the node electric quantity data of the node B is divided into 65 points, the node positioning information is divided into 5 points, and the node residual storage capacity is divided into 70 points; the node electric quantity data of the node C is scored as 67 points, the node positioning information is scored as 15 points, and the node residual storage amount is scored as 30 points. Then, according to the preset priority, the scores of the residual storage capacity of the nodes are compared, and the node electric quantity data of the node C is the highest score, so that the node B is selected as a new gateway.
When a new gateway is selected by using an election algorithm, it is inevitable that the new gateway will be selected under the condition that the priorities are the same and the scores are also the same. Optionally, the current gateway is further configured to:
if two or more first target data to be analyzed exist, determining a plurality of data with the second highest priority from the target data corresponding to each first target data to be analyzed based on the preset priorities of the node electric quantity data, the node positioning information and the node residual storage capacity in the target data, and determining second target data to be analyzed with the highest score from the data with the second highest priority; and taking the node corresponding to the second target data to be analyzed as the new gateway.
And if two or more second target data to be analyzed exist, selecting a node corresponding to the target data with the highest total score of the node electric quantity data, the node positioning information and the node residual storage amount from the nodes corresponding to the second target data to be analyzed as a new gateway.
For example, there are 5 nodes in the existing A, B, C, D, E, and the preset priority is node power data > node remaining storage capacity > node positioning information. If the node electric quantity data scores of the nodes A, B, C are all higher than those of the nodes D and E and the node electric quantity data scores of the nodes A, B, C are all 80 points, comparing the scores of the residual storage capacity of the nodes with the second highest priority in the nodes A, B, C; if the scores of the node residual storage capacity of the node B, C are all higher than that of the node A, and the scores of the node residual storage capacity of the node B, C are all 60 points, comparing the node electric quantity data of the node B with the node C, the node residual storage capacity and the total score of the node positioning information (namely the sum of the scores of the node electric quantity data, the node residual storage capacity and the node positioning information); and if the total score of the node B is 165 points and the total score of the node C is 175 points, selecting the node C as a new gateway.
Optionally, the preset priority order of the node electric quantity data, the node positioning information and the node remaining storage amount in the target data is as follows: the priority of the node electric quantity data is highest; the priority of the residual storage of the node is the second highest; the node location information has the lowest priority.
In practical situations, the selected gateway preferentially selects the node 12 with the largest remaining storage space and the largest remaining power as the new gateway, so the above-mentioned predetermined priority may be adopted. Certainly, the preset priority is only an optional embodiment provided in this specification, and in practical applications, a user may set the preset priority according to an actual situation, which is not limited in the embodiment of the present invention.
Optionally, as shown in fig. 4, the current gateway 11 is further configured to:
and judging whether each target data has abnormal target data.
And if so, discarding the abnormal target data.
In an outdoor environment, each node 12 may malfunction due to various complicated natural conditions, so that target data transmitted to the current gateway 11 is abnormal. Therefore, the current gateway can determine the target data after receiving the target data, and if the target data has abnormal target data, the target data determined to be the abnormal target data is discarded.
Optionally, the step of judging, by the current gateway 11, whether there is abnormal target data in each of the target data includes:
and judging whether the node electric quantity data is in a preset electric quantity range, if not, judging that the node electric quantity data is the abnormal target data.
And judging whether the node positioning information is within a preset position deviation range, and if not, judging that the node positioning information is the abnormal target data.
And judging whether the residual storage capacity of the node is in a preset storage range, if not, judging that the residual storage capacity of the node is abnormal target data.
As an alternative embodiment, as shown in table 2, it is determined whether the node power data is abnormal target data, and it may be determined whether the node power data is within a normal power range (preset power range), for example: the preset electric quantity range is 0% -100%, and if the current gateway 11 receives a node electric quantity data of 150% electric quantity, the data is judged to be abnormal target data; whether the remaining storage capacity of the node is abnormal target data or not can be judged, and whether the node is in a normal storage space range (a preset storage range) or not can be judged, for example: presetting a storage range of 0 to 100GB, and if the residual storage capacity of one node received by the current gateway 11 is 130GB, determining that the data is abnormal target data; whether the node positioning information is abnormal target data or not is judged, whether the positioning of the node 12 is within a preset range taking an average positioning point as a center or not can be judged, for example, a preset position deviation range is node positioning information which takes a certain point as a center and takes a point within a radius of 20m as normal, and if the current gateway 11 receives that the certain node positioning information is out of the range, the data is judged to be abnormal target data.
TABLE 2 target data determination
Figure P_220825093923914_914321001
Optionally, since the node electric quantity data should appear to be linearly decreased under a normal condition, the manner of determining whether the node electric quantity data is the abnormal target data may also be: if the difference between the node electric quantity data and the electric quantity estimated by the electric quantity-time state regression equation of all the nodes exceeds +/-20%, the current gateway 11 judges the node electric quantity data to be abnormal target data.
Optionally, the current gateway 11 is further configured to:
after the new gateway is selected, reset restart is performed, and the new gateway is converted into the node 12.
And the target node is configured to reset and restart after being selected as the new gateway, and convert the new gateway into the current gateway 11.
When a new gateway is selected, the whole internet of things networking system 10 is reset and restarted, and a node originally serving as the gateway is switched off the data collection function after being restarted and is converted into a common node 12; the target node selected as the new gateway will, after the restart, turn on the gateway function, convert it to a gateway, and send an instruction to the other nodes 12 to cause the other nodes to send data to them after the restart.
Based on the same inventive concept, as shown in fig. 5, an embodiment of the present specification further provides a gateway selection method, which is applied to an internet of things networking system 10, where the internet of things networking system 10 includes a current gateway 11 and a plurality of nodes 12, and the current gateway 11 is in communication connection with each node 12, and the method includes:
each node 12 sends target data to the current gateway 11 according to a target data acquisition instruction sent by the current gateway 11, where the target data includes node electric quantity data, node positioning information, and node remaining storage capacity of each node 12.
The current gateway 11 determines whether a handover condition is satisfied, sends a target data acquisition instruction to each node 12 and receives target data sent by each node 12 if the handover condition is satisfied, and selects a target node from the plurality of nodes 12 as a new gateway based on an election algorithm according to the target data.
Regarding the above gateway selection method, the steps of the gateway selection method have been described in detail in the embodiment of the networking system of the internet of things provided in this specification, and will not be elaborated herein.
Optionally, after selecting the target node from the plurality of nodes as the new gateway based on the election algorithm, the method further includes:
after the preset time, taking a new gateway as the current gateway, and acquiring target data sent by each node;
and selecting a target node from the plurality of nodes as a new gateway based on an election algorithm according to the target data.
In addition to the way that the current gateway 11 automatically selects a new gateway when the handover condition is satisfied, a gateway handover time (i.e., a preset time) may be preset in each node 12, i.e., the current gateway 11, and after the gateway handover time elapses after a new gateway is selected, the new gateway may serve as the current gateway 11, initiate selection of another gateway, and reselect the node 12 in the best current state as the new gateway, so as to implement selection of the gateway.
For example, the preset time is 8 hours, when the current gateway 11 selects a new gateway and the new gateway is used as the current gateway 11, the current gateway 11 starts to time, and after the time of 8 hours, the current gateway 11 automatically initiates selection of the new gateway, and selects a target node with an optimal state from all the nodes 12 as the new gateway. In an alternative embodiment, if the target data of other nodes 12 is not as good as the state information of the current gateway 11, the current gateway 11 continues to be selected, and after 1/2 of the preset time, a new gateway is reselected.
By adopting the scheme in the embodiment of the invention, the following effects can be at least partially achieved:
1. under the condition that the current gateway 11 meets the switching condition, the target data of each node 12 is acquired, and the target node is selected from the nodes based on the election algorithm to serve as a new gateway, so that the problems that the gateway load is too large and the work efficiency of the networking system 10 of the internet of things is low due to the fact that only one fixed gateway exists in the networking system 10 of the internet of things are solved.
2. By automatically initiating selection of a new gateway by the current gateway 11 within a preset time, dynamic switching and load balancing of the gateways are realized, and the service time of the internet of things networking system 10 is further increased.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (8)

1. The networking system of the Internet of things is characterized by comprising a current gateway and a plurality of nodes, wherein the current gateway is in communication connection with each node;
each node is used for sending target data to the current gateway according to a target data acquisition instruction sent by the current gateway, wherein the target data comprises node electric quantity data, node positioning information and node residual storage capacity of each node;
the current gateway is configured to determine whether a handover condition is satisfied, send a target data acquisition instruction to each node and receive target data sent by each node if the handover condition is satisfied, and select a target node from the nodes as a new gateway based on an election algorithm according to the target data, where the current gateway is configured to:
respectively scoring the node electric quantity data, the node positioning information and the node residual storage amount included in each target data according to a preset strategy; determining a plurality of data with the highest priority from each target data based on preset priorities of node electric quantity data, node positioning information and node residual storage amount in the target data, and determining first target data to be analyzed with the highest score from the data with the highest priority; taking the node corresponding to the first target data to be analyzed as the new gateway;
the current gateway is further configured to: if two or more first target data to be analyzed exist, determining a plurality of data with second highest priority from the target data corresponding to each first target data to be analyzed based on the preset priorities of the node electric quantity data, the node positioning information and the node residual storage volume in the target data, and determining second target data to be analyzed with highest score from the plurality of data with second highest priority; taking the node corresponding to the second target data to be analyzed as the new gateway; and if two or more second target data to be analyzed exist, selecting the node corresponding to the target data with the highest total score of the node electric quantity data, the node positioning information and the node residual storage capacity from the nodes corresponding to the second target data to be analyzed as the new gateway.
2. The networking system of claim 1, wherein the current gateway is configured to determine whether the handover condition is satisfied by:
monitoring self state information, wherein the state information comprises gateway electric quantity and gateway storage space;
judging whether the gateway electric quantity is lower than a preset electric quantity threshold value and/or whether the gateway storage space is lower than a preset storage space;
and if the gateway electric quantity is lower than a preset electric quantity threshold value and/or the gateway storage space is lower than a preset storage space, judging that the switching condition is met.
3. The internet of things networking system of claim 1, wherein the current gateway is further configured to:
judging whether each target data has abnormal target data or not;
and if so, discarding the abnormal target data.
4. The internet-of-things networking system of claim 3, wherein the step of determining whether each of the target data has abnormal target data comprises:
judging whether the node electric quantity data is within a preset electric quantity range, and if not, judging that the node electric quantity data is the abnormal target data;
judging whether the node positioning information is within a preset position deviation range, if not, judging that the node positioning information is the abnormal target data;
and judging whether the residual storage capacity of the node is in a preset storage range, if not, judging that the residual storage capacity of the node is the abnormal target data.
5. The networking system of the internet of things of claim 1, wherein the preset priorities of the node electric quantity data, the node positioning information and the node remaining storage amount in the target data are as follows:
the priority of the node electric quantity data is highest;
the priority of the residual storage of the node is the second highest;
the node location information has the lowest priority.
6. The internet of things networking system of claim 1, wherein the current gateway is further configured to:
after the new gateway is selected out, resetting and restarting are carried out, and the new gateway is converted into the node;
and the target node is used for resetting and restarting after being selected as the new gateway, and converting the new gateway into the current gateway.
7. A gateway selection method is characterized by being applied to an Internet of things networking system, wherein the Internet of things networking system comprises a current gateway and a plurality of nodes, the current gateway is in communication connection with each node, and the method comprises the following steps:
each node sends target data to the current gateway according to a target data acquisition instruction sent by the current gateway, wherein the target data comprises node electric quantity data, node positioning information and node residual storage capacity of each node;
the current gateway judges whether a switching condition is met, sends a target data acquisition instruction to each node under the condition that the switching condition is met, receives target data sent by each node, and selects a target node from a plurality of nodes as a new gateway based on an election algorithm according to the target data, wherein the gateway comprises:
respectively scoring the node electric quantity data, the node positioning information and the node residual storage amount included in each target data according to a preset strategy; determining a plurality of data with the highest priority from each target data based on preset priorities of node electric quantity data, node positioning information and node residual storage amount in the target data, and determining first target data to be analyzed with the highest score from the data with the highest priority; taking the node corresponding to the first target data to be analyzed as the new gateway;
the current gateway is further configured to: if two or more first target data to be analyzed exist, determining a plurality of data with second highest priority from the target data corresponding to each first target data to be analyzed based on the preset priorities of the node electric quantity data, the node positioning information and the node residual storage volume in the target data, and determining second target data to be analyzed with highest score from the plurality of data with second highest priority; taking the node corresponding to the second target data to be analyzed as the new gateway; and if two or more second target data to be analyzed exist, selecting a node corresponding to the target data with the highest total score of node electric quantity data, node positioning information and node residual storage capacity from the nodes corresponding to the second target data to be analyzed as the new gateway.
8. The gateway selection method of claim 7, wherein after said electing based algorithm a target node from a plurality of said nodes as a new gateway, said method further comprises:
after the preset time, taking the new gateway as the current gateway to acquire target data sent by each node;
and selecting a target node from the nodes as a new gateway based on an election algorithm according to the target data.
CN202211043865.7A 2022-08-30 2022-08-30 Internet of things networking system and gateway selection method Active CN115134835B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211043865.7A CN115134835B (en) 2022-08-30 2022-08-30 Internet of things networking system and gateway selection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211043865.7A CN115134835B (en) 2022-08-30 2022-08-30 Internet of things networking system and gateway selection method

Publications (2)

Publication Number Publication Date
CN115134835A CN115134835A (en) 2022-09-30
CN115134835B true CN115134835B (en) 2022-12-20

Family

ID=83388111

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211043865.7A Active CN115134835B (en) 2022-08-30 2022-08-30 Internet of things networking system and gateway selection method

Country Status (1)

Country Link
CN (1) CN115134835B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115474291B (en) * 2022-11-14 2023-02-28 湖南柒丰智能科技有限公司 LoRa communication method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101895906A (en) * 2010-07-19 2010-11-24 中兴通讯股份有限公司 Mobile terminal and method for processing communication between same and gateway
US10750433B1 (en) * 2018-09-14 2020-08-18 Amazon Technologies, Inc. Gateway selection in a mesh network
CN113573392A (en) * 2021-07-13 2021-10-29 电子科技大学中山学院 Energy-saving communication method under abnormal state of gateway of Internet of things
CN114040473A (en) * 2021-11-29 2022-02-11 中国科学院上海微系统与信息技术研究所 Clustering routing method for wireless sensor network

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FI118291B (en) * 2004-12-22 2007-09-14 Timo D Haemaelaeinen Energy efficient wireless sensor network, node devices for the same and method of arranging, the communications in a wireless sensor network
CN103139265B (en) * 2011-12-01 2016-06-08 国际商业机器公司 Network adaptation transmitter optimization method in massive parallel processing and system
WO2018098759A1 (en) * 2016-11-30 2018-06-07 深圳天珑无线科技有限公司 Method for selecting cluster head in distributed network, node, and system
CN112689315B (en) * 2020-12-24 2022-10-21 河南大学 WSNs improved clustering energy consumption optimization method based on mobile sink node

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101895906A (en) * 2010-07-19 2010-11-24 中兴通讯股份有限公司 Mobile terminal and method for processing communication between same and gateway
US10750433B1 (en) * 2018-09-14 2020-08-18 Amazon Technologies, Inc. Gateway selection in a mesh network
CN113573392A (en) * 2021-07-13 2021-10-29 电子科技大学中山学院 Energy-saving communication method under abnormal state of gateway of Internet of things
CN114040473A (en) * 2021-11-29 2022-02-11 中国科学院上海微系统与信息技术研究所 Clustering routing method for wireless sensor network

Also Published As

Publication number Publication date
CN115134835A (en) 2022-09-30

Similar Documents

Publication Publication Date Title
CN108009028B (en) Message processing method, device, equipment and computer readable storage medium
EP4238295A1 (en) Methods, systems, and computer readable media for rank processing for network function selection
CN108848170B (en) Fog cluster management system and method based on nagios monitoring
US9532359B2 (en) Resource allocation method and device
CN115134835B (en) Internet of things networking system and gateway selection method
CN115277598B (en) Method and device for scheduling computing power resources and computer readable storage medium
CN107317764B (en) Traffic load balancing method, system, device and computer readable storage medium
CN109802986B (en) Equipment management method, system, device and server
CN112822735B (en) Gateway switching management method, device, equipment and storage medium based on Internet of things
CN112104727B (en) Method and system for deploying simplified high-availability Zookeeper cluster
CN109150565B (en) Network situation perception method, device and system
CN113132176B (en) Method for controlling edge node, node and edge computing system
CN112218342A (en) Method, device and system for realizing core network sub-slice disaster tolerance
CN114258053A (en) Wireless device and method for automatic recovery from failure
CN115499447A (en) Cluster master node confirmation method and device, electronic equipment and storage medium
CN111385359A (en) Load processing method and device of object gateway
US9357008B2 (en) Network system, node device group, sensor device group, and method for transmitting and receiving sensor data
CN117014313B (en) Method and system for analyzing equipment data of edge cloud platform in real time
CN113300865B (en) Management and control method, network system, equipment and storage medium
CN112260946A (en) Link fault processing method and device, terminal equipment and storage medium
CN111050356A (en) Data transmission processing method and device, storage medium and electronic device
CN116156609A (en) Data communication method, device, electronic equipment and storage medium
CN114466365A (en) Spectrum resource acquisition method, spectrum resource acquisition device and computer readable storage medium
US11977450B2 (en) Backup system, method therefor, and program
CN114039836A (en) Fault processing method and device for Exporter collector

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