Low-power wireless network data transmission method based on WAPI protocol
By partitioning the substation wireless sensor network and managing dynamic distance thresholds, combined with the WAPI protocol, the problems of high power consumption and poor network robustness in wireless communications are solved, low-power and secure data transmission is achieved, and the life of sensor nodes is extended.
Patent Information
- Application Number
- CN202411575798.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-11-06
AI Technical Summary
Existing wireless communication technologies consume high power in substations, shortening the lifespan of sensor nodes. Furthermore, the network structure of wireless sensor networks has poor robustness, and long chains lead to rapid energy consumption. Existing improved protocols fail to effectively address the distance threshold problem, resulting in uneven node energy consumption.
A low-power wireless network data transmission method based on the WAPI protocol is adopted. By partitioning the sensor network and setting a dynamic maximum distance threshold, the leader node is selected by comprehensively considering the distance between the node and the base station, the energy of the surviving nodes in the area and the remaining energy of the nodes. The chain is constructed using a greedy algorithm, and data is encrypted during the transmission process to avoid the generation of long chains and energy imbalance.
It effectively reduces the transmission energy consumption of nodes, prolongs the network survival time, ensures the security of data transmission and the stability of the network, and extends the life of sensor nodes.
Smart Images

Figure CN119729458B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of WAPI wireless communication security technology, and particularly relates to a low-power wireless network data transmission method based on a WAPI protocol. BACKGROUND
[0002] As a pivotal node of the power system, the substation occupies an important position in the power grid operation. With the continuous advancement of smart grid construction and digital transformation, as well as the rapid development of device mobile Internet of Things, big data analysis and other technologies, the demand for wireless device applications is growing.
[0003] In recent years, the demand for information collection and transmission of various business terminals in the power grid has been growing, and a large number of new businesses represented by robot inspection, visual operation, unmanned aerial vehicles and various wireless intelligent monitoring have emerged. These businesses generally have the characteristics of large bandwidth, large connection and strong mobility.
[0004] The wired communication mode has been unable to meet the growing demand for business, and wireless communication network is a good solution. Wireless communication network is a supplement to wired communication network and is a hot spot in current communication network research.
[0005] At present, the application of wireless communication in the power grid is not much, mainly because the security and stability of wireless public network communication cannot meet the demand of power grid business. On the other hand, although the sensor devices in the substation are relatively fixed in position, they are numerous and distributed discretely, and the wireless link of the wireless sensor network has vulnerability and the network topology structure has variability, which determines that the application of wireless sensor network in smart grid needs to fully consider the information security problem of power sensor network, and in order to make the wireless sensor node more convenient to use in the substation, the battery is generally used for power supply, and the battery cannot be too large, which limits the battery capacity. The depletion of the power means the end of the life of the sensor node, and if the power consumption can be reduced as much as possible, it means that the life of the system is prolonged. Therefore, reducing power consumption and prolonging the life of the system as much as possible is an important prerequisite for the application of wireless communication technology in the substation scenario.
[0006] With the proposal and continuous promotion of WAPI protocol, WAPI technology has outstanding performance in its access ability, flexible deployment, and data transmission security. Therefore, the gradual deployment of secure wireless communication network in substation has become a new application of WAPI technology in the power industry. The design of WAPI security network aims to protect the security of data communication and information transmission process in the power system, prevent unauthorized devices from invading the system, and ensure that only legal devices can access the network. However, there is currently less research on low-power WAPI technology, which has important research significance in the substation scenario. LEACH algorithm is a classic clustering algorithm and the first clustering routing protocol that transmits data through aggregation. Member nodes transmit data to cluster head nodes through single-hop, and cluster head nodes forward the received data directly to the base station. However, in practical applications, single-hop data transmission leads to fast energy consumption of the system, and when nodes far from the base station are elected as cluster heads, it also causes nodes to die prematurely.
[0007] To solve the problems of LEACH protocol, PEGASIS (Power-Efficient Gathering in Sensor Information Systems) protocol is proposed based on LEACH. This protocol mainly uses greedy algorithm to connect all nodes into a single chain, and randomly selects cluster head by base station, so that information is transmitted from both ends of the chain to the cluster head, and then the cluster head sends information to the base station. Although this protocol has certain effect on prolonging node life and balancing node energy consumption, the network structure is a long chain, and once a node in the chain fails, the entire network will be paralyzed, with poor robustness. Currently, wireless communication is not widely used in power grid, mainly because the security and stability of wireless communication cannot meet the needs of power grid business. How to minimize power consumption and prolong the life of the system is the key to the application of wireless communication technology in the substation scenario. Among the many improvements of PEGASIS protocol, there are still problems in the selection of leader nodes, which do not comprehensively consider the remaining energy of current sensor nodes, the average energy in the region, and the distance to the base station, leading to unbalanced node energy consumption.
[0008] The long chain problem in PEGASIS protocol is an important factor that leads to fast energy consumption and premature death of sensor nodes. In some current improved protocols, the distance threshold problem is not considered, and how to dynamically adjust the distance threshold to minimize the possibility of long chain in the link is a technical problem currently faced. SUMMARY
[0009] The object of the present invention is to provide a low-power wireless network data transmission method based on the WAPI protocol to solve at least one technical problem existing in the above background technology.
[0010] In order to achieve the above object, the present invention adopts the following technical solutions:
[0011] In a first aspect, the present invention provides a low-power wireless network data transmission method based on the WAPI protocol, comprising:
[0012] The sensor network is formed by multiple randomly deployed sensor nodes. The network model is partitioned so that each area has the same number of nodes.
[0013] Perform WAPI authentication on sensor nodes, and nodes that pass WAPI authentication can participate in network communication;
[0014] In each area, a chain is constructed using a greedy algorithm and the prescribed chaining rules, and the distances between connected nodes are recorded;
[0015] Select each chain head node according to the rules for selecting the main chain leader node and the branch chain head node;
[0016] Taking into account the distance between the leader node and the base station, the average energy of the surviving nodes in the area, and the remaining energy of the nodes, the leader node will be re-selected only when the leader node replacement conditions are met, ensuring that the main chain leader node is always closest to the base station when the energy threshold conditions are met;
[0017] Node data is transmitted within each area, and sensor data is encrypted using WAPI during transmission to prevent data leakage or tampering; data is transmitted from the two end nodes of each chain toward the head node, and between the two chains, data is transmitted from the head node with a higher level to the node with a lower level, ensuring that the data is transmitted toward the leader node of the main chain. The intermediate nodes fuse the data of the current node and the previous node into a data packet of the same length, and continue to transmit data to the next node. Finally, the leader node of the main chain completes the data fusion and sends it to the base station.
[0018] Furthermore, after the area division is completed, the chain formation stage is entered in each area, and the dynamic maximum distance threshold D is set. limit , taking into account the area of the region and the number of nodes in the region, the farthest node from the current node is specified:
[0019]
[0020] Among them, m i represents the number of surviving nodes in region i, x region(i) Indicates the boundary length of region i, y region(i) Indicates the border width of region i.
[0021] Furthermore, when forming a chain in a certain area, the node farthest from the base station is first selected as the starting point of the chain. The greedy algorithm is used to calculate the distance between the current node and other unlinked nodes, and the node closest to the current node is selected to form a chain. When the distance between node a and node b is dis a,b <D limit When , it means that the link between a and b is a short link, a is the current node, and b is the next node of a to join the chain; when dis a,b ≥D limit When , it means that the link between a and b is a long link, then b will no longer be added to the link. At this time, a new link is constructed, and the starting point of the new link is still the node farthest from the base station from the nodes that have not been linked. The above process is repeated until all nodes in the area are linked, ending the linking stage.
[0022] Furthermore, when selecting the leader node of the main chain, we start from the node closest to the base station and select the leader node of the main chain in each area. The condition for replacing the leader node is to determine whether the node energy is less than the energy threshold E min and is less than the average residual energy E avg ,If the judgment condition is met, the next node closest to the base station is found as the leader node.
[0023] Furthermore, when selecting the main chain leader node, the distance d between the node and the base station and the average energy E of the surviving nodes in the area are comprehensively considered. avg And the node residual energy E rem (i);
[0024]
[0025] Among them, E ij represents the energy of node i in region j, n j represents the number of surviving nodes in region j;
[0026] Energy threshold E min for:
[0027]
[0028] Furthermore, after the selection of the main chain leader node is completed, the chain where the leader node is located represents the main chain. The connection between other sub-chains and the main chain is determined based on the distance between each chain. The shortest distance between chains is calculated, that is, the shortest distance from a node on a chain to a node on another chain. The two chains with the shortest distance are connected.
[0029] Furthermore, multiple chains are layered. Assuming that the main chain has been determined and the level of the main chain is 1, when the distance between node i of a chain and node k of the main chain is the shortest distance between the chain and all chains in the same region, the nodes i and k of the chain are linked, and node i is selected as the head node of the chain. The level of the chain directly connected to the main chain is 2. This process is repeated, and the level of the chain directly connected to the chain with level 2 is 3, until all chains are successfully connected and the head node and the specified level are selected to end the connection between the sub-chains.
[0030] In a second aspect, the present invention provides a non-transitory computer-readable storage medium, which is used to store computer instructions. When the computer instructions are executed by a processor, the low-power wireless network data transmission method based on the WAPI protocol as described in the first aspect is implemented.
[0031] In a third aspect, the present invention provides a computer device comprising a memory and a processor, wherein the processor and the memory communicate with each other, the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the low-power wireless network data transmission method based on the WAPI protocol as described in the first aspect.
[0032] In a fourth aspect, the present invention provides an electronic device comprising: a processor, a memory, and a computer program; wherein the processor is connected to the memory, and the computer program is stored in the memory. When the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device executes instructions for implementing the low-power wireless network data transmission method based on the WAPI protocol as described in the first aspect.
[0033] The beneficial effects of the present invention are as follows: by evenly partitioning the network model and setting a dynamic maximum distance threshold, comprehensively considering the area of the region and the number of nodes in the region, and stipulating the node farthest from the current node, the generation of long chains is effectively avoided. When selecting the main chain leader node, the distance between the node and the base station, the average residual energy of the surviving nodes in the region, and the residual energy of the node are comprehensively considered, which can ensure that the main chain leader node is always closest to the base station when the energy threshold conditions are met, thereby reducing the energy consumption of the leader node in transmitting data to the base station. By improving the chain formation rules and comprehensively considering multiple factors to select the leader node, the transmission energy consumption of the nodes in the network is reduced, the energy consumption of the entire network is balanced, the number of rounds of node death is delayed, and the survival time of the network is extended. By performing WAPI authentication, only sensor nodes that pass the WAPI identity authentication can participate in wireless network communications, thereby ensuring the security of data transmission.
[0034] Additional advantages of the present invention will be more clearly given in the following description or learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0036] Figure 1 This is a flow chart of a low-power wireless network data transmission method based on the WAPI protocol according to an embodiment of the present invention.
[0037] Figure 2 This is a schematic diagram of a node energy consumption model according to an embodiment of the present invention.
[0038] Figure 3 Schematic diagram of the network model in the DMDT_PEGASIS protocol described in an embodiment of the present invention.
[0039] Figure 4 This is a flowchart for building a multi-chain according to an embodiment of the present invention.
[0040] Figure 5 This is a schematic diagram of data transmission according to an embodiment of the present invention.
[0041] Figure 6 This is a flow chart of the DMDT_PEGASIS protocol described in an embodiment of the present invention.
[0042] Figure 7 This is the PEGASIS link diagram described in an embodiment of the present invention.
[0043] Figure 8 This is the DMDT_PEGASIS link diagram described in an embodiment of the present invention.
[0044] Figure 9 This is a comparison diagram of network residual energy according to an embodiment of the present invention.
[0045] Figure 10 This is a schematic diagram of the number of surviving nodes according to an embodiment of the present invention.
[0046] Figure 11 This is a comparison chart of node death ratios according to an embodiment of the present invention. DETAILED DESCRIPTION
[0047] The embodiments of the present invention are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention and are not to be construed as limiting the present invention.
[0048] Those skilled in the art will understand that unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which this invention belongs.
[0049] It should also be understood that terms, such as those defined in commonly used dictionaries, should be understood to have a meaning consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless as defined herein.
[0050] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a," "an," "said," and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, and / or groups thereof.
[0051] In the description of this specification, reference to the terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Those skilled in the art may combine and integrate different embodiments or examples described in this specification, as well as features of different embodiments or examples, unless otherwise contradictory.
[0052] To facilitate understanding of the present invention, the present invention is further explained below with reference to specific embodiments in conjunction with the accompanying drawings, and the specific embodiments do not constitute a limitation on the embodiments of the present invention.
[0053] Those skilled in the art should understand that the drawings are merely schematic diagrams of embodiments, and the components in the drawings are not necessarily necessary for implementing the present invention.
[0054] To ensure the information security of wireless sensor networks in smart grids, the present invention proposes a low-power wireless network based on the WAPI protocol. This protocol uses a WAPI module with an encryption chip for data transmission. After passing the WAPI authentication process, normal data encryption communication is performed. To address the long chain problem in the PEGASIS protocol, an improved protocol (DMDT-PEGASIS protocol) based on the PEGASIS protocol is proposed. This protocol first partitions the network area to reduce the possibility of long chains. Based on a chaining rule based on a dynamic maximum distance threshold, a greedy algorithm is used to form chains. When the distance of the node closest to the current node exceeds the dynamic maximum distance threshold, a new chain is established to avoid the generation of long chains, thereby preventing the node from consuming too much energy and causing premature death. To address the uneven energy consumption of leader nodes in the PEGASIS protocol, the present invention comprehensively considers multiple factors, including the distance of the node from the base station, the remaining energy of the node, and the average energy in the region, to reduce the energy consumption caused by the random replacement of leader nodes.
[0055] Example 1
[0056] In this embodiment 1, a low-power wireless network data transmission method based on the WAPI protocol is provided, including: a sensor network formed by multiple randomly deployed sensor nodes, partitioning the network model, and each area has the same number of nodes; WAPI authentication of the sensor nodes, and the nodes that pass the WAPI identity authentication participate in network communication; constructing a chain in each area through a greedy algorithm and a prescribed chain formation rule, and recording the distance between connected nodes; selecting each chain head node according to the rule of selecting the main chain leader node and the branch chain head node; comprehensively considering the distance between the leader node and the base station, the average energy of the surviving nodes in the area, and the remaining energy of the nodes, only those that meet the requirements of the leader node being more The leading node will be reselected only when the conditions are changed to ensure that the leading node of the main chain is always closest to the base station when the energy threshold conditions are met; the node data is transmitted in each area, and the sensor data is encrypted using WAPI during transmission to prevent data leakage or tampering; the data is transmitted from the two end nodes of each chain to the head node, and the data between the two chains is transmitted from the head node with a higher level to the node with a lower level, ensuring that the data is transmitted towards the leading node of the main chain. The intermediate nodes all fuse the data of the current node and the previous node into a data packet of the same length, and continue to transmit data to the next node. Finally, the leading node of the main chain completes the data fusion and sends it to the base station.
[0057] After the area division is completed, the chain formation stage is entered in each area, and the dynamic maximum distance threshold D is set. limit , taking into account the area of the region and the number of nodes in the region, the farthest node from the current node is specified:
[0058]
[0059] Among them, m i represents the number of surviving nodes in region i, x region(i) Indicates the boundary length of region i, y region(i) Indicates the border width of region i.
[0060] When forming a chain in a certain area, the node farthest from the base station is first selected as the starting point of the chain. Using the greedy algorithm, the distance between the current node and other unlinked nodes is calculated, and the node closest to the current node is selected to form a chain. When the distance between node a and node b is a,b <D limit When , it means that the link between a and b is a short link, a is the current node, and b is the next node of a to join the chain; when dis a,b ≥D limit When , it means that the link between a and b is a long link, then b will no longer be added to the link. At this time, a new link is constructed, and the starting point of the new link is still the node farthest from the base station from the nodes that have not been linked. The above process is repeated until all nodes in the area are linked, ending the linking stage.
[0061] When selecting the leader node of the main chain, we start from the node closest to the base station and select the leader node of the main chain in each area. The condition for changing the leader node is to determine whether the node energy is less than the energy threshold E min and is less than the average residual energy E avg ,If the judgment condition is met, the next node closest to the base station is found as the leader node.
[0062] When selecting the main chain leader node, the distance d between the node and the base station and the average energy E of the surviving nodes in the area are comprehensively considered. avg And the node residual energy E rem (i);
[0063]
[0064] Among them, E ij represents the energy of node i in region j, n j represents the number of surviving nodes in region j;
[0065] Energy threshold E min for:
[0066]
[0067] After the selection of the main chain leader node is completed, the chain where the leader node is located represents the main chain. The connection between other sub-chains and the main chain is determined by the distance between each chain. The shortest distance between chains is calculated, that is, the shortest distance from a node on a chain to a node on another chain. The two chains with the shortest distance are connected.
[0068] Multiple chains are processed in layers. Assuming that the main chain has been determined and the level of the main chain is 1, when the distance between node i of a chain and node k of the main chain is the shortest distance between the chain and all chains in the same region, the nodes i and k of the chain are linked, and node i is selected as the head node of the chain. The level of the chain directly connected to the main chain is 2. This process is repeated, and the level of the chain directly connected to the chain with level 2 is 3, until all chains are successfully connected and the head node and the specified level are selected to end the connection between the sub-chains.
[0069] Example 2
[0070] The problem to be solved is the problem of long chains and unbalanced energy consumption in PEGASIS in wireless sensor networks. At present, the selection of leader nodes does not take into account the influence of multiple factors, resulting in unbalanced energy consumption. In order to avoid the generation of long chains, most of the current improvement methods do not achieve dynamic adjustment. To solve the above problems, in this embodiment 2, a low-power wireless network based on the WAPI protocol is provided, which will use a WAPI module with an encryption chip for data transmission. After passing the WAPI authentication process, normal data encryption communication is carried out. Figure 1 As shown, the low-power wireless network based on the WAPI protocol includes the following steps.
[0071] (1) A sensor network consisting of N randomly deployed sensor nodes is established. All sensor nodes are randomly distributed in a 400×400 square area. All nodes are assigned a unique fixed ID number and have the same initial energy, data fusion capability and other properties.
[0072] (2) Uniform partitioning is adopted, which is divided into four areas. Each area contains 25 sensor nodes, ensuring that the number of nodes in each area is the same, thereby ensuring the same node density when the nodes are randomly distributed in the area, which helps to balance energy consumption.
[0073] (3) Perform WAPI authentication. Only sensor nodes that pass WAPI identity authentication can participate in network communication.
[0074] (4) After the area division is completed, the chain formation stage is entered in each area. Therefore, only nodes in the same area will enter the chain. Each area is chained separately, and the long chain problem is solved based on the dynamic maximum distance threshold.
[0075] (5) Taking into account the distance between the leader node and the base station, the average energy of the surviving nodes in the area, and the remaining energy of the nodes, the leader node will be reselected only when the leader node replacement conditions are met, ensuring that the main chain leader node is always closest to the base station when the energy threshold conditions are met.
[0076] (6) Node data is transmitted within each area. During transmission, WAPI is used to encrypt sensor data to prevent data leakage or tampering. Data is transmitted from the two end nodes of each chain toward the head node. Between the two chains, data is transmitted from the head node with a higher level to the node with a lower level, ensuring that the data is transmitted toward the leader node of the main chain. The intermediate nodes fuse the data of the current node and the previous node into a data packet of the same length and continue to transmit data to the next node. Finally, the leader node of the main chain completes the data fusion and sends it to the base station.
[0077] With the continuous advancement of smart grid construction and digital transformation, as well as the rapid development of technologies such as mobile IoT and big data analytics, the demand for wireless device applications is growing. Achieving low-power transmission in wireless sensor networks while ensuring security is an urgent issue. The specific improvements to this embodiment are as follows.
[0078] The system model of the proposed improved algorithm based on the PEGASIS protocol (DMDT_PEGASIS) is the same as the protocol model in the subsequent comparative simulation.
[0079] The network model of this embodiment is:
[0080] Assume a sensor network consisting of N randomly deployed sensor nodes:
[0081] (1) Assume that all sensor nodes are randomly distributed in a 400×400 square area.
[0082] (2) All nodes in the square area have a unique fixed ID number representing themselves.
[0083] (3) Wireless sensor networks use stationary sensors. After nodes are randomly generated, their positions will not change. Therefore, all nodes have the same initial energy, data fusion capability and other properties.
[0084] (4) Each node can not only communicate with any other node in the network, but also communicate directly with the BS node.
[0085] (5) The base station is located at a fixed location and has a stable energy supply, but the energy of the other nodes is limited and cannot be replenished.
[0086] All protocols involved in this embodiment adopt the first-order radio energy consumption model. The energy consumption of the node mainly includes three processes: data transmission, data fusion, and data reception. Figure 2 shown.
[0087] In such Figure 2 In the node energy consumption model shown, the node energy consumption needs to be further divided into a multipath fading model and a free space model according to the different transmission distances. Assuming that the transmission distance of the node is d, when d < d0, it is a free space model, and when d ≥ d0, it is a multipath fading model. This is shown in Equation (1).
[0088]
[0089] Among them, E d Represents the energy loss during data transmission, ε fs represents the energy loss factor of the free space model, ε amp Represents the energy loss factor in the multipath fading model. When calculating the energy consumption of a node during transmission, an appropriate energy consumption model is selected based on the distance between the node and its adjacent nodes. is the transmission distance threshold for dividing the spatial model.
[0090] from Figure 2 It can be seen that when data is transmitted between nodes, the energy consumed by the node to send data is shown in Formula 2.
[0091]
[0092] Among them, E elec is the energy consumed when receiving each bit of data.
[0093] When data is transmitted between nodes, the energy consumed by the node to receive data is shown in Equation 3.
[0094] E RX =E elec ×k (3)
[0095] Among them, E elec is the energy consumed when receiving each bit of data.
[0096] Except for the chain head node, each node needs to undergo a data fusion process after receiving the data. The energy consumed by fusing the received data packets into a data packet of length Kb is E DA As shown in formula (4).
[0097] E DA =E da ×k (4)
[0098] Among them, Eda to fuse the energy of each bit of data.
[0099] Due to the transmission characteristics of the chain protocol, when transmitting on the chain, in addition to the two end nodes of each chain, other nodes will experience the processes of sending, receiving and fusing, so the total energy consumed by the node each time is shown in formula (5).
[0100] E(i) = E TX + E DA + E RX (5)
[0101] In view of the problem that the energy is consumed too quickly due to the rotation of the chain leader node in the traditional PEGASIS protocol, and the problem that the chain is too long due to the use of the greedy algorithm, the embodiment improves the traditional protocol and proposes a DMDT-PEGASIS protocol, which comprehensively considers the position of the leader node from the base station and the residual energy of the leader node to select a more suitable leader node. In the chain building process, first, the region is divided, then the maximum distance threshold is specified, and the region is independently chained to prevent the generation of a long chain. The improved protocol mainly has four stages of region division, chain formation, leader node selection and data transmission.
[0102] The classic PEGASIS protocol uses the greedy algorithm to find the nearest node of the current node in the chain formation process, but cannot avoid the generation of a long chain. To solve this problem, the embodiment first divides the node region, reduces the network region of the chain formation, and reduces the possibility of generating a long chain.
[0103] The partition is divided into uniform partition and non-uniform partition. The non-uniform partition is similar to the clustering in the LEACH protocol. When selecting a cluster head, the ordinary node will usually select the cluster head closest to itself to join the region based on the distance from the cluster head. This method will cause the energy consumption of the leader node to accelerate and the nodes to die quickly when there are many nodes in the region. The uniform partition can well solve this problem and ensure that the number of nodes in each region is the same, so as to ensure that the node density is the same when the nodes in the region are randomly distributed, which is helpful to balance the energy consumption and prolong the life of the node. Therefore, in the DMDT_PEGASIS protocol, the network space is first uniformly partitioned to reduce the possibility of generating a long chain. The network model of the embodiment is shown in Figure 3 .
[0104] After the region division, the chain formation stage in each region is entered, so only the nodes in the same region will enter the chain, and each region is independently chained. In view of the deficiency of the greedy algorithm which only finds the nearest node for the current node, the embodiment further improves the possibility of generating a long chain by setting a dynamic maximum distance threshold D limit, taking into account the area of the region and the number of nodes in the region, the node with the longest distance from the current node is specified. As shown in Equation 6
[0105]
[0106] Among them, m i represents the number of surviving nodes in region i, x region(i) Indicates the boundary length of region i, y region(i) Indicates the border width of region i.
[0107] When forming a chain in a certain area, the node farthest from the base station is first selected as the starting point of the chain. The greedy algorithm is used to calculate the distance between the current node and other unlinked nodes, and the node closest to the current node is selected to form a chain. a,b <D limit When , it means that the link between a and b is a short link, a is the current node, and b is the next node of a to join the chain; when dis a,b ≥D limit When , it means that the link between a and b is a long link, then b will no longer be added to the chain. At this time, a new link needs to be built. The starting point of the link is still the node farthest from the base station among the nodes that have not been linked. Repeat the above process until all nodes in the area are linked, and the linking stage ends. The flowchart of building a multi-chain is as follows Figure 4 shown.
[0108] In the chain protocol, the selection of the chain leader node has a direct impact on the transmission direction of node data in the WSN. This embodiment does not adopt the method of rotating the leader node. In order to minimize the reverse transmission of data and balance the energy consumption as much as possible, the distance d between the node and the base station and the average energy E of the surviving nodes in the area are comprehensively considered when selecting the main chain leader node. avg And the node residual energy E rem (i). E avg As shown in Formula 7.
[0109]
[0110] Among them, E ij represents the energy of node i in region j (j=1, 2, 3, 4), n j Indicates the number of surviving nodes in region j.
[0111] When selecting the leader node of the main chain, we start from the node closest to the base station and select the leader node of the main chain in each area. The condition for changing the leader node is to determine whether the node energy is less than the energy threshold E min and is less than the average residual energy E avgIf the judgment condition is met, the next node closest to the base station is found as the leader node. Energy threshold E min As shown in formula (8).
[0112]
[0113] Therefore, it can be ensured that the main chain leader node is always closest to the base station when the energy threshold condition is met, reducing the energy consumption of the leader node in transmitting data to the base station.
[0114] After the main chain leader node is selected, the chain where the leader node is located represents the main chain. The connection between other sub-chains and the main chain is determined by the distance between each chain. The shortest distance between chains is calculated, that is, the shortest distance from a node on a chain to a node on another chain. The two chains with the shortest distance are connected. Multiple chains are layered. Assuming that the main chain has been determined and the main chain level is 1, when the distance between node i of a chain and node k of the main chain is the shortest distance between the chain and all chains in the same region, nodes i and k of the chain are linked, and node i is selected as the head node of the chain. The chain level directly connected to the main chain is 2. This process is repeated. The chain level directly connected to the chain with level 2 is 3, until all chains are successfully connected and the head node and the specified level are selected to end the connection between sub-chains.
[0115] When all links are connected and the head node is selected, the node data is transmitted in each area, starting from the two end nodes of each chain toward the head node. The data is transmitted from the head node with a higher level to the node with a lower level between the two chains, ensuring that the data is transmitted toward the leader node of the main chain. The intermediate nodes fuse the data of the current node and the previous node into a data packet of the same length, and continue to transmit the data to the next node. Finally, the leader node of the main chain completes the data fusion and sends it to the base station, completing the data transmission stage. The transmission process is as follows: Figure 5 shown.
[0116] In summary, if Figure 6 As shown, the DMDT_PEGASIS protocol process is as follows:
[0117] Step 1) partition the network model so that each area has the same number of nodes;
[0118] Step 2) Record the distances of all surviving nodes from the base station;
[0119] Step 3) Build a chain in each area using a greedy algorithm and the specified chaining rules, and record the distance between connected nodes;
[0120] Step 4) Select each chain head node according to the rules for selecting the main chain leader node and the branch chain head node;
[0121] Step 5) Data is transmitted from the chain with a higher level to the chain with a lower level, and the energy consumption of the node during the data transmission process is calculated according to the energy model;
[0122] Step 6) After completing one round, record the number of remaining nodes and the remaining energy of the nodes in each area;
[0123] Step 7) If there are still surviving nodes in the network model, return to step 3) until the number of surviving nodes reaches 0.
[0124] In this embodiment, the above theory is simulated and verified on the MATLAB platform. Since the DMDT_PEGASIS protocol integrates the idea of selecting multiple cluster heads of the LEACH protocol and improves the shortcomings of the chaining rule of the PEGASIS protocol, this embodiment analyzes and compares the LEACH protocol, the PEGASIS protocol and the DMDT_PEGASIS protocol in terms of chain length, number of surviving nodes, network residual energy, and death ratio. The initial network parameters set are shown in Table 1.
[0125] Table 1 Network parameter settings
[0126]
[0127] Compare the links formed by the improved algorithm DMDT_PEGASIS and the PEGASIS algorithm. Figure 7 The following is the PEGASIS protocol link diagram. Figure 8 This is the DMDT_PEGASIS protocol link diagram.
[0128] Depend on Figure 7 、 Figure 8 As can be seen, the chain between nodes labeled 56 and 39 in the PEGASIS algorithm is significantly longer. Comparing the link lengths of the two algorithms in Table 2 shows that the DMTD_PEGASIS protocol, through partitioning and setting the maximum distance threshold, generates a more balanced link graph, effectively avoiding the generation of long chains. The DMTD_PEGASIS protocol reduces the average link distance by 23.6% compared to the pre-improved protocol. The generation of long chains is a key factor in excessive energy consumption, so the improved algorithm effectively reduces the energy consumption of inter-node transmission.
[0129] Table 2 Link length comparison
[0130]
[0131] The improved algorithm DMTD_PEGASIS is compared with PEGASIS and LEACH algorithms respectively. The network residual energy comparison chart of different protocols is as follows: Figure 9 As shown in the figure, the network residual energy of DMTD_PEGASIS is consistently higher than that of PEGASIS and LEACH. When energy consumption reaches 50%, DMTD_PEGASIS, PEGASIS, and LEACH protocols run for 526, 380, and 311 rounds, respectively. The improved protocols are delayed by 38.4% and 69.1% compared to the other two protocols. When energy consumption reaches 90%, DMTD_PEGASIS, PEGASIS, and LEACH protocols run for 838, 702, and 516 rounds, respectively, which are delayed by 19.4% and 62.4% compared to the other two protocols.
[0132] In summary, DMTD_PEGASIS is superior to PEGASIS and LEACH protocols in terms of network energy balance.
[0133] pass Figure 10 and Figure 11 As can be seen, the improved algorithm effectively extends the number of death rounds when the death rate reaches 20%, 40%, 60%, 80%, and 100%. When 20% of the nodes die, the DMTD_PEGASIS, PEGASIS, and LEACH protocols run for 828, 630, and 557 rounds, respectively. When all nodes die, the DMTD_PEGASIS, PEGASIS, and LEACH protocols run for 1249, 1053, and 718 rounds, respectively. The improved protocol extends its lifecycle by 18.6% and 74% compared to the other two protocols, respectively.
[0134] Energy Efficient Aggregation of Sensor Information Systems (PEGASIS) protocol: PEGASIS evolved from the LEACH protocol, but its topology differs significantly from that of LEACH. While LEACH employs a cluster structure, PEGASIS employs a chain structure. Using a greedy algorithm, PEGASIS constructs a chain from all nodes in the network. Information collected by the network is transmitted along the chain to a chain head node selected by the base station, which then transmits it to the base station. Chain construction begins with the node farthest from the base station. This node sends a probe signal and, by monitoring the response signals from other nodes, determines the nearest node and adds it to the chain. The added node then follows the same process to determine its nearest node (excluding nodes already in the chain) and adds it to the chain. This process continues, ultimately forming a chain that includes all nodes. Once the base station selects the cluster head, a token control mechanism is used for data transmission. First, a token signal is passed to the nodes at both ends of the chain. Each node sends data to the next node in the chain. The receiving node merges its own data with the received data and then sends the merged data to the next node. Finally, the chain head node merges the data from both ends and sends it to the base station. If a node in the chain dies, the network needs to be re-established.
[0135] WAPI (Wireless LAN Authentication and Privacy Infrastructure) is a security protocol. Like infrared, Bluetooth, GPRS, and CDMA1X, WAPI is a wireless transmission protocol. It consists of the WLAN Authentication Infrastructure (WAI) and the WLAN Privacy Infrastructure (WPI). WAI uses an elliptic curve-based public key certificate system, enabling bidirectional identity authentication between wireless clients (STAs) and access points (APs) through an authentication server (AS). To ensure the confidentiality of transmitted data, WPI employs symmetric cryptographic algorithms for encryption and decryption, fully guaranteeing the security of data transmission.
[0136] Example 3
[0137] This embodiment 3 provides a non-transitory computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the low-power wireless network data transmission method based on the WAPI protocol as described above is implemented. The method includes:
[0138] The sensor network formed by a plurality of randomly deployed sensor nodes is partitioned into network models, each region having the same number of nodes;
[0139] The sensor nodes are authenticated by WAPI, and the nodes authenticated by WAPI participate in network communication;
[0140] In each region, a chain is constructed by a greedy algorithm and a specified chain formation rule, and the distance between connected nodes is recorded;
[0141] According to the rules for selecting the main chain leader node and the branch chain head node, each chain head node is selected;
[0142] The distance of the leader node from the base station, the average energy of the surviving nodes in the region, and the residual energy of the nodes are comprehensively considered, and only when the leader node replacement condition is met, the leader node is reselected, ensuring that the main chain leader node is always closest to the base station when the energy threshold condition is met;
[0143] The node data is transmitted in each region, and the sensor data is encrypted by WAPI during transmission to prevent data leakage or tampering; the data is transmitted from the two end nodes of each chain to the head node, and the data is transmitted from the high-level head node to the low-level node between the two chains, ensuring that the data is transmitted towards the leader node of the main chain, and the intermediate nodes fuse the data of the current node and the previous node into a data packet of the same length, and continue to transmit the data to the next node. Finally, the leader node of the main chain completes data fusion and sends it to the base station.
[0144] Embodiment 4
[0145] The embodiment 4 provides a computer device, comprising a memory and a processor, the processor and the memory communicate with each other, the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the low-power wireless network data transmission method based on the WAPI protocol as described above, the method comprising:
[0146] The sensor network formed by a plurality of randomly deployed sensor nodes is partitioned into network models, each region having the same number of nodes;
[0147] The sensor nodes are authenticated by WAPI, and the nodes authenticated by WAPI participate in network communication;
[0148] In each region, a chain is constructed by a greedy algorithm and a specified chain formation rule, and the distance between connected nodes is recorded;
[0149] According to the rules for selecting the main chain leader node and the branch chain head node, each chain head node is selected;
[0150] Taking into account the distance between the leader node and the base station, the average energy of the surviving nodes in the area, and the remaining energy of the nodes, the leader node will be re-selected only when the leader node replacement conditions are met, ensuring that the main chain leader node is always closest to the base station when the energy threshold conditions are met;
[0151] Node data is transmitted within each area, and sensor data is encrypted using WAPI during transmission to prevent data leakage or tampering; data is transmitted from the two end nodes of each chain toward the head node, and between the two chains, data is transmitted from the head node with a higher level to the node with a lower level, ensuring that the data is transmitted toward the leader node of the main chain. The intermediate nodes fuse the data of the current node and the previous node into a data packet of the same length, and continue to transmit data to the next node. Finally, the leader node of the main chain completes the data fusion and sends it to the base station.
[0152] Example 5
[0153] This embodiment 5 provides an electronic device, including: a processor, a memory, and a computer program; wherein the processor is connected to the memory, and the computer program is stored in the memory. When the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to execute instructions for implementing the low-power wireless network data transmission method based on the WAPI protocol as described above, the method including:
[0154] The sensor network is formed by multiple randomly deployed sensor nodes. The network model is partitioned so that each area has the same number of nodes.
[0155] Perform WAPI authentication on sensor nodes, and nodes that pass WAPI authentication can participate in network communication;
[0156] In each area, a chain is constructed using a greedy algorithm and the prescribed chaining rules, and the distances between connected nodes are recorded;
[0157] Select each chain head node according to the rules for selecting the main chain leader node and the branch chain head node;
[0158] Taking into account the distance between the leader node and the base station, the average energy of the surviving nodes in the area, and the remaining energy of the nodes, the leader node will be re-selected only when the leader node replacement conditions are met, ensuring that the main chain leader node is always closest to the base station when the energy threshold conditions are met;
[0159] Node data is transmitted within each area, and sensor data is encrypted using WAPI during transmission to prevent data leakage or tampering; data is transmitted from the two end nodes of each chain toward the head node, and between the two chains, data is transmitted from the head node with a higher level to the node with a lower level, ensuring that the data is transmitted toward the leader node of the main chain. The intermediate nodes fuse the data of the current node and the previous node into a data packet of the same length, and continue to transmit data to the next node. Finally, the leader node of the main chain completes the data fusion and sends it to the base station.
[0160] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0161] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0162] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0163] These computer program instructions can also be loaded onto a computer or other programmable data processing device, and a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide the functions for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1A step that specifies a function in one or more boxes.
[0164] Although the above describes the specific embodiments of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solutions disclosed in the present invention without the need for creative work should be included in the scope of protection of the present invention.
Claims
1. A low-power wireless network data transmission method based on the WAPI protocol, characterized in that: include: The sensor network is formed by multiple randomly deployed sensor nodes. The network model is partitioned so that each area has the same number of nodes. Perform WAPI authentication on sensor nodes, and nodes that pass WAPI authentication can participate in network communication; In each area, a chain is constructed by a greedy algorithm and the prescribed chaining rules, and the distance between the connected nodes is recorded. After the area division is completed, the chaining stage in each area is entered, and the dynamic maximum distance threshold D is set. limit , taking into account the area of the region and the number of nodes in the region, the farthest node from the current node is specified: Among them, m i represents the number of surviving nodes in region i, x region(i) Indicates the boundary length of region i, y region(i) Indicates the border width of region i; Select each chain head node according to the rules for selecting the main chain leader node and the branch chain head node; Taking into account the distance between the leader node and the base station, the average energy of the surviving nodes in the area, and the remaining energy of the nodes, the leader node will be re-selected only when the leader node replacement conditions are met, ensuring that the main chain leader node is always closest to the base station when the energy threshold conditions are met; Node data is transmitted within each area, and sensor data is encrypted using WAPI during transmission to prevent data leakage or tampering; data is transmitted from the two end nodes of each chain toward the head node, and between the two chains, data is transmitted from the head node with a higher level to the node with a lower level, ensuring that the data is transmitted toward the leader node of the main chain. The intermediate nodes fuse the data of the current node and the previous node into a data packet of the same length, and continue to transmit data to the next node. Finally, the leader node of the main chain completes the data fusion and sends it to the base station.
2. The low-power wireless network data transmission method based on the WAPI protocol according to claim 1, characterized in that: When forming a chain in a certain area, the node farthest from the base station is first selected as the starting point of the chain. Using the greedy algorithm, the distance between the current node and other unlinked nodes is calculated, and the node closest to the current node is selected to form a chain. When the distance between node a and node b is a,b <D limit When , it means that the link between a and b is a short link, a is the current node, and b is the next node of a to join the chain; when dis a,b ≥D limit When , it means that the link between a and b is a long link, then b will no longer be added to the link. At this time, a new link is constructed, and the starting point of the new link is still the node farthest from the base station from the nodes that have not been linked. The above process is repeated until all nodes in the area are linked, ending the linking stage.
3. The low-power wireless network data transmission method based on the WAPI protocol according to claim 1, characterized in that: When selecting the leader node of the main chain, we start from the node closest to the base station and select the leader node of the main chain in each area; the condition for replacing the leader node is to judge whether the node energy is less than the energy threshold E min and is less than the average residual energy E avg ,If the judgment condition is met, the next node closest to the base station is found as the leader node.
4. The low-power wireless network data transmission method based on the WAPI protocol according to claim 3, characterized in that: When selecting the main chain leader node, the distance d between the node and the base station and the average energy E of the surviving nodes in the area are comprehensively considered. avg And the node residual energy E rem (i); Among them, E ij represents the energy of node i in region j, n j represents the number of surviving nodes in region j; Energy threshold E min for: Where d represents the transmission distance between nodes, and d0 represents the transmission distance threshold between nodes.
5. The low-power wireless network data transmission method based on the WAPI protocol according to claim 1, characterized in that: After the selection of the main chain leader node is completed, the chain where the leader node is located represents the main chain. The connection between other sub-chains and the main chain is determined by the distance between each chain. The shortest distance between chains is calculated, that is, the shortest distance from a node on a chain to a node on another chain. The two chains with the shortest distance are connected.
6. The low-power wireless network data transmission method based on the WAPI protocol according to claim 5, characterized in that: Multiple chains are processed in layers. Assuming that the main chain has been determined and the level of the main chain is 1, when the distance between node i of a chain and node k of the main chain is the shortest distance between the chain and all chains in the same region, the nodes i and k of the chain are linked, and node i is selected as the head node of the chain. The level of the chain directly connected to the main chain is 2. This process is repeated, and the level of the chain directly connected to the chain with level 2 is 3, until all chains are successfully connected and the head node and the specified level are selected to end the connection between the sub-chains.
7. A non-transitory computer-readable storage medium, characterized in that The non-transitory computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by the processor, the low-power wireless network data transmission method based on the WAPI protocol according to any one of claims 1 to 6 is implemented.
8. A computer device, characterized in that: It includes a memory and a processor, the processor and the memory communicate with each other, the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the low-power wireless network data transmission method based on the WAPI protocol as described in any one of claims 1 to 6.
9. An electronic device, characterized in that: include: A processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to execute instructions for implementing the low-power wireless network data transmission method based on the WAPI protocol as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and base station for managing radio resources of device-to-device communication
CN106576330A
Wireless sensor network routing method based on area chaining
CN116963226A