A mobile terminal-based relay ad hoc network communication method and system

By constructing an energy-geography joint gradient field on the mobile terminal and dynamically selecting relay nodes, the problem of network performance degradation caused by improper node energy management in the existing technology is solved, and efficient and reliable relay ad hoc network communication is achieved.

CN120390267BActive Publication Date: 2025-09-26CHONGQING LANGYIDI IND CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510874306.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-09-26
Estimated Expiration
2045-06-27

AI Technical Summary

Technical Problem

Existing relay ad hoc network communication technologies lack flexible management in dynamic environments with changing node energy states and geographical locations, resulting in degraded network performance, frequent communication interruptions, and uneven energy consumption.

Method used

By integrating kinetic energy converters to monitor the energy replenishment rate, constructing an energy-geography joint gradient field, combining IMU data to predict node displacement, dynamically selecting relay nodes, and introducing an energy attenuation factor when energy is insufficient, high-energy nodes take over the relay task.

Benefits of technology

It improves the accuracy of relay selection, enhances network self-healing capabilities, extends network life, improves data transmission reliability, and avoids network paralysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120390267B_ABST
    Figure CN120390267B_ABST
Patent Text Reader

Abstract

The present invention provides a mobile terminal-based relay ad hoc network communication method and system, relating to the technical field of mobile terminal relay ad hoc network communication. The present invention uses a mobile terminal integrated kinetic energy converter to monitor the energy replenishment rate in real time, calculate the energy sustainability index, estimate the distance of adjacent nodes, and construct an energy-geography joint gradient field in a multidimensional space. Nodes dynamically adjust the weight coefficients of energy and geography according to network density to generate a comprehensive gradient vector. In addition, IMU-collected motion data is used to correct the geographic gradient field to improve the accuracy of position prediction. When a relay link fails, the upstream node can rebroadcast the request, triggering the update of the local gradient field. The surrounding nodes refresh the gradient field based on the latest information and select a new relay node. At the same time, the gradient information is embedded in the data packet header. When the node energy sustainability index falls below a threshold, an energy attenuation factor is introduced, and the relay task is promptly exited, and the high-energy node takes over, thereby balancing network energy consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of relay ad hoc network communication of mobile terminals, and in particular to a relay ad hoc network communication method and system based on mobile terminals. Background Art

[0002] Amid the rapid advancement of communications technology, mobile-based relay ad hoc networking (MANET) communication methods are becoming an increasingly important network architecture, playing a key role in remote areas, emergency response, and military communications. By allowing direct communication between mobile terminals, relay ad hoc networks reduce reliance on infrastructure and enhance network flexibility and adaptability. Evaluating this type of communication method is crucial for ensuring efficient information transmission and robustness in environments with demanding real-time and reliability requirements. Specific scenarios include emergency rescue efforts during natural disasters, drone swarm collaboration, and intelligent transportation systems. These applications require rapid communication link establishment while maintaining network connectivity and scalability in dynamic environments.

[0003] Existing technologies usually implement relay ad hoc network communication through fixed relay nodes or simple forwarding mechanisms. Although these methods can operate effectively under certain conditions, they often lack dynamic management of network status and node energy. For example, some methods rely on preset relay paths or static energy management strategies and fail to adjust the real-time energy status of each node. This approach will lead to network performance degradation in the case of high energy consumption and uneven node capabilities. For example, when the energy of some nodes is exhausted, the entire network may cause communication interruption due to lack of effective relay support, affecting the timely delivery of data.

[0004] The shortcoming of existing technologies is that they cannot flexibly respond to changes in node energy, especially in the environment of mobile nodes. Fluctuations in energy status will significantly affect their ability to participate in relaying. Existing methods often ignore the impact of node energy gradients and geographical locations on network structure. There is no effective mechanism to automatically evaluate and adjust the selection of relay nodes, resulting in low network communication efficiency. In addition, frequent control information exchanges increase energy consumption, making it difficult for nodes to maintain stable communication capabilities under high load.

