IPv6 network-inter-network IPv6 packet broadcasting method for wireless energy supply sensor network
Through linear network coding and multi-round broadcast technology, the reliability and delay constraints of IPv6 packet broadcasting are solved, the performance of wireless energy supply sensor networks is optimized, and efficient IPv6 packet transmission is achieved in applications such as smart farms and smart mines. .
Patent Information
- Application Number
- CN202210105180.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-28
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-01-28
AI Technical Summary
In the cross-network IPv6 packet broadcast between the IPv6 network and the wireless energy supply sensor network, the existing technology has the problems of low reliability, serious delay constraints and difficult performance optimization, especially in IoT applications such as smart farms and smart mines. , the broadcast of IPv6 packets must be successful within a given delay, and optimization of the data rate, number of fragments, and number of groups must be considered to maximize network utility.
Linear network coding technology is used to encode each IPv6 packet fragment into multiple linearly independent coded packets, and a multi-round broadcast scheme is used to ensure that the node receives enough coded packets to restore the original packet. Combined with the data rate and energy consumption model, optimization The number of IPv6 packets in each group, the number of fragments and the data rate to improve broadcast reliability and effectiveness.
It improves the reliability and network utility of IPv6 packet broadcast, ensures successful broadcast within a given delay, optimizes the throughput rate and energy efficiency of the network, and enhances the ability to support Internet of Things applications.
Smart Images

