Farmland data opportunistic transmission method and device, electronic equipment and medium
By adopting a high-efficiency opportunistic routing transmission mechanism and power control in agricultural wireless sensor networks, combined with network clustering, and dynamic selection of transmission paths and node power, the problem of high energy consumption in wireless sensor networks is solved, and data transmission reliability and energy efficiency are improved.
Patent Information
- Application Number
- CN202211644572.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-20
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2042-12-20
Smart Images

Figure CN116261202B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of data transmission, in particular to a farmland data opportunity transmission method and device, electronic equipment and medium. BACKGROUND
[0002] For different sending nodes, the transmission cost of the selected forwarding node may change at any time, and its regularity is difficult to calculate, so that a suitable forwarding path cannot be selected in time. The existing opportunity routing adopts a method of focusing on the candidate forwarding set to construct and sort the forwarding nodes, and does not optimize the opportunity routing, resulting in increased energy consumption of the wireless sensor and increased use cost. SUMMARY
[0003] The present application provides a farmland data opportunity transmission method, device, electronic equipment and medium to solve the technical problem of high energy consumption of agricultural wireless sensor networks in the prior art. The present application provides a high-energy-efficiency opportunity routing transmission mechanism combined with power control and network clustering.
[0004] In a first aspect, the present application provides a farmland data opportunity transmission method, comprising:
[0005] In response to a data transmission instruction of any current node, determining a candidate forwarding set of the current node;
[0006] Transmitting data to each candidate node in the candidate forwarding set through the cluster head node of the cluster where the current node is located;
[0007] Filtering out a next-hop node from the candidate forwarding set, and in response to a data transmission instruction of the next-hop node, until the data is transmitted to a sink node;
[0008] The candidate forwarding set of the candidate node is a set of candidate nodes related to the cluster head node of the cluster where the current node is located;
[0009] The cluster where the current node is located is different from the cluster where the candidate node is located;
[0010] The candidate node is determined according to the size relationship between the expected transmission energy consumption of the current node before it joins the candidate forwarding set and the expected transmission energy consumption of the current node after it joins the candidate forwarding set.
[0011] According to the farmland data opportunity transmission method provided by the present application, the determination of the candidate forwarding set of the current node comprises:
[0012] Obtaining the initial expected transmission energy consumption of the initial candidate forwarding set corresponding to the initial node;
[0013] Repeat the following steps:
[0014] If the current expected transmission energy consumption of any neighbor node of the current node after joining the current candidate forwarding set is less than the expected transmission energy consumption of the previous iteration, add the neighbor node to the current candidate forwarding set;
[0015] When the current expected transmission energy consumption of any neighboring node of the current node after joining the current candidate forwarding set is equal to the expected transmission energy consumption of the previous iteration, the iteration is stopped and the candidate forwarding set after iteration is determined as the candidate forwarding set of the current node.
[0016] According to the farmland data opportunistic transmission method provided by the present invention, the data is transmitted to each candidate node in the candidate forwarding set through the cluster head node of the cluster where the current node is located, including:
[0017] In a case where the current node is a cluster head node of the cluster where the current node is located, sending the data to each candidate node in the candidate forwarding set;
[0018] When the current node is a non-cluster head node of the cluster where the current node is located, the data is sent from the current node to the cluster head node of the cluster where the current node is located, and the data is sent to each candidate node in the candidate forwarding set according to the cluster head node of the cluster where the current node is located.
[0019] According to the farmland data opportunistic transmission method provided by the present invention, the step of selecting a next hop node from the candidate forwarding set includes:
[0020] Determine all candidate nodes that send feedback information to the current node as candidate nodes to be judged;
[0021] Determine the sending priority of all candidate nodes to be judged, and determine the candidate node to be judged with the highest sending priority as the next hop node;
[0022] The feedback information is used to indicate that the candidate node has received the data transmitted from the current node;
[0023] The sending priority of the candidate nodes to be determined is determined according to the expected energy consumption efficiency between the current node and each candidate node to be determined, and is sorted in ascending order.
[0024] The farmland data transmission method provided by the present invention further includes, before responding to a data transmission instruction of any current node:
[0025] For each node, send message notification information to all neighboring nodes of the node, so that the node receives the message notification information sent by all neighboring nodes;
[0026] Determine the node density of the node according to the number of message notification information received by the node and the number of all nodes, and determine the distance from the node to the sink node according to the node position of the node and the node position of the sink node;
[0027] Calculating the probability of the node becoming a cluster head node according to the node density of the node, the distance from the node to the sink node, and the residual energy of the node, and traversing all nodes to obtain the probability of each node becoming a cluster head node;
[0028] For each node, determine the variable value of each node according to the random number generated by each node and the probability of each node becoming a cluster head node, and send the probability of each node becoming a cluster head node and the variable value of each node to all neighboring nodes of the node, so that each node obtains the probability of all neighboring nodes becoming cluster head nodes and the variable values of all neighboring nodes;
[0029] The node with the highest probability of becoming the cluster head node and a variable value equal to a preset constant is determined as the cluster head node, and the election information is sent to all neighboring nodes according to the cluster head node, so as to cluster all nodes according to the election information received by each node;
[0030] The message notification information includes the node location, node name and the remaining energy of the node.
[0031] According to the farmland data opportunistic transmission method provided by the present invention, clustering all nodes according to the selected information received by each node includes:
[0032] When any node receives an election information, the node is added to the cluster where the cluster head corresponding to the election information is located;
[0033] When any node receives multiple election information, the node is added to the cluster where the cluster head corresponding to the election information with the highest probability of becoming the cluster head node belongs.
[0034] According to the farmland data transmission method provided by the present invention, before sending message notification information to all neighboring nodes of the node, the method includes:
[0035] For any node, determine the data packet reception success rate between the node and each node in the target area based on the node's transmit power, the distance between the node and each node in the target area, the data rate, the data packet size, and the noise bandwidth;
[0036] Determine nodes in the target area whose data packet reception success rate is greater than a preset threshold as neighbor nodes of the node;
[0037] Traverse all nodes until the neighbor nodes of all nodes in the target area are determined.
[0038] In a second aspect, a farmland data opportunity transmission device is provided, comprising:
[0039] A determination unit is configured to determine a candidate forwarding set of a current node in response to a data transmission instruction of the current node.
[0040] A transmission unit is configured to transmit data to each candidate node in the candidate forwarding set through a cluster head node of a cluster where the current node is located.
[0041] A response unit is configured to filter out a next-hop node from the candidate forwarding set and respond to a data transmission instruction of the next-hop node until the data is transmitted to a sink node.
[0042] The candidate forwarding set of the candidate node is a set of candidate nodes related to the cluster head node of the cluster where the current node is located.
[0043] The cluster where the current node is located is different from the cluster where the candidate node is located.
[0044] The candidate node is determined according to the size relationship between the expected transmission energy of the current node before joining the candidate forwarding set and the expected transmission energy of the current node after joining the candidate forwarding set.
[0045] In a third aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the farmland data opportunity transmission method when executing the program.
[0046] In a fourth aspect, a non-transitory computer-readable storage medium is provided, which stores a computer program executable by a processor to implement the farmland data opportunity transmission method.
[0047] The present application provides a farmland data opportunity transmission method, device, electronic device and medium, and when the current node transmits data, the data is transmitted to each candidate node in the candidate forwarding set through the cluster head node of the cluster where the current node is located, and the next-hop node is filtered out from the candidate forwarding set, and the data transmission instruction of the next-hop node is responded to until the data is transmitted to the sink node. The present application designs an inter-cluster opportunity routing transmission mechanism, dynamically selects node transmission power and candidate forwarding node set, so as to minimize the cost of data transmission between nodes, thereby improving the data transmission reliability in the network and improving the network energy efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are 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.
[0049] Figure 1 This is one of the flow charts of the farmland data opportunity transmission method provided by the present invention;
[0050] Figure 2 This is a schematic diagram of a process for determining a candidate forwarding set for a current node provided by the present invention;
[0051] Figure 3 This is a schematic diagram of the process of screening out the next hop node provided by the present invention;
[0052] Figure 4 This is the second flow chart of the farmland data transmission method provided by the present invention;
[0053] Figure 5 This is the third flow chart of the farmland data transmission method provided by the present invention;
[0054] Figure 6 is a schematic diagram of a node neighbor table provided by the present invention;
[0055] Figure 7 This is the fourth flow chart of the farmland data transmission method provided by the present invention;
[0056] Figure 8 It is a structural diagram of the farmland data transmission device provided by the present invention;
[0057] Figure 9 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0058] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0059] In the agricultural sector, integrating various IoT technologies to establish unmanned farms and achieve automated agricultural production management is a breakthrough in agricultural transformation and upgrading. The Internet of Things (IoT) encompasses a variety of intelligent operating machines, including sensors, robots, drones, and unmanned tractors. These machines, connected via the internet, automatically collect data on farm environmental parameters, crop status, and operational quality. Management information systems and data analysis then inform production decisions. Wireless sensor networks, as a crucial foundation for the agricultural IoT, are crucial for transmitting detected information to sink nodes or base stations for further analysis. Sensor nodes sense data and transmit it to sink nodes via single or multi-hop processes.
[0060] However, sensor nodes carry limited and irreplaceable battery sources, the agricultural production monitoring process has a long cycle and the monitoring environment is open, and most of the energy of wireless nodes is absorbed by the data transmission process. In order to extend the life of agricultural wireless sensor networks, it is very important to design energy-saving wireless sensor network routing protocols. Among the routing strategies of wireless sensor networks in the prior art, there is deterministic routing. In deterministic routing, the transmission path is determined according to the neighboring nodes selected by the intelligent optimization algorithm to send data packets. Wireless sensor networks are energy-efficient, and signal transmission is easily affected by the environment. However, factors such as open weather conditions, dense crops, signal multipath fading, and interference from neighboring wireless technologies or concurrent transmissions in the farm environment lead to high variation in radio links, resulting in unstable link connectivity probability and increased packet loss rate in agricultural wireless sensor networks. Therefore, it is necessary to design an efficient routing algorithm. Traditional routing schemes usually use intelligent algorithms to select the next hop node, but the probabilistic connectivity of the wireless link may cause the next hop node to fail to successfully receive the data packet. In order to solve the above technical problems, the present invention provides a method, device, electronic device and medium for opportunistic transmission of farmland data. Figure 1 This is one of the flow charts of the farmland data opportunity transmission method provided by the present invention, which provides a farmland data opportunity transmission method, including:
[0061] In response to a data transmission instruction of any current node, determining a candidate forwarding set of the current node;
[0062] Transmitting data to each candidate node in the candidate forwarding set through the cluster head node of the cluster where the current node is located;
[0063] Screening out a next-hop node from the candidate forwarding set, and responding to a data transmission instruction of the next-hop node until the data is transmitted to the sink node;
[0064] The candidate forwarding set of candidate nodes is a set of candidate nodes related to the cluster head node of the cluster where the current node is located;
[0065] The cluster where the current node is located is different from the cluster where the candidate node is located;
[0066] The candidate node is determined based on the relationship between the expected transmission energy consumption of the current node before it joins the candidate forwarding set and the expected transmission energy consumption of the current node after it joins the candidate forwarding set.
[0067] In step 101, in response to a data transmission instruction of any current node, a candidate forwarding set of the current node is determined. The current node is any node in the process of data transmission between clusters. It can be a data transmission instruction generated by a wireless sensor, which aims to transmit data to a sink node. At this time, the candidate forwarding set of the current node is determined. The candidate forwarding set is a set of candidate nodes related to the cluster head node of the cluster where the current node is located. In the present invention, data is continuously transmitted among nodes between clusters mainly based on the current node to minimize the transmission power. Therefore, the direction of data transmission should be between different clusters until it is transmitted to the sink node. Therefore, the cluster where the current node is located is different from the cluster where the candidate node is located.
[0068] The candidate forwarding set is constructed based on the candidate nodes, and the candidate nodes are determined based on the relationship between the expected transmission energy consumption of the current node before joining the candidate forwarding set and the expected transmission energy consumption of the current node after joining the candidate forwarding set. If the current expected transmission energy consumption of any neighbor node of the current node after joining the current candidate forwarding set is less than the expected transmission energy consumption of the previous iteration, then the neighbor node is a candidate node.
[0069] In step 102, data is transmitted to each candidate node in the candidate forwarding set through the cluster head node of the cluster where the current node is located. The present invention completes the transmission of data in different clusters through the cluster head node of the cluster where the current node is located. In order to ensure that the data can be transmitted to the next hop node with the highest success rate, after determining the candidate forwarding set of the current node, data can be sent to all nodes in the candidate forwarding set. If data is received from the current node, the transmission is considered successful.
[0070] Those skilled in the art understand that clustering is an effective method to maintain balanced energy consumption of sensor nodes. Each cluster consists of cluster member nodes and a cluster head. Cluster members send information to their respective cluster heads in the cluster. The cluster heads are responsible for data aggregation and further send the aggregated data to the sink node. The purpose of the wireless sensor network protocol is to send the fused data of all cluster heads to the sink node for further analysis. Therefore, inter-cluster routing is very necessary for the efficient transmission of data packets from cluster head nodes to sink nodes.
[0071] In step 103, the next hop node is screened out from the candidate forwarding set, and the data transmission instruction of the next hop node is responded to until the data is transmitted to the aggregation node. In the present invention, any node in the candidate forwarding set can be determined as the next hop node, and any node that successfully receives the data transmission of the current node can be determined as the next hop node. The node in the candidate forwarding set with the highest priority can also be determined as the next hop node according to the transmission priority. Optionally, all candidate nodes that send feedback information to the current node can also be determined as candidate nodes to be judged; the sending priority of all candidate nodes to be judged is determined, and the candidate node to be judged with the highest sending priority is determined as the next hop node; the sending priority of the candidate nodes to be judged is determined according to the expected energy consumption efficiency between the current node and each candidate node to be judged, and is sorted in order from small to large.
[0072] The present invention takes into account the unstable link probability characteristics in a farm environment and establishes a node transmission cost model composed of transmission energy efficiency and link probability. By introducing opportunity theory to design an end-to-end reliable routing transmission protocol, a candidate forwarding set of nodes is constructed and forwarding sorted, and stable communication interaction is achieved under different link conditions, realizing low-latency and high-throughput agricultural monitoring data transmission. Farm wireless sensor networks have the characteristics of high energy consumption and long monitoring cycles. The present invention adopts a high-efficiency opportunity routing transmission mechanism combined with power control and network clustering, and uses data fusion theory to divide the network into different clusters containing cluster heads and cluster members, thereby reducing the energy consumption of agricultural wireless sensor networks. At the same time, the transmission power of the cluster head node is selected according to the different transmission probabilities of different links, achieving high-efficiency monitoring data transmission and extending the network life.
[0073] Optionally, transmitting the data to each candidate node in the candidate forwarding set through the cluster head node of the cluster where the current node is located includes:
[0074] In a case where the current node is a cluster head node of the cluster where the current node is located, sending the data to each candidate node in the candidate forwarding set;
[0075] When the current node is a non-cluster head node of the cluster where the current node is located, the data is sent from the current node to the cluster head node of the cluster where the current node is located, and the data is sent to each candidate node in the candidate forwarding set according to the cluster head node of the cluster where the current node is located.
[0076] Optionally, during the process of data transmission between different nodes, when the current node is the cluster head node of the cluster where the current node is located, the data is sent to each candidate node in the candidate forwarding set according to the cluster head node of the cluster where the current node is located; and when the current node is a non-cluster head node of the cluster where the current node is located, first, the data needs to be sent from the current node to the cluster head node of the cluster where the current node is located, and then the data is sent to each candidate node in the candidate forwarding set according to the cluster head node of the cluster where the current node is located, thereby completing the transmission of data to each candidate node in the candidate forwarding set during the data transmission process of the current node.
[0077] This invention establishes a transmission model that maps network energy efficiency, taking into account multiple factors such as network energy consumption, transmit power, and node clustering. This model employs an opportunistic routing transmission strategy and constructs a set of candidate forwarding nodes. This overcomes the limitations of previous deterministic routing algorithms, which often lack adaptability to link quality. This model adaptively selects transmission routes within the network, avoiding the need to preselect relay nodes before data transmission and instead relying on dynamic, distributed online forwarding decisions after data transmission. Therefore, opportunistic routing is more suitable for agricultural wireless sensor networks than traditional routing. Previous research has demonstrated the significant advantages of clustered wireless sensor networks.
[0078] To address the current challenges of wireless sensor network reliability and high energy consumption in farm environments, this paper proposes a node-opportunistic routing transmission method. This method improves network transmission performance by jointly optimizing the transmit power of network nodes and the data transmission path. The network is first clustered, taking into account node density, transmission distance, and remaining energy. Data analysis and fusion performed by the cluster head reduces data volume and network energy consumption.
[0079] The present invention provides a method, apparatus, electronic device, and medium for opportunistic transmission of farmland data. When transmitting data from a current node, the method transmits the data to each candidate node in a candidate forwarding set via the cluster head node of the cluster to which the current node belongs. The method then selects a next-hop node from the candidate forwarding set and responds to the data transmission instructions from the next-hop node until the data is transmitted to a sink node. By designing an inter-cluster opportunistic routing transmission mechanism, the method dynamically selects node transmission power and candidate forwarding node sets to minimize the cost of data transmission between nodes, thereby improving data transmission reliability and network energy efficiency within the network.
[0080] Figure 2 : is a schematic diagram of a process for determining a candidate forwarding set of a current node provided by the present invention, wherein determining the candidate forwarding set of the current node includes:
[0081] an initial expected transmission energy consumption of an initial candidate forwarding set corresponding to the initial node is obtained;
[0082] repeating the following steps: in a case that a current expected transmission energy consumption after a neighbor node of any current node is added to a current candidate forwarding set is less than an expected transmission energy consumption of the last iteration, adding the neighbor node to the current candidate forwarding set; and in a case that the current expected transmission energy consumption after the neighbor node of any current node is added to the current candidate forwarding set is equal to the expected transmission energy consumption of the last iteration, stopping iteration, and determining a candidate forwarding set after iteration as the candidate forwarding set of the current node.
[0083] In step 1011, an initial expected transmission energy consumption of an initial candidate forwarding set corresponding to the initial node is obtained, in such an embodiment, after the farm wireless sensor network completes clustering, each node in the cluster can communicate with the cluster head node in one hop, the cluster head node aggregates the sensing data, and then performs fusion processing in the sensor, and then transmits the processed data to the sink node. The cluster head node has large data volume and high information accuracy, and needs to be accurately transmitted. However, the energy of the farm wireless sensor network WSN is limited, and the node is not easy to charge or replace. The application provides an inter-cluster opportunistic routing transmission mechanism combined with power control. Specifically, node i is a current node, and node j is a data transmission object, that is, a neighbor node. The probability of transmission failure of node i when transmitting data to node j can be represented by the bit error rate pe ij , each candidate node receives a data packet event independently, and then the expected transmission times of node i when transmitting data to the candidate forwarding node set is represented by formula (1): k The probability that the data sent by node i is received by at least one node in the candidate forwarding node set is:
[0084]
[0085] Formula (1) represents the expected transmission times of node i when transmitting data to the candidate forwarding node set. Let C i represent the candidate forwarding node set of node i. According to the network energy consumption model, the expected energy consumption efficiency of node i when transmitting data to the candidate forwarding node is:
[0086]
[0087] In formula (2), E TX is the energy consumed by the node when transmitting data, E Rx is the energy consumed by the node when receiving data, pe ij k is the connectivity probability between node i and node j. More specifically, E TX , E Rx and pe ijk :
[0088] Wireless sensor networks (WSNs) primarily consist of energy supply electronics, a communication subsystem, a processing subsystem, and a sensor subsystem. Some sensor networks also include a positioning subsystem. The communication subsystem consumes significantly more energy than the processing subsystem. Existing research has demonstrated that data transmission consumes significant energy, while data processing consumes relatively little. Based on this principle, energy consumption models primarily consider the energy consumption of the sensor and communication subsystems. The First-Order energy model is used to measure node energy consumption. The energy consumed by a node sending k bits of data to a distance d is as follows:
[0089] E TX (k,d)=k·E elec +k·ε fs ·d 2 ,d<d0 (3)
[0090] In formula (3), E elec is the energy consumed by the sending module and the receiving module to process 1 bit of data; fs and ε mp All are the energy consumed by power amplification; In fact, node energy consumption is positively correlated with transmission power. According to the free space attenuation model, the above energy consumption model can be converted into:
[0091]
[0092] In formula (4), pt i is the transmit power of node i, and h is the path gain.
[0093] The energy consumed by a node receiving k bits of data is:
[0094] E RX =k·E elec (5)
[0095] The present invention adopts power adjustable sensor as research object, and assumes P={pt1,pt2,…,pt u} is the set of transmission power, when node i selects the transmission power pt k When ∈P sends data, the connectivity probability between node i and node j is expressed as pe ij k , the probability is calculated by the reliability model:
[0096]
[0097] In formula (6), d i is the transmission distance between node i and the next hop node.
[0098] In opportunistic routing, the candidate node with the highest priority and receiving the last stage packet will forward the data first, otherwise, the candidate node with the second highest priority will forward the data. If node j forwards the data, it means that node j successfully receives the data and all the candidate nodes with higher priority than it fail to receive the data, in this case, the expected energy consumption of node j is based on at least one node in the candidate set receiving the data. Therefore, node i forwards the data to the candidate forwarding set C i The expected energy consumption efficiency of successfully sending the fusion data is:
[0099]
[0100] In summary, the expected transmission energy consumption efficiency of node i in end-to-end opportunistic routing is :
[0101]
[0102] In formula (8), Ei is the expected energy consumption efficiency of node i sending data to the candidate forwarding node, Ei is the expected energy consumption efficiency of node i sending data to the candidate forwarding node, Ei is the expected energy consumption efficiency of node i forwarding data to the candidate forwarding set C i The expected energy consumption efficiency of successfully sending the fusion data. The way of obtaining the initial expected transmission energy consumption of the initial candidate forwarding set corresponding to the initial node in step 1011 is also applicable to the determination of the expected transmission energy consumption of the candidate forwarding set corresponding to the node in the subsequent iteration.
[0103] In step 1012, if the current expected transmission energy consumption of any neighbor node of the current node after joining the current candidate forwarding set is less than the expected transmission energy consumption of the last iteration, the neighbor node is added to the current candidate forwarding set. In the present application, whether any neighbor node of the current node is a candidate node is determined by judging the size relationship of the value of the expected transmission energy consumption in the case of judging the influence of the expected transmission energy consumption caused by adding any neighbor node to the candidate forwarding set. The principle of the judgment is that the current expected transmission energy consumption after adding the neighbor node to the current candidate forwarding set is less than the expected transmission energy consumption of the last iteration.
[0104] In step 1013, step 1012 is a repeatedly executed step, that is, any neighbor node of the current node is continuously added to the candidate forwarding set, and a judgment is made after the addition, until the current expected transmission energy consumption of any neighbor node of the current node after joining the current candidate forwarding set is equal to the expected transmission energy consumption of the last iteration, at which point the iteration is stopped, and the candidate forwarding set after the iteration is determined as the candidate forwarding set of the current node.
[0105] Those skilled in the art understand that inter-node transmission power is positively correlated with energy consumption. Failure to consider the dynamic changes in node transmit power during routing design can lead to nodes using a transmission power greater than that required for the communication distance. This results in inefficient energy consumption and accelerated node failure. The energy efficiency of node data transmission is affected by its transmit power. To improve node energy efficiency during routing and extend network life, it is necessary to control node transmit power to avoid inefficient energy consumption.
[0106] Specifically, in the end-to-end opportunistic routing, the expected transmission energy efficiency of node i is CQ i k , let CQ sink =0, CQ i k =+∞, 1≤i≤N, the initial value of the transmission power level is k=1, the initial value of the number of iterations iter is 1, and the iteration initialization is set to CQ sink =0, CQ i 0 =+∞, 1≤i≤N, in the iterth iteration, calculate the expected transmission energy consumption between node i and its neighboring nodes in different clusters. If node j is a neighboring node of node i and is in a different cluster from node i, when it joins the candidate forwarding node set C of node i, i Then the expected transmission energy consumption CQ of node i is i_iter 0 Less than CQ i 0, then add node j to the candidate forwarding set of node i; when the candidate forwarding set C of node i If the result is different from the previous iteration, repeat the above steps and set CQ i 0 = CQ iter 0, then let iter = iter + 1; when the candidate forwarding set C of the node i If the result is the same as the previous iteration, judge CQ i k Is it less than CQ? i 0 If so, let CQ i 0 =CQ i k , node i transmission power pt i For pt k , the node's final candidate forwarding set is the current candidate forwarding set C i, 1≤i≤N. Optionally, it is determined whether the current number of iterations is less than or equal to a preset number of iterations. If so, k=k+1 and the iterative process continues. If not, the iteration is stopped and the algorithm ends. In the present invention, when selecting a candidate node set for opportunistic routing according to the above steps, each iteration calculates the set of neighbor nodes that minimizes the expected transmission energy efficiency from node i to node j, and the candidate forwarding set after the iteration is determined as the candidate forwarding set for the current node.
[0107] This invention utilizes opportunistic routing for data transmission. In this approach, the sender no longer selects a single relay node, but instead sends data packets to a group of relay nodes to improve the packet delivery rate between the sending and receiving nodes. The source node selects candidate relay nodes and prioritizes them based on various performance metrics, such as distance to the destination, expected transmission count (ETX), propagation delay, and queue length. The more candidate forwarding nodes in opportunistic routing, the higher the transmission success rate. On the other hand, on the shortest path to the destination, each neighboring node's transmission progress is slower than the next hop's. Using too many candidates can increase the likelihood that a packet will stray from the shortest path. When routing is selected for data transmission, the node's communication range and link quality are affected by the node's transmit power. However, most current wireless sensor network routing algorithms typically use a fixed transmit power during design, resulting in redundant network energy consumption. This invention combines power control with routing transmission to propose an energy-efficient clustered opportunistic routing transmission mechanism. Based on a node reliability model and an energy consumption model, a greedy algorithm is designed to cluster sensor nodes using single-hop communication as a constraint. Then, the unicast transmission energy efficiency cost of the node and the transmission energy efficiency cost of the candidate forwarding set are established, and the candidate forwarding set and forwarding node priority ranking of each cluster head are obtained through end-to-end iteration.
[0108] Figure 3 This is a flow chart of screening out the next-hop node provided by the present invention, wherein the screening out of the next-hop node from the candidate forwarding set includes: determining all candidate nodes that send feedback information to the current node as candidate nodes to be judged; determining the sending priorities of all candidate nodes to be judged, and determining the candidate node to be judged with the highest sending priority as the next-hop node; the feedback information is used to indicate that the candidate node has received the data transmitted from the current node; the sending priority of the candidate node to be judged is determined according to the expected energy consumption efficiency between the current node and each candidate node to be judged, and is sorted in ascending order.
[0109] In step 1031, all candidate nodes sending feedback information to the current node are determined as candidate nodes to be judged, the feedback information being used to indicate that the candidate nodes have received the data transmitted from the current node, the data being first transmitted from the current node to each candidate node in the candidate forwarding set corresponding to the current node, some of the candidate nodes being able to receive the data and some of the candidate nodes being unable to receive the data, all the candidate nodes receiving the data from the current node sending feedback information to the current node so that the current node can know which candidate nodes receive the data, and then all the candidate nodes sending feedback information to the current node are determined as candidate nodes to be judged.
[0110] In step 1032, the transmission priorities of all the candidate nodes to be judged are determined, and the candidate node to be judged with the highest transmission priority is determined as the next hop node, the transmission priority of the candidate node to be judged being determined according to the expected energy consumption efficiency between the current node and each candidate node to be judged in the order from small to large, the expected energy consumption efficiency between the current node and each candidate node to be judged being determined according to formula (4), and all the candidate nodes to be judged being sorted in the order from large to small, and the candidate node to be judged with the highest transmission priority being determined as the next hop node.
[0111] After the candidate forwarding set is constructed, the forwarding nodes are sorted according to the expected transmission energy consumption between nodes, when a data transmission event occurs in the network, if the sending node is an in-cluster member node, the data is first transmitted to the cluster head of the current cluster, if the sending node is a cluster head node, the cluster head node executes the opportunistic routing algorithm to send data packets to all nodes in the candidate forwarding set, the node receiving the transmission data packet and having the highest priority being the actual next hop node, and other candidate nodes discarding the data packet. Alternatively, if the actual next hop node is an in-cluster member node of another cluster, the data is first transmitted to the cluster head node, and then the cluster head node executes the opportunistic routing algorithm to forward the data. If the actual next hop node is another cluster head node, the opportunistic routing algorithm is executed to select the next hop node, and the above steps are repeated until all the data is transmitted to the sink node, and the forwarding and transmission of the data are ended.
[0112] Figure 4 is a flowchart of the agricultural field data opportunistic transmission method provided by the application, before responding to the data transmission instruction of any current node, further comprising:
[0113] For each node, sending message notification information to all neighbor nodes of the node, so that the node receives the message notification information sent from all neighbor nodes;
[0114] determine the node density of the node according to the number of message notification information received by the node and the number of all nodes, and determine the distance from the node to the sink node according to the node position of the node and the node position of the sink node;
[0115] calculate the probability of the node becoming a cluster head node according to the node density of the node, the distance from the node to the sink node and the residual energy of the node, and traverse all nodes to obtain the probability of each node becoming a cluster head node in all nodes;
[0116] for each node, determine the variable value of each node according to the random number generated by each node and the probability of each node becoming a cluster head node, and send the probability of each node becoming a cluster head node and the variable value of each node to all neighbor nodes of the node, so that each node obtains the probability of all neighbor nodes becoming a cluster head node and the variable value of all neighbor nodes;
[0117] determine the node with the highest probability of becoming a cluster head node and the preset constant as the variable value as the cluster head node, and send the election information to all neighbor nodes according to the cluster head node, so as to cluster all nodes according to the election information received by each node;
[0118] The message notification information includes node position, node name and residual energy of the node.
[0119] Optionally, before responding to the data transmission instruction of any current node, all nodes need to be clustered according to the election information received by each node, specifically:
[0120] In step 201, for each node, send message notification information to all neighbor nodes of the node, so that the node receives the message notification information sent from all neighbor nodes, and the message notification information includes node position, node name and residual energy of the node. The present application aims to divide the nodes in the network into clusters, and assign a cluster head (CH) to each cluster. The cluster head is responsible for receiving and aggregating the data sensed by the nodes in the cluster, and then sending to the sink node. The present application discloses a CH election protocol based on node density, residual energy and Euclidean distance.
[0121] In step 202, determine the node density of the node according to the number of message notification information received by the node and the number of all nodes, and determine the distance from the node to the sink node according to the node position of the node and the node position of the sink node, specifically:
[0122] Figure 6This is a schematic diagram of the node neighbor table provided by the present invention. In the calculation of node density, when a node receives a message notification from a neighboring node, it stores the information of each neighbor in Figure 6 In the neighbor table shown, the number of received messages is counted as Sc, thereby determining the number of neighbors |Ne i |, the calculation formula of the node density is:
[0123]
[0124] Optionally, determining the distance from the node to the sink node according to the node position of the node and the node position of the sink node may refer to:
[0125]
[0126] Where (x s ,y s ) and (x i ,y i ) represent the locations of the sink node and the current node respectively.
[0127] In step 203, the probability of the node becoming the cluster head node is calculated based on the node density of the node, the distance from the node to the sink node, and the residual energy of the node. Optionally, refer to the following formula:
[0128]
[0129] In formula (11), α, β, and ε represent weight factors, which are calculated by entropy weight method, Pr is the ratio of cluster heads in the network, r is the number of iterations, and d min is the minimum distance between the set of node i and its neighbor nodes and the sink node, d i is the distance between node i and the sink node, Er max is the maximum residual energy in the set consisting of node i and its neighboring nodes, and traverses all nodes to obtain the probability of each node becoming the cluster head node.
[0130] In step 204, for each node, the variable value of each node is determined based on the random number generated by each node and the probability of each node becoming a cluster head node, and the probability of each node becoming a cluster head node and the variable value of each node are sent to all neighboring nodes of the node, so that each node obtains the probability of all neighboring nodes becoming cluster head nodes and the variable values of all neighboring nodes.
[0131] Optionally, after completing the weight pc i的 After calculation, each node generates a random number pd i ∈[0,1], if pd i <pci , then let the variable l = 1, otherwise l = 0, any node sends its own node's election probability and l value to the adjacent node by sending a broadcast packet, which is stored in Figure 6 In the neighbor table, through information interaction, each node can obtain the election probability and election willingness of itself and its neighbor nodes.
[0132] In step 205, the node with the highest probability of becoming the cluster head node and whose variable value is a preset constant is determined to be the cluster head node, and the election information is sent to all neighboring nodes based on the cluster head node, so as to cluster all nodes according to the election information received by each node. Optionally, the preset constant is 1, and the node with the highest probability of being elected and whose l value is 1 is selected to become the cluster head, and the cluster head information is sent to the neighboring nodes, and all nodes are clustered according to the election information received by each node.
[0133] Optionally, clustering all nodes according to the selected information received by each node includes:
[0134] When any node receives an election information, the node is added to the cluster where the cluster head corresponding to the election information is located;
[0135] When any node receives multiple election information, the node is added to the cluster where the cluster head corresponding to the election information with the highest probability of becoming the cluster head node belongs.
[0136] Those skilled in the art will understand that if any node receives only one CH announcement message corresponding to the election information, the node will select the sender of the message as its cluster head. Furthermore, if any node receives two or more CH announcement messages corresponding to the election information, the node will select the cluster head node with the highest election probability from the election information. Alternatively, if any node receives data packets with the same election probability from the election information, it will randomly select one of the cluster heads to join.
[0137] Figure 5 This is a flow chart of the farmland data transmission method provided by the present invention, which includes the following steps before sending a message notification information to all neighboring nodes of the node:
[0138] For any node, determine the data packet reception success rate between the node and each node in the target area based on the node's transmit power, the distance between the node and each node in the target area, the data rate, the data packet size, and the noise bandwidth;
[0139] Determine nodes in the target area whose data packet reception success rate is greater than a preset threshold as neighbor nodes of the node;
[0140] Traverse all nodes until the neighbor nodes of all nodes in the target area are determined.
[0141] In step 301, the target area may be a farm area, for example, the size of which is 400×400m. 2 N sensors are deployed in an unmanned farm, and its network topology can be simplified to an undirected graph G = (V, E), where the set V = {v1, v2, ..., v N} represents the set of nodes, E is the set of all links, and edge e ij ∈E exists if and only if the node v i and v j There is a connection between them.
[0142] Furthermore, the frequently changing ecological environment and dense crops on farms can hinder wireless sensor signal transmission, making the connectivity probability of communication links between nodes unstable. Based on the IEEE 802.15.6 standard, the following path loss model following a lognormal distribution can be constructed:
[0143]
[0144] In formula (12), PL(d) and d represent the path loss and distance between the sending node and the receiving node, respectively, PL(d0) is the path loss at the reference distance β0, and h is the path loss exponent (the rate at which the signal decays). σ is a zero-mean Gaussian distributed random variable with a unit of (dB).
[0145] Assuming the node's transmit power is Pt and the additive white Gaussian noise power is Pn, the receiver's signal-to-noise ratio is:
[0146] γ(d)=Pt-PL(d)-Pn(13)
[0147] Background noise value P of the network environment n Typically -115dBm. Based on the above received signal-to-noise ratio, the present invention uses the packet reception success rate (PAR) to measure the quality of the communication link, which can be calculated using the following formula:
[0148]
[0149] In formula (14), d is the path distance between the sending node and the receiving node, R is the data rate, f is the packet size (in bytes), and B N is the noise bandwidth.
[0150] In step 302, the nodes in the target area whose packet receiving success rate is greater than a preset threshold are determined as neighbor nodes of the node. Optionally, if the connectivity probability pe between the two nodes is greater than a preset threshold, ijGreater than the preset threshold pe th , there is a connected link between the two nodes, and its connectivity is affected by the transmission power selected by the sending node. All nodes with a connected link to node i constitute the neighbor node set of node i, which is represented by Ne i Indicates that Er={Er1, Er2,…, Er N} represents the residual energy set of the node.
[0151] In step 303, all nodes are traversed until the neighbor nodes of all nodes in the target area are determined. According to steps 301 to 302, for each node, the data packet reception success rate of the node and each node in the target area is determined according to the transmission power of the node, the distance between the node and each node in the target area, the data rate, the data packet size and the noise bandwidth. The nodes in the target area whose data packet reception success rate is greater than a preset threshold are determined as neighbor nodes of the node.
[0152] Figure 7 This is the fourth flow chart of the farmland data opportunity transmission method provided by the present invention. The present invention inputs information such as the number of nodes, transmission power level, node position, node remaining energy, cluster head node set, calculates the candidate forwarding combination of all nodes and sorts the forwarding nodes. When a data transmission event occurs in the network, it determines whether its sending node is the cluster head node. If it is the cluster head node, the data is broadcast to the candidate forwarding set, and the node that receives the data packet and has the highest priority is selected to forward the data. If it is not the cluster head node, the data is transmitted to the cluster head node of the current cluster, and then the data is broadcast to the candidate forwarding set, and the node that receives the data packet and has the highest priority is selected to forward the data, and then determines whether the forwarding node is a convergence node. If it is not a convergence node, it returns to the step of determining whether the sending node is the cluster head node and repeats the above steps. If it is a convergence node, it ends.
[0153] To address the irregular attenuation of wireless signals and the high transmission energy consumption caused by open farm environments and dense crops, this paper proposes an opportunistic transmission mechanism that combines power control with network clustering. First, the probability of a node being elected as a cluster head is calculated based on node distance, neighbor density, and residual energy. A greedy algorithm is then designed to divide the network into clusters. Cluster members transmit information to the cluster head via single-hop communication. After information fusion, node reliability models and energy consumption models are used to determine the transmission costs of inter-cluster links. This allows the cluster head candidate forwarding node set to be constructed, thereby improving the throughput of farm sensor networks. Because the overhead of coordinating candidate nodes and transmitting redundant data packets can incur additional energy costs for the network, this protocol minimizes transmission power when selecting a forwarding node set while ensuring acceptable link quality between nodes. This reduces energy consumption while maintaining per-hop link quality.
[0154] This paper proposes a clustering method for agricultural wireless sensor networks. Sensor nodes in the network locally process and fuse sensor data to reduce data transmission. First, the threshold formula for selecting a cluster head is improved by calculating the density of a node's neighbors, the distance to the sink node, and the residual energy. An entropy weighting method is then used to weight various influencing factors. This method divides the network into clusters for intra-cluster single-hop communication while balancing performance across different networks. Furthermore, considering the difficulty in ensuring link transmission quality in farm environments, opportunistic routing theory is introduced to achieve highly reliable data transmission between clusters.
[0155] To further optimize the energy efficiency of agricultural wireless sensor networks, this paper, based on the clustering method for agricultural wireless sensor networks, proposes an inter-cluster opportunistic routing method that adapts to dynamic transmission power. This method uses the bit error rate to predict the probability of node transmission success and establishes a node energy consumption model that factors in the influence of transmission power. Based on this, the network transmission cost is derived. The present invention then converts the energy efficiency transmission cost of transmitting data from the source node to the destination node into a unicast transmission cost and a path transmission cost for a set of candidate forwarding nodes. Node transmission power is iteratively selected and a set of candidate forwarding nodes for the cluster head node is constructed. Relay nodes with the lowest transmission cost in the candidate forwarding set are given higher priority for packet forwarding, thus achieving energy-efficient and reliable transmission of agricultural monitoring data.
[0156] Figure 8 It is a structural schematic diagram of the farmland data opportunity transmission device provided by the present invention. The present invention provides a farmland data opportunity transmission device, including a determination unit 1: used to respond to the data transmission instruction of any current node and determine the candidate forwarding set of the current node. The working principle of the determination unit 1 can refer to the aforementioned step 101 and will not be repeated here.
[0157] The farmland data opportunity transmission device also includes a transmission unit 2: used to transmit data to each candidate node in the candidate forwarding set through the cluster head node of the cluster where the current node is located. The working principle of the transmission unit 2 can refer to the aforementioned step 102 and will not be repeated here.
[0158] The farmland data opportunity transmission device also includes a response unit 3: used to filter out the next hop node from the candidate forwarding set, and respond to the data transmission instruction of the next hop node until the data is transmitted to the aggregation node. The working principle of the response unit 3 can refer to the aforementioned step 103 and will not be repeated here.
[0159] The candidate forwarding set of candidate nodes is a set of candidate nodes related to the cluster head node of the cluster where the current node is located; the cluster where the current node is located is different from the cluster where the candidate node is located; the candidate node is determined based on the relationship between the expected transmission energy consumption of the current node before it joins the candidate forwarding set and the expected transmission energy consumption of the current node after it joins the candidate forwarding set.
[0160] The present invention provides a method, apparatus, electronic device, and medium for opportunistic transmission of farmland data. When transmitting data from a current node, the method transmits the data to each candidate node in a candidate forwarding set via the cluster head node of the cluster to which the current node belongs. The method then selects a next-hop node from the candidate forwarding set and responds to the data transmission instructions from the next-hop node until the data is transmitted to a sink node. By designing an inter-cluster opportunistic routing transmission mechanism, the method dynamically selects node transmission power and candidate forwarding node sets to minimize the cost of data transmission between nodes, thereby improving data transmission reliability and network energy efficiency within the network.
[0161] Figure 9 Schematic diagram of the structure of the electronic device provided by the present invention. Figure 9 As shown, the electronic device may include: a processor 910, a communication interface 920, a memory 930, and a communication bus 940, wherein the processor 910, the communication interface 920, and the memory 930 communicate with each other via the communication bus 940. The processor 910 may call logic instructions in the memory 930 to execute a farmland data opportunistic transmission method, which includes: determining a candidate forwarding set for the current node in response to a data transmission instruction from any current node; transmitting data to each candidate node in the candidate forwarding set via the cluster head node of the cluster where the current node is located; selecting a next-hop node from the candidate forwarding set and responding to the data transmission instruction from the next-hop node until the data is transmitted to a sink node; the candidate forwarding set is a set of candidate nodes related to the cluster head node of the cluster where the current node is located; the cluster where the current node is located is different from the cluster where the candidate node is located; and the candidate node is determined based on the relationship between the expected transmission energy consumption of the current node before joining the candidate forwarding set and the expected transmission energy consumption of the current node after joining the candidate forwarding set.
[0162] In addition, the logic instructions in the above-mentioned memory 930 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as a product to be parsed. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0163] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the above-mentioned methods to provide a farmland data opportunity transmission method, the method comprising: responding to a data transmission instruction of any current node, determining a candidate forwarding set of the current node; transmitting data to each candidate node in the candidate forwarding set through the cluster head node of the cluster where the current node is located; screening out a next-hop node from the candidate forwarding set, and responding to the data transmission instruction of the next-hop node until the data is transmitted to the aggregation node; the candidate forwarding set is a set of candidate nodes related to the cluster head node of the cluster where the current node is located; the cluster where the current node is located is different from the cluster where the candidate node is located; the candidate node is determined based on the relationship between the expected transmission energy consumption of the current node before it joins the candidate forwarding set and the expected transmission energy consumption of the current node after it joins the candidate forwarding set.
[0164] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for transmitting farmland data, characterized in that: include: In response to a data transmission instruction of any current node, determining a candidate forwarding set of the current node; Transmitting data to each candidate node in the candidate forwarding set through the cluster head node of the cluster where the current node is located; Screening out a next-hop node from the candidate forwarding set, and responding to a data transmission instruction of the next-hop node until the data is transmitted to the sink node; The candidate forwarding set is a set of candidate nodes related to the cluster head node of the cluster where the current node is located; The cluster where the current node is located is different from the cluster where the candidate node is located; The candidate node is determined based on the relationship between the expected transmission energy consumption of the current node before it joins the candidate forwarding set and the expected transmission energy consumption of the current node after it joins the candidate forwarding set; The step of selecting a next-hop node from the candidate forwarding set includes: determining all candidate nodes that have sent feedback information to the current node as candidate nodes to be determined; determining the sending priorities of all candidate nodes to be determined, and determining the candidate node to be determined with the highest sending priority as the next-hop node; the feedback information is used to indicate that the candidate node has received the data transmitted from the current node; and the sending priorities of the candidate nodes to be determined are determined in ascending order based on the expected energy efficiency between the current node and each candidate node to be determined; Before the data transmission instruction in response to any current node, it also includes: for each node, sending message notification information to all neighboring nodes of the node, so that the node receives message notification information sent by all neighboring nodes; determining the node density of the node according to the number of message notification information received by the node and the number of all nodes, and determining the distance from the node to the sink node according to the node position of the node and the node position of the sink node; calculating the probability of the node becoming a cluster head node according to the node density of the node, the distance from the node to the sink node and the residual energy of the node, and traversing all nodes to obtain the probability of each node becoming a cluster head node among all nodes. The method comprises the following steps: determining the probability of becoming a cluster head node; determining the variable value of each node according to the random number generated by each node and the probability of each node becoming a cluster head node; sending the probability of each node becoming a cluster head node and the variable value of each node to all neighboring nodes of the node, so that each node obtains the probability of all neighboring nodes becoming cluster head nodes and the variable values of all neighboring nodes; determining the node with the highest probability of becoming a cluster head node and a variable value being a preset constant as the cluster head node, and sending the election information to all neighboring nodes according to the cluster head node, so as to cluster all nodes according to the election information received by each node; the message notification information includes the node location, node name and the remaining energy of the node.
2. The farmland data transmission method according to claim 1, characterized in that: The transmitting the data to each candidate node in the candidate forwarding set through the cluster head node of the cluster where the current node is located includes: In a case where the current node is a cluster head node of the cluster where the current node is located, sending the data to each candidate node in the candidate forwarding set; When the current node is a non-cluster head node of the cluster where the current node is located, the data is sent from the current node to the cluster head node of the cluster where the current node is located, and the data is sent to each candidate node in the candidate forwarding set according to the cluster head node of the cluster where the current node is located.
3. The farmland data transmission method according to claim 1, characterized in that: The clustering of all nodes according to the selected information received by each node includes: When any node receives an election information, the node is added to the cluster where the cluster head corresponding to the election information is located; When any node receives multiple election information, the node is added to the cluster where the cluster head corresponding to the election information with the highest probability of becoming the cluster head node belongs.
4. The farmland data transmission method according to claim 1, characterized in that: Before sending a message notification information to all neighboring nodes of the node, the method includes: For any node, determine the data packet reception success rate between the node and each node in the target area based on the node's transmit power, the distance between the node and each node in the target area, the data rate, the data packet size, and the noise bandwidth; Determine nodes in the target area whose data packet reception success rate is greater than a preset threshold as neighbor nodes of the node; Traverse all nodes until the neighbor nodes of all nodes in the target area are determined.
5. A farmland data transmission device, characterized in that: include: A determination unit: configured to determine a candidate forwarding set of a current node in response to a data transmission instruction of any current node; Transmission unit: configured to transmit data to each candidate node in the candidate forwarding set through the cluster head node of the cluster where the current node is located; A response unit is configured to select a next-hop node from the candidate forwarding set and respond to a data transmission instruction of the next-hop node until the data is transmitted to the sink node; The candidate forwarding set is a set of candidate nodes related to the cluster head node of the cluster where the current node is located; The cluster where the current node is located is different from the cluster where the candidate node is located; The candidate node is determined based on the relationship between the expected transmission energy consumption of the current node before it joins the candidate forwarding set and the expected transmission energy consumption of the current node after it joins the candidate forwarding set; The step of selecting a next-hop node from the candidate forwarding set includes: determining all candidate nodes that have sent feedback information to the current node as candidate nodes to be determined; determining the sending priorities of all candidate nodes to be determined, and determining the candidate node to be determined with the highest sending priority as the next-hop node; the feedback information is used to indicate that the candidate node has received the data transmitted from the current node; and the sending priorities of the candidate nodes to be determined are determined in ascending order based on the expected energy efficiency between the current node and each candidate node to be determined; It also includes a clustering unit: used for sending message notification information to all neighboring nodes of the node for each node before responding to the data transmission instruction of any current node, so that the node receives the message notification information sent by all neighboring nodes; determining the node density of the node according to the number of message notification information received by the node and the number of all nodes, and determining the distance from the node to the sink node according to the node position of the node and the node position of the sink node; calculating the probability of the node becoming a cluster head node according to the node density of the node, the distance from the node to the sink node and the residual energy of the node, and traversing all nodes to obtain the probability of each node in all nodes. The method comprises the following steps: determining the probability of a node becoming a cluster head node according to a random number generated by each node and the probability of each node becoming a cluster head node, and sending the probability of each node becoming a cluster head node and the variable value of each node to all neighboring nodes of the node, so that each node obtains the probability of all neighboring nodes becoming cluster head nodes and the variable values of all neighboring nodes; determining the node with the highest probability of becoming a cluster head node and a variable value being a preset constant as the cluster head node, and sending election information to all neighboring nodes according to the cluster head node, so as to cluster all nodes according to the election information received by each node; the message notification information includes the node location, node name and the remaining energy of the node.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the farmland data transmission method according to any one of claims 1 to 4 is implemented.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the farmland data transmission method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Wireless sensor network opportunistic routing protocol based on grid clustering
CN101577668A
Candidate forwarding set construction method and relay coordination method of farmland complex environment opportunity transmission
CN108811026A
Role stratification-based wireless sensor network security routing method
CN109474905A
Wireless sensor network non-uniform clustering routing method based on energy optimization
CN111698705A