[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not form the prior art that is already known to a person of ordinary skill in the art. Summary of the Invention

[0006] The object of the present invention is to provide a mobile terminal-based relay ad hoc network communication method and system to solve the problems raised in the above background technology.

[0007] To achieve the above object, the present invention provides the following technical solutions:

[0008] A mobile terminal-based relay ad hoc network communication method, specifically comprising the following steps:

[0009] Step 1: The mobile terminal monitors its energy replenishment rate in real time through an integrated kinetic energy converter and calculates an energy sustainability index based on a preset time window and the current energy consumption rate. Simultaneously, the terminal estimates the distance to neighboring nodes through RSSI, broadcasts its own energy status and geographic location information, and constructs energy and geographic gradient fields, forming a joint energy-geographic gradient field in a multidimensional space.

[0010] Step 2: The mobile terminal uses the IMU to collect acceleration and angular velocity data, combines it with a kinematic model to predict future displacement, and calculates the confidence level of the position prediction using the velocity vector. This confidence level is used to correct the geographic gradient field to compensate for path deviation caused by movement. The mobile terminal then adjusts the weight coefficients of energy and geography based on network density to generate a comprehensive gradient vector to guide relay selection.

[0011] Step 3: When a relay link fails due to node movement or energy exhaustion, the upstream terminal of the failed node will rebroadcast the request, triggering the update of the local gradient field. The surrounding nodes refresh the gradient field based on the latest energy sustainability index and location information, and recalculate the comprehensive gradient vector to select a new relay node.

[0012] Step 4: The gradient information is embedded in the data packet header of the terminal. When the terminal energy sustainability index is lower than the threshold, an energy attenuation factor is introduced and the relay task is exited. The high-energy node takes over to balance the network energy consumption.

[0013] Furthermore, the mobile terminal monitors its energy replenishment rate in real time through the integrated kinetic energy converter, and calculates the energy sustainability index based on the preset time window and the current energy consumption rate. The logic is as follows:

[0014] When the terminal moves or vibrates, the PZT-5H piezoelectric piece generates charge due to mechanical stress. The amount of charge varies with the vibration frequency and amplitude. The acceleration of the terminal is detected by the acceleration sensor. and vibration frequency , calculate the energy replenishment rate The formula is:

[0015] ;

[0016] in, is the material conversion efficiency constant, and The unit is mW·s³ / m², The square of acceleration reflects the mechanical energy input intensity, The vibration frequency determines the continuity of energy harvesting;

[0017] Use current sensor to measure terminal battery discharge current , the voltage sensor monitors the battery voltage : ,in is the instantaneous power consumption. The formula for calculating the energy consumption rate per unit time is:

[0018] ;

[0019] in, is the current total energy consumption rate of the terminal, is a sliding time window, is the current moment, t is the time variable;

[0020] Set the global time window to , calculate the energy sustainability index The formula is:

[0021] ;

[0022] like , indicating energy surplus, continuing to undertake the relay task, if , represents the energy deficit and reduces the relay load.

[0023] Furthermore, the terminal estimates the distance to neighboring nodes through RSSI, broadcasts its own energy status and geographic location information, constructs energy gradient field and geographic gradient field, and forms the logic of energy-geographic joint gradient field in multidimensional space as follows:

[0024] Integrated multi-mode GNSS chip, receives GPS / Beidou dual system positioning, outputs latitude and longitude coordinates, and sets the broadcast frequency to broadcast once every 5 seconds as the base frequency. The frequency is dynamically reduced as the number of neighbors increases. The broadcast period is set to: ;in is the current number of neighbors, is the maximum neighbor threshold; set the broadcast frequency to: ;

[0025] After receiving the neighbor broadcast packet, extract the signal strength , using the logarithmic distance path loss model to estimate the distance The formula is:

[0026] ;

[0027] in, is the physical distance, i.e. the actual straight-line distance between the terminal and the neighboring node, is the path loss exponent, At the reference distance The signal strength measured at Meters is the reference distance, which represents the benchmark distance for signal strength measurement. is environmental noise;

[0028] Receive neighbor broadcast packets and analyze neighbor energy sustainability index and location, by signal strength Calculate physical distance to neighbors , calculate the single-neighbor energy gradient field The formula is:

[0029] ;

[0030] Among them, j is the index of the neighbor node, The difference in energy sustainability between neighbors and oneself, is the energy sustainability index of the terminal itself, is the energy sustainability index of neighbor node j, is the physical distance between the terminal and neighbor j; is the geographic coordinate vector of neighbor node j, is the current geographic coordinate vector of this terminal, represents the energy gradient along the connecting line, represents the direction unit vector from the current terminal to neighbor j;

[0031] Aggregate the gradient fields of all neighbors to generate a global energy gradient field The formula is:

[0032] ;

[0033] in, is the weight of neighbor j, is the total number of neighbors;

[0034] The terminal constructs a geographic gradient field based on its own and the target location The formula is:

[0035] ;

[0036] in, is the Euclidean distance, is the target location coordinate of the data packet, The real-time geographic location of the terminal;

[0037] If the target position is unknown, set , relying only on the energy gradient field for decision making.

[0038] Furthermore, the mobile terminal adjusts the weight coefficients of energy and geography according to the network density and generates a comprehensive gradient vector to guide the relay selection logic as follows:

[0039] Count the current number of neighbor nodes , define the density factor: ,in is the preset maximum number of neighbors, dynamic weight coefficient The formula is:

[0040] ;

[0041] in, is the density attenuation factor, which controls the speed at which density affects weight. is the current number of neighbors, ;when When there are no neighbors, , completely dependent on the geographical gradient field, when High density, , giving priority to the energy gradient field;

[0042] Fusion of energy gradient field and geographic gradient field to calculate the comprehensive gradient vector , generate the optimal relay direction vector, based on the formula:

[0043] ;

[0044] in, is the energy gradient vector, is the geographic gradient vector, is the dynamic weight coefficient; the relay direction is biased towards the node with better energy and closer to the target;

[0045] The terminal uses the IMU to collect acceleration and angular velocity data, combines it with the kinematic model to predict future displacement, and calculates the confidence level of the position prediction using the modulus of the velocity vector. The logic for correcting the geographic gradient field to compensate for path deviation caused by movement is as follows:

[0046] Acceleration calibration, remove the gravity component by attitude angle calculation to obtain linear acceleration The formula is:

[0047] ;

[0048] in, is the pitch angle, is the original acceleration, is the acceleration due to gravity;

[0049] Angular velocity integration, calculate the yaw angle through gyroscope data :

[0050] ;

[0051] in, is the Z-axis angular velocity, is the sampling interval, is the yaw angle at time t, It was the previous moment yaw angle.

[0052] Furthermore, the kinematic model is used to predict the displacement, and for velocity calculation, the velocity is obtained by integrating the linear acceleration. :

[0053] ;

[0054] in, is the velocity vector at time t, For the previous moment The velocity vector of

[0055] Predicted displacement , assuming uniform motion, predict the future The displacement per second is based on the formula:

[0056] ;

[0057] For position prediction confidence The calculation is based on the formula:

[0058] ;

[0059] in, is the adjustment coefficient, which controls the impact of speed on confidence; is the modulus of the velocity vector at time t, and ; At low speed , , fully trust the geographical gradient field; at high speed , , the weight of the geographical gradient is halved;

[0060] According to the predicted displacement and confidence, the geographic gradient field is corrected and the predicted position is calculated:

[0061] ;

[0062] in, is the yaw angle, is the location information at time t, To predict location information, To predict displacement; are direction cosines and sines, that is, decomposing the displacement into projection components of plane coordinates;

[0063] The formula for correcting geographic gradient sites is:

[0064] ;

[0065] in, The corrected geographic gradient vector is combined with the predicted displacement and the confidence geographic direction vector to correct the original geographic gradient field through the prediction model. ; is the predicted geographic gradient field, and ;

[0066] The corrected comprehensive gradient vector calculated based on the corrected geographic gradient field is: ;

[0067] The optimal relay node is selected based on the modified comprehensive gradient, and only the nodes with the same comprehensive gradient vector are considered. For neighbors with a direction angle less than 45°, the node priority is sorted by the gradient projection value, based on the formula:

[0068] ;

[0069] in, is the score of the neighbor node, Neighbor node location coordinates, is its own position coordinate, Score neighbor nodes; select the node with the highest score as the relay.

[0070] Furthermore, when a relay link fails due to node movement or energy exhaustion, the upstream terminal of the failed node will rebroadcast the request, triggering the update of the local gradient field. The logic is as follows:

[0071] Through the ACK confirmation mechanism: After the upstream node sends the data packet, it starts the ACK waiting timer and sets the timeout time to If the ACK / NACK from the next hop is not received within the timeout period, the link is considered failed. The failure judgment formula is:

[0072] ;

[0073] Heartbeat detection: The upstream terminal sends a heartbeat packet to the next hop every second. If three consecutive heartbeat packets are lost, the link is considered failed.

[0074] The upstream node sends a request packet, the request packet is initialized , each time after a jump ,when Stop forwarding when the message is forwarded, limit the transmission within 3 hops, and the neighbor node only processes The node only responds to requests whose distance from the upstream node is less than 100 meters, that is, with the failed node as the center and the radius The affected nodes are determined by the signal strength attenuation model in a circular area of ​​1 meter. ;

[0075] The neighboring node that receives the request immediately measures the current energy replenishment rate and updates the energy sustainability index When the node is in a moving state, it updates its own position through IMU prediction:

[0076] ;

[0077] in, is the current moving speed of the terminal, Seconds is the time interval for updating the location information. is the updated location information. is the old location information;

[0078] Local gradient recalculation, updated energy gradient field :

[0079] ;

[0080] in, is the physical distance to the neighboring node, that is, the straight-line distance between the terminal and neighbor j, is the distance weight coefficient. The closer the neighbor is, the greater the impact on the gradient. is the safety distance offset, Used to avoid numerical instability with a zero denominator when the neighbor and terminal positions completely coincide;

[0081] The surrounding nodes refresh the gradient field according to the latest energy sustainability index and location information, and recalculate the comprehensive gradient vector. The logic of selecting a new relay node is:

[0082] The updated geographic gradient field is divided into geographic direction units and distance scalars:

[0083] ;

[0084] in, Used to indicate direction, Used to reflect distance; introduce geographic weights: ,in To prevent zero constant;

[0085] According to the number of neighbors within the coverage area of ​​the current local request packet , that is, the number of neighbors within the coverage of the request packet, calculate :

[0086] ;

[0087] Updated comprehensive gradient Calculated as:

[0088] ;

[0089] in, is the geographical direction after amplification with weight;

[0090] pass Exclude nodes with insufficient remaining energy and only select Towards nodes with an angle less than or equal to 30°; the updated priority sorting is arranged in descending order of gradient projection value, based on the formula:

[0091] ;

[0092] in, is the updated score of the neighbor node, is the neighbor node position coordinate, The node with the highest score is selected as the new relay.

[0093] Furthermore, the gradient information is embedded in the terminal's data packet header. When the terminal's energy sustainability index falls below a threshold, an energy decay factor is introduced and the relay task is exited. The logic is as follows:

[0094] The energy gradient, geographic gradient, and energy state are embedded in the data packet header to avoid sending a separate control packet. Only when the data packet is sent to the relay node, the header carries the sender's gradient information. The receiving node extracts the gradient information and updates the local neighbor table without the need for additional exchange of control packets.

[0095] Introducing energy attenuation factors into energy gradient calculations , periodically checking the energy sustainability index every 10 seconds , set the energy sustainability index threshold:

[0096] ;

[0097] when , , normal mode, no attenuation, participate in relay; when , warning mode, , extend the broadcast cycle by 20%; when , exit mode, , exit the relay and send an alarm;

[0098] The formula for reducing one's own influence in the neighbor's gradient field is:

[0099] ;

[0100] in, is the influence of the node in the neighbor gradient field, is the original energy gradient vector, is the energy attenuation factor;

[0101] when When the attenuation is 20%, the attraction drops to ;when When the attenuation is 50%, the attraction drops to ;when No attenuation ;

[0102] Extend the status broadcast period:

[0103] ;

[0104] in, is the updated status broadcast cycle; when When the broadcast period is extended to ; Set the node status flag bit in the data packet header to 0, that is, it does not participate in relaying. After receiving it, the neighboring node will no longer consider it as a candidate; send an energy warning packet to the upstream node of the current relay link to trigger it to select a backup path in advance;

[0105] The logic of high-energy nodes taking over to balance network energy consumption is:

[0106] Calculate high energy nodes and increase weight coefficients in gradient calculations :

[0107] ;

[0108] in, is the energy gradient of the high energy node, , is the weight coefficient, which is dynamically adjusted according to the energy sustainability index;

[0109] High energy nodes, i.e. , shorten the broadcast cycle to ,In the fast diffusion state, a high priority flag is marked in the packet header to attract ,downstream nodes to give priority to it.

[0110] The present invention further provides a mobile terminal-based relay ad hoc network communication system, which is used to execute the above-mentioned mobile terminal-based relay ad hoc network communication method, including:

[0111] The gradient calculation module is used by the mobile terminal to monitor its energy replenishment rate in real time through the integrated kinetic energy converter and calculate the energy sustainability index based on the preset time window and the current energy consumption rate. At the same time, the terminal estimates the distance to the neighboring node through RSSI, broadcasts its own energy status and geographic location information, and constructs energy gradient field and geographic gradient field, forming an energy-geographic joint gradient field in multidimensional space;

[0112] The modified gradient module is used by mobile terminals to collect acceleration and angular velocity data using the IMU, combine it with a kinematic model to predict future displacement, and calculate the confidence level of the position prediction using the modulus of the velocity vector. This confidence level is used to correct the geographic gradient field to compensate for path deviation caused by movement. The mobile terminal adjusts the weight coefficients of energy and geography based on network density to generate a comprehensive gradient vector to guide relay selection.

[0113] The update relay module is used to update the local gradient field when a relay link fails due to node movement or energy exhaustion. The upstream terminal of the failed node will rebroadcast the request, triggering the update of the local gradient field. The surrounding nodes refresh the gradient field based on the latest energy sustainability index and location information, and recalculate the comprehensive gradient vector to select a new relay node.

[0114] The energy consumption balancing module is used to embed gradient information into the terminal's data packet header. When the terminal's energy sustainability index is lower than the threshold, an energy attenuation factor is introduced and the relay task is exited. The high-energy node takes over to balance the network energy consumption.

[0115] Compared with the prior art, the present invention has the following beneficial effects:

[0116] The mobile terminal of the present invention integrates a kinetic energy converter, which can monitor its energy replenishment rate in real time and calculate the energy sustainability index based on the current energy consumption, solving the problem of lack of dynamic energy management in the existing technology. It enables the node to evaluate its effectiveness in the network in real time based on its own energy status and information of neighboring nodes; adjusts the weight coefficient of energy and geography by network density, generates a comprehensive gradient vector, and combines the motion data collected by the IMU to accurately predict the future displacement of the node, thereby correcting the geographic gradient field. This process significantly improves the accuracy of relay selection and solves the problem of path deviation caused by node movement in the existing technology.

[0117] When a relay link fails, the upstream node can rebroadcast the request, triggering the update of the local gradient field. This feature refreshes the gradient field through the latest energy sustainability index and location information, dynamically selects new relay nodes, and enhances the network's self-healing ability. The present invention embeds gradient information into the packet header and introduces an energy attenuation factor when the node energy sustainability index falls below a threshold, allowing the relay task to be exited in a timely manner. This feature ensures that high-energy nodes can take over the relay task, thereby effectively balancing the network's energy consumption and avoiding network paralysis caused by energy exhaustion of a single node.

[0118] The intelligent management mechanism of the present invention not only extends the service life of the network, but also improves the reliability of data transmission, and solves the problem of communication interruption caused by improper energy management in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0119] Figure 1 Schematic diagram of the overall method flow of the present invention;