Figure CN114501371B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of wireless power supply sensor networks and relates to an IPv6 network-wireless power supply sensor network cross-network IPv6 packet broadcasting method. Background Art
[0002] A wirelessly powered sensor network (WPSN) is composed of a large number of passive sensor nodes. These nodes are not equipped with batteries and can obtain energy from the radio frequency signals emitted by wireless chargers (WC) arranged around them. In IoT applications such as smart farms and smart mines, WPSN nodes often need to exchange information with the controller deployed in the IPv6 network. For example, the controller often needs to distribute instructions encapsulated in IPv6 packets to WPSN nodes to control the WPSN nodes to perform tasks, such as turning on or off the switch of crop irrigation equipment. Generally, to achieve the interconnection between the IPv6 network and the WPSN, a gateway needs to be set at the boundary of the IPv6 network and the WPSN. The functions of the gateway mainly include two aspects: (1) broadcasting the IPv6 packets from the controller to the WPSN nodes; (2) receiving the perception data from the WPSN nodes and forwarding them to the controller. The technical solution proposed in the present invention is applicable to the above aspect (1). Since the length of the IPv6 packet is generally greater than 1000B, the length of the data packet supported by the WPSN is generally not greater than 127B. Therefore, the gateway needs to fragment the IPv6 packet before broadcasting it.
[0003] The main process of the gateway broadcasting IPv6 packets to the WPSN nodes is as follows: first, the gateway receives the IPv6 packets from the control end and groups the IPv6 packets, each group contains several IPv6 packets; then, each IPv6 packet is fragmented and each fragment is encapsulated in a separate WPSN data packet; then, the gateway uses an appropriate data rate to broadcast the WPSN data packets that have been encapsulated with IPv6 packet fragments to the WPSN nodes one by one in groups; finally, the WPSN nodes receive the data packets from the gateway, and when the WPSN nodes correctly receive all IPv6 packet fragments, they restore the original IPv6 packets.
[0004] In the above process, there are three key issues to consider:
[0005] First, the reliability issue of IPv6 packet broadcasting.
[0006] In order to correctly receive an IPv6 packet, a node must correctly receive all of its IPv6 packet fragments. In fact, during the broadcast of an IPv6 packet, if any fragment is lost, not only will the IPv6 packet be unable to be restored, but all fragments that have been correctly received by the node before will be invalidated. It can be seen that it is very important to improve the reliability of cross-network IPv6 packet broadcasting.
[0007] Second, the delay constraint problem of IPv6 packet broadcast
[0008] In IoT applications such as smart farms and smart mines, many tasks need to be executed in a timely manner, that is, there is a given delay constraint for each specific task. If the IPv6 packet encapsulating the control command cannot be broadcast to the receiving node within the given delay, the task execution fails. To avoid this situation, it is necessary to ensure that the IPv6 packet can be successfully broadcast to the receiving node within the given delay constraint.
[0009] Third, the performance optimization issue of IPv6 packet broadcast
[0010] First, the number of each group of IPv6 packets in the gateway and the number of fragments of each IPv6 packet will affect the energy efficiency and throughput of the network. This is because when the number of each group of IPv6 packets and the number of fragments of each IPv6 packet are different, the delay, energy consumption and corresponding charging time required to broadcast IPv6 packets are different; secondly, the data rate used by the gateway will affect the delay and bit error rate of IPv6 packet broadcasting. If a higher data rate is used, the delay may be reduced, but the bit error rate will increase; if a lower data rate is used, the delay may increase, but the bit error rate will decrease. It can be seen that it is necessary to comprehensively consider the optimization selection of parameters such as data rate, the number of each group of IPv6 packets, and the number of fragments of each IPv6 packet to maximize the energy efficiency and throughput of the network (collectively referred to as "network utility"). Summary of the invention
[0011] In order to overcome the shortcomings of the existing technology, the present invention provides an IPv6 network-wireless power supply sensor network cross-network IPv6 packet broadcasting method, which adopts linear network coding technology to encode the fragments of each IPv6 packet into multiple linearly independent coding packets, so that the receiving node can restore the original IPv6 packet through decoding operation as long as it receives a certain number of coding packets, thereby improving the reliability of IPv6 packet broadcasting; an optimization problem with the goal of maximizing energy efficiency and throughput and the broadcast delay as a constraint is proposed. By solving the optimization problem, the optimal values of parameters such as the number of IPv6 packets in each group, the number of fragments of each IPv6 packet and the data rate can be obtained, thereby improving the utility of the network.
[0012] The technical solution adopted by the present invention to solve its technical problem is:
[0013] A method for broadcasting IPv6 packets across an IPv6 network and a wireless energy-supplying sensor network, comprising the following steps:
[0014] 1) Establish a system model. The process is as follows:
[0015] 1.1) Build a network model
[0016] The network model consists of an IPv6 network, a WPSN (Wirelessly Powered Sensor Network), a wireless charger (Wireless Charger, WC), and a gateway G (Gateway). The IPv6 network and the WPSN are connected to each other through the gateway G. The WPSN consists of R1, R2, ..., R M It consists of M nodes in total, with gateway G as the center, forming a star network. Wireless charging stations are arranged around WPSN, responsible for supplying energy to WPSN nodes. Gateway G is externally powered and has sufficient power. The data flow through gateway G can be divided into "upstream data flow" and "downstream data flow". Upstream data flow refers to the perception data gathered from WPSN nodes to gateway G; downstream data flow refers to the IPv6 packets broadcast by gateway G to WPSN nodes. In the downstream data flow, gateway G is responsible for receiving IPv6 packets from the controller and transmitting them to all WPSN nodes through wireless broadcasting. Each WPSN node is equipped with an antenna, and wireless charging and data transmission and reception cannot be performed at the same time.
[0017] 1.2) Constructing a bit error rate model
[0018] With d i Represents gateway G and node R i The distance between (G, R i ) indicates G and R i In a wireless channel using direct sequence spread spectrum technology and offset quadrature phase shift keying modulation mode, the link (G, R i ) bit error rate b i for:
[0019]
[0020] Among them, B N is the noise bandwidth, r is the data rate, Q(·) is the Gaussian tail integral function, and we have:
[0021]
[0022] And ψ(·) is the received signal-to-noise ratio, we have:
[0023] ψ(d i )=P t-P lost (d0)-10μlog 10 (d i / d0)-P th (3)
[0024] In the above formula, P t is the transmission power of gateway G, P lost (d0) is the link (G,R i ) is the power loss per unit distance, usually d0 = 1m, μ is the power attenuation coefficient, and its value range is an integer between 2 and 4, P th is the receiving power threshold. i The received power is not less than P th Only when the data is received normally;
[0025] With l H , l M , l FCS , l d They represent the physical layer header length, MAC layer header length, frame check sequence length and payload length of the WPSN data packet respectively. Then the length of the WPSN data packet is l p = l H +l M +l d +l FCS Therefore, in the link (G, R i ) is:
[0026]
[0027] 1.3) Building an energy consumption model
[0028] Considering the energy consumption of WPSN nodes, and Respectively represent R i The energy consumption of sending 1 bit and receiving 1 bit; U represents the working voltage when the node is in the sending state or receiving state, I Tx and I Rx They represent the current intensity when the node is in the sending state and the receiving state respectively, t represents the time for the node to send or receive 1 bit, t = 1 / r, and we get
[0029]
[0030] and
[0031]
[0032] 1.4) Build a wireless charging model
[0033] P i(h) Represents R i The charging power is Represents R i The strength of the RF signal received from charging station q, q = 1, 2, ..., Q. Q represents the number of charging stations. When Q = 1, According to the Friss equation,
[0034]
[0035] Among them, G s and G r They represent the antenna gains of the charging station and the node respectively, λ is the wavelength of the electromagnetic wave, and P s is the transmission power of the charging station, L p is the polarization attenuation, D i,q Represents R i The distance between D and the charging station q, ε is a very small value, which ensures that when D i,q = 0, that is, when the charging station and the node position overlap, the denominator of formula (7) is not 0;
[0036] Let η represent the "RF-to-electrical energy" conversion efficiency of the node energy capture circuit, then R i Charging power:
[0037]
[0038] When Q>1, for R i For example, the RF signal of each charging station has different attenuation and phase shift, which is related to R i The distance D between the charging station q i,q At this time, R i The signal received from the charging station q can be expressed as the following complex number:
[0039]
[0040] So, we get R i The total charging power is:
[0041]
[0042] 2) Establish the 6WPSN protocol. The process is as follows:
[0043] 2.1) The working process of the 6WPSN protocol is divided into the following two stages:
[0044] Phase 1: Charging phase. First, the gateway G estimates the charging time of the network based on the number of IPv6 packets to be transmitted, the current remaining energy of the node, and the target energy level of the node. Second, the gateway G broadcasts the charging control instruction (CCI) to the charging station and specifies the charging duration in the charging control instruction, that is, the starting time and the ending time of charging. After receiving the charging control instruction, the charging station transmits the radio frequency signal to charge the node at the specified starting time and the ending time.
[0045] Phase 2: IPv6 packet broadcasting phase. After the charging phase is completed, the gateway broadcasts the receiving control instruction RCI to the nodes. The instruction specifies the number of each group of IPv6 packets, the number of fragments of the IPv6 packet, and the encoding vector. The gateway G broadcasts the IPv6 packets to the nodes one by one until all nodes successfully receive all IPv6 packets. First, before broadcasting each IPv6 packet, the gateway G needs to split it into N fragments and encapsulate each fragment in a WPSN data packet separately, that is, each IPv6 packet is re-encapsulated into N WPSN data packets. The reason why IPv6 packets need to be fragmented is that the length of the IPv6 packet is greater than the data packet length that the WPSN node can support; secondly, the gateway G broadcasts the N fragments of each IPv6 packet to the nodes. At the receiving end, each time the node correctly receives the N fragments of each IPv6 packet, it can restore the original IPv6 packet. This is repeated until all IPv6 packets are correctly received by all nodes.
[0046] 2.2) The process of 6WPSN protocol broadcasting each IPv6 packet
[0047] The 6WPSN protocol uses linear network coding technology to encode the N fragments of each IPv6 packet into N c Linearly independent code packets, N< <N c According to the characteristics of linear network coding, as long as the node receives N c Any N of the encoded packets can be decoded to restore the N original fragments and further restore the original IPv6 packet.
[0048] In the process of broadcasting each IPv6 packet, in order to ensure that M nodes can correctly receive at least N coded packets, the 6WPSN protocol adopts a "multi-round broadcast" scheme. At the same time, in order to ensure that the coded packets received by the nodes are linearly independent, each coded packet is broadcast only once. Represents R i The number of encoding packets currently required, expressed in Y j represents the number of coded packets that gateway G needs to broadcast in round j, then Obviously,
[0049] 2.3) Gateway and node operation process;
[0050] 2.3.1) Gateway G operation process:
[0051] Step 2.3.1.1.G solves the optimization problem to obtain the optimal number of IPv6 packets per group n, the number of fragments per IPv6 packet N, and the data rate r;
[0052] Step 2.3.1.2. Calculate the network charging time T c , and then sends the charging control instruction CCI to Q charging stations. After receiving the charging control instruction, the charging station starts charging the node for a duration of T c ;
[0053] Step 2.3.1.3. Calculate the total number of coded packets N c , then, encode the N fragments into N c Encoded packets are temporarily stored in the sending queue;
[0054] Step 2.3.1.4.G broadcasts the receiving control instruction RCI to M nodes at the minimum rate r0, indicating the number of IPv6 packets n, the number of fragments of the IPv6 packet N, and the encoding vector CV. Set n temp =n;
[0055] Step 2.3.1.5.G Determine n temp Is it equal to 0? If so, go to step 2.3.1.9;
[0056] Step 2.3.1.6.G: Set Y=N.
[0057] Step 2.3.1.7.G broadcasts the first Y coded packets in the sending queue to M nodes one by one at a data rate r, and then clears these Y coded packets to free up storage space;
[0058] Step 2.3.1.8. G receives ACK packets or NACK packets from M nodes and records them in a table. G determines whether the number of ACK packets in the table is equal to M. If so, it sets n temp =n temp -1, return to step 2.3.1.5; if not, check the information in NACK to obtain the number of packets required for the next round of transmission, and set Return to step 2.3.1.7;
[0059] Step 2.3.1.9. End;
[0060] 2.3.2) Node R i Operation flow, i=1,2,...,M:
[0061] Step 2.3.2.1.Ri Draws energy from surrounding charging stations for a duration of T c ;
[0062] Step 2.3.2.2.R i Receive the receiving control instruction CCI from the gateway G, and obtain the number of IPv6 packets to be received this time, the number of fragments N of each IPv6 packet, and the encoding vector CV and other parameters from the instruction. Set n temp =0;
[0063] Step 2.3.2.3.R i Receive the coded packet from gateway G and perform CRC check. If there is no bit error, it will be temporarily stored in the receiving queue; otherwise, it will be discarded;
[0064] Step 2.3.2.4.R i Determine whether the number of coded packets X in the receiving queue is equal to N. If X = N, stop receiving and reply an ACK containing its current remaining energy to gateway G after the current round of broadcasting ends; at the same time, restore the N coded packets to the original IPv6 packets; if X ≠ N and the current round of broadcasting has not ended, return to step 2.3.2.3; if X ≠ N and the current round of broadcasting has just ended, set And reply to gateway G with a If the value is NACK, return to step 2.3.2.3;
[0065] Step 2.3.2.5.R i Set temp =n temp +1, submit the IPv6 packet to the upper layer of the protocol stack and clear the receiving queue, determine n temp Is it equal to n? If not, return to step 2.3.2.3;
[0066] Step 2.3.2.6. End;
[0067] Get the timeline of n IPv6 packet broadcasts, T r Indicates the duration of receiving the control command, T i represents the duration of the i-th round of broadcasting, T i (Ack) Indicates the duration of receiving ACK or NACK after the i-th round of broadcast, i = 1, 2, ...
[0068] Further, the processing process of 2.2) is as follows:
[0069] Round 1: Broadcast Y1 coded packets, gateway G sends N c The first Y1=N of the coded packets are broadcast to M nodes one by one. After the broadcast is completed, G receives the iACK or NACK packet, i = 1, 2, ..., M. If G receives an ACK packet, it means that R i The IPv6 packet is received successfully. In this case, R i It will indicate its current remaining energy in the ACK packet and stop receiving; if G receives a NACK packet, it means that R i Some or all of the coded packets fail to be received. In this case, R i The NACK packet will indicate the number of coded packets that it has not received so far, that is, the number of coded packets it has received so far. If the total number of ACKs received by gateway G so far is equal to M, the IPv6 packet is successfully broadcast to M nodes; otherwise, it proceeds to the next round;
[0070] Round 2: Broadcast Y2 coded packets. Gateway G determines the number of coded packets to be broadcast in this round based on the information in the received NACK packet. Then, gateway G in the remaining N c -Y1=N c - Broadcast Y2 coded packets to the nodes one by one in order among the N coded packets; then, gateway G receives ACK packets or NACK packets from the nodes; if the total number of ACKs received by gateway G so far is equal to M, the IPv6 packet is successfully broadcast to M nodes; otherwise, enter the next round;
[0071] This process is repeated until all M nodes have correctly received N coded packets.
[0072] Furthermore, the method further comprises the following steps:
[0073] 3) Performance analysis model of 6WPSN protocol
[0074] In a wireless broadcast channel with multiple receiving nodes, the packet loss probability of each receiving node is different, that is, after the gateway G broadcasts N coded packets, the number of packet losses of the M receiving nodes is not the same; on average, the number of coded packets that G needs to broadcast in each round is exactly equal to the number of packet losses of the node with the most packet loss in the network after the previous round of broadcast; in order to obtain the theoretical throughput and energy efficiency expression of the 6WPSN protocol, the packet loss probability of the network is first modeled, and then the success probability of the gateway G broadcasting an IPv6 packet is derived. On this basis, the expected number of broadcast rounds and the expected number of broadcasts required by G under the condition of successfully broadcasting an IPv6 packet are derived. Finally, the theoretical throughput and energy efficiency expression of the 6WPSN protocol are derived.
[0075] Furthermore, the method further comprises the following steps:
[0076] 4) Considering that network throughput and energy efficiency are both important indicators for WPSN, we define a utility function F(N,r,n)=ω1θ Th +ω2θ EE , where ω1 and ω2 are weight coefficients and ω1+ω2=1. In order to maximize the utility F(N,r,n) of the network, the following optimization problem is proposed, which combines throughput and energy efficiency for comprehensive optimization;
[0077] max:F(N,r,n)=ω1θ Th +ω2θ EE
[0078] wrt:N,r,n
[0079]
[0080] In formula (35), C1 limits the number of fragments of each IPv6 packet to no more than C2 indicates the data rate r∈{6.25,12.5,25,50}Kbps adopted by the gateway; C3 indicates that the length of each coded packet is at least 10B and not greater than the longest data packet length supported by the IEEE802.15.4 standard, i.e., 127B; C4 indicates that the payload of each coded packet is not less than 4B, in order to ensure the transmission efficiency of each coded packet; C5 gives the delay constraint for G to broadcast n IPv6 packets, i.e., G needs to successfully broadcast n IPv6 packets within Γ time; in C6, represents the upper bound of the node capacitor capacity, represents the average energy consumption required to correctly receive an IPv6 packet, so Represents R i The maximum number of IPv6 packets that can be received by the energy in the capacitor;
[0081] Considering that the number of combinations of N, r and n is not large, the gateway G can use an exhaustive search method to obtain the optimal solution to the optimization problem.
[0082] The beneficial effects of the present invention are mainly manifested in: 1. Improving the reliability of IPv6 packet broadcasting; 2. Improving the effectiveness of the network. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] Figure 1 It is a schematic diagram of the IPv6 network-WPSN cross-network IPv6 packet broadcast model.
[0084] Figure 2 This is a schematic diagram of IPv6 packet fragmentation.
[0085] Figure 3 This is a diagram of the "multi-round broadcast" scheme for each IPv6 packet.
[0086] Figure 4 is the timeline of n IPv6 packet broadcasts.
[0087] Figure 5 This is a schematic diagram of the k-th round of broadcasting. DETAILED DESCRIPTION
[0088] The present invention will be further described below in conjunction with the accompanying drawings.
[0089] Reference Figure 1 to Figure 5 , a method for broadcasting IPv6 packets across an IPv6 network and a wireless power supply sensor network, comprising the following steps:
[0090] 1) Establish a system model. The process is as follows:
[0091] 1.1) Build a network model
[0092] The network model consists of an IPv6 network, a WPSN (Wirelessly Powered Sensor Network), a wireless charger (Wireless Charger, WC), and a gateway G (Gateway). The IPv6 network and the WPSN are connected to each other through the gateway G. The WPSN consists of R1, R2, ..., R M It consists of M nodes in total, with gateway G as the center, forming a star network. Wireless charging stations are arranged around WPSN, responsible for supplying energy to WPSN nodes. Gateway G is externally powered and has sufficient power. The data flow through gateway G can be divided into "upstream data flow" and "downstream data flow". Upstream data flow refers to the perception data gathered from WPSN nodes to gateway G; downstream data flow refers to the IPv6 packets broadcast by gateway G to WPSN nodes. In the downstream data flow, gateway G is responsible for receiving IPv6 packets from the controller and transmitting them to all WPSN nodes through wireless broadcasting. Each WPSN node is equipped with an antenna, and wireless charging and data transmission and reception cannot be performed at the same time.
[0093] 1.2) Constructing a bit error rate model
[0094] With d i Represents gateway G and node R i The distance between (G, R i ) indicates G and R iIn a wireless channel using Direct Sequence Spread Spectrum (DSSS) and Offset Quadrature Phase Shift Keying (O-QPSK), the link (G, R i ) bit error rate (BER) i for:
[0095]
[0096] Among them, B N is the noise bandwidth, r is the data rate, Q(·) is the Gaussian tail integral function, and we have:
[0097]
[0098] And ψ(·) is the received signal to noise ratio (SNR), we have:
[0099] ψ(d i )=P t -P lost (d0)-10μlog 10 (d i / d0)-P th (3)
[0100] In the above formula, P t is the transmission power of gateway G, P lost (d0) is the link (G,R i ) is the power loss per unit distance, usually d0 = 1m, μ is the power attenuation coefficient, and its value range is an integer between 2 and 4, P th is the receiving power threshold. i The received power is not less than P th Only when the data is received normally;
[0101] With l H , l M , l FCS , l d They represent the physical layer header length, MAC layer header length, frame check sequence length and payload length of the WPSN data packet respectively. Then the length of the WPSN data packet is l p = l H +l M +l d +l FCS Therefore, in the link (G, R i ) is:
[0102]
[0103] 1.3) Building an energy consumption model
[0104] Considering the energy consumption of WPSN nodes, and Respectively represent R i The energy consumption of sending 1 bit and receiving 1 bit; U represents the working voltage when the node is in the sending state or receiving state, I Tx and I Rx They represent the current intensity when the node is in the sending state and the receiving state respectively, and t represents the time for the node to send or receive 1 bit. Obviously, t = 1 / r, and we get
[0105]
[0106] and
[0107]
[0108] 1.4) Build a wireless charging model
[0109] P i (h) Represents R i The charging power is Represents R i The strength of the radio frequency signal received from charging station q, q = 1, 2, ..., Q. Q represents the number of charging stations. When Q = 1, It can be calculated according to the Friss equation, that is
[0110]
[0111] Among them, G s and G r They represent the antenna gains of the charging station and the node respectively, λ is the wavelength of the electromagnetic wave, and P s is the transmission power of the charging station, L p is the polarization attenuation, D i,q Represents R i The distance between D and the charging station q, ε is a very small value, which ensures that when D i,q =0, that is, when the charging station and the node position overlap, the denominator of formula (7) is not 0.
[0112] Let η represent the "RF-to-electrical energy" conversion efficiency of the node energy capture circuit, then R i Charging power:
[0113]
[0114] When Q>1, for R i For example, the RF signal of each charging station has different attenuation and phase shift, which is related to R i The distance D between the charging station q i,q At this time, R i The signal received from the charging station q can be expressed as the following complex number:
[0115]
[0116] So, we can get R i The total charging power is:
[0117]
[0118] 2) Establish the 6WPSN protocol. The process is as follows:
[0119] 2.1) The working process of the 6WPSN protocol is divided into the following two stages:
[0120] Phase 1: Charging phase. First, gateway G estimates the charging time of the network based on the number of IPv6 packets to be transmitted, the current remaining energy of the node, and the target energy level of the node (i.e., the minimum energy required for the node to successfully receive the IPv6 packet from gateway G); secondly, gateway G broadcasts the charge control instruction (CCI) to the charging station and specifies the charging duration, i.e., the start and end time points of charging, in the charge control instruction. After receiving the charge control instruction, the charging station transmits a radio frequency signal to charge the node at the specified start and end time points.
[0121] Phase 2: IPv6 packet broadcasting phase. After the charging phase is completed, the gateway broadcasts the receiving control instruction (RCI) to the nodes, which specifies the number of each group of IPv6 packets, the number of fragments of the IPv6 packet, and the encoding vector. Then, the gateway G broadcasts the IPv6 packets to the nodes one by one until all nodes successfully receive all IPv6 packets. First, before broadcasting each IPv6 packet, the gateway G needs to split it into N fragments and encapsulate each fragment separately in a WPSN data packet, that is, each IPv6 packet is re-encapsulated into N WPSN data packets, such as Figure 2As shown in the figure. The reason why IPv6 packets need to be fragmented is that the length of IPv6 packets (more than 1000B) is greater than the length of data packets that WPSN nodes can support (only about 100B). Secondly, gateway G broadcasts N fragments of each IPv6 packet to the nodes. At the receiving end, every time a node correctly receives N fragments of each IPv6 packet, it can restore the original IPv6 packet, and repeat this process until all IPv6 packets are correctly received by all nodes.
[0122] 2.2) The process of 6WPSN protocol broadcasting each IPv6 packet
[0123] Due to the unreliability of wireless channels, each IPv6 packet fragment (referred to as "fragment") broadcast by gateway G may be lost due to bit errors. As long as any one of the N fragments is lost, the receiver cannot restore the original IPv6 packet. Therefore, it is very important to improve the reliability of IPv6 packet broadcasting.
[0124] In order to improve the reliability of IPv6 packet broadcasting, the present invention adopts linear network coding technology in the 6WPSN protocol. Through this technology, the present invention encodes the N fragments of each IPv6 packet into N c Linearly independent code packets, N< <N c According to the characteristics of linear network coding, as long as the node receives N c Any N of the encoded packets can be decoded to restore the N original fragments and further restore the original IPv6 packet.
[0125] In the process of broadcasting each IPv6 packet, in order to ensure that M nodes can correctly receive at least N coded packets, the 6WPSN protocol adopts a "multi-round broadcast" scheme. At the same time, in order to ensure that the coded packets received by the nodes are linearly independent, each coded packet is broadcast only once. Represents R i The number of encoding packets currently required, expressed in Y j represents the number of coded packets that gateway G needs to broadcast in round j, then Obviously,
[0126] The processing process of 2.2) is as follows:
[0127] Round 1: Broadcast Y1 coded packets. Gateway G sends N c The first Y1=N of the coded packets are broadcast to M nodes one by one. After the broadcast is completed, G receives the i ACK (Acknowledgment) packet or NACK (Negative Acknowledgment) packet, i = 1, 2, ..., M. If G receives an ACK packet, it means that R iThe IPv6 packet is received successfully. In this case, R i It will indicate its current remaining energy in the ACK packet and stop receiving; if G receives a NACK packet, it means that R i Some or all of the coded packets fail to be received. In this case, R i The NACK packet will indicate the number of coded packets that it has not received so far, that is, the number of coded packets it has received so far. If the total number of ACKs received by gateway G so far is equal to M, the broadcast of the IPv6 packet to M nodes is successful; otherwise, enter the next round.
[0128] Round 2: Broadcast Y2 coded packets. Gateway G determines the number of coded packets to be broadcast in this round based on the information in the received NACK packet. Then, gateway G in the remaining N c -Y1=N c -Y2 encoded packets are broadcast to the nodes one by one in order. Then, gateway G receives ACK packets or NACK packets from the nodes. If the total number of ACKs received by gateway G so far is equal to M, the IPv6 packet is successfully broadcast to M nodes; otherwise, it enters the next round.
[0129] This process is repeated until all M nodes have correctly received N coded packets.
[0130] To illustrate the process of gateway G broadcasting an IPv6 packet, an example is given. Assume that there are 5 nodes in the network, R1, R2, ..., R5, and gateway G needs to broadcast an IPv6 packet. The IPv6 packet is divided into N = 10 fragments, and these 10 fragments are encoded as N c = 20 linearly independent coding packets. The broadcast process of gateway G is as follows:
[0131] Round 1: G broadcasts the first Y1=10 of the 20 code packets to 5 nodes. Assume that after the broadcast, the number of code packets still needed by each of the 5 nodes, that is, the number of code packets still missing so far, is shown in Table 1. Therefore, G receives 2 ACK packets from R1 and R4 and 3 NACK packets from R2, R3 and R5. These 3 NACK packets indicate the number of code packets still needed by R2, R3 and R5 so far: and
[0132]
[0133] Table 1
[0134] Round 2: Gateway G counts the maximum number of code packets still needed by each node in the network after the previous round of broadcasting, and obtains Y2=max{0,1,2,0,4}=4. Therefore, gateway G broadcasts the first 4 code packets of the remaining 20–Y1=20-10=10 code packets to 5 nodes. Let's assume that after this round of broadcasting, the number of code packets still needed by each node is as shown in Table 2. Then, gateway G will receive two ACKs from R2 and R3 and one NACK from R5. R5 indicates in the NACK that the number of code packets it still needs is 1.
[0135]
[0136] Table 2
[0137] This process repeats until gateway G receives 5 ACKs.
[0138] It is worth mentioning that in order to save the storage space of the gateway G, after each round of broadcasting is completed, the coded packets that have been broadcasted in that round can be cleared from the memory.
[0139] 2.3) Gateway and node operation process;
[0140] 2.3.1) Gateway G operation process:
[0141] Step 1. G solves the optimization problem (35) to obtain the optimal number n of IPv6 packets per group, the number N of fragments per IPv6 packet, and the data rate r.
[0142] Step 2.G calculates the network charging time T according to the following formula (30) c , and then sends the charging control instruction CCI to Q charging stations (after receiving the charging control instruction, the charging station starts charging the node for a duration of T c ).
[0143] Step 3.G calculates the total number of coded packets N according to the following formula (23): c , then, encode the N fragments into N c The encoded packets are temporarily stored in the sending queue.
[0144] Step 4. G uses the lowest rate r0 to broadcast the receiving control instruction RCI to M nodes, indicating the number n of IPv6 packets, the number N of fragments of IPv6 packets, and the encoding vector CV. Set n temp =n.
[0145] Step 5. G determines n temp Is it equal to 0? If so, go to step 9.
[0146] Step 6. G sets Y=N.
[0147] Step 7. G broadcasts the first Y coded packets in the sending queue to M nodes one by one at a data rate r, and then clears these Y coded packets to release storage space.
[0148] Step 8. G receives ACK packets or NACK packets from M nodes and records them in a table as shown in Table 1. G determines whether the number of ACKs in the table is equal to M. If so, it sets n temp =n temp -1, return to step 5; if not, check the information in NACK to obtain the number of packets required for the next round of transmission, and set Return to step 7.
[0149] Step 9. End.
[0150] 2.3.2) Node R i Operation flow (i=1,2,...,M):
[0151] Step 1. R i Draws energy from surrounding charging stations for a duration of T c ;
[0152] Step 2. R i Receive the receiving control instruction CCI from the gateway G, and obtain the number of IPv6 packets to be received this time, the number of fragments N of each IPv6 packet, and the encoding vector CV and other parameters from the instruction. Set n temp =0.
[0153] Step 3. R i Receive the coded packet from gateway G and perform CRC check. If there is no bit error, it will be temporarily stored in the receiving queue; otherwise, it will be discarded;
[0154] Step 4. R i Determine whether the number of coded packets X in the receiving queue is equal to N. If X = N, stop receiving and reply an ACK containing its own current remaining energy to the gateway G after the current round of broadcasting ends; at the same time, restore the N coded packets to the original IPv6 packets; if X≠N and the current round of broadcasting has not ended, return to step 3; if X≠N and the current round of broadcasting has just ended, set And reply to gateway G with a If the value is NACK, return to step 3.
[0155] Step 5. R i Set temp =n temp +1, submit the IPv6 packet to the upper layer of the protocol stack and clear the receiving queue, determine n temp Is it equal to n? If not, return to step 3.
[0156] Step 6. End.
[0157] Get the timeline of n IPv6 packet broadcasts, such as Figure 4 As shown, where T r Indicates the duration of receiving the control command, T i represents the duration of the i-th round of broadcasting, T i (Ack) Indicates the duration of receiving ACK or NACK after the i-th round of broadcast, i = 1, 2, ...
[0158] Furthermore, the method further comprises the following steps:
[0159] 3) Performance analysis model of 6WPSN protocol
[0160] In a wireless broadcast channel with multiple receiving nodes, the packet loss probability of each receiving node is different. That is to say, after gateway G broadcasts N coded packets, the number of packet losses of M receiving nodes is not the same. In fact, on average, the number of coded packets that G needs to broadcast in each round is exactly equal to the number of packet losses of the node with the most packet losses in the network after the previous round of broadcast. Therefore, in order to obtain the theoretical throughput and energy efficiency expression of the 6WPSN protocol, we first model the packet loss probability of the network, and then derive the success probability of gateway G broadcasting 1 IPv6 packet. On this basis, we derive the expected number of broadcast rounds and the expected number of broadcasts required by G under the condition of successfully broadcasting 1 IPv6 packet. Finally, we derive the theoretical throughput and energy efficiency expression of the 6WPSN protocol.
[0161] As mentioned above, gateway G may need to go through multiple rounds of broadcasting to successfully broadcast an IPv6 packet. In this case, the expected number of packet losses in each round (i.e., the expected number of packets that need to be transmitted in the next round), the expected number of transmission rounds under the premise of successfully transmitting N packets, and the expected total number of transmissions under the premise of successfully transmitting N packets (i.e., the expected total number of transmitted packets) are
[0162] 3.1 Network packet loss probability
[0163] First, consider the node R i The probability of packet loss. Indicates that after G broadcasts a coded packets continuously, R i The number of packet losses, then R i The probability of losing b packets after G broadcasts a coded packets is:
[0164]
[0165] Secondly, consider the probability that after G continuously broadcasts a coded packets, the node with the most packet losses in the network loses b packets. Let Y denote the number of packet losses of the node with the most packet losses in the network after G continuously broadcasts a coded packets, that is
[0166]
[0167] We define Y as the number of packet losses in the network. Then, when G broadcasts a packets, the probability that Y is less than or equal to b is:
[0168]
[0169] According to the above formula, when G broadcasts a packets, a = 1, 2,..., N, the probability that the number of packet losses in the network is exactly equal to b can be obtained as:
[0170]
[0171] 3.2. Success Probability of Broadcasting an IPv6 Packet
[0172] First, consider the probability of the event that "G broadcasts a coded packets in the current round and needs to broadcast b coded packets in the next round". In fact, the probability of this event is equivalent to the probability of the event that "G broadcasts a coded packets in the current round and the number of packet losses in the network is b".
[0173] Let S j represent that G is currently in the state of "broadcasting j data packets", j = 0, 1, 2,..., N, then the state space of G is {S0, S1, S2,..., S N}. The gateway G may change its state after each round of broadcasting. We can call the phenomenon that G changes from one state to another state "state transition". Let P a,b represent the probability that G changes from state S a to state S b . It is easy to know that it is impossible for G to change from state S j to state S j+s (s ∈ Z + ), because the number of coded packets broadcast by G in the next round cannot be greater than the number of coded packets broadcast in this round. That is, when a < b, P a,b = 0; in addition, it is always true that G changes from state S0 to state S0, that is, P 0,0 = 1. The state S0 indicates that G has successfully broadcast N coded packets or G currently has no coded packets to broadcast. To sum up, the expression of P a,b is as follows:
[0174]
[0175] Next, consider "G from state S a After k rounds of broadcasting, it is in state S b "The probability of this event.
[0176] by It means "G changes from state S a After k rounds of broadcasting, it is in state S b The probability of this event can be expressed as It is called "k-step state transition probability", and it is easy to know
[0177]
[0178] Further, suppose G is currently in state S a (a=1,2,...,N), after k rounds of transmission, G enters state S b (b=0,1,2,...,a;b≤a), that is, G needs to broadcast a coded packets at a certain time, and after k rounds of broadcasting, it may need to broadcast b coded packets again. It should be pointed out that “G from state S a After k rounds of transmission, it enters state S b "This event is equivalent to "G from state S a After (k-1) rounds of transmission, it is in state S b ,S b+1 ,...,S a Then, after the kth round of transmission, it enters state S b This event, therefore, yields:
[0179]
[0180] P represents the 1-step state transfer matrix. Since the state space of G is {S0,S1,S2,...,S N}, so P is a (N+1)×(N+1) matrix whose elements are P a,b Composition, among which, P a,b is the element in the (a+1)th row and (b+1)th column of the matrix, that is,
[0181]
[0182] From equations (16) to (18), we can obtain:
[0183]
[0184] So, G changes from state S N After k rounds of transmission, it is in state S b The transition probability can be obtained by recursive equation (19), where It is the success probability of G broadcasting N coded packets to M nodes after k rounds of broadcasting, that is, the success probability of G broadcasting an IPv6 packet to M nodes after k rounds of broadcasting.
[0185] 3.3 Expected broadcast times
[0186] First, consider the expected number of coded packets that G needs to broadcast in the kth round, k = 1, 2, 3, .... It is easy to know that when k = 1, the number of coded packets that G needs to broadcast is N. In the following, when we say "the kth round of broadcast is successful", it means that after the kth round of broadcast, all nodes have correctly received N coded packets; when we say "the kth round of broadcast failed", it means that after the kth round of broadcast, there are still 1 or more nodes that have not correctly received N coded packets. Obviously, for the kth round of broadcast, the prerequisite for it to occur is that the previous k-1 rounds of broadcast have all failed.
[0187] by represents the probability that gateway G successfully broadcasts N coded packets in the kth round. Obviously, Therefore, we can get and The events that occurred before and after the k-th round of broadcast and their corresponding probabilities can be used as follows: Figure 4 The binary tree shown in the figure shows that the black nodes and the equations next to them represent the events and their probabilities that occurred before the kth round of broadcasting. Figure 5 It is not difficult to conclude that the probability of failure of the first k-1 rounds of broadcasting is
[0188] Y k It represents the number of coded packets that the gateway G needs to broadcast in the kth round. Through the above analysis, it is not difficult to conclude that the expected number of coded packets that G needs to transmit in the kth round is:
[0189]
[0190] Next, consider the expected number of rounds required by G under the premise (condition) of successfully broadcasting N coded packets.
[0191] With random variables represents the number of rounds required by G under the premise (condition) of successfully broadcasting N coded packets. According to formula (19), the probability that G succeeds in the first round of broadcasting is The probability of success in the second round of broadcasting is The probability of success in the kth round of broadcasting is Therefore, when the number of broadcast rounds is unlimited, the probability of G successfully broadcasting N coded packets is Therefore, the expected number of rounds required for G to successfully broadcast N coded packets is:
[0192]
[0193] by represents the total number of broadcasts required by G (i.e., the total number of broadcast packets required) under the premise that all M nodes successfully receive N coded packets. According to equations (20) and (21), we can get The expected value of is:
[0194]
[0195] Therefore, we can let the number of encoded packets in each IPv6 packet be:
[0196]
[0197] Among them, α≥1, we call α the coding redundancy coefficient. When the value of α is larger, the probability of successfully broadcasting IPv6 packets will increase, but this will increase the storage space overhead of gateway G. In fact, we can select a reasonable α value according to the usage of G's storage space.
[0198] 3.4 Network Energy Efficiency and Throughput
[0199] For node R i For example, the probability of successful transmission of the coded packet is p i ,by Represents R i In order to successfully receive N coded packets, the number of receptions required is easy to know. Due to the event "R i Successfully received N coded packets" is equivalent to the event "R i The N+jth coded packet is successfully received and any N-1 of the previous N+j-1 coded packets are successfully received", therefore, R i The probability of successfully receiving N coded packets after a total of N+j (j=0,1,2,...) times is:
[0200]
[0201] Further, we can get R i The expected number of receptions to successfully receive N coded packets is:
[0202]
[0203] In addition, according to formula (20), G broadcasts E[Y k ] code packages, accordingly, R iThe number of receptions is also E[Y k ]. i In order to make up N code packets R i The number of rounds required is:
[0204]
[0205] Where f(x) is defined as:
[0206]
[0207] So, for R i For example, in the broadcast process of an IPv6 packet, it needs to receive an average of coded packets, and N packets need to be sent to G i -1 NACK packet and 1 ACK packet. Therefore, R i The expected energy consumption of correctly receiving n IPv6 packets is
[0208]
[0209] Among them, l RCI Indicates the length of the received control instruction.
[0210] The energy efficiency of the network is defined as the ratio of the total number of bits of IPv6 packets successfully broadcast by G to the total energy consumed by the nodes, that is,
[0211]
[0212] In order to obtain the network delay expression, we first need to know the network charging time. In order to ensure that G does not interrupt during the broadcast of n IPv6 packets, we need to ensure that R i The energy is not less than Therefore, the charging time of the network can be obtained as:
[0213]
[0214] Among them, e i represents the remaining energy before G starts broadcasting IPv6 packets.
[0215] Secondly, derive the delay required for the k-th round of broadcasting, σ C It represents the contention channel time required for the gateway G or node to send a coded packet, expressed as σ LIFS Indicates the long interframe interval. Since the expected number of coded packets sent by G in the kth round of broadcast is E[Y k ], therefore, the expected delay required for the kth round is:
[0216] Tk =E[Y k ](l p / r+σ LIFS ) (31)
[0217] In addition, as mentioned above, when one IPv6 packet is received correctly, R i Need to reply N to gateway G i -1 NACK and 1 ACK. Then, the total number of ACKs and NACKs that M nodes reply to the gateway is Correspondingly, the time consumed is:
[0218]
[0219] Among them, σ C represents the average time required for each node to compete for the channel, l a is the length of ACK / NACK, σ SIFS Indicates short interframe space.
[0220] So, according to Figure 4 , the total delay required for gateway G to successfully transmit n IPv6 packets is:
[0221]
[0222] Where r0 indicates that the gateway G uses the lowest data rate to broadcast the receiving control instruction to increase the probability of successful broadcasting. Considering that the receiving control instruction is short and uses the lowest data rate, it can be assumed that the receiving control instruction does not lose packets.
[0223] The network throughput is defined as the ratio of the total number of bits of n IPv6 packets to the required time, that is,
[0224]
[0225] Furthermore, the method further comprises the following steps:
[0226] 4) Considering that both network throughput and energy efficiency are crucial for WPSN, the present invention defines a utility function F(N,r,n)=ω1θ Th +ω2θ EE , where ω1 and ω2 are weight coefficients and ω1+ω2=1. In order to maximize the utility F(N,r,n) of the network, we propose the following optimization problem, which combines throughput and energy efficiency for comprehensive optimization.
[0227] max:F(N,r,n)=ω1θ Th +ω2θ EE
[0228] wrt:N,r,n
[0229]
[0230] In formula (35), C1 limits the number of fragments of each IPv6 packet to no more than C2 indicates the data rate r∈{6.25,12.5,25,50}Kbps adopted by the gateway; C3 indicates that the length of each coded packet is at least 10B and not greater than the longest data packet length supported by the IEEE802.15.4 standard, i.e., 127B; C4 indicates that the payload of each coded packet is not less than 4B, in order to ensure the transmission efficiency of each coded packet; C5 gives the delay constraint for G to broadcast n IPv6 packets, i.e., G needs to successfully broadcast n IPv6 packets within Γ time; in C6, represents the upper bound of the node capacitor capacity, represents the average energy consumption required to correctly receive an IPv6 packet, so Represents R i The maximum number of IPv6 packets that can be received by the energy in the capacitor;
[0231] Considering that the number of combinations of N, r and n is not large, the gateway G can use an exhaustive search method to obtain the optimal solution to the optimization problem.
Claims
1. A method for broadcasting IPv6 packets across an IPv6 network and a wireless power supply sensor network, characterized in that: The method comprises the following steps: 1) Establish a system model. The process is as follows: 1.1) Build a network model The network model consists of an IPv6 network, WPSN, a wireless charging station WC, and a gateway G. The IPv6 network and WPSN are connected to each other through the gateway G. The WPSN consists of R1, R2, ..., R M It consists of M nodes in total, with gateway G as the center, forming a star network. Wireless charging stations are arranged around WPSN, responsible for supplying energy to WPSN nodes. Gateway G is connected to an external power supply and has sufficient power. The data flow through gateway G is divided into "upstream data flow" and "downstream data flow". Upstream data flow refers to the perception data gathered from WPSN nodes to gateway G; downstream data flow refers to the IPv6 packets broadcast by gateway G to WPSN nodes. In the downstream data flow, gateway G is responsible for receiving IPv6 packets from the control end and transmitting IPv6 packets to all WPSN nodes through wireless broadcasting. Each WPSN node is equipped with an antenna, and wireless charging and data transmission and reception cannot be carried out at the same time. 1.2) Constructing a bit error rate model With d i Represents gateway G and node R i The distance between (G, R i ) indicates G and R i In a wireless channel using direct sequence spread spectrum technology and offset quadrature phase shift keying modulation mode, the link (G, R i ) bit error rate b i for: Among them, B N is the noise bandwidth, r is the data rate, Q(·) is the Gaussian tail integral function, and we have: And ψ(·) is the received signal-to-noise ratio, we have: ψ(d i )=P t -P lost (d0)-10μlog 10 (d i / d0)-P th (3) In the above formula, P t is the transmission power of gateway G, P lost (d0) is the link (G,R i ) is the power loss per unit distance, usually d0 = 1m, μ is the power attenuation coefficient, and its value range is an integer between 2 and 4, P th is the receiving power threshold. i The received power is not less than P th Only when the data is received normally; With l H , l M , l FCS , l d They represent the physical layer header length, MAC layer header length, frame check sequence length and payload length of the WPSN data packet respectively. Then the length of the WPSN data packet is l p = l H +l M +l d +l FCS , so, in the link (G,R i ) is: 1.3) Building an energy consumption model Considering the energy consumption of WPSN nodes, and Respectively represent R i The energy consumption of sending 1 bit and receiving 1 bit; U represents the working voltage when the node is in the sending state or receiving state, I Tx and I Rx They represent the current intensity when the node is in the sending state and the receiving state respectively, t represents the time for the node to send or receive 1 bit, t = 1 / r, and we get and 1.4) Build a wireless charging model P i (h) Represents R i The charging power is Represents R i The strength of the radio frequency signal received from charging station q, q = 1, 2, ..., Q, Q represents the number of charging stations, when Q = 1, According to the Friss equation, Among them, G s and G r They represent the antenna gains of the charging station and the node respectively, λ is the wavelength of the electromagnetic wave, and P s is the transmission power of the charging station, L p is the polarization attenuation, D i,q Represents R i The distance between D and the charging station q, ε is a very small value, which ensures that when D i,q = 0, that is, when the charging station and the node position overlap, the denominator of formula (7) is not 0; Let η represent the "RF-to-electrical energy" conversion efficiency of the node energy capture circuit, then R i Charging power: When Q>1, for R i For example, the RF signal of each charging station has different attenuation and phase shift, which is related to R i The distance D between the charging station q i,q At this time, R i The signal received from charging station q is represented as the following complex number: So, we get R i The total charging power is: 2) Establish the 6WPSN protocol. The process is as follows: 2.1) The working process of the 6WPSN protocol is divided into the following two stages: Phase 1: Charging phase. First, gateway G estimates the charging time of the network based on the number of IPv6 packets to be transmitted, the current remaining energy of the node, and the target energy level of the node. Second, gateway G broadcasts the charging control instruction CCI to the charging station and specifies the charging duration in the charging control instruction, that is, the starting time and the ending time of charging. After receiving the charging control instruction, the charging station transmits the radio frequency signal to charge the node at the specified starting time and the ending time. The second stage: the IPv6 packet broadcasting stage. After the charging stage is completed, the gateway broadcasts the receiving control instruction RCI to the nodes. The instruction specifies the number of each group of IPv6 packets, the number of fragments of the IPv6 packet, and the encoding vector. The gateway G broadcasts the IPv6 packets to the nodes one by one until all nodes successfully receive all IPv6 packets. First, before broadcasting each IPv6 packet, the gateway G needs to divide it into N fragments and encapsulate each fragment in a WPSN data packet separately, that is, each IPv6 packet is re-encapsulated into N WPSN data packets. The reason why the IPv6 packet needs to be fragmented is that the length of the IPv6 packet is greater than the data packet length that the WPSN node can support; secondly, the gateway G broadcasts the N fragments of each IPv6 packet to the nodes. At the receiving end, every time the node correctly receives the N fragments of each IPv6 packet, it can restore the original IPv6 packet. This is repeated until all IPv6 packets are correctly received by all nodes. 2.2) The process of WPSN protocol broadcasting each IPv6 packet The 6WPSN protocol uses linear network coding technology to encode the N fragments of each IPv6 packet into N c Linearly independent code packets, N< <N c According to the characteristics of linear network coding, as long as the node receives N c Any N of the encoded packets can be decoded to restore the N original fragments and further restore the original IPv6 packet. In the process of broadcasting each IPv6 packet, in order to ensure that M nodes can correctly receive at least N coded packets, the 6WPSN protocol adopts a "multi-round broadcast" scheme. At the same time, in order to ensure that the coded packets received by the nodes are linearly independent, each coded packet is broadcast only once. Represents R i The number of encoding packets currently required, expressed in Y j represents the number of coded packets that gateway G needs to broadcast in round j, then Obviously, 2.3) Gateway and node operation process; 2.3.1) Gateway G operation process: Step 2.3.1.1.G solves the optimization problem to obtain the optimal number of IPv6 packets per group n, the number of fragments per IPv6 packet N, and the data rate r; Step 2.3.1.
2. Calculate the network charging time T c , and then sends the charging control instruction CCI to Q charging stations. After receiving the charging control instruction, the charging station starts charging the node for a duration of T c ; Step 2.3.1.
3. Calculate the total number of coded packets N c , then, encode the N fragments into N c Encoded packets are temporarily stored in the sending queue; Step 2.3.1.4.G broadcasts the receiving control instruction RCI to M nodes at the minimum rate r0, indicating the number of IPv6 packets n, the number of fragments of the IPv6 packet N, and the encoding vector CV. Set n temp =n; Step 2.3.1.5.G Determine n temp Is it equal to 0? If so, go to step 2.3.1.9; Step 2.3.1.6.G: Set Y = N; Step 2.3.1.7.G broadcasts the first Y coded packets in the sending queue to M nodes one by one at a data rate r, and then clears these Y coded packets to free up storage space; Step 2.3.1.
8. G receives ACK packets or NACK packets from M nodes and records them in a table. G determines whether the number of ACK packets in the table is equal to M. If so, it sets n temp =n temp -1, return to step 2.3.1.5; if not, check the information in NACK to obtain the number of packets required for the next round of transmission, and set Return to step 2.3.1.7; Step 2.3.1.
9. End; 2.3.2) Node R i Operation flow, i=1,2,...,M: Step 2.3.2.1.R i Draws energy from surrounding charging stations for a duration of T c ; Step 2.3.2.2.R i Receive the receiving control instruction CCI from the gateway G, and obtain the number of IPv6 packets to be received this time, the number of fragments of each IPv6 packet, and the encoding vector CV parameter in the instruction, and set n temp =0; Step 2.3.2.3.R i Receive the coded packet from gateway G and perform CRC check. If there is no bit error, it will be temporarily stored in the receiving queue; otherwise, it will be discarded; Step 2.3.2.4.R i Determine whether the number of coded packets X in the receiving queue is equal to N. If X = N, stop receiving and reply an ACK containing its current remaining energy to gateway G after the current round of broadcasting ends; at the same time, restore the N coded packets to the original IPv6 packets; if X ≠ N and the current round of broadcasting has not ended, return to step 2.3.2.3; if X ≠ N and the current round of broadcasting has just ended, set And reply to gateway G with a If the value is NACK, return to step 2.3.2.3; Step 2.3.2.5.R i Set temp =n temp +1, submit the IPv6 packet to the upper layer of the protocol stack and clear the receiving queue, determine n temp Is it equal to n? If not, return to step 2.3.2.3; Step 2.3.2.
6. End; Get the timeline of n IPv6 packet broadcasts, T r Indicates the duration of receiving the control command, T i represents the duration of the i-th round of broadcasting, T i (Ack) Indicates the duration of receiving ACK or NACK after the i-th round of broadcast, i = 1, 2, ...
2. The method for broadcasting IPv6 packets across an IPv6 network and a wireless power supply sensor network as claimed in claim 1, characterized in that: The processing process of 2.2) is as follows: Round 1: Broadcast Y1 coded packets, gateway G sends N c The first Y1=N of the coded packets are broadcast to M nodes one by one. After the broadcast is completed, G receives the i ACK or NACK packet, i = 1, 2, ..., M. If G receives an ACK packet, it means that R i The IPv6 packet is received successfully. In this case, R i It will indicate its current remaining energy in the ACK packet and stop receiving; if G receives a NACK packet, it means that R i Some or all of the coded packets fail to be received. In this case, R i The NACK packet will indicate the number of coded packets that it has not received so far, that is, the number of coded packets it has received so far. If the total number of ACKs received by gateway G so far is equal to M, then the IPv6 packet is successfully broadcast to M nodes; Otherwise, proceed to the next round; Round 2: Broadcast Y2 coded packets. Gateway G determines the number of coded packets to be broadcast in this round based on the information in the received NACK packet. Then, gateway G in the remaining N c -Y1=N c - Broadcast Y2 coded packets to the nodes one by one in order among the N coded packets; Afterwards , Gateway G receives ACK packet or NACK packet from the node; If the total number of ACKs received by gateway G so far is equal to M, then the IPv6 packet is successfully broadcast to M nodes; Otherwise, proceed to the next round; This process is repeated until all M nodes have correctly received N coded packets.
3. A method for broadcasting IPv6 packets across an IPv6 network and a wireless power supply sensor network as claimed in claim 1 or 2, characterized in that: The method further comprises the following steps: 3) Performance analysis model of 6WPSN protocol In a wireless broadcast channel with multiple receiving nodes, the packet loss probability of each receiving node is different, that is, after the gateway G broadcasts N coded packets, the number of packet losses of the M receiving nodes is not the same; on average, the number of coded packets that G needs to broadcast in each round is exactly equal to the number of packet losses of the node with the most packet loss in the network after the previous round of broadcast; in order to obtain the theoretical throughput and energy efficiency expression of the 6WPSN protocol, the packet loss probability of the network is first modeled, and then the success probability of the gateway G broadcasting an IPv6 packet is derived. On this basis, the expected number of broadcast rounds and the expected number of broadcasts required by G under the condition of successfully broadcasting an IPv6 packet are derived. Finally, the theoretical throughput and energy efficiency expression of the 6WPSN protocol are derived.
4. The method for broadcasting IPv6 packets across an IPv6 network and a wireless power supply sensor network as claimed in claim 3, characterized in that: The method further comprises the following steps: 4) Considering that network throughput and energy efficiency are both important indicators for WPSN, we define a utility function F(N,r,n)=ω1θ Th +ω2θ EE , where θ EE represents the energy efficiency of the network, which is defined as the ratio of the total number of bits of IPv6 packets successfully broadcast by G to the total energy consumed by the nodes; θ Th represents the throughput of the network. The throughput of the network is defined as the ratio of the total number of bits of n IPv6 packets to the required time. ω1 and ω2 are weight coefficients and ω1+ω2=1. In order to maximize the utility function F(N,r,n) of the network, the following optimization problem is proposed. This optimization problem combines the throughput and energy efficiency for comprehensive optimization. max:F(N,r,n)=ω1θ Th +ω2θ EE wrt:N,r,n In formula (35), C1 limits the number of fragments of each IPv6 packet to no more than C2 indicates the data rate r∈{6.25,12.5,25,50}Kbps adopted by the gateway; C3 indicates that the length of each coded packet is at least 10B and not greater than the longest data packet length supported by the IEEE802.15.4 standard, i.e., 127B; C4 indicates that the payload of each coded packet is not less than 4B, in order to ensure the transmission efficiency of each coded packet; C5 gives the delay constraint for G to broadcast n IPv6 packets, i.e., G needs to successfully broadcast n IPv6 packets within Γ time; in C6, represents the upper bound of the node capacitor capacity, represents the average energy consumption required to correctly receive an IPv6 packet, so Represents R i The maximum number of IPv6 packets that can be received by the energy in the capacitor, e i represents the remaining energy before G starts broadcasting IPv6 packets; Considering that the number of combinations of N, r and n is not large, gateway G uses an exhaustive search method to obtain the optimal solution to the optimization problem.
Citation Information
Patent Citations
Reliable fragmented transmission method based on network coding for 6LoWPAN (IPv6 over Low Power Wireless Personal Area Network)
CN102904954A
Address configuration method and system
CN102932491A
An efficient dissemination protocol for remote update in 6lowpan sensor network
KR1020120074016A
Cross-layer and cross-access technology traffic splitting and retransmission mechanisms
US20210400537A1
