A wireless sensor network simulation method based on cellular automata
Through the simulation method based on cellular automata, combined with the grid space model and fault model, the wireless sensor network is updated and evaluated, which solves the problem of inaccurate invulnerability evaluation in the existing technology and realizes the improvement of wireless sensor network. Accurate simulation and performance testing under dynamic conditions improve the survivability and lifespan of the network.
Patent Information
- Application Number
- CN202411029065.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-07-30
AI Technical Summary
Existing wireless sensor network models cannot accurately represent the invulnerability performance of the network, especially under factors such as network degree distribution, edge weight influence, node communication radius, geospatial location constraints, energy failure and component failure, resulting in invulnerability. Assessments are difficult to make accurately.
The simulation method based on cellular automata is used to process the wireless sensor network information through the grid space simulation model, construct the cell state value and adjacent state value, use the transfer function to update the network state, and combine the fault model and energy value calculation subroutine Model to evaluate the survival rate, network coverage and network efficiency of the network, thereby achieving invulnerability assessment.
It achieves accurate simulation and performance testing of wireless sensor networks under dynamic conditions, improves the accuracy and speed of invulnerability assessment, provides a theoretical basis for wireless network mission planning, extends network life and improves invulnerability. .
Smart Images

Figure CN118574150B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer simulation, and in particular to a wireless sensor network simulation method based on cellular automata. Background Art
[0002] In recent years, with the increasing maturity of sensor technology, wireless communication technology and microprocessor technology, as well as the decline of related hardware and computing costs, wireless sensor networks that use a large number of integrated sensor nodes with the ability to collect information, process data and wirelessly communicate to monitor designated areas have been widely used and gradually become an important underlying network for realizing Internet of Things applications. In practical applications, due to the characteristics of wireless sensor networks such as large scale, limited resources, random deployment, self-organization, and dynamic changes in internal factors such as topology and transmission paths, it is difficult to predict the actual network operation status and life cycle of its actual work, and it is also difficult to evaluate the reliability and availability of its collected data. The existing wireless sensor network models have inaccurate modeling of factors such as network degree distribution, network edge weight, node communication radius, geographic space location constraints, energy failure, component failure, network invulnerability, and the failure of network assumptions to cover real network characteristics, and cannot truly represent the invulnerability performance of wireless sensor networks in actual situations.
[0003] Therefore, taking into account factors such as network degree distribution, network edge weight influence, the impact of node communication radius on network energy consumption, geographic location constraints, the existence of network assumption failure scenarios that cannot cover real network characteristics, energy failure, component failure, and network invulnerability, a feasible and effective invulnerability assessment method and device are constructed, which has important theoretical and practical value for studying the operation mechanism and practical application of wireless sensor networks. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a wireless sensor network simulation method and device based on cellular automata, which comprehensively considers factors such as network degree distribution, network edge weight influence, the influence of node communication radius on network energy consumption, geographic space location constraints, the existence of network assumption failure situations that cannot cover real network characteristics, energy failure, component failure, network invulnerability, etc., to improve the accuracy of invulnerability assessment.
[0005] In order to solve the above technical problems, the first aspect of the embodiment of the present invention discloses a wireless sensor network simulation method based on cellular automata, comprising:
[0006] S1, obtaining wireless sensor network information; the wireless sensor network information includes the network distribution range, node location information, node connection information, node status information, and node type information of the wireless sensor network; the wireless sensor network includes wireless sensor nodes; the node connection information includes information of adjacent nodes connected to each node; the node type information includes edge nodes and aggregation nodes; the aggregation node is used to receive data from edge nodes; the node status information includes normal operation and failure;
[0007] S2, using a grid space simulation model to process the wireless sensor network information to obtain wireless sensor grid information;
[0008] S3, updating and evaluating the wireless sensor grid information and the wireless sensor network information to obtain wireless sensor network evaluation result information; the wireless sensor network evaluation result information is used to characterize the anti-destruction performance of the wireless sensor network.
[0009] The method of using the grid space simulation model to process the wireless sensor network information to obtain the wireless sensor grid information includes:
[0010] S21, dividing the network distribution range into regular grids to obtain a plurality of cells; the cells include cell range information and network node information; the network node information includes type information and node status information of the wireless sensor nodes included in the cell range;
[0011] S22, determining the network node information of each cell according to the range information of each cell and the network node location information;
[0012] S23, determining a state value of each cell according to the network node information of the cell;
[0013] S24, determining the neighboring state value of each cell according to the sum of the state values of the neighboring cells in the network distribution range;
[0014] S25, determining a transfer function of each cell according to the state value and adjacent state values of the cell;
[0015] S26, using the state values, adjacent state values and transfer functions of all cells, construct the wireless sensor grid information.
[0016] The state updating and evaluation processing of the wireless sensor grid information and the wireless sensor network information to obtain the wireless sensor network evaluation result information includes:
[0017] S31, acquiring attack information of the wireless sensor network; and updating the wireless sensor grid information using the attack information;
[0018] S32, using the fault model to process the wireless sensor grid information to obtain the fault probability and energy value of the initialized cells;
[0019] S33, performing aggregation connection determination processing on the wireless sensor network information and the wireless sensor grid information to obtain an aggregation node set and updated wireless sensor grid information;
[0020] S34, performing status update processing on the aggregation node set, the failure probability and energy value of the cell, and the wireless sensor grid information obtained in S33 to obtain first wireless sensor grid information;
[0021] S35, evaluating the first wireless sensor grid information and the wireless sensor network information to obtain wireless sensor network evaluation result information.
[0022] The aggregation connection determination process includes:
[0023] Using all sink nodes in the wireless sensor network, a sink node set is constructed;
[0024] According to the node connection information in the wireless sensor network information, all edge nodes connected to the sink node and all edge nodes not connected to the sink node are determined;
[0025] Add all edge nodes connected to the sink node to the sink node set; set the state values of the cells corresponding to all edge nodes connected to the sink node to 2; and set the state values of the cells corresponding to all edge nodes not connected to the sink node to 1.
[0026] The state update process is performed on the aggregation node set, the failure probability and energy value of the cell, and the wireless sensor grid information obtained in S33 to obtain the first wireless sensor grid information, including:
[0027] S341, numbering all nodes in the sink node set to obtain sequence numbers of all nodes; setting the current sequence number value to 1;
[0028] S342, obtaining the node corresponding to the current sequence number value in the aggregation node set;
[0029] S343, randomly generate a first discriminant value; the value range of the first discriminant value is (0, 1);
[0030] S344, determining whether the failure probability of the cell corresponding to the node is greater than a first judgment value, if not greater than the first judgment value, setting the state value of the cell corresponding to the node to 1, setting the node to be disconnected from the adjacent sink node, and updating the node connection information in the wireless sensor network information;
[0031] S345, determining whether the energy value of the node is less than or equal to 0, if the energy value of the node is less than or equal to 0, setting the state value of the cell corresponding to the node to 1, setting the node to be disconnected from the adjacent sink node, and updating the node connection information in the wireless sensor network information;
[0032] S346, using the state value of the cell, updating the wireless sensor grid information;
[0033] S347, using the fault model to process the wireless sensor grid information to obtain an updated value of the fault probability and an updated value of the energy value of the cell;
[0034] S348, increasing the current sequence number by 1, determining whether the current sequence number is greater than the total number of nodes in the sink node set, and obtaining a first determination result; if the first determination result is not greater than the total number of nodes in the sink node set, executing S342; if the first determination result is greater than the total number of nodes in the sink node set, executing S349;
[0035] S349, performing aggregation connection determination processing on the updated wireless sensor network information and the wireless sensor grid information, and confirming that the obtained wireless sensor grid information is the first wireless sensor grid information.
[0036] The step of evaluating and processing the first wireless sensor grid information and the wireless sensor network information to obtain wireless sensor network evaluation result information includes:
[0037] Performing survival rate calculation processing on the first wireless sensor grid information and the wireless sensor network information to obtain a survival rate index;
[0038] The expression for calculating the survival rate is:
[0039] ,
[0040] in, is the total number of nodes in the wireless sensor network, represents the survival rate index at time t, represents the number of cells with a state value of 2 in the first wireless sensor grid information, Indicates the state value of the cell corresponding to the node whose node position information is (i, j). Represents wireless sensor grid information;
[0041] Performing network coverage calculation processing on the first wireless sensor grid information and the wireless sensor network information to obtain network coverage;
[0042] The expression for calculating the network coverage is:
[0043] ,
[0044] in, Indicates the state judgment value of the node with node position information (i, j). When the sum of the state values of the cells corresponding to all the connected nodes of the node with node position information (i, j) is equal to the number of all the connected nodes of the node with node position information (i, j), ; When the sum of the state values of the cells corresponding to all the connected nodes of the node whose node position information is (i, j) is greater than the number of all the connected nodes of the node whose node position information is (i, j), ; represents the sum of the state values of all cells, and n represents the side length of the network distribution range of the wireless sensor network;
[0045] Performing network efficiency calculation processing on the first wireless sensor grid information and the wireless sensor network information to obtain a network efficiency value;
[0046] The expression for calculating the network efficiency is:
[0047] ,
[0048] in, represents the set of nodes that work normally at time t, The node whose position information is (i, j) is in The number of hops from the node to its adjacent sink node at any given moment;
[0049] The survival rate index, network coverage rate and network efficiency value are combined and processed to obtain wireless sensor network evaluation result information.
[0050] The fault model includes an energy value calculation sub-model and a fault probability calculation sub-model;
[0051] The energy value calculation sub-model is used to calculate the energy value of the node according to the amount of messages sent by the node; the calculation expression of the energy value calculation sub-model is:
[0052] ,
[0053] ,
[0054] in, To calculate the energy value of the node at time t, is the initial energy value of the node at time t, is the distance from the node at time t The node outside sends a size of The energy consumed by the message The node sends The energy consumed by data, is the coefficient of transmission loss;
[0055] The failure probability calculation sub-model is used to calculate the failure probability of the node;
[0056] The calculation expression of the failure probability calculation sub-model is:
[0057] ,
[0058] in, represents the failure probability of the node with the node location information (i, j), is the number of neighboring nodes of the node, is the failure factor.
[0059] In a second aspect of an embodiment of the present invention, a wireless sensor network simulation device based on cellular automata is disclosed, the device comprising:
[0060] A memory storing executable program code;
[0061] a processor coupled to the memory;
[0062] The processor calls the executable program code stored in the memory to execute the wireless sensor network simulation method based on cellular automata.
[0063] According to a third aspect of an embodiment of the present invention, a computer storable medium is disclosed. The computer storable medium stores computer instructions. When the computer instructions are called, they are used to execute the wireless sensor network simulation method based on cellular automata.
[0064] A fourth aspect of the embodiments of the present invention provides an information data processing terminal, wherein the information data processing terminal is used to implement the wireless sensor network simulation method based on cellular automata.
[0065] The beneficial effects of the present invention are:
[0066] 1. The present invention constructs a wireless sensor network model to realize functions such as network simulation operation, fault scenario simulation, and performance testing under dynamic conditions, thereby achieving accurate and rapid evaluation of network anti-destruction capabilities and laying the foundation for wireless network task planning.
[0067] 2. The method of the present invention is aimed at the operation scenario of wireless sensor networks. Cells are used to simulate numerous nodes in wireless sensor networks. Each node can update the state of the next time segment based on its own and its neighboring node status information. At the same time, energy exhaustion, hardware and software failures, connectivity failures, and malicious attacks are introduced and operated. Three anti-destruction measurement indicators, namely survival rate, network coverage, and network efficiency, are introduced into the model. Therefore, this method can effectively calculate the operation status of wireless sensor networks in real scenarios and analyze the changes in their network performance, thereby achieving the beneficial effect of guiding the deployment or maintenance of wireless sensor networks in real scenarios through network operation results to improve anti-destruction and extend network life. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 It is a flow chart for implementing the method of the present invention. DETAILED DESCRIPTION
[0069] In order to better understand the content of the present invention, two embodiments are given here. Figure 1 It is a flow chart for implementing the method of the present invention.
[0070] Embodiment 1
[0071] The present invention discloses a wireless sensor network simulation method based on cellular automata, which is implemented based on a computer and includes:
[0072] S1, obtaining wireless sensor network information; the wireless sensor network information includes the network distribution range, node location information, node connection information, node status information, and node type information of the wireless sensor network; the wireless sensor network includes wireless sensor nodes; the node connection information includes information of adjacent nodes connected to each node; the node type information includes edge nodes and aggregation nodes; the aggregation node is used to receive data from edge nodes; the node status information includes normal operation and failure;
[0073] S2, using a grid space simulation model to process the wireless sensor network information to obtain wireless sensor grid information; the cellular automaton is implemented based on the grid space simulation model;
[0074] S3, performing status update and evaluation processing on the wireless sensor grid information to obtain wireless sensor network evaluation result information; the wireless sensor network evaluation result information is used to characterize the anti-destruction performance of the wireless sensor network.
[0075] The method of using the grid space simulation model to process the wireless sensor network information to obtain the wireless sensor grid information includes:
[0076] S21, dividing the network distribution range into regular grids to obtain a plurality of cells; the cells include cell range information and network node information; the network node information includes type information and node status information of the wireless sensor nodes included in the cell range;
[0077] S22, determining the network node information of each cell according to the range information of each cell and the network node location information;
[0078] S23, determining a state value of any cell according to the network node information of the cell;
[0079] S24, determining a neighboring state value of any cell according to the sum of state values of neighboring cells of the cell in the network distribution range;
[0080] S25, determining a transfer function of any cell according to the state value of the cell and the adjacent state values;
[0081] S26, constructing wireless sensor grid information using the state value, adjacent state value and transfer function of any cell.
[0082] The step of determining the state value of any cell according to the network node information of the cell includes:
[0083] Four node deployment states are considered: undeployed node, deployed node and working normally, deployed node failed, and deployed aggregation node;
[0084] In the wireless sensor network nodes, the state value of each cell has four state values, expressed as .
[0085] “0” means no node is deployed in this cell;
[0086] “1” means that a sensor node is deployed in the cell, but the sensor node has failed;
[0087] “2” means that an edge sensor is deployed in the cell and the sensor node can operate normally;
[0088] "3" means that a sink node is deployed in the cell, and the messages generated by other nodes will eventually be transmitted to the sink node.
[0089] The transfer function can be characterized by a Markov function.
[0090] The step of performing status updating and evaluation processing on the wireless sensor grid information to obtain wireless sensor network evaluation result information includes:
[0091] S31, acquiring attack information of the wireless sensor network; and updating the wireless sensor grid information using the attack information;
[0092] S32, using the fault model to process the wireless sensor grid information to obtain the fault probability and energy value of the initialized cells;
[0093] S33, performing aggregation connection determination processing on the wireless sensor network information and the wireless sensor grid information to obtain an aggregation node set and updated wireless sensor grid information;
[0094] S34, performing status update processing on the aggregation node set, the failure probability and energy value of the cell, and the wireless sensor grid information obtained in S33 to obtain first wireless sensor grid information;
[0095] S35, evaluating the first wireless sensor grid information and the wireless sensor network information to obtain wireless sensor network evaluation result information.
[0096] The S31 includes:
[0097] Acquire the attacked wireless sensor node in the wireless sensor network; determine the cell where the wireless sensor node is located; and modify the state value of the cell of the attacked wireless sensor node to 1.
[0098] The aggregation connection determination process includes:
[0099] Using all sink nodes in the wireless sensor network, a sink node set is constructed;
[0100] According to the node connection information in the wireless sensor network information, all edge nodes connected to the sink node and all edge nodes not connected to the sink node are determined;
[0101] Add all edge nodes connected to the sink node to the sink node set; set the state values of the cells corresponding to all edge nodes connected to the sink node to 2; and set the state values of the cells corresponding to all edge nodes not connected to the sink node to 1.
[0102] The state update process is performed on the aggregation node set, the failure probability and energy value of the cell, and the wireless sensor grid information obtained in S33 to obtain the first wireless sensor grid information, including:
[0103] S341, numbering all nodes in the sink node set to obtain sequence numbers of all nodes; setting the current sequence number value to 1;
[0104] S342, obtaining the node corresponding to the current sequence number value in the aggregation node set;
[0105] S343, randomly generate a first discriminant value; the value range of the first discriminant value is (0, 1);
[0106] S344, determining whether the failure probability of the cell corresponding to the node is greater than a first judgment value, if not greater than the first judgment value, setting the state value of the cell corresponding to the node to 1, setting the node to be disconnected from the adjacent sink node, and updating the node connection information in the wireless sensor network information;
[0107] S345, determining whether the energy value of the node is less than or equal to 0, if the energy value of the node is less than or equal to 0, setting the state value of the cell corresponding to the node to 1, setting the node to be disconnected from the adjacent sink node, and updating the node connection information in the wireless sensor network information;
[0108] S346, using the state value of the cell, updating the wireless sensor grid information;
[0109] S347, using the fault model to process the wireless sensor grid information to obtain updated values of the fault probability and energy value of the cell;
[0110] S348, increasing the current sequence number by 1, determining whether the current sequence number is greater than the total number of nodes in the sink node set, and obtaining a first determination result; if the first determination result is not greater than the total number of nodes in the sink node set, executing S342; if the first determination result is greater than the total number of nodes in the sink node set, executing S349;
[0111] S349, performing aggregation connection determination processing on the updated wireless sensor network information and the wireless sensor grid information, and confirming that the obtained wireless sensor grid information is the first wireless sensor grid information.
[0112] The step of evaluating and processing the first wireless sensor grid information and the wireless sensor network information to obtain wireless sensor network evaluation result information includes:
[0113] Performing survival rate calculation processing on the first wireless sensor grid information and the wireless sensor network information to obtain a survival rate index;
[0114] The expression for calculating the survival rate is:
[0115] ,
[0116] in, is the total number of nodes in the wireless sensor network, represents the survival rate index at time t, represents the number of cells with a state value of 2 in the first wireless sensor grid information, Indicates the state value of the cell corresponding to the node whose node position information is (i, j). Represents wireless sensor grid information;
[0117] Performing network coverage calculation processing on the first wireless sensor grid information and the wireless sensor network information to obtain network coverage;
[0118] The expression for calculating the network coverage is:
[0119] ,
[0120] in, Indicates the state judgment value of the node with node position information (i, j). When the sum of the state values of the cells corresponding to all the connected nodes of the node with node position information (i, j) is equal to the number of all the connected nodes of the node with node position information (i, j), ; When the sum of the state values of the cells corresponding to all the connected nodes of the node whose node position information is (i, j) is greater than the number of all the connected nodes of the node whose node position information is (i, j), ; represents the sum of the state values of all cells, and n represents the side length of the network distribution range of the wireless sensor network;
[0121] Performing network efficiency calculation processing on the first wireless sensor grid information and the wireless sensor network information to obtain a network efficiency value;
[0122] The expression for calculating the network efficiency is:
[0123] ,
[0124] in, represents the set of nodes that are operating normally at time t, The node whose position information is (i, j) is in The number of hops from the node to its adjacent sink node at any given moment;
[0125] The survival rate index, network coverage rate and network efficiency value are combined and processed to obtain wireless sensor network evaluation result information.
[0126] The fault model includes an energy value calculation sub-model and a fault probability calculation sub-model;
[0127] The energy value calculation sub-model is used to calculate the energy value of the node according to the amount of messages sent by the node; the calculation expression of the energy value calculation sub-model is:
[0128] ,
[0129] ,
[0130] in, To calculate the energy value of the node at time t, is the initial energy value of the node at time t, is the distance from the node at time t The node outside sends a size of The energy consumed by the message The node sends The energy consumed by data, is the transmission loss coefficient.
[0131] The failure probability calculation sub-model is used to calculate the failure probability of the node;
[0132] The calculation expression of the failure probability calculation sub-model is:
[0133] ,
[0134] in, represents the failure probability of the node with the node location information (i, j), is the number of neighboring nodes of the node, is the failure factor.
[0135] In a second aspect of an embodiment of the present invention, a wireless sensor network simulation device based on cellular automata is disclosed, the device comprising:
[0136] A memory storing executable program code;
[0137] a processor coupled to the memory;
[0138] The processor calls the executable program code stored in the memory to execute the wireless sensor network simulation method based on cellular automata.
[0139] According to a third aspect of an embodiment of the present invention, a computer storable medium is disclosed. The computer storable medium stores computer instructions. When the computer instructions are called, they are used to execute the wireless sensor network simulation method based on cellular automata.
[0140] A fourth aspect of the embodiments of the present invention provides an information data processing terminal, wherein the information data processing terminal is used to implement the wireless sensor network simulation method based on cellular automata.
[0141] Embodiment 2
[0142] The present invention discloses a wireless sensor network simulation method based on cellular automata, comprising:
[0143] S1, obtaining wireless sensor network information; the wireless sensor network information includes the network distribution range, node location information, node connection information, node status information, and node type information of the wireless sensor network; the wireless sensor network includes wireless sensor nodes; the node connection information includes information of adjacent nodes connected to each node; the node type information includes edge nodes and aggregation nodes; the aggregation node is used to receive data from edge nodes; the node status information includes normal operation and failure;
[0144] S2, using a grid space simulation model to process the wireless sensor network information to obtain wireless sensor grid information;
[0145] S3, performing status update and evaluation processing on the wireless sensor grid information to obtain wireless sensor network evaluation result information; the wireless sensor network evaluation result information is used to characterize the anti-destruction performance of the wireless sensor network.
[0146] The parameter settings of the wireless sensor network information and the wireless sensor grid information in the present invention include: is a regular grid space composed of cells, is the grid space size, is the finite set of states that the unit has, is the conversion function that follows, It is a cell exist The state of the moment, It is a cell The adjacent unit set of Is with the cell Adjacent cells in The sum of the states at the moment, is Time and Cell The number of adjacent cells, It is a cell exist The energy of the moment, It is a cell exist The utility value at the moment, It is a cell exist The number of hops from time to the sink node, is the weight of the routing protocol, It is a cell The probability of failure, It is a cell The degree, It is the attack ratio.
[0147] The specific explanation is as follows:
[0148] Represents a The grid space is a grid space, and each element that makes up the grid space is called a cell. The grid space boundary is closed, so the cells at the boundary have fewer neighbor cells than cells in other areas.
[0149] Represents the state set of a cell. The states of a cell are finite. In the simulation of wireless sensor network nodes, each cell has four states. .
[0150] “0” means no node is deployed in this cell;
[0151] “1” means that a sensor node is deployed in the cell, but the sensor node has failed;
[0152] “2” means that a sensor node is deployed in the cell and the sensor node can operate normally;
[0153] "3" means that a sink node is deployed in the cell, and the messages generated by other nodes will eventually be transmitted to the sink node.
[0154] It is used to represent the finite set of neighboring cells owned by a cell. In the model construction of wireless sensor network nodes, the Moore neighborhood structure is adopted, and each cell can have no more than eight nodes as neighboring cells.
[0155] The set of adjacent cells can be defined as:
[0156] .
[0157] Assume that Moment, Cell The state is represented by , then the sum of the states of the set of neighboring cell nodes of this cell can be expressed as .
[0158] At the same time, you can also get Time Cell The number of surrounding neighbor nodes.
[0159] Indicates the transition function followed by the cell state change. In this modeling work, the state of the cell is assumed to be affected by the states of its neighboring cells. Moment, Cell The state transfer function can be defined as
[0160] ,
[0161] In an actual wireless sensor network, a sensor node needs to meet two conditions to work properly. The first condition is that its functional components can work properly, that is, it has not failed or been attacked, and its energy has not been exhausted. The second condition is that it can maintain at least one valid path to the sink node. Based on these two conditions, a more specific and accurate conversion function can be obtained. The conversion function can be represented by a Markov chain function.
[0162] In wireless sensor networks used in real scenarios, sensor node failures and faults come from various sources, which may be caused by external malicious attacks, energy exhaustion, or software / hardware failures, or they may not fail directly, but the connection with the sink node is disconnected, resulting in connectivity failure. It is worth noting that in wireless sensor networks, the node failure process is not irreversible. If the sink node is mobile, some nodes with connectivity failures may re-establish contact with the sink node. In this section, energy exhaustion failure, software / hardware failure, and connectivity failure failure are modeled to obtain a fault model. The fault model includes an energy exhaustion fault model, a hardware / software fault model, and a connectivity failure fault model.
[0163] Energy exhaustion failure is a node failure caused by node energy exhaustion. In the simulation of wireless sensor networks in the present invention, the sink node is considered to be unrestricted by energy, that is, it is considered to have unlimited energy. All other sensor nodes have limited energy, and the initial energy of all sensor nodes is assumed to be the same. When When the remaining energy at the moment is not enough to support the normal operation of the sensor node, the sensor node is assumed to have failed due to energy exhaustion. In each time interval, the sensor node consumes a certain amount of energy to maintain its own function. In addition to normal energy consumption, the focus is on transmission energy consumption. The first-order radio model is used to simulate the process of sensor node energy consumption. In this model, the sensor node moves to the distance The sensor nodes outside send a message of size The sensor node will consume the message The calculation formula is: ,in, The node sends The energy consumed by data, is the coefficient of transmission loss. Here, the free space channel model is used to calculate the specific value of transmission loss. The sensor node receives the The sensor node will consume the message Energy. The calculation method is: .
[0164] Calculating the energy consumption of sensor nodes Before that, the data transmission of the wireless sensor node must be judged. First, the utility value of each wireless sensor node is calculated, and the data transmission occurs in the transmission process from the low utility value node to the high utility value node. For the transmission process from the low utility value node to the high utility value node between adjacent nodes, the energy consumption value of the data sending node is calculated, and then its energy value is calculated. For the data forwarding activity of the sensor node, the present invention designs a specific selection routing protocol to support the operation. In this protocol, each sensor node is assigned a utility value, and the message will be sent from the low utility value node to the high utility value node. The utility value of each sensor node depends on two factors: its residual energy and its minimum hop distance to the sink node. Because the residual energy of each sensor node in the network and its minimum hop distance to the sink node are changing with time, so the utility value is also changing. The specific calculation method of the utility value is: .in It means that the node (i,j) is The utility value at the moment, Is a node exist The minimum hop distance at the time is the minimum number of hops from the node to the nearest sink node. represents energy (i, j represents coordinates); and is the weighted coefficient for adjusting routing performance and should satisfy the condition Obviously, the utility value of the sensor node is It should be noted that when a sensor node fails, its utility will be set to 0. In addition, in order to ensure that the data eventually reaches the sink node, the utility values of all sink nodes are set to 1, ensuring that the sink node has the highest utility value in the network.
[0165] For the hardware / software failure model, in real scenarios, the load differences between sensor nodes are very obvious. The load on the "central" nodes is much higher than that on other nodes, which makes them more likely to fail due to buffer overflow and other reasons. At the same time, the "edge" nodes are mostly in environments with harsh natural conditions, and the probability of failure is different. ,here It is a sensor node The probability of a hardware or software failure occurring at each time step (simulation timestamp); It is a sensor node The degree of is the number of sensor nodes and sink nodes in its neighboring cell space. is the failure coefficient. In the present invention, setting =5.
[0166] For the connectivity failure model, in a wireless sensor network, when some sensor nodes fail, the connectivity of other nodes in the network may be affected. In this process, some sensor nodes may be isolated because their paths to the sink node are cut off, so their messages cannot be sent to the sink node in the end. In this simulation model, the isolation failure can be considered as a failure caused by the lack of a working node in the adjacent cell space. If the sensor node is located in a cell Cannot satisfy and If these two conditions are met, the node is considered to have become an "island" with failed connectivity in the network, and its connectivity value is judged to be 0; if the above two conditions are met, its connectivity value is judged to be 1; in S347 and S32, the node connectivity value is also updated and calculated.
[0167] After performing S344 and before performing S345, the method further includes determining the connectivity value of the node to determine whether the connectivity value of the node is equal to 0. If the connectivity value of the node is equal to 0, the state value of the cell corresponding to the node is set to 1, the node is set to be disconnected from the adjacent aggregation node, and the node connection information in the wireless sensor network information is updated;
[0168] The step of obtaining the attack information of the wireless sensor network and updating the wireless sensor grid information using the attack information includes:
[0169] In order to comprehensively evaluate and analyze the invulnerability of wireless sensor networks when subjected to different types of attacks, three attack strategies are designed in the operational modeling, namely, random attack, maximum degree attack, and maximum betweenness attack. In the model, all attacks are considered synchronous attacks, that is, the attacks on the target nodes are completed at the same time. In the model, the target of the attack does not consider the sink node, because once the sink node fails, the entire network will immediately collapse, and there is no value for comparative analysis.
[0170] A random attack means that the attacker randomly selects some nodes to attack. Under the random attack strategy, the attack ratio is randomly selected. The sensor node after the attack is set to 1.
[0171] A maximum degree attack is when the attacker chooses the node with the maximum degree centrality in the network as the target of attack, that is, the node with the largest number of directly connected nodes. The goal of this attack method is to destroy the integrity and stability of the network. Under the maximum degree attack strategy, first calculate the degree of all nodes, sort them in descending order, and attack the proportion For a node with a large degree, its state is set to 1.
[0172] The maximum betweenness attack is when the attacker chooses the node with the highest betweenness centrality as the target of attack. Betweenness centrality refers to the frequency of the node as an intermediary in the network. The goal of this attack method is to destroy the connectivity of the network, because the betweenness centrality node plays an important intermediary role in the network. Under the maximum betweenness attack strategy, the betweenness of all nodes is first calculated and sorted in descending order, and the attack ratio is The state of nodes with large betweenness is set to 1. Different from the general betweenness of the network, the directional betweenness designed for wireless sensor networks is used in this attack strategy. When calculating the number of shortest paths passing through a node, the starting point of these paths is any other node, but the end point must be the sink node. The betweenness can be calculated using the inverse of the attack cost of the node.
[0173] The directional betweenness value reflects the ability of the sensor node to control the network data flow. From the perspective of the shortest path, the larger the betweenness value of a node, the more times the node appears on the shortest path connecting other nodes in the network, and the more information this node forwards to the sink node in the network. Therefore, this node as a "hub" has a huge impact on the efficiency of the network.
[0174] In wireless sensor networks, the cost of attacking different nodes depends on factors such as the location, function, security measures, and vulnerability of the node. Edge nodes are nodes located at the edge of the network. They usually have lower security and are therefore vulnerable to attack. The cost of attacking these nodes is relatively low. Core nodes are nodes in the central area of the network that connect the entire network. They have higher security and resources and are located in a relatively safe area. Attacking these nodes is expensive and requires considerable technology and resources.
[0175] In this model, for the sake of simplicity, the difference in the cost of attacking sensor nodes is set according to the distance from the sink node, so as to distinguish the attack costs of core nodes and non-core nodes. Sensor nodes within a certain range of hop distance from the sink node are considered core nodes. In actual scenarios, they are deployed in relatively safe places in the mission area and are equipped with certain protection measures. Therefore, for the attacker, the cost of attacking them is higher. The nodes close to the edge of the network are non-core nodes. Due to limited resources, spatial location relationships and other reasons, their security is weaker, and the cost of attacking them is lower. The specific calculation formula is designed as follows. The calculation formula for the cost of each node is ,here , are cost coefficients, Is a node Minimum number of hops to the sink node.
[0176] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A wireless sensor network simulation method based on cellular automata, characterized in that: include: S1, obtaining wireless sensor network information; the wireless sensor network information includes the network distribution range, node location information, node connection information, node status information, and node type information of the wireless sensor network; the wireless sensor network includes wireless sensor nodes; the node connection information includes information of adjacent nodes connected to each node; the node type information includes edge nodes and sink nodes; the sink node is used to receive data from edge nodes; The node status information includes normal operation and failure; S2, using a grid space simulation model to process the wireless sensor network information to obtain wireless sensor grid information; S3, performing status update and evaluation processing on the wireless sensor grid information and the wireless sensor network information to obtain wireless sensor network evaluation result information; The wireless sensor network evaluation result information is used to characterize the anti-destruction performance of the wireless sensor network; The method of using the grid space simulation model to process the wireless sensor network information to obtain the wireless sensor grid information includes: S21, dividing the network distribution range into regular grids to obtain a plurality of cells; the cells include cell range information and network node information; the network node information includes type information and node status information of the wireless sensor nodes included in the cell range; S22, determining the network node information of each cell according to the range information of each cell and the network node location information; S23, determining a state value of each cell according to the network node information of the cell; S24, determining the neighboring state value of each cell according to the sum of the state values of the neighboring cells in the network distribution range; S25, determining a transfer function of each cell according to the state value and adjacent state values of the cell; S26, using the state values, adjacent state values and transfer functions of all cells, construct the wireless sensor grid information.
2. The wireless sensor network simulation method based on cellular automata according to claim 1, characterized in that: The state updating and evaluation processing of the wireless sensor grid information and the wireless sensor network information to obtain the wireless sensor network evaluation result information includes: S31, acquiring attack information of the wireless sensor network; and updating the wireless sensor grid information using the attack information; S32, using the fault model to process the wireless sensor grid information to obtain the fault probability and energy value of the initialized cells; S33, performing aggregation connection determination processing on the wireless sensor network information and the wireless sensor grid information to obtain an aggregation node set and updated wireless sensor grid information; S34, performing status update processing on the aggregation node set, the failure probability and energy value of the cell, and the wireless sensor grid information obtained in S33 to obtain first wireless sensor grid information; S35, evaluating and processing the first wireless sensor grid information and the wireless sensor network information to obtain wireless sensor network evaluation result information; The aggregation connection determination process includes: Using all sink nodes in the wireless sensor network, a sink node set is constructed; According to the node connection information in the wireless sensor network information, all edge nodes connected to the sink node and all edge nodes not connected to the sink node are determined; Add all edge nodes connected to the sink node to the sink node set; set the state values of the cells corresponding to all edge nodes connected to the sink node to 2; and set the state values of the cells corresponding to all edge nodes not connected to the sink node to 1.
3. The wireless sensor network simulation method based on cellular automata as claimed in claim 2, characterized in that: The state update process is performed on the aggregation node set, the failure probability and energy value of the cell, and the wireless sensor grid information obtained in S33 to obtain the first wireless sensor grid information, including: S341, numbering all nodes in the sink node set to obtain sequence numbers of all nodes; setting the current sequence number value to 1; S342, obtaining the node corresponding to the current sequence number value in the aggregation node set; S343, randomly generate a first discriminant value; the value range of the first discriminant value is (0, 1); S344, determining whether the failure probability of the cell corresponding to the node is greater than a first judgment value, if not greater than the first judgment value, setting the state value of the cell corresponding to the node to 1, setting the node to be disconnected from the adjacent sink node, and updating the node connection information in the wireless sensor network information; S345, determining whether the energy value of the node is less than or equal to 0, if the energy value of the node is less than or equal to 0, setting the state value of the cell corresponding to the node to 1, setting the node to be disconnected from the adjacent sink node, and updating the node connection information in the wireless sensor network information; S346, using the state value of the cell, updating the wireless sensor grid information; S347, using the fault model to process the wireless sensor grid information to obtain an updated value of the fault probability and an updated value of the energy value of the cell; S348, increasing the current sequence number by 1, determining whether the current sequence number is greater than the total number of nodes in the sink node set, and obtaining a first determination result; if the first determination result is not greater than the total number of nodes in the sink node set, executing S342; if the first determination result is greater than the total number of nodes in the sink node set, executing S349; S349, performing aggregation connection determination processing on the updated wireless sensor network information and the wireless sensor grid information, and confirming that the obtained wireless sensor grid information is the first wireless sensor grid information.
4. The wireless sensor network simulation method based on cellular automata as claimed in claim 3, characterized in that: The step of evaluating and processing the first wireless sensor grid information and the wireless sensor network information to obtain wireless sensor network evaluation result information includes: Performing survival rate calculation processing on the first wireless sensor grid information and the wireless sensor network information to obtain a survival rate index; Performing network coverage calculation processing on the first wireless sensor grid information and the wireless sensor network information to obtain network coverage; Performing network efficiency calculation processing on the first wireless sensor grid information and the wireless sensor network information to obtain a network efficiency value; The survival rate index, network coverage rate and network efficiency value are combined and processed to obtain wireless sensor network evaluation result information.
5. The wireless sensor network simulation method based on cellular automata as claimed in claim 4, characterized in that: The expression for calculating the survival rate is: , in, is the total number of nodes in the wireless sensor network, represents the survival rate index at time t, represents the number of cells with a state value of 2 in the first wireless sensor grid information, Indicates the state value of the cell corresponding to the node whose node position information is (i, j). Represents wireless sensor grid information; The expression for calculating the network coverage is: , in, Indicates the state judgment value of the node with node position information (i, j). When the sum of the state values of the cells corresponding to all the connected nodes of the node with node position information (i, j) is equal to the number of all the connected nodes of the node with node position information (i, j), ; When the sum of the state values of the cells corresponding to all the connected nodes of the node whose node position information is (i, j) is greater than the number of all the connected nodes of the node whose node position information is (i, j), ; represents the sum of the state values of all cells, and n represents the side length of the network distribution range of the wireless sensor network; The expression for calculating the network efficiency is: , in, represents the set of nodes that work normally at time t, The node whose position information is (i, j) is in The number of hops from a node to its adjacent sink node at a given moment.
6. The wireless sensor network simulation method based on cellular automata as claimed in claim 5, characterized in that: The fault model includes an energy value calculation sub-model and a fault probability calculation sub-model; The energy value calculation sub-model is used to calculate the energy value of the node according to the amount of messages sent by the node; The failure probability calculation sub-model is used to calculate the failure probability of a node.
7. The wireless sensor network simulation method based on cellular automata according to claim 6, characterized in that: The calculation expression of the energy value calculation sub-model is: , , in, To calculate the energy value of the node at time t, is the initial energy value of the node at time t, is the distance from the node at time t The node outside sends a size of The energy consumed by the message The node sends The energy consumed by data, is the coefficient of transmission loss; The calculation expression of the failure probability calculation sub-model is: , in, represents the failure probability of the node with the node location information (i, j), is the number of neighboring nodes of the node, is the failure factor.