[0120] Figure 2 This is a flow chart of the overall system module of the present invention;

[0121] Figure 3 This is the energy sustainability index-energy consumption rate curve of the present invention;

[0122] Figure 4 This is the energy sustainability index-energy replenishment rate curve of the present invention;

[0123] Figure 5 This is the energy vector gradient-neighbor number fitting curve diagram of the present invention;

[0124] Figure 6 This is a fitting curve diagram of geographic vector gradient-neighborhood number of the present invention;

[0125] Figure 7 This is a dynamic weight-neighbor number curve diagram of the present invention;

[0126] Figure 8 This is the energy sustainability index-energy attenuation factor fitting curve of the present invention. DETAILED DESCRIPTION

[0127] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to specific embodiments.

[0128] It should be noted that, unless otherwise defined, the technical or scientific terms used in the present invention should have the usual meanings understood by people with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative position relationships. When the absolute position of the object being described changes, the relative position relationship may also change accordingly.

[0129] Example:

[0130] See also Figures 1-8 , the present invention provides a technical solution:

[0131] A mobile terminal-based relay ad hoc network communication method, specifically comprising the following steps:

[0132] Step 1: The mobile terminal monitors its energy replenishment rate in real time through an integrated kinetic energy converter and calculates an energy sustainability index based on a preset time window and the current energy consumption rate. Simultaneously, the terminal estimates the distance to neighboring nodes through RSSI, broadcasts its own energy status and geographic location information, and constructs energy and geographic gradient fields, forming a joint energy-geographic gradient field in a multidimensional space.

[0133] The mobile terminal monitors its energy replenishment rate in real time through the integrated kinetic energy converter and calculates the energy sustainability index based on the preset time window and the current energy consumption rate. The logic is as follows:

[0134] When the terminal moves or vibrates, the PZT-5H piezoelectric piece generates charge due to mechanical stress. The amount of charge varies with the vibration frequency and amplitude. The acceleration of the terminal is detected by the acceleration sensor. and vibration frequency , calculate the energy replenishment rate The formula is:

[0135] ;

[0136] in, is the material conversion efficiency constant, and The unit is mW·s³ / m², which represents the energy conversion efficiency of the piezoelectric material and reflects the energy conversion capability of the material. is the square of acceleration, reflecting the intensity of mechanical energy input and the magnitude of input energy. is the vibration frequency, measured in Hertz, which determines the continuity of energy collection; the energy replenishment rate , in milliwatts, represents the energy collected per unit time; The acceleration of the terminal in meters per second squared;

[0137] This formula shows that the energy replenishment rate increases with the square of the acceleration and the vibration frequency, which means that when the terminal is subjected to stronger mechanical forces, that is, higher acceleration and faster vibration, that is, higher frequency, it can collect energy more effectively, and thus, The larger the value of, the faster the terminal can replenish energy under specific environmental conditions;

[0138] Use current sensor to measure terminal battery discharge current , the voltage sensor monitors the battery voltage : ,in is the instantaneous power consumption. The formula for calculating the energy consumption rate per unit time is:

[0139] ;

[0140] in, is the current moment, t is the time variable, is the current total energy consumption rate of the terminal, is a sliding time window, which represents the time period for calculating the average power consumption; the formula is based on the power consumption Integration within the time window can smooth out instantaneous fluctuations, making energy consumption data more stable and reflecting the actual energy consumption trend of the equipment;

[0141] The instantaneous power consumption is in watts, indicating the current energy consumption rate of the terminal; The battery voltage is in volts, indicating the current battery voltage level; is the battery discharge current, measured in amperes, representing the current supplied by the battery to external devices. This formula shows that instantaneous power consumption is the product of the battery voltage and the discharge current. A higher power consumption indicates that the terminal consumes more energy at a given moment, thus affecting its energy sustainability index.

[0142] Current total energy consumption rate of the terminal , in watts, represents the average power consumption within the sliding time window, The larger it is, the higher the energy consumption of the terminal during this period, which may affect its energy sustainability;

[0143] Set the global time window to , calculate the energy sustainability index The formula is:

[0144] ;

[0145] like , indicating that the energy supply of the terminal exceeds its consumption within a certain period of time, and the terminal continues to undertake the relay task. , indicating that the terminal is at a disadvantage in terms of energy consumption and needs to reduce the load;

[0146] is the energy sustainability index, indicating the energy surplus or deficit, the global time window , is a fixed time period, such as , which represents the basic time for evaluating energy sustainability.

[0147] Some experimental numbers and specific data of energy sustainability index are shown in Table 1.

[0148] Table 1

[0149]

[0150] Analysis of the first 15 data sets in this table shows that the combination of energy replenishment rate, time window, and energy consumption rate has a significant impact on the energy sustainability index. However, in this sample, the energy decay factor remains constant at 1, indicating that energy decay in the current environment is not considered an influencing variable, facilitating analysis of the direct relationship between input and output.

[0151] The overall trend shows that when the energy recharge rate is relatively high, the time window is moderate, and the energy consumption rate is low, the system can achieve a higher energy sustainability index. For example, in row 1, with a recharge rate of 0.8, a time window of 3600 seconds, and an energy consumption of only 0.5, the system's energy sustainability index is as high as 5.76, the highest value in the current sample. In row 2, although the energy consumption doubles to 1, the time window is extended to 4200 seconds, and the recharge rate is increased to 1.2, a high index (5.04) is still achieved, indicating that there is a certain compensation balance mechanism between the various parameters.

[0152] As the energy consumption rate increases or the time window shortens, the energy sustainability index decreases significantly. For example, in row 5, although the recharge rate is 3, the time window is only 2400 seconds, and the energy consumption rate is as high as 2, causing the energy sustainability index to drop to 3.6. Similarly, in row 6, the recharge and energy consumption are both 1.8, and the time window is 3600 seconds, but the index is still 3.6, further demonstrating that even if the recharge rate matches the consumption, if the recharge is insufficient to cover the required duration, the system energy state is still limited.

[0153] When energy consumption continues to rise above the recharge rate, the index rapidly declines even when the time window is extended. For example, in row 14, the recharge is 1.2, the consumption is 2.4 (doubled), and the time window is 3600 seconds, but the index is only 1.8. In contrast, in row 15, the recharge is 0.6, and the time window is 6000 seconds. Despite the long run time, the index is still only 1.8 due to the consumption of 2. This data shows that the imbalance between recharge rate and energy consumption is a key factor in energy unsustainability, that is, "supply exceeds demand" always limits the long-term stable operation of the system.

[0154] The logic of enabling the terminal to estimate the distance to neighboring nodes through RSSI, broadcast its own energy status and geographic location information, construct energy gradient field and geographic gradient field, and form an energy-geographic joint gradient field in multidimensional space is as follows:

[0155] Integrated multi-mode GNSS chip, receives GPS / Beidou dual system positioning, outputs latitude and longitude coordinates, and sets the broadcast frequency to broadcast once every 5 seconds as the base frequency. The frequency is dynamically reduced as the number of neighbors increases. The broadcast period is set to: ;in is the current number of neighbors, is the maximum neighbor threshold; set the broadcast frequency to: ;

[0156] The broadcast period is in seconds, which indicates the time interval for the terminal to send status information. is the number of neighbors, indicating the number of neighbor nodes around the current terminal, is the maximum neighbor threshold, which is set to 50, indicating the maximum possible number of neighbors in the system; when the number of neighbors increases, Increase, decline;

[0157] After receiving the neighbor broadcast packet, extract the signal strength , using the logarithmic distance path loss model to estimate the distance The formula is:

[0158] ;

[0159] in, is the physical distance, i.e. the actual straight-line distance between the terminal and the neighboring node, The signal strength at is the path loss index, which reflects the speed at which the signal attenuates with distance, free space , complex environment , according to the deployment environment preset, the urban environment takes , Meters is the reference distance, which represents the standard distance for signal strength measurement. is the environmental noise, which is a Gaussian distributed random variable, reflecting the signal fluctuation, experimental statistics, that is, the typical value ; At the reference distance The signal strength measured at , in decibel milliwatts;

[0160] The received signal strength indicator is expressed in decibel milliwatts, indicating the signal strength between the terminal and the neighbor. This formula is used to estimate the actual distance between the terminal and the neighbor node. The higher the signal strength, the closer the distance between the terminal and the neighbor node. The difference reflects the impact of different environments on signal attenuation. The larger the signal strength value, the better the received signal quality, which affects the subsequent energy gradient calculation;

[0161] Receive neighbor broadcast packets and analyze neighbor energy sustainability index and location, by signal strength Calculate physical distance to neighbors , calculate the single-neighbor energy gradient field The formula is:

[0162] ;

[0163] Among them, j is the index of the neighbor node, The difference in energy sustainability between neighbors and oneself, is the energy sustainability index of the terminal itself, is the energy sustainability index of neighbor node j, reflecting the energy supply capacity of neighbor nodes, is the physical distance between the terminal and neighbor j, that is, the actual distance between the terminal and the neighbor node;

[0164] is the energy gradient of the neighbor, which represents the relationship between the energy supply capacity of the neighbor node and the distance. The formula shows that the energy gradient of a single neighbor is the ratio of the energy sustainability difference to the distance. The larger the value of , the stronger the energy supply capability of the neighboring node is, and the closer it is to itself, the more suitable it is for collaboration in the network; is the geographic coordinate vector of neighbor node j, is the current geographic coordinate vector of this terminal, represents the energy gradient along the connecting line, represents the direction unit vector from the current terminal to neighbor j;

[0165] Aggregate the gradient fields of all neighbors to generate a global energy gradient field The formula is:

[0166] ;

[0167] in, is the weight of neighbor j, is the total number of neighbors;

[0168] Global energy gradient field , considering the energy supply capacity of all neighbors, the neighbor weight , which is usually inversely proportional to the distance and represents the contribution to the energy gradient; this formula aggregates the energy gradients of all neighbors, comprehensively considering the impact of distance on energy supply capacity, and the global energy gradient field The larger the value of , the stronger the overall energy supply capacity of the network;

[0169] The terminal constructs a geographic gradient field based on its own and the target location The formula is:

[0170] ;

[0171] in, is the Euclidean distance, is the target location coordinate of the data packet, that is, the final location where the data packet needs to reach, The real-time geographic location of the terminal.

[0172] Geographic gradient field , represents the unit vector between the target position and the own position; this formula describes the direction and distance between the target position and the own position, The larger the value of , the farther the distance between the target position and the own position is, and the clearer the direction is;

[0173] Concrete to plane coordinates: With itself as the origin, use UTM projection to convert longitude and latitude into plane coordinates: own coordinates , target coordinates , calculate the vector:

[0174] ;

[0175] in, , is the Euclidean distance between its own coordinates and the target coordinates; this formula further specifies the geographic gradient field and uses a plane coordinate system to calculate the specific distance and direction between the target and itself. The larger the value of, the farther the target location is, thus affecting the node’s routing decision;

[0176] If the target location is unknown, such as broadcast flooding, set , relying only on the energy gradient field for decision making, this logic avoids invalid decisions when information is lacking.

[0177] Step 2: The mobile terminal adjusts the energy and geographic weights based on network density to generate a comprehensive gradient vector to guide relay selection. The terminal uses the IMU to collect acceleration and angular velocity data, combines it with a kinematic model to predict future displacement, and calculates the confidence level of the position prediction using the modulus of the velocity vector. It then corrects the geographic gradient field to compensate for path deviation caused by movement.

[0178] The mobile terminal adjusts the energy and geographical weight coefficients according to the network density and generates a comprehensive gradient vector to guide the relay selection logic:

[0179] Count the current number of neighbor nodes , define the density factor: ,in To preset the maximum number of neighbors, dynamic weight coefficient The formula is:

[0180] ;

[0181] in, is the density attenuation factor, which controls the speed at which density affects weight. is the current number of neighbors, ;when When there are no neighbors, , completely dependent on the geographical gradient field, when High density, , giving priority to the energy gradient field;

[0182] Density Factor Indicates the ratio of the current neighbor node to the maximum number of neighbors, The value of Within the range, when When , it means there is no neighbor node. ;when When , it reaches the maximum density, ,The density factor reflects the congestion level of the network;

[0183] Used to adjust the impact of energy and geographic gradients on the integrated gradient vector, The value range is between; greater This means that in the case of high density, the terminal is more inclined to choose nodes with better energy;

[0184] Fusion of energy gradient field and geographic gradient field to calculate the comprehensive gradient vector , generate the optimal relay direction vector, based on the formula:

[0185] ;

[0186] in, is the energy gradient vector, is the geographic gradient vector, is the dynamic weight coefficient; the relay direction is biased towards the node with better energy and closer to the target;

[0187] Comprehensive gradient vector , represents the optimal relay direction after comprehensive consideration of energy and geographical factors, is a unit vector, indicating the optimal relay direction, and higher It indicates a more appropriate selection direction, which helps the terminal find a relay node that has high energy and is close to the target.

[0188] Some experimental numbers and specific data of comprehensive gradients are shown in Table 2.

[0189] Table 2

[0190]

[0191] By analyzing the data in the table, it can be observed that changes in the number of neighbors have a significant impact on the dynamic weight, the balance between the energy vector gradient and the geographic vector gradient, and the final comprehensive gradient. In general, as the number of neighbors gradually increases from 2 to 50, the dynamic weight shows a monotonically increasing trend, which indicates that when more neighbors are considered in the network or algorithm, the system tends to give higher dynamic weights. For example, when the number of neighbors is only 2, the dynamic weight is only 0.18; when the number of neighbors increases to 50, the dynamic weight reaches 1.00. This means that when more neighbor nodes participate, the system's reliance on dynamic features increases significantly;

[0192] In terms of energy vector gradient and geographic vector gradient, we can see a clear contrast and trade-off. As the number of neighbors increases, the energy vector gradient rises from 0.25 to 0.95, while the geographic vector gradient drops from 0.95 to 0.25. This opposite trend of change reflects that when the number of neighbors is small, the spatial context represented by geographic information is more important; but when the number of neighbors increases, energy information gradually becomes the dominant factor. For example, in the first row (number of neighbors = 2), the energy vector gradient is only 0.25, while the geographic vector gradient is as high as 0.95, so the comprehensive gradient reaches 0.92; while in the 15th row (number of neighbors = 50), the opposite is true. The energy vector gradient is 0.95, the geographic vector gradient drops to 0.25, and the comprehensive gradient also increases to 0.95.

[0193] The value of the comprehensive gradient shows a "U-shaped" trend, first decreasing and then recovering. This indicates that when the number of neighbors is moderate (approximately between 12 and 15), the system compromises more between energy and geographic information, resulting in the smallest comprehensive gradient. However, when the number of neighbors is extremely small or extremely large, one dimension of information becomes dominant, causing the comprehensive gradient to rise. Specifically, in the fourth row (number of neighbors = 12), the comprehensive gradient is 0.68; in the fifth row (number of neighbors = 15), the comprehensive gradient drops to 0.67, the minimum value. However, when the number of neighbors continues to increase to 50, the comprehensive gradient rises to 0.95. This indicates that when the number of neighbors is small or large, the system is able to more clearly focus on either geographic or energy information, resulting in a better comprehensive effect. However, when the number of neighbors is moderate, the two information dimensions constrain each other, making it difficult for one to be sufficiently prominent, resulting in a relatively weak comprehensive effect.

[0194] The terminal uses the IMU to collect acceleration and angular velocity data, combines it with the kinematic model to predict future displacement, and calculates the confidence level of the position prediction using the modulus of the velocity vector. The logic for correcting the geographic gradient field to compensate for path deviation caused by movement is as follows:

[0195] Acceleration calibration, remove the gravity component by attitude angle calculation to obtain linear acceleration The formula is:

[0196] ;

[0197] in, is the pitch angle, obtained through gyroscope integration or accelerometer static calibration, reflecting the tilt of the terminal. is the original acceleration, is the acceleration due to gravity, linear acceleration , removing the true acceleration of the gravity component; this formula provides a more accurate linear acceleration by removing the gravity component, and the larger A higher value indicates that the terminal is subjected to stronger acceleration during actual movement, which helps improve the accuracy of subsequent position prediction;

[0198] Angular velocity integration, calculate the yaw angle through gyroscope data :

[0199] ;

[0200] in, is the Z-axis angular velocity, is the sampling interval, is the yaw angle at time t, It was the previous moment yaw angle; Indicates the rotation angle of the terminal. The formula calculates the current yaw angle by integrating the angular velocity. The larger A higher value means the terminal rotates faster. The change may be larger, reflecting the terminal's steering dynamics;

[0201] Use the kinematic model to predict displacement, and for velocity calculation, get the velocity by integrating the linear acceleration. :

[0202] ;

[0203] in, represents the velocity vector at the terminal time t, For the previous moment The velocity vector, is the sampling interval; the formula updates the current speed through linear acceleration, and the larger This will directly lead to an increase in the speed value, indicating that the terminal moves faster;

[0204] Predicted displacement , assuming uniform motion, predict the future The displacement per second is based on the formula:

[0205] ;

[0206] represents the future displacement, For speed, is the linear acceleration; this formula combines the current velocity and acceleration to calculate the future displacement, the larger or Will lead to greater , which reflects the terminal’s displacement capability in the future;

[0207] For position prediction confidence The calculation is based on the formula:

[0208] ;

[0209] in, is the adjustment coefficient, which controls the impact of speed on confidence. The larger the value, the faster the confidence decreases at high speed. is the modulus of the velocity vector at time t, reflecting the speed of terminal movement, and ; At low speed , , fully trust the geographical gradient field; at high speed , , the weight of the geographical gradient is halved;

[0210] Used to evaluate the reliability of position prediction, the larger the value, the The higher the confidence in the predicted position, the lower the speed, the closer the confidence is to 1, indicating trust in the geographic gradient field; while when the speed is higher, the confidence decreases, indicating a greater reliance on historical information;

[0211] According to the predicted displacement and confidence, the geographic gradient field is corrected and the predicted position is calculated:

[0212] ;

[0213] in, is the yaw angle, which determines the moving direction, is the location information at time t, To predict location information, To predict displacement; are direction cosines and sines, that is, decomposing the displacement into projection components of plane coordinates;

[0214] This formula uses position information and predicted displacement to calculate the future position. and the right direction, by It is confirmed that the accuracy of position prediction will be significantly improved;

[0215] The formula for correcting geographic gradient sites is:

[0216] ;

[0217] in, The corrected geographic gradient vector is combined with the predicted displacement and the confidence geographic direction vector to correct the original geographic gradient field through the prediction model. ; is the predicted geographic gradient field, and ;

[0218] This formula combines the prediction confidence to modify the original geographic gradient field, reflecting the impact of position changes on the gradient in a dynamic environment. The corrected geographic gradient will be more inclined to the current geographic information, while the lower There will be greater reliance on forecast information;

[0219] The corrected comprehensive gradient vector calculated based on the corrected geographic gradient field is: ;

[0220] The new comprehensive gradient vector generated by this formula takes into account energy and geographical information, combined with dynamic weight coefficients The impact, greater The value indicates a more optimal relay selection direction;

[0221] The optimal relay node is selected based on the modified comprehensive gradient, and only the nodes with the same comprehensive gradient vector are considered. For neighbors with a direction angle less than 45°, the node priority is sorted by the gradient projection value, based on the formula:

[0222] ;

[0223] in, Neighbor node location coordinates, is its own location coordinate, that is, the real-time geographic location of the terminal; the node with the highest score is selected as the relay.

[0224] is the score of the neighbor node, which is used to evaluate the priority of the relay node. The formula calculates the projection value between the comprehensive gradient vector and the direction vector of the neighbor node, and selects the neighbor with the same comprehensive direction as the priority relay. The higher the It means that the node is more suitable as a relay after comprehensively considering energy and geographical information.

[0225] Step 3: When a relay link fails due to node movement or energy exhaustion, the upstream terminal of the failed node will rebroadcast the request, triggering the update of the local gradient field. The surrounding nodes refresh the gradient field based on the latest energy sustainability index and location information, and recalculate the comprehensive gradient vector to select a new relay node.

[0226] When a relay link fails due to node movement or energy exhaustion, the upstream terminal of the failed node will rebroadcast the request, triggering the update of the local gradient field. The logic is:

[0227] Through the ACK confirmation mechanism: After the upstream node sends the data packet, it starts the ACK waiting timer and sets the timeout time to If the ACK / NACK from the next hop is not received within the timeout period, the link is considered failed. The failure judgment formula is:

[0228] ;

[0229] Heartbeat detection: The upstream terminal sends a heartbeat packet to the next hop every second. If three consecutive heartbeat packets are lost, the link is considered to be down. This mechanism ensures the real-time performance of the link by sending heartbeat packets regularly. If three consecutive heartbeat packets are lost, it means that the link may be down. This method can quickly reflect the availability of the node.

[0230] The status of the ACK confirmation mechanism indicates whether the link is valid and whether the upstream node is within the set timeout period. Receive confirmation (ACK) or negative confirmation (NACK) from the downstream node within seconds;

[0231] This formula is used to determine the validity of a link. If an ACK is received within 0.3 seconds, the link is valid; otherwise, it is considered invalid. If the link is invalid, it means that action needs to be taken to rebroadcast. The TTL design controls the maximum forwarding hops of the request packet to prevent infinite propagation. A higher TTL value means that the request packet can be transmitted farther, increasing the potential range of the response.

[0232] The upstream node sends a request packet, the request packet is initialized , each time after a jump ,when Stop forwarding when the message is forwarded, limit the transmission within 3 hops, and the neighbor node only processes The node only responds to requests whose distance from the upstream node is less than 100 meters, that is, with the failed node as the center and the radius The affected nodes are determined by the signal strength attenuation model in a circular area of ​​1 meter. ;

[0233] is the path loss index, which reflects the speed of signal attenuation. is the radius of the area centered on the failed node, is the received signal strength indicator, which indicates the validity of the signal; this formula is used to determine which nodes are affected by the failed link. A value higher than the right side of the formula means that the node is within the valid range and can receive requests. Values ​​indicate stronger signals and nodes are more likely to participate in the reconnection process;

[0234] The neighboring node that receives the request immediately measures the current energy replenishment rate and updates the energy sustainability index When the node is in a moving state, it updates its own position through IMU prediction:

[0235] ;

[0236] in, is the current moving speed of the terminal, Seconds is the time interval for location information update;

[0237] Updated Energy Sustainability Index , used to evaluate the energy status of the node, The larger the value, the better the energy state of the node, and the more it can be used as a relay. If it is less than a certain threshold, it means that the node has insufficient energy and should not be selected;

[0238] is the updated location information. is the old position information; this formula calculates the new position information based on the current speed and is suitable for dynamic environments. Higher speed and update frequency will lead to improved accuracy of position prediction;

[0239] Local gradient recalculation, updated energy gradient field :

[0240] ;

[0241] in, is the physical distance to the neighboring node, that is, the straight-line distance between the terminal and neighbor j, is the distance weight coefficient, the closer the neighbor is, the greater the impact on the gradient; the updated energy gradient field , is the safety distance offset, Used to avoid numerical instability when the denominator is zero when the neighbor and terminal positions completely coincide; the formula updates the energy gradient field and weight coefficients according to the energy state and distance of the neighbor nodes. Considering the degree of influence of distance on energy, the closer the node is, the greater the influence on the gradient. The updated gradient field reflects the energy status of the surrounding nodes.

[0242] The surrounding nodes refresh the gradient field according to the latest energy sustainability index and location information, and recalculate the comprehensive gradient vector. The logic of selecting a new relay node is:

[0243] The updated geographic gradient field is divided into geographic direction units and distance scalars:

[0244] ;

[0245] in, Used to indicate direction, Used to reflect distance; introduce geographic weights: ,in To prevent zero constant; according to the number of neighbors within the coverage of the current local request packet , that is, the number of neighbors within the coverage of the request packet, calculate :

[0246] ;

[0247] is the updated dynamic weight coefficient; the updated weight coefficient reflects the change of local network density. As the number of neighbors increases, The value of will increase, thus increasing the influence on the energy gradient in the comprehensive gradient calculation;

[0248] Updated comprehensive gradient Calculated as:

[0249] ;

[0250] in, is the geographical direction after amplification with weight;

[0251] The updated comprehensive gradient vector is generated by taking into account the energy and geographical gradients through dynamic weight coefficients to guide relay selection. Values ​​mean better reconstruction paths;

[0252] pass Exclude nodes with insufficient remaining energy and only select Towards nodes with an angle less than or equal to 30°; the updated priority sorting is arranged in descending order of gradient projection value, based on the formula:

[0253] ;

[0254] in, is the neighbor node position coordinate, For its own location coordinates, select the node with the highest score as the new relay; The formula evaluates the priority of each neighbor node by calculating the projection value of the comprehensive gradient vector and the neighbor node direction vector to obtain the updated neighbor node score. A higher score indicates that the node is more consistent with the comprehensive gradient direction and is suitable as a new relay.

[0255] Step 4: Gradient information is embedded into the terminal's data packet header. When the terminal's energy sustainability index falls below a threshold, an energy decay factor is introduced and the relay task is exited. A high-energy node takes over to balance network energy consumption.

[0256] The gradient information is embedded in the terminal's data packet header. When the terminal's energy sustainability index falls below the threshold, the energy decay factor is introduced and the relay task is exited. The logic is as follows:

[0257] Embed energy gradient, geographical gradient and energy status into data packet header to avoid sending control packets separately;

[0258] Energy gradient direction, data type int8, byte 2, encoding method: normalized vector x, y magnified 100 times and rounded; geographic gradient direction is the same as energy gradient direction, energy sustainability index data type uint8, byte 2, encoding rules: Linear mapping to 0~255, resolution 0.5; node status flag, data type bitfield byte 1, encoding rule: lower 4 bits, energy attenuation factor 0~1.5, resolution 0.1, high 4 bits, enhancement factor is 1.0~3.0, distinguishing case 0.2;

[0259] Sending end: normalize the gradient component, such as , magnify 100 times and round to get an integer , receiving end: divide the integer by 100 and restore it to a floating point number ;

[0260] Sending end compression ,Right now , receiving end ;

[0261] Only when a data packet is sent to a relay node does the header carry the sender's gradient information. The receiving node extracts this gradient information and updates its local neighbor table without the need for additional control packets. By embedding gradient information in the packet header, the transmission of control information in the network can be reduced, improving overall transmission efficiency. The receiving node can quickly update its neighbor table, reducing the delay caused by control packets.

[0262] Introducing energy attenuation factors into energy gradient calculations , periodically checking the energy sustainability index every 10 seconds , set the energy sustainability index threshold:

[0263] ;

[0264] when , , normal mode, no attenuation, participate in relay; when , warning mode, , extend the broadcast cycle by 20%; when , exit mode, , exit the relay and send an alarm;

[0265] This formula indicates the current energy state of the node, The larger the value, the better the energy sustainability of the node, and the more capable it is of participating in relay tasks. When , the node needs to exit the relay to avoid affecting other nodes;

[0266] It is used to adjust the influence of the node in the neighbor gradient field. It reflects the energy status of the node and affects the effectiveness of the node in participating in the relay task. A higher value indicates a higher node energy and a stronger impact on the network; a smaller A value of indicates that the node energy is insufficient, reducing the impact on the gradient field;

[0267] The formula for reducing one's own influence in the neighbor's gradient field is:

[0268] ;

[0269] in, is the influence of the node in the neighbor gradient field, is the original energy gradient vector, is the energy attenuation factor;

[0270] Reducing its own influence in the neighbor gradient field can avoid the failure of relay tasks due to insufficient energy, thereby maintaining the stability of the overall network; When the attenuation is 20%, the attraction drops to ;when When the attenuation is 50%, the attraction drops to ;when No attenuation ;

[0271] This formula adjusts the influence of the node in the gradient field by the energy attenuation factor. Value, such as when When the number of nodes is less than 1, the influence will be greatly reduced, preventing nodes with insufficient energy from affecting the normal operation of the network;

[0272] Extend the status broadcast period:

[0273] ;

[0274] in, The broadcast period of the updated status is extended when the energy status decreases to reduce energy consumption. The value indicates that the node reduces the frequency of information transmission in the case of energy crisis to save energy;

[0275] when When the broadcast period is extended to ; Set the node status flag bit in the data packet header to 0, that is, it does not participate in relaying. After receiving it, the neighboring node will no longer consider it as a candidate; send an energy warning packet to the upstream node of the current relay link to trigger it to select a backup path in advance;

[0276] The logic of high-energy nodes taking over to balance network energy consumption is:

[0277] Calculate high energy nodes and increase weight coefficients in gradient calculations :

[0278] ;

[0279] in, is the energy gradient of the high energy node, , is the weight coefficient, which is dynamically adjusted according to the energy sustainability index; this logic emphasizes the importance of high energy nodes, and higher A higher value means that the node has greater attraction and influence, and can more effectively disseminate status information. High-energy nodes are given priority to participate in relaying to balance network energy consumption and improve overall network performance.

[0280] High energy nodes, i.e. , shorten the broadcast cycle to , quickly diffuse the state, mark the high priority flag in the data packet header, and attract downstream nodes to choose it first; this logic ensures that high-energy nodes can quickly spread information and respond quickly to changes in network status. The shortened broadcast cycle helps to update the status information of neighbor nodes in a timely manner, enhancing the flexibility and reliability of the network.

[0281] The present invention further provides a mobile terminal-based relay ad hoc network communication system, which is used to execute the above-mentioned mobile terminal-based relay ad hoc network communication method, including:

[0282] The gradient calculation module is used by the mobile terminal to monitor its energy replenishment rate in real time through the integrated kinetic energy converter and calculate the energy sustainability index based on the preset time window and the current energy consumption rate. At the same time, the terminal estimates the distance to the neighboring node through RSSI, broadcasts its own energy status and geographic location information, and constructs energy gradient field and geographic gradient field, forming an energy-geographic joint gradient field in multidimensional space;

[0283] The modified gradient module is used by mobile terminals to collect acceleration and angular velocity data using the IMU, combine it with a kinematic model to predict future displacement, and calculate the confidence level of the position prediction using the velocity vector. This confidence level is used to correct the geographic gradient field to compensate for path deviation caused by movement. The mobile terminal adjusts the weight coefficients of energy and geography based on network density to generate a comprehensive gradient vector to guide relay selection.

[0284] The update relay module is used to update the local gradient field when a relay link fails due to node movement or energy exhaustion. The upstream terminal of the failed node will rebroadcast the request, triggering the update of the local gradient field. The surrounding nodes refresh the gradient field based on the latest energy sustainability index and location information, and recalculate the comprehensive gradient vector to select a new relay node.

[0285] The energy consumption balancing module is used to embed gradient information into the terminal's data packet header. When the terminal's energy sustainability index is lower than the threshold, an energy attenuation factor is introduced and the relay task is exited. The high-energy node takes over to balance the network energy consumption.

[0286] The above formulas are all dimensionless and numerical calculations. The formulas are obtained by collecting a large amount of data and performing software simulation to obtain the most recent real situation. The preset parameters in the formulas are set by technicians in this field according to actual conditions.

[0287] The above embodiments can be implemented in whole or in part by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed by hardware or software depends on the specific application and design constraints of the technical solution.

[0288] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, and may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment as needed.

[0289] The above is only a specific implementation method of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed in this application, which should be covered by the scope of protection of the present application.

Claims

1. A relay ad hoc network communication method based on a mobile terminal, characterized in that: The specific steps include: Step 1: The mobile terminal monitors its energy replenishment rate in real time through an integrated kinetic energy converter and calculates an energy sustainability index based on a preset time window and the current energy consumption rate. Simultaneously, the terminal estimates the distance to neighboring nodes through RSSI, broadcasts its own energy status and geographic location information, and constructs energy and geographic gradient fields, forming a joint energy-geographic gradient field in a multidimensional space. Step 2: The mobile terminal uses the IMU to collect acceleration and angular velocity data, combines it with a kinematic model to predict future displacement, and calculates the confidence level of the position prediction using the velocity vector. This confidence level is used to correct the geographic gradient field to compensate for path deviation caused by movement. The terminal then adjusts the weight coefficients of energy and geography based on network density to generate a comprehensive gradient vector to guide relay selection. Step 3: When a relay link fails due to node movement or energy exhaustion, the upstream terminal of the failed node rebroadcasts the request, triggering the update of the local gradient field. The surrounding nodes refresh the gradient field based on the latest energy sustainability index and location information, and recalculate the comprehensive gradient vector to select a new relay node. Step 4: Gradient information is embedded into the terminal's data packet header. When the terminal's energy sustainability index falls below a threshold, an energy decay factor is introduced and the relay task is exited. A high-energy node takes over to balance network energy consumption. The mobile terminal monitors its energy replenishment rate in real time through the integrated kinetic energy converter and calculates the energy sustainability index based on the preset time window and the current energy consumption rate. The logic is as follows: When the terminal moves or vibrates, the PZT-5H piezoelectric piece generates charge due to mechanical stress. The amount of charge varies with the vibration frequency and amplitude. The acceleration of the terminal is detected by the acceleration sensor. and vibration frequency , calculate the energy replenishment rate The formula is: in, is the material conversion efficiency constant, and The unit is mW·s³ / m², The square of acceleration reflects the mechanical energy input intensity, The vibration frequency determines the continuity of energy harvesting; Use current sensor to measure terminal battery discharge current , the voltage sensor monitors the battery voltage : ,in is the instantaneous power consumption. The formula for calculating the energy consumption rate per unit time is: in, is the current total energy consumption rate of the terminal, is a sliding time window, is the current moment, t is the time variable; Set the global time window to , calculate the energy sustainability index The formula is: like , indicating energy surplus, continuing to undertake the relay task, if , represents the energy deficit and reduces the relay load; The logic of enabling the terminal to estimate the distance to neighboring nodes through RSSI, broadcast its own energy status and geographic location information, construct energy gradient field and geographic gradient field, and form an energy-geographic joint gradient field in multidimensional space is as follows: Integrated multi-mode GNSS chip, receives GPS / Beidou dual system positioning, outputs latitude and longitude coordinates, and sets the broadcast frequency to broadcast once every 5 seconds as the base frequency. The frequency is dynamically reduced as the number of neighbors increases. The broadcast period is set to: ;in is the current number of neighbors, is the maximum neighbor threshold; set the broadcast frequency to: ; After receiving the neighbor broadcast packet, extract the signal strength , using the logarithmic distance path loss model to estimate the distance The formula is: in, is the physical distance, i.e. the actual straight-line distance between the terminal and the neighboring node, is the path loss exponent, At the reference distance The signal strength measured at Meters is the reference distance, which represents the benchmark distance for signal strength measurement. is environmental noise; Receive neighbor broadcast packets and analyze neighbor energy sustainability index and location, by signal strength Calculate physical distance to neighbors , calculate the single-neighbor energy gradient field The formula is: Among them, j is the index of the neighbor node, The difference in energy sustainability between neighbors and oneself, is the energy sustainability index of the terminal itself, is the energy sustainability index of neighbor node j, is the physical distance between the terminal and neighbor j; is the geographic coordinate vector of neighbor node j, is the current geographic coordinate vector of this terminal, represents the energy gradient along the connecting line, represents the direction unit vector from the current terminal to neighbor j; Aggregate the gradient fields of all neighbors to generate a global energy gradient field The formula is: in, is the weight of neighbor j, is the total number of neighbors; The terminal constructs a geographic gradient field based on its own and the target location The formula is: in, is the Euclidean distance, is the target location coordinate of the data packet, The real-time geographic location of the terminal; If the target position is unknown, set , only relying on the energy gradient field for decision making; The mobile terminal adjusts the energy and geographical weight coefficients according to the network density and generates a comprehensive gradient vector to guide the relay selection logic: Count the current number of neighbor nodes , define the density factor: ,in is the preset maximum number of neighbors, dynamic weight coefficient The formula is: in, is the density attenuation factor, which controls the speed at which density affects weight. is the current number of neighbors, ;when When there are no neighbors, , completely dependent on the geographical gradient field, when High density, , giving priority to the energy gradient field; Fusion of energy gradient field and geographic gradient field to calculate the comprehensive gradient vector , generate the optimal relay direction vector, based on the formula: in, is the energy gradient vector, is the geographic gradient vector, is the dynamic weight coefficient; the relay direction is biased towards the node with better energy and closer to the target; The terminal uses the IMU to collect acceleration and angular velocity data, combines it with the kinematic model to predict future displacement, and calculates the confidence level of the position prediction using the modulus of the velocity vector. The logic for correcting the geographic gradient field to compensate for path deviation caused by movement is as follows: Acceleration calibration, remove the gravity component by attitude angle calculation to obtain linear acceleration The formula is: in, is the pitch angle, is the original acceleration, is the acceleration due to gravity; Angular velocity integration, calculate the yaw angle through gyroscope data : in, is the Z-axis angular velocity, is the sampling interval, is the yaw angle at time t, It was the previous moment yaw angle; Use the kinematic model to predict displacement, and for velocity calculation, get the velocity by integrating the linear acceleration. : in, is the velocity vector at time t, For the previous moment The velocity vector of Predicted displacement , assuming uniform motion, predict the future The displacement per second is based on the formula: For position prediction confidence The calculation is based on the formula: in, is the adjustment coefficient, which controls the impact of speed on confidence; is the modulus of the velocity vector at time t, and ; At low speed , , fully trust the geographical gradient field; at high speed , , the weight of the geographical gradient is halved; According to the predicted displacement and confidence, the geographic gradient field is corrected and the predicted position is calculated: in, is the yaw angle, is the location information at time t, To predict location information, To predict displacement; are direction cosines and sines, that is, decomposing the displacement into projection components of plane coordinates; The formula for correcting geographic gradient sites is: in, The corrected geographic gradient vector is combined with the predicted displacement and the confidence geographic direction vector to correct the original geographic gradient field through the prediction model. ; is the predicted geographic gradient field, and ; The corrected comprehensive gradient vector calculated based on the corrected geographic gradient field is: ; The optimal relay node is selected based on the modified comprehensive gradient, and only the nodes with the same comprehensive gradient vector are considered. For neighbors with a direction angle less than 45°, the node priority is sorted by the gradient projection value, based on the formula: in, is the score of the neighbor node, Neighbor node location coordinates, is its own position coordinate, Score neighbor nodes; select the node with the highest score as the relay; When a relay link fails due to node movement or energy exhaustion, the upstream terminal of the failed node will rebroadcast the request, triggering the update of the local gradient field. The logic is: Through the ACK confirmation mechanism: After the upstream node sends the data packet, it starts the ACK waiting timer and sets the timeout time to If the ACK / NACK from the next hop is not received within the timeout period, the link is considered failed. The failure judgment formula is: Heartbeat detection: The upstream terminal sends a heartbeat packet to the next hop every second. If three consecutive heartbeat packets are lost, the link is considered failed. The upstream node sends a request packet, the request packet is initialized , each time after a jump ,when Stop forwarding when the message is forwarded, limit the transmission within 3 hops, and the neighbor node only processes The node only responds to requests whose distance from the upstream node is less than 100 meters, that is, with the failed node as the center and the radius The affected nodes are determined by the signal strength attenuation model in a circular area of ​​1 meter. ; The neighboring node that receives the request immediately measures the current energy replenishment rate and updates the energy sustainability index When the node is in a moving state, it updates its own position through IMU prediction: in, is the current moving speed of the terminal, Seconds is the time interval for updating the location information. is the updated location information. is the old location information; Local gradient recalculation, updated energy gradient field : in, is the physical distance to the neighboring node, that is, the straight-line distance between the terminal and neighbor j, is the distance weight coefficient. The closer the neighbor is, the greater the impact on the gradient. is the safety distance offset, Used to avoid numerical instability with a zero denominator when the neighbor and terminal positions completely coincide; The surrounding nodes refresh the gradient field according to the latest energy sustainability index and location information, and recalculate the comprehensive gradient vector. The logic of selecting a new relay node is: The updated geographic gradient field is divided into geographic direction units and distance scalars: in, Used to indicate direction, Used to reflect distance; introduce geographic weights: ,in To prevent zero constant; According to the number of neighbors within the coverage area of ​​the current local request packet , that is, the number of neighbors within the coverage of the request packet, calculate : Updated comprehensive gradient Calculated as: in, is the geographical direction after amplification with weight; pass Exclude nodes with insufficient remaining energy and only select Towards nodes with an angle less than or equal to 30°; the updated priority sorting is arranged in descending order of gradient projection value, based on the formula: in, is the updated score of the neighbor node, is the neighbor node position coordinate, For its own location coordinates, select the node with the highest score as the new relay; The gradient information is embedded in the terminal's data packet header. When the terminal's energy sustainability index falls below the threshold, the energy decay factor is introduced and the relay task is exited. The logic is as follows: The energy gradient, geographic gradient, and energy state are embedded in the data packet header to avoid sending a separate control packet. Only when the data packet is sent to the relay node, the header carries the sender's gradient information. The receiving node extracts the gradient information and updates the local neighbor table without the need for additional exchange of control packets. Introducing energy attenuation factors into energy gradient calculations , periodically checking the energy sustainability index every 10 seconds , set the energy sustainability index threshold: when , , normal mode, no attenuation, participate in relay; when , warning mode, , extend the broadcast cycle by 20%; when , exit mode, , exit the relay and send an alarm; The formula for reducing one's own influence in the neighbor's gradient field is: in, is the influence of the node in the neighbor gradient field, is the original energy gradient vector, is the energy attenuation factor; when When the attenuation is 20%, the attraction drops to ;when When the attenuation is 50%, the attraction drops to ;when No attenuation ; Extend the status broadcast period: in, is the updated status broadcast cycle; when When the broadcast period is extended to ; Set the node status flag bit in the data packet header to 0, that is, it does not participate in relaying. After receiving it, the neighboring node will no longer consider it as a candidate; send an energy warning packet to the upstream node of the current relay link to trigger it to select a backup path in advance; The logic of high-energy nodes taking over to balance network energy consumption is: Calculate high energy nodes and increase weight coefficients in gradient calculations : in, is the energy gradient of the high energy node, , is the weight coefficient, which is dynamically adjusted according to the energy sustainability index; High energy nodes, i.e. , shorten the broadcast cycle to ,In the fast diffusion state, a high priority flag is marked in the header of the data packet, attracting downstream nodes to give priority to it.

2. A mobile terminal-based relay ad hoc network communication system, characterized by: The system is used to execute the mobile terminal-based relay ad hoc network communication method according to claim 1, comprising: The gradient calculation module is used by the mobile terminal to monitor its energy replenishment rate in real time through the integrated kinetic energy converter and calculate the energy sustainability index based on the preset time window and the current energy consumption rate. At the same time, the terminal estimates the distance to the neighboring node through RSSI, broadcasts its own energy status and geographic location information, and constructs energy gradient field and geographic gradient field, forming an energy-geographic joint gradient field in multidimensional space; The modified gradient module is used by mobile terminals to collect acceleration and angular velocity data using the IMU, combine it with a kinematic model to predict future displacement, and calculate the confidence level of the position prediction using the modulus of the velocity vector. This confidence level is used to correct the geographic gradient field to compensate for path deviation caused by movement. The mobile terminal adjusts the weight coefficients of energy and geography based on network density to generate a comprehensive gradient vector to guide relay selection. The update relay module is used to update the local gradient field when a relay link fails due to node movement or energy exhaustion. The upstream terminal of the failed node will rebroadcast the request, triggering the update of the local gradient field. The surrounding nodes refresh the gradient field based on the latest energy sustainability index and location information, and recalculate the comprehensive gradient vector to select a new relay node. The energy consumption balancing module is used to embed gradient information into the terminal's data packet header. When the terminal's energy sustainability index is lower than the threshold, an energy attenuation factor is introduced and the relay task is exited. The high-energy node takes over to balance the network energy consumption.

Citation Information

Patent Citations

  • Long-distance endpoint free networking topology method

    CN117062091A

  • Electronic communication control method and system based on Internet of Things

    CN118678319A