Relay ad hoc network communication method and system based on mobile terminal

By monitoring the energy recharge rate in real time and building an energy-geographic joint gradient field, combining IMU to predict displacement, dynamically selecting relay nodes, the 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.

CN120390267AActive Publication Date: 2025-07-29CHONGQING LANGYIDI IND CO LTD +1

Patent Information

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

AI Technical Summary

Technical Problem

The lack of dynamic management of node energy state in the existing relay ad hoc network communication technology leads to degradation of network performance and communication interruption, especially when the energy state fluctuates in the mobile node environment, which affects the communication efficiency and stability of the network.

Method used

The energy recharge rate is monitored in real time by integrated kinetic energy converter, calculate the energy sustainability index, combine RSSI to estimate the distance and geographical location of neighboring nodes to build an energy-geographic joint gradient field, use IMU to predict node displacement, dynamically adjust energy and geographical weights, select the optimal relay node, and introduce energy attenuation factor when the energy is below the threshold, and high-energy nodes take over the relay task.

Benefits of technology

It improves the accuracy of relay selection, enhances the network's self-healing ability, extends the network's service life, improves the reliability of data transmission, and avoids network paralysis caused by the energy exhaustion of a single node.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120390267A_ABST
    Figure CN120390267A_ABST
Patent Text Reader

Abstract

The invention provides a relay ad hoc network communication method and system based on a mobile terminal, and relates to the technical field of relay ad hoc network communication of the mobile terminal.The energy supply rate is monitored in real time through a mobile terminal integrated kinetic energy converter, the energy sustainable index is calculated, and the distance between adjacent nodes is estimated; constructing an energy-geography combined gradient field in a multi-dimensional space, dynamically adjusting weight coefficients of energy and geography by nodes according to network density, generating a comprehensive gradient vector, and correcting the geography gradient field by using motion data acquired by an IMU (Inertial Measurement Unit) so as to improve the accuracy of position prediction; when the relay link fails, the upstream node can broadcast the request again and trigger the updating of the local gradient field, and the surrounding nodes refresh the gradient field according to the latest information and select a new relay node; meanwhile, gradient information is embedded into a data packet head, when a node energy sustainable index is lower than a threshold value, an energy attenuation factor is introduced, a relay task is quitted in time, a high-energy node takes over, and therefore network energy consumption is balanced.
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 for mobile terminals, and specifically provides a relay ad-hoc network communication method and system based on mobile terminals. Background Art

[0002] In the context of the rapid development of current communication technologies, the relay ad-hoc network communication method based on mobile terminals has gradually become an important network architecture, especially playing a key role in scenarios such as remote areas, emergency disaster relief, and military communications. Relay ad-hoc networks allow direct communication between mobile terminals, reducing the dependence on infrastructure and improving the flexibility and adaptability of the network. The significance of evaluating such communication methods lies in their ability to ensure efficient information transmission and network robustness in environments with high requirements for real-time and reliability. Specific scenarios include emergency rescue during natural disasters, drone swarm cooperation, and intelligent transportation systems. These applications require rapid establishment of communication links and, at the same time, maintaining network coherence and scalability in a dynamic environment.

[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 according to the real-time energy status of each node. In a situation where energy consumption is high and node capabilities are uneven, this approach can lead to a decline in network performance. For example, when the energy of some nodes is exhausted, the entire network may experience communication interruption due to the lack of effective relay support, affecting the timely transmission of data.

[0004] The deficiencies of existing technologies lie in their inability to flexibly respond to changes in node energy. Especially in an environment of mobile nodes, fluctuations in energy status can significantly affect their ability to participate in relaying. Existing methods often ignore the impact of node energy gradients and geographical locations on the network structure and do not have an effective mechanism to automatically evaluate and adjust the selection of relay nodes, resulting in low communication efficiency of the network. In addition, frequent exchange of control information increases energy consumption, making it difficult for nodes to maintain stable communication capabilities under high loads.

[0005] The above information disclosed in the background art section is only used to enhance the understanding of the background of the present disclosure, and thus it may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention

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

[0007] To achieve the above object, the present invention provides the following technical solutions: A relay ad-hoc network communication method based on a mobile terminal, the specific steps include: Step 1: The mobile terminal real-time monitors its energy replenishment rate through an integrated kinetic energy converter, calculates the energy sustainability index based on a preset time window and the current energy consumption rate. Meanwhile, the terminal estimates the distance to neighboring nodes through RSSI, broadcasts its own energy status and geographical location information, constructs an energy gradient field and a geographical gradient field, and forms an energy-geographical joint gradient field in a multi-dimensional space; Step 2: The mobile terminal uses the IMU to collect acceleration and angular velocity data, combines the kinematic model to predict future displacements, calculates the confidence of position prediction through the velocity vector, uses this confidence to correct the geographical gradient field to compensate for the path deviation caused by movement. The mobile terminal adjusts the weight coefficients of energy and geography according to the network density, generates 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 will rebroadcast a request, triggering an update of the local gradient field. Surrounding nodes refresh the gradient field according to the latest energy sustainability index and position information, and recalculate the comprehensive gradient vector, thereby selecting a new relay node; Step 4: Embed the gradient information into the packet header of the terminal. When the energy sustainability index of the terminal is lower than the threshold, introduce an energy attenuation factor and exit the relay task, and the high-energy node takes over to balance the network energy consumption.

[0008] Furthermore, the logic for the mobile terminal to real-time monitor its energy replenishment rate through an integrated kinetic energy converter and calculate the energy sustainability index based on a preset time window and the current energy consumption rate is as follows: When the terminal moves or vibrates, the PZT-5H piezoelectric sheet generates charges under mechanical stress, and the amount of charge changes with the vibration frequency and amplitude. Detect the terminal acceleration through an acceleration sensor and vibration frequency , calculate the energy replenishment rate The formula based on is: ; Among them, is the material conversion efficiency constant, and The unit of is mW·s³ / m², is the square of the acceleration reflecting the intensity of mechanical energy input, is the vibration frequency that determines the persistence of energy harvesting; Measure the discharge current of the terminal battery using a current sensor , and monitor the battery voltage using a voltage sensor : , where For the instantaneous power consumption, the formula for calculating the energy consumption rate per unit time is as follows: ; Wherein, is the current total energy consumption rate of the terminal, is the sliding time window, is the current moment, and t is the time variable; Set the global time window as , and the formula for calculating the energy sustainability index is as follows: ; If , it indicates energy surplus, and the relay task continues. If , it indicates energy deficit, and the relay load is reduced.

[0009] Furthermore, the logic for enabling the terminal to estimate the distance to neighboring nodes through RSSI, broadcast its own energy status and geographical location information, and construct an energy gradient field and a geographical gradient field to form an energy - geographical joint gradient field in multi - dimensional space is as follows: Integrate a multi - mode GNSS chip to receive GPS / Beidou dual - system positioning, output longitude and latitude coordinates, set the broadcast frequency to the base frequency of once every 5 seconds, and dynamically reduce the frequency according to the increase in the number of neighbors. Set the broadcast period as: ; wherein is the current number of neighbors, is the maximum neighbor threshold; set the broadcast frequency as: ; After receiving the neighbor broadcast packet, extract the signal strength , and use the log - distance path loss model to estimate the distance The formula is as follows: ; Wherein, is the physical distance, that is, the actual straight - line distance between the terminal and the neighbor node, is the path loss exponent, is the signal strength measured at the reference distance , 1 meter is the reference distance, indicating the reference distance for signal strength measurement, is the ambient noise; Receive the neighbor broadcast packet, parse the energy sustainability index and location of the neighbor, calculate the physical distance from the neighbor through the signal strength , and calculate the single - neighbor energy gradient field The formula is as follows: ; where \(j\) is the index of the neighbor node, is the energy sustainability difference between the neighbor and itself, is the energy sustainability index of the terminal itself, is the energy sustainability index of the neighbor node \(j\), is the physical distance between the terminal and the neighbor \(j\); is the geographical coordinate vector of the neighbor node \(j\), is the current geographical coordinate vector of this terminal, represents the magnitude of the energy gradient along the connection line direction, represents the unit vector in the direction from this terminal to the neighbor \(j\); Aggregate the gradient fields of all neighbors to generate a global energy gradient field The formula is: ; where, is the weight of the neighbor \(j\), is the total number of neighbors; The terminal constructs a geographical gradient field based on itself and the target location The formula is: ; where, is the Euclidean distance, is the target location coordinate of the data packet, is the real-time geographical location of the terminal; If the target location is unknown, set , and only rely on the energy gradient field for decision-making.

[0010] Furthermore, the logic for the mobile terminal to adjust the weight coefficients of energy and geography according to the network density and generate a comprehensive gradient vector to guide relay selection is: Count the current number of neighbor nodes , and define the density factor: , where is the preset maximum number of neighbors, and the dynamic weight coefficient The formula is: ; where, is the density attenuation factor, which controls the influence speed of density on the weight, is the current number of neighbors, ; when there are no neighbors, that is , completely rely on the geographical gradient field, and when it is high density, , give priority to the energy gradient field; Integrate the energy gradient field and the geographical gradient field to calculate the comprehensive gradient vector , and generate the optimal relay direction vector. The formula is as follows: ; Among them, is the energy gradient vector, is the geographical gradient vector, is the dynamic weight coefficient; the relay direction biases towards the node with better energy and closer to the target; The terminal uses the IMU to collect acceleration and angular velocity data, combines the kinematic model to predict future displacements, and calculates the confidence of position prediction through the magnitude of the velocity vector. The logic for correcting the geographical gradient field to compensate for the path deviation caused by movement is as follows: Acceleration calibration: Remove the gravity component through the calculation of the attitude angle to obtain the linear acceleration The formula is as follows: ; Among them, is the pitch angle, is the original acceleration, is the gravitational acceleration; Angular velocity integration: Calculate the yaw angle through the gyroscope data : ; Among them, is the angular velocity of the Z axis, is the sampling interval, is the yaw angle at time t, is the previous moment 's yaw angle.

[0011] Furthermore, use the kinematic model to predict displacements. For velocity calculation, obtain the velocity through the integration of the linear acceleration : ; Among them, is the velocity vector at time t, is the velocity vector at the previous moment ; Predict displacement , assuming uniform motion, predict the displacement in the future seconds. The formula is as follows: ; For the calculation of the position prediction confidence , the formula is as follows: ; Among them, is the adjustment coefficient, controlling the influence intensity of speed on confidence; is the magnitude of the velocity vector at time t, and ; at low speed , , fully trust the geographical gradient field; at high speed , , the geographical gradient weight is halved; Correct the geographical gradient field according to the predicted displacement and confidence, and calculate the predicted position: ; Among them, is the yaw angle, is the position information at time t, is the predicted position information, is the predicted displacement; are the direction cosine and sine, that is, decompose the displacement into the projection components of the plane coordinates; The formula for correcting the geographical gradient field is: ; Among them, is the corrected geographical gradient vector, the geographical direction vector combining the predicted displacement and confidence, and correct the original geographical gradient field through the prediction model ; is the predicted geographical gradient field, and ; Calculate the corrected comprehensive gradient vector according to the corrected geographical gradient field as: ; Select the optimal relay node according to the corrected comprehensive gradient, only consider the neighbors whose included angle with the comprehensive gradient vector is less than 45°, and the node priority is sorted according to the gradient projection value. The formula is: ; Among them, is the score of the neighbor node, the position coordinates of the neighbor node, is its own position coordinates, is the score of the neighbor node; select the node with the highest score as the relay.

[0012] Further, when a relay link fails due to node movement or energy exhaustion, the upstream terminal of the failed node will rebroadcast the request, and the logic for triggering the update of the local gradient field is: Through the ACK confirmation mechanism: after the upstream node sends a data packet, start the ACK waiting timer, and set the timeout time to seconds. If the ACK / NACK of the next hop is not received after the timeout, it is determined that the link fails. The failure judgment formula is: ; Heartbeat detection: The upstream terminal sends a heartbeat packet to the next hop every second. If three heartbeat packets are continuously lost, the link is determined to be invalid. The upstream node sends a request packet. The request packet initial , and it when , stop forwarding, limit the propagation within 3 hops. Neighbor nodes only process request packets. The node only responds to requests with a distance less than 100 meters from the upstream node, that is, within a circular area with a radius meters centered on the failed node. Determine the affected nodes through the signal strength attenuation model: ; The neighbor 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, predict and update its own position through the IMU: ; Among them, is the current moving speed of the terminal, seconds is the time interval for updating the position information, is the updated position information, is the old position information; Recalculate the local gradient, and the updated energy gradient field : ; Among them, is the physical distance from the neighbor node, that is, the straight-line distance between the terminal and neighbor j, is the distance weight coefficient. The closer the neighbor, the greater the influence on the gradient, is the safety distance offset, used to avoid numerical instability with a zero denominator when the neighbor and the terminal positions completely coincide; The surrounding nodes refresh the gradient field according to the latest energy sustainability index and position information, and recalculate the comprehensive gradient vector. The logic for selecting a new relay node is: The updated geographical gradient field is divided into a geographical direction unit and a distance scalar: ; Among them, is used to indicate the direction, is used to reflect the distance; Introduce a geographical weight: , where is an anti-zero constant; According to the number of neighbors within the coverage range of the current local request packet , that is, the number of neighbors within the coverage of the request packet, is calculated : ; The updated comprehensive gradient is calculated as: ; where is the geographical direction amplified by the weight; By excluding the nodes with insufficient remaining energy and only selecting the nodes with an included angle less than or equal to 30° with ; the updated priority sorting is in descending order of the gradient projection value, and the formula is: ; where is the score of the updated neighbor node, is the position coordinate of the neighbor node, is the self-position coordinate, and the node with the highest score is selected as the new relay.

[0013] Furthermore, embedding the gradient information into the packet header of the terminal, when the energy sustainability index of the terminal is lower than the threshold, the logic of introducing the energy decay factor and exiting the relay task is: Embedding the energy gradient, geographical gradient and energy status into the packet header, avoiding sending a separate control packet. Only when the packet is sent to the relay node, the header carries the gradient information of the sender, and the receiving node extracts the gradient information to update the local neighbor table without additional control packet exchange; Introducing the energy decay factor in the energy gradient calculation and periodically checking the energy sustainability index every 10 seconds, and setting the energy sustainability index threshold: ; When , , normal mode, no attenuation, participating in the relay; when , warning mode, , extending the broadcast period by 20%; when , exit mode, , exiting the relay and sending an alarm; The formula for reducing the influence of the node in the neighbor gradient field is: ; where is the influence of the node in the neighbor gradient field, is the original energy gradient vector, is the energy decay factor; When When it is, the attenuation is 20%, and the attraction drops to ; When When it is, the attenuation is 50%, and the attraction drops to ; When When it is, there is no attenuation ; Extend the status broadcast period: ; Among them, is the updated status broadcast period; when When it is, 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, and the neighbor nodes will no longer use it as a candidate after receiving it; send an energy warning packet to the upstream node of the current relay link to trigger it to select an alternative route in advance; The logic for the high-energy node to take over to balance the network energy consumption is: Calculate the high-energy nodes and increase the weight coefficient in the gradient calculation : ; Among them, is the energy gradient of the high-energy node, , is the weight coefficient, which is dynamically adjusted according to the energy sustainability index; The high-energy node, that is , shorten the broadcast period to , quickly spread the status, mark a high-priority flag in the data packet header, and attract downstream nodes to select preferentially.

[0014] The present invention further provides a relay ad-hoc communication system based on a mobile terminal, and the system is used to execute the above-mentioned relay ad-hoc communication method based on a mobile terminal, including: A gradient calculation module, configured to enable the mobile terminal to continuously monitor its energy replenishment rate through an integrated kinetic energy converter, calculate the energy sustainability index based on a preset time window and the current energy consumption rate, and at the same time the terminal estimates the distance of neighboring nodes through RSSI, broadcasts its own energy state and geographical location information, constructs an energy gradient field and a geographical gradient field, and forms an energy-geographical joint gradient field in a multi-dimensional space; A gradient correction module, configured to enable the mobile terminal to collect acceleration and angular velocity data by using an IMU, predict future displacements in combination with a kinematic model, calculate the confidence of position prediction through the magnitude of the velocity vector, use this confidence to correct the geographical gradient field to compensate for the path deviation caused by movement, and the mobile terminal adjusts the weight coefficients of energy and geography according to the network density to generate a comprehensive gradient vector to guide relay selection; Update relay module, when a certain relay link fails due to node movement or energy exhaustion, the upstream terminal of the failed node will rebroadcast a request, triggering an update of the local gradient field. Surrounding nodes refresh the gradient field according to the latest energy sustainability index and location information, and recalculate the comprehensive gradient vector, so as to select a new relay node; Energy consumption balancing module, which is used to embed gradient information into the packet header of the terminal. When the energy sustainability index of the terminal is lower than the threshold, an energy decay factor is introduced and the relay task is exited, and the high-energy node takes over to balance the network energy consumption.

[0015] Compared with the prior art, the beneficial effects of the present invention are: The mobile terminal of the present invention integrates a kinetic energy converter, which can monitor its energy supply 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 prior art, enabling the node to evaluate its effectiveness in the network in real time according to its own energy state and the information of neighboring nodes; adjusting the weight coefficients of energy and geography through network density to generate a comprehensive gradient vector, and combining the motion data collected by the IMU to accurately predict the future displacement of the node, thereby correcting the geographical gradient field. This process significantly improves the accuracy of relay selection and solves the problem of path deviation caused by node movement in the prior art.

[0016] When a certain relay link fails, the upstream node can rebroadcast a request, triggering an update of the local gradient field. This feature refreshes the gradient field through the latest energy sustainability index and location information, dynamically selects a new relay node, and enhances the self-healing ability of the network; the present invention embeds gradient information into the packet header and introduces an energy decay factor when the energy sustainability index of the node is lower than the threshold, and exits the relay task in a timely manner. This feature ensures that high-energy nodes can take over the relay task, thus effectively balancing the energy consumption of the network and avoiding network paralysis caused by the energy exhaustion of a single node.

[0017] 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, solving the problem of communication interruption caused by improper energy management in the prior art. Brief Description of the Drawings

[0018] Figure 1 It is a schematic diagram of the overall method flow of the present invention; Figure 2 It is a flow chart of the overall system module of the present invention; Figure 3 It is a curve graph of energy sustainability index - energy consumption rate of the present invention; Figure 4 It is a curve graph of energy sustainability index - energy supply rate of the present invention; Figure 5This is the fitting curve of the energy vector gradient - the number of neighbors for the present invention; Figure 6 This is the fitting curve of the geographical vector gradient - the number of neighbors for the present invention; Figure 7 This is the curve of the dynamic weight - the number of neighbors for the present invention; Figure 8 This is the fitting curve of the energy sustainability index - the energy decay factor for the present invention. Detailed implementation manners

[0019] To make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below in conjunction with specific embodiments.

[0020] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should have the ordinary meanings understood by those of ordinary skill in the field to which the present invention belongs. The "first", "second" and similar terms used in the present invention do not represent any order, quantity or importance, but are only used to distinguish different components. Terms such as "including" or "comprising" mean that the elements or objects appearing before this term cover the elements or objects listed after this term and their equivalents, without excluding other elements or objects. Terms such as "connected" or "coupled" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. Terms such as "upper", "lower", "left", "right" are only used to represent relative positional relationships, and when the absolute position of the object being described changes, the relative positional relationship may also change accordingly.

[0021] Embodiment: Please refer to Figures 1 - 8 , the present invention provides a technical solution: A relay ad hoc network communication method based on a mobile terminal, the specific steps include: Step 1: The mobile terminal monitors its energy replenishment rate in real time through an integrated kinetic energy converter, calculates the energy sustainability index based on a preset time window and the current energy consumption rate, and at the same time, the terminal estimates the distances of neighboring nodes through RSSI, broadcasts its own energy state and geographical location information, constructs an energy gradient field and a geographical gradient field, and forms an energy - geographical joint gradient field in a multi - dimensional space; The logic for the mobile terminal to monitor its energy replenishment rate in real time through an integrated kinetic energy converter and calculate the energy sustainability index based on a preset time window and the current energy consumption rate is as follows: When the terminal moves or vibrates, the PZT - 5H piezoelectric sheet generates charges under mechanical stress, and the amount of charge changes with the vibration frequency and amplitude. The acceleration of the terminal is detected through an acceleration sensor and the vibration frequency , and the energy replenishment rate is calculated The formula is as follows: ; Wherein, is the material conversion efficiency constant, and The unit of is mW·s³ / m², which represents the energy conversion efficiency of the piezoelectric material and reflects the energy conversion ability of the material. is the square of acceleration, which reflects the input intensity of mechanical energy and embodies the magnitude of the input energy. is the vibration frequency, with the unit of hertz, which determines the sustainability of energy harvesting; the energy supply rate , with the unit of milliwatt, represents the energy collected per unit time; The acceleration of the terminal, with the unit of meters per second squared; This formula shows that the energy supply rate increases with the increase of the square of acceleration and the vibration frequency. This means that when the terminal is subjected to a stronger mechanical force, that is, a higher acceleration and a faster vibration, that is, a higher frequency, it can harvest energy more effectively. Therefore, The larger the value of, the faster the terminal can replenish energy under specific environmental conditions; Use a current sensor to measure the discharge current of the terminal battery , and use a voltage sensor to monitor the battery voltage : , wherein is the instantaneous power consumption, and the formula for calculating the energy consumption rate per unit time is: ; Wherein, is the current moment, t is the time variable, is the current total energy consumption rate of the terminal, is the sliding time window, which represents the time period for calculating the average power consumption; this formula can smooth the instantaneous fluctuations through the integration of the power consumption within the time window, making the energy consumption data more stable and reflecting the actual energy consumption trend of the device; is the instantaneous power consumption, with the unit of watt, which represents the current energy consumption rate of the terminal; is the battery voltage, with the unit of volt, which represents the current voltage level of the battery; is the battery discharge current, with the unit of ampere, which represents the current supplied by the battery to external devices; this formula shows that the instantaneous power consumption is obtained by multiplying the battery voltage by the discharge current. The larger the power consumption, the more energy the terminal consumes at a certain moment, thus affecting its energy sustainability index; The current total energy consumption rate of the terminal , with the unit of watt, 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; Set the global time window as and calculate the energy sustainability index The formula based on is: ; If , it means that the energy replenishment of the terminal exceeds its consumption within a certain period of time, and it continues to undertake the relay task. If , it means that the terminal is at a disadvantage in terms of energy consumption and needs to reduce the load; is the energy sustainability index, indicating the surplus or deficit of energy. The global time window , is a fixed time period, such as , representing the base time for evaluating energy sustainability.

[0022] Specific data of some experiment numbers and the energy sustainability index are shown in Table 1.

[0023] Table 1

[0024] Through the analysis of the first 15 groups of data in this table, it can be seen that the combination of the energy replenishment rate, time window, and energy consumption rate has a significant impact on the energy sustainability index. In this batch of samples, the energy decay factor remains constant at 1, indicating that the energy decay in the current environment is not regarded as an influencing variable, which is convenient for analyzing the direct relationship between input and output; The overall trend shows that when the energy replenishment 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 the first row, the replenishment rate is 0.8, the time window is 3600 seconds, and the energy consumption is only 0.5. The energy sustainability index of the system is as high as 5.76, which is the highest value in the current samples; while in the second row, although the energy consumption doubles to 1, the time window is extended to 4200 seconds, and the replenishment rate also rises to 1.2, still obtaining a relatively high index (5.04), indicating that there is a certain compensation and balance mechanism among the parameters; As the energy consumption rate increases or the time window shortens, the energy sustainability index decreases significantly. For example, in the fifth row, although the replenishment rate reaches 3, the time window is only 2400 seconds, and the energy consumption rate is as high as 2, resulting in the energy sustainability index dropping to 3.6; similarly, in the sixth row, both the replenishment and consumption are 1.8, and the time window is 3600, and the index is still 3.6, further indicating that even if the replenishment rate matches the consumption, if the replenishment is not sufficient to cover the required duration, the energy state of the system is still limited; When the energy consumption continues to rise above the replenishment rate, even if the time window is extended, the index still drops rapidly. For example, in line 14, the replenishment is 1.2 and the consumption is 2.4 (doubled), with a time window of 3,600 seconds and the index is only 1.8; while in line 15, the replenishment is 0.6, the time window is 6,000 seconds, and although the running time is long, due to the consumption of 2, the index is still only 1.8. Such data shows that the imbalance between the replenishment rate and the energy consumption is the key factor for unsustainable energy, that is, "supply falling short of demand" always restricts the long-term stable operation of the system.

[0025] The logic for the terminal to estimate the distance to neighboring nodes through RSSI, broadcast its own energy status and geographical location information, and construct an energy gradient field and a geographical gradient field to form an energy-geographical joint gradient field in multi-dimensional space is as follows: Integrate a multi-mode GNSS chip to receive GPS / Beidou dual-system positioning, output longitude and latitude coordinates, set the broadcast frequency to the base frequency of once every 5 seconds, and dynamically reduce the frequency according to the increase in the number of neighbors. Set the broadcast period as: ; where is the current number of neighbors, is the maximum neighbor threshold; set the broadcast frequency as: ; is the broadcast period, in seconds, representing the time interval for the terminal to send status information, is the number of neighbors, representing the number of neighboring nodes around the current terminal, is the maximum neighbor threshold, set to 50, representing the possible maximum number of neighbors in the system; when the number of neighbors increases, increases, decreases; After receiving the neighbor broadcast packet, extract the signal strength , and use the log-distance path loss model to estimate the distance The formula based on is: ; Among them, is the physical distance, that is, the actual straight-line distance between the terminal and the neighboring node, is the signal strength at the location of participating in , is the path loss exponent, reflecting the speed of signal attenuation with distance, in free space , in complex environment , preset according to the deployment environment, take for urban environment, meters is the reference distance, representing the standard distance for signal strength measurement, is the environmental noise, which is a Gaussian distributed random variable, reflecting signal fluctuations, experimental statistics, that is, the typical value ; is the signal strength measured at the reference distance in decibel-milliwatts; is the received signal strength indication in decibel-milliwatts, representing the signal strength between the terminal and its neighbor; this formula is used to estimate the actual distance between the terminal and its neighbor node. The higher the signal strength, the closer the distance between the terminal and its neighbor node. Different values of the path loss exponent reflect the influence 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; Receive neighbor broadcast packets, parse the energy sustainability index and location of the neighbor, and calculate the physical distance from the neighbor through the signal strength to calculate the single-neighbor energy gradient field using the formula: ; where j is the index of the neighbor node, is the difference in energy sustainability between the neighbor and itself, is the energy sustainability index of the terminal itself, is the energy sustainability index of neighbor node j, reflecting the energy supply ability of the neighbor node, is the physical distance between the terminal and neighbor j, i.e., the actual distance between the terminal and the neighbor node; is the energy gradient of the neighbor, representing the relationship between the energy supply ability of the neighbor node and the distance. This formula shows that the energy gradient of a single neighbor is the ratio of the difference in energy sustainability and the distance, and the larger the value of , the relatively stronger the energy supply ability of the neighbor node and the closer it is to itself, making it suitable for cooperation in the network; is the geographical coordinate vector of neighbor node j, is the geographical coordinate vector of the current terminal, represents the magnitude of the energy gradient along the connection line direction, represents the unit vector in the direction from the terminal to neighbor j; Aggregate the gradient fields of all neighbors to generate the global energy gradient field using the formula: where is the weight of neighbor j, is the total number of neighbors; The global energy gradient field takes into account the energy supply abilities of all neighbors and the neighbor weights , 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 the energy supply capacity, and the global energy gradient field The larger the value of , the stronger the overall energy supply capacity in the network; The terminal constructs a geographical gradient field based on its own position and the target position ; where is the Euclidean distance, is the target position coordinate of the data packet, that is, the final position that the data packet needs to reach, is the self-position coordinate, the real-time geographical location of the terminal; The geographical gradient field , represents the unit vector between the target position and the self-position; this formula describes the direction and distance between the target position and the self-position, The larger the value of , the farther the distance between the target position and the self-position, and the more definite the direction; Specifically to the plane coordinates: taking itself as the origin, using UTM projection to convert longitude and latitude into plane coordinates: self-coordinate , target coordinate ; where , is the Euclidean distance between the self-coordinate and the target coordinate; this formula further specifies the geographical gradient field, using the plane coordinate system to calculate the specific distance and direction between the target and the self, The larger the value of , the farther the target position, thus affecting the routing decision of the node; If the target position is unknown, such as in broadcast flooding, set

[0026] Step 2: The mobile terminal adjusts the weight coefficients of energy and geography according to the network density, generates a comprehensive gradient vector to guide relay selection. The terminal uses the IMU to collect acceleration and angular velocity data, combines the kinematic model to predict the future displacement, and calculates the confidence of the position prediction through the magnitude of the velocity vector, and corrects the geographical gradient field to compensate for the path deviation caused by movement; The logic for the mobile terminal to adjust the weight coefficients of energy and geography according to the network density and generate a comprehensive gradient vector to guide relay selection is as follows: Count the number of current neighbor nodes , define the density factor: , where is the preset maximum number of neighbors, and the dynamic weight coefficient The formula is: ; Among them, is the density decay factor, which controls the influence speed of density on the weight, is the current number of neighbors, ; when there are no neighbors, that is , and it completely depends on the geographical gradient field. When it is high density, , and the energy gradient field is given priority; Density factor represents the ratio of the current neighbor node to the maximum number of neighbors, The value of is within the range of When it means there are no neighbor nodes, ; when it means reaching the maximum density, is used to adjust the influence of the energy and geographical gradients on the comprehensive gradient vector, The value range of is between ; a larger means that in the case of high density, the terminal is more inclined to select a node with better energy; Fuse the energy gradient field and the geographical gradient field to calculate the comprehensive gradient vector ; Among them, is the energy gradient vector, is the geographical gradient vector, is the dynamic weight coefficient; the relay direction is biased towards the node with better energy and closer to the target; Comprehensive gradient vector represents the best relay direction after comprehensively considering energy and geographical factors, is a unit vector representing the optimal relay direction, and a higher means a more suitable selection direction, which helps the terminal find a relay node with both high energy and close to the target.

[0027] The partial experimental numbers and the specific data of the comprehensive gradient are shown in Table 2.

[0028] Table 2

[0029] By analyzing the data in the table, it can be observed that the change in the number of neighbors has a significant impact on the balance between the dynamic weight, the energy vector gradient, and the geographical vector gradient, as well as the final comprehensive gradient. Generally speaking, as the number of neighbors gradually increases from 2 to 50, the dynamic weight shows a monotonically increasing trend, indicating that when considering more neighbors in the network or algorithm, the system tends to assign a higher dynamic weight. For example, when the number of neighbors is only 2, the dynamic weight is only 0.18; while 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 dependence on dynamic features increases significantly; Regarding the energy vector gradient and the geographical vector gradient, obvious contrasts and trade-offs can be seen. As the number of neighbors increases, the energy vector gradient rises from 0.25 to 0.95, while the geographical vector gradient drops from 0.95 to 0.25. This opposite trend of change reflects that in the case of a small number of neighbors, the spatial context represented by geographical information is more important; however, 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 geographical vector gradient is as high as 0.95, so the comprehensive gradient reaches 0.92; while in the 15th row (number of neighbors = 50), it is exactly the opposite, the energy vector gradient is 0.95, the geographical vector gradient drops to 0.25, and the comprehensive gradient also rises to 0.95; The value of the comprehensive gradient shows a "U-shaped" trend of first decreasing and then increasing, indicating that when the number of neighbors is at a medium level (between approximately 12 and 15), the system makes more compromises between energy and geographical information, resulting in the minimum comprehensive gradient; while in the case of extremely few or extremely many neighbors, a certain information dimension dominates absolutely, thus causing the comprehensive gradient to rise. Specifically, in the 4th row (number of neighbors = 12), the comprehensive gradient is 0.68; in the 5th row (number of neighbors = 15), the comprehensive gradient drops to 0.67, which is the minimum value; but when the number of neighbors continues to increase to 50, the comprehensive gradient rises to 0.95 again. This shows that when the number of neighbors is small or large, the system can more clearly focus on a single geographical or energy information, resulting in a better comprehensive effect; while when the number of neighbors is moderate, the two types of information restrict each other, making it difficult for one side to stand out enough, and ultimately the comprehensive effect is relatively weak.

[0030] The logic for the terminal to use the IMU to collect acceleration and angular velocity data, combine the kinematic model to predict future displacements, and calculate the confidence of position prediction through the magnitude of the velocity vector and correct the geographical gradient field to compensate for the path deviation caused by movement is as follows: Acceleration calibration, removing the gravity component through the calculation of the attitude angle to obtain the linear acceleration The formula based on is: ; Among them, is the pitch angle, obtained by gyroscope integration or accelerometer static calibration, reflecting the tilt degree of the terminal, is the raw acceleration, is the gravitational acceleration, the linear acceleration , the true acceleration after removing the gravity component; this formula provides a more accurate linear acceleration by removing the gravity component, and a larger value indicates that the terminal is more strongly accelerated during actual movement, which helps to improve the accuracy of subsequent position prediction; the integration of angular velocity, calculating the yaw angle through gyroscope data : ; wherein, is the angular velocity of the Z axis, is the sampling interval, is the yaw angle at time t, is the previous moment of the yaw angle; represents the rotation angle of the terminal. This formula calculates the current yaw angle by integrating the angular velocity. A larger value indicates that the terminal rotates faster, may change more, reflecting the turning dynamics of the terminal; Using a kinematic model to predict displacement. For velocity calculation, the velocity is obtained by integrating the linear acceleration : ; wherein, represents the velocity vector of the terminal at time t, is the velocity vector at the previous moment ; is the sampling interval; this formula updates the current velocity through the linear acceleration. A larger will directly lead to an increase in the velocity value, indicating that the terminal moves faster; Predicting displacement , assuming uniform motion, predicting the displacement in the future seconds, and the formula is: ; represents the future displacement amount, is the velocity, is the linear acceleration; this formula calculates the future displacement by combining the current velocity and acceleration. A larger or will result in a larger , reflecting the displacement ability of the terminal in the future; For the position prediction confidence The calculation is based on the following formula: ; Among them, is the adjustment coefficient, which controls the influence intensity 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, which reflects the speed of the terminal's movement, and ; at low speed , , fully trust the geographical gradient field; at high speed , , the geographical gradient weight is halved; is used to evaluate the reliability of position prediction. The larger the value, the higher the degree of trust in the predicted position. When the speed is low, the confidence is close to 1, indicating trust in the geographical gradient field; while when the speed is high, the confidence decreases, indicating that more reliance on historical information is needed; The geographical gradient field is corrected according to the predicted displacement and confidence, and the predicted position is calculated as: ; Among them, is the yaw angle, which determines the moving direction, is the position information at time t, is the predicted position information, is the predicted displacement; are the direction cosine and sine, that is, the displacement is decomposed into the projection components of the plane coordinates; This formula calculates the future position using the position information and the predicted displacement. A larger and the correct direction, determined by , will significantly improve the accuracy of position prediction; The formula for correcting the geographical gradient field is: ; Among them, is the corrected geographical gradient vector, which is the geographical direction vector combining the predicted displacement and confidence, and corrects the original geographical gradient field through the prediction model ; is the predicted geographical gradient field, and ; This formula corrects the original geographical gradient field by combining the predicted confidence, reflecting the influence of position changes on the gradient in a dynamic environment. A higher will make the corrected geographical gradient more inclined to the current geographical information, while a lower will rely more on the predicted information; The corrected comprehensive gradient vector is calculated according to the corrected geographical gradient field as: ; The new comprehensive gradient vector generated by this formula comprehensively considers energy and geographical information and combines the influence of the dynamic weight coefficient The larger the value indicates a better relay selection direction; Select the optimal relay node according to the corrected comprehensive gradient, only considering the neighbors whose included angle with the comprehensive gradient vector direction is less than 45°. The node priority is sorted according to the gradient projection value, and the formula is as follows: ; Among them, The position coordinates of the neighbor node, is its own position coordinate, that is, the real-time geographical location of the terminal; select the node with the highest score as the relay.

[0031] is the score of the neighbor node, which is used to evaluate the priority of the relay node; this formula selects the neighbor consistent with the comprehensive direction as the preferred relay by calculating the projection value between the comprehensive gradient vector and the neighbor node direction vector. A higher indicates that the node is more suitable as a relay after comprehensively considering energy and geographical information.

[0032] Step 3: When a certain 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 will refresh the gradient field according to the latest energy sustainability index and location information and recalculate the comprehensive gradient vector, so as to select a new relay node; When a certain relay link fails due to node movement or energy exhaustion, the logic for the upstream terminal of the failed node to rebroadcast the request and trigger the update of the local gradient field is as follows: Through the ACK confirmation mechanism: After the upstream node sends a data packet, it starts the ACK waiting timer, and sets the timeout time to seconds. If the ACK / NACK of the next hop is not received after the timeout, it is determined that the link fails. 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, it is determined that the link fails; this mechanism ensures the real-time performance of the link by regularly sending heartbeat packets. If three consecutive heartbeat packets are lost, it means that the link may fail. This method can quickly reflect the availability of the node; is the status of the ACK confirmation mechanism, indicating whether the link is valid and whether the upstream node receives the confirmation (ACK) or rejection confirmation (NACK) from the downstream node within the set timeout time seconds; This formula is used to determine the validity of the link. If an ACK is received within 0.3 seconds, the link is valid; otherwise, it is determined to be invalid. If the link is invalid, it means that action needs to be taken for re - broadcasting. The design of TTL controls the maximum forwarding hops of the request packet to prevent infinite propagation. A higher TTL value means that the request packet can propagate farther, increasing the potential range of response. The upstream node sends a request packet, and the request packet initial , and for each hop it passes through , when , it stops forwarding, restricting the propagation within 3 hops. Neighbor nodes only process request packets. Nodes only respond to requests whose distance from the upstream node is less than 100 meters, that is, within a circular area with a radius of meters centered on the failed node. The affected nodes are determined through the signal strength attenuation model: ; is the path loss exponent, reflecting the speed of signal attenuation, is the radius of the area centered on the failed node, is the received signal strength indication, representing the validity of the signal. This formula is used to determine which nodes are affected by the failed link. If the value of a node is higher than the right - hand side of the formula, it means that the node is within the effective range and can receive the request. A larger value indicates a stronger signal, and the node is more likely to participate in the re - connection process; The neighbor 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 predicts and updates its own position through the IMU: ; Among them, is the current moving speed of the terminal, seconds is the time interval for position information update; The updated energy sustainability index is used to evaluate the energy state of the node. The larger it is, the better the energy state of the node, and it can be used as a relay. While less than a certain threshold means that the node has insufficient energy and should not be selected; is the updated position information, is the old position information. This formula calculates the new position information based on the current speed and is applicable in a dynamic environment. Higher speeds and update frequencies will result in higher accuracy of position prediction; The local gradient is recalculated, and the updated energy gradient field : ; Among them, is the physical distance to the neighbor node, that is, the straight-line distance between the terminal and neighbor j, is the distance weight coefficient, and the closer the neighbor is, the greater the influence on the gradient; the updated energy gradient field , is the safety distance offset, which is used to avoid numerical instability with a zero denominator when the neighbor and the terminal are in exactly the same position; this formula updates the energy gradient field through the energy state and distance of the neighbor nodes, and the weight coefficient considers 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; The logic for the surrounding nodes to refresh the gradient field according to the latest energy sustainability index and location information and recalculate the comprehensive gradient vector to select a new relay node is as follows: The updated geographical gradient field is divided into a geographical direction unit and a distance scalar: ; Among them, is used to indicate the orientation, is used to reflect the distance; introduce a geographical weight: , where is an anti-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 : ; is the updated dynamic weight coefficient; the updated weight coefficient reflects the change in the 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; The updated comprehensive gradient is calculated as: ; Among them, is the geographical direction amplified by the weight; is the updated comprehensive gradient vector. This formula comprehensively considers the energy and geographical gradients through the dynamic weight coefficient to generate a new comprehensive gradient vector to guide the relay selection. A larger value means a better reconstruction path; By exclude nodes with insufficient remaining energy and only select those related to Nodes with an included angle less than or equal to 30°; The updated priority sorting is in descending order of the gradient projection value, and the formula is as follows: ; Among them, is the position coordinate of the neighbor node, is its own position coordinate, and the node with the highest score is selected as the new relay; is the score of the updated neighbor node. This formula evaluates the priority of each neighbor node by calculating the projection value of the comprehensive gradient vector and the neighbor node direction vector. A higher score indicates that the node is more consistent with the comprehensive gradient direction and is suitable as a new relay.

[0033] Step 4: Embed the gradient information into the packet header of the terminal. When the terminal energy sustainability index is lower than the threshold, introduce an energy attenuation factor and exit the relay task, and the high-energy node takes over to balance the network energy consumption; The logic of embedding the gradient information into the packet header of the terminal and introducing an energy attenuation factor and exiting the relay task when the terminal energy sustainability index is lower than the threshold is as follows: Embed the energy gradient, geographical gradient, and energy status into the packet header to avoid sending control packets separately; Energy gradient direction, data type int8, 2 bytes, encoding method: The normalized vector x and y are magnified 100 times and then rounded; The geographical gradient direction is the same as the energy gradient direction. The energy sustainability index data type is uint8, 2 bytes, encoding rule: Linearly mapped to 0~255, resolution 0.5; Node status flag, data type bitfieid, 1 byte, encoding rule: The lower 4 bits are the energy attenuation factor ranges from 0~1.5, resolution 0.1, and the upper 4 bits are the enhancement factor ranges from 1.0~3.0, resolution 0.2; Sender: The normalized gradient component, such as , is magnified 100 times and then rounded to obtain an integer , Receiver: The integer is divided by 100 to restore it to a floating-point number ; Sender Compress , that is, , Receiver ; Only when the data packet is sent to the relay node, the gradient information of the sender is carried in the header. The receiving node extracts the gradient information to update the local neighbor table without additional control packet exchange; By embedding the gradient information in the packet header, the transmission of control information in the network can be reduced, improving the overall transmission efficiency. The receiving node can quickly update its neighbor table, reducing the delay caused by control packets; Introduce an energy decay factor in the energy gradient calculation , periodically check the energy sustainability index every 10 seconds , set the energy sustainability index threshold: ; When , , normal mode, no decay, participate in relaying; When , warning mode, , extend the broadcast period by 20%; When , exit mode, , exit relaying, send an alarm; This formula indicates the current energy state of the node, the larger, the better the energy sustainability of the node, and it can participate in the relaying task; When , the node needs to exit relaying to avoid affecting other nodes; is used to adjust the influence degree of the node in the neighbor gradient field. It reflects the energy status of the node and affects the effectiveness of the node when participating in the relaying task. A larger value indicates that the node has higher energy and stronger influence on the network; while a smaller value indicates that the node has insufficient energy and reduces the influence on the gradient field; The formula for reducing its own influence in the neighbor gradient field is: ; Among them, is the influence of the node in the neighbor gradient field, is the original energy gradient vector, is the energy decay factor; Reducing its own influence in the neighbor gradient field can avoid the failure of the relaying task caused by insufficient energy, thus maintaining the stability of the overall network; When , decay by 20%, and the attraction drops to ; When , decay by 50%, and the attraction drops to ; When , no decay ; This formula adjusts the influence of the node in the gradient field through the energy decay factor. A lower value, such as when , will cause a significant drop in influence and avoid the normal operation of the network being affected by nodes with insufficient energy; Extend the status broadcast period: ; Among them, is the updated status broadcast period. When the energy status decreases, the broadcast period will be extended accordingly to reduce energy consumption. A larger value indicates that the node reduces the information dissemination frequency in the energy crisis situation to save energy; When , the broadcast period is extended to ; Set the node status flag in the data packet header to 0, that is, it does not participate in relaying, and the neighbor nodes will no longer regard it as a candidate after receiving it; Send an energy warning packet to the upstream node of the current relay link to trigger it to select an alternative route in advance; The logic for high-energy nodes to take over to balance network energy consumption is as follows: Calculate high-energy nodes and increase the weight coefficient in the gradient calculation : ; Among them, is the energy gradient of high-energy nodes, , is the weight coefficient, which is dynamically adjusted according to the energy sustainability index; This logic emphasizes the importance of high-energy nodes. A higher value means that the node has stronger attraction and influence, can spread status information more effectively, and high-energy nodes give priority to participating in relaying to balance network energy consumption and improve the overall network performance; High-energy nodes, that is, , shorten the broadcast period to , quickly spread the status, mark a high-priority flag in the data packet header to attract downstream nodes to give priority to selection; This logic ensures that high-energy nodes can quickly spread information, respond quickly to changes in network status, and the shortened broadcast period helps to update the status information of neighbor nodes in a timely manner, enhancing the flexibility and reliability of the network.

[0034] The present invention also provides a relay ad hoc communication system based on a mobile terminal. The system is used to execute the above-mentioned relay ad hoc communication method based on a mobile terminal, including: A gradient calculation module, which is used for the mobile terminal to monitor its energy replenishment rate in real time through an integrated kinetic energy converter, calculate the energy sustainability index based on a preset time window and the current energy consumption rate, and at the same time the terminal estimates the distance of neighboring nodes through RSSI, broadcasts its own energy status and geographical location information, constructs an energy gradient field and a geographical gradient field, and forms an energy-geographical joint gradient field in a multi-dimensional space; Correction Gradient Module, which is used for a mobile terminal to collect acceleration and angular velocity data by using an IMU, predict future displacements in combination with a kinematic model, calculate the confidence of position prediction through a velocity vector, use this confidence to correct the geographical gradient field to compensate for path deviations caused by movement, and the mobile terminal adjusts the weight coefficients of energy and geography according to network density to generate a comprehensive gradient vector to guide relay selection; Update Relay Module, which is used when a certain relay link fails due to node movement or energy exhaustion. The upstream terminal of the failed node will rebroadcast a request to trigger the update of the local gradient field. Surrounding nodes refresh the gradient field according to the latest energy sustainability index and position information, and recalculate the comprehensive gradient vector to select a new relay node; Balanced Energy Consumption Module, which is used to embed gradient information into the packet header of the terminal. When the energy sustainability index of the terminal is lower than the threshold, an energy decay factor is introduced and the relay task is exited, and the high-energy node takes over to balance the network energy consumption.

[0035] All the above formulas are dimensionless and take their numerical values for calculation. The formulas are obtained by software simulation of a large amount of collected data to get a formula closest to the real situation. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.

[0036] The above embodiments can be implemented in whole or in part by software, hardware, firmware, or any other combination. 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 can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software methods depends on the specific application and design constraints of the technical solution.

[0037] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units. They can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0038] The above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application, and all should be covered by the protection scope of this 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, calculates the energy sustainability index based on a preset time window and the current energy consumption rate. Meanwhile, the terminal estimates the distances to neighboring nodes through RSSI, broadcasts its own energy status and geographical location information, constructs an energy gradient field and a geographical gradient field, and forms an energy-geographical joint gradient field in multi-dimensional space; Step 2: The mobile terminal uses the IMU to collect acceleration and angular velocity data, combines with the kinematic model to predict future displacements, calculates the confidence of the position prediction through the magnitude of the velocity vector, uses this confidence to correct the geographical gradient field to compensate for the path deviation caused by movement. The terminal adjusts the weight coefficients of energy and geography according to the network density, and generates 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 re-broadcasts a request, triggering an update of the local gradient field. Surrounding nodes refresh the gradient field according to the latest energy sustainability index and location information, and recalculate the comprehensive gradient vector, thereby selecting a new relay node; Step 4: Embed the gradient information into the packet header of the terminal. When the energy sustainability index of the terminal is lower than the threshold, introduce an energy attenuation factor and exit the relay task, and let the high-energy node take over to balance the network energy consumption.

2. The relay ad-hoc network communication method based on a mobile terminal according to claim 1, wherein: The logic for the mobile terminal to monitor its energy replenishment rate in real time through an integrated kinetic energy converter and calculate the energy sustainability index based on a preset time window and the current energy consumption rate is: When the terminal moves or vibrates, the PZT-5H piezoelectric sheet generates charges under mechanical stress. The amount of charge varies with the vibration frequency and amplitude, and the acceleration of the terminal is detected by an acceleration sensor. and the vibration frequency , and the energy replenishment rate is calculated The formula based on is: ; Among them, is the material conversion efficiency constant, and The unit of is mW·s³ / m², is the square of acceleration reflecting the input intensity of mechanical energy, is the vibration frequency that determines the sustainability of energy harvesting; Measuring the discharge current of the terminal battery using a current sensor , and monitoring the battery voltage using a voltage sensor : , where is the instantaneous power consumption, and the formula for calculating the energy consumption rate per unit time is: ; Among them, is the current total energy consumption rate of the terminal, is the sliding time window, is the current moment, and t is the time variable; Set the global time window to , and calculate the energy sustainability index . The formula is as follows: ; If , it indicates an energy surplus and continues to undertake the relay task. If , it indicates an energy deficit and reduces the relay load.

3. The relay ad-hoc network communication method based on a mobile terminal according to claim 2, characterized in that: The logic for the terminal to estimate the distances to neighboring nodes through RSSI, broadcast its own energy status and geographical location information, construct an energy gradient field and a geographical gradient field, and form an energy-geographical joint gradient field in multi-dimensional space is: Integrated multi-mode GNSS chip, receiving GPS / Beidou dual-system positioning, outputting longitude and latitude coordinates, with the broadcast frequency set to the base frequency of once every 5 seconds, and dynamically reducing the frequency according to the increase in the number of neighbors. The broadcast period is set as: ; where 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 , and estimate the distance using the log-distance path loss model The formula is as follows: ; wherein, is the physical distance, that is, the actual straight-line distance between the terminal and the neighbor node, is the path loss exponent, is the signal strength measured at the reference distance when, meters is the reference distance, indicating the reference distance for signal strength measurement, is the ambient noise; Receive neighbor broadcast packets and parse the energy sustainability index of neighbors and location, and calculate the physical distance to the neighbor through the signal strength , calculate the energy gradient field of a single neighbor The formula based on is as follows:​ ; where j is the index of the neighbor node, is the energy sustainability difference between the neighbor and itself, 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 geographical coordinate vector of neighbor node j, is the current geographical coordinate vector of this terminal, represents the magnitude of the energy gradient along the connection line direction, represents the unit vector in the direction from this terminal to neighbor j; Aggregate the gradient fields of all neighbors to generate a global energy gradient field The formula is as follows: ; Among them, is the weight of neighbor j, is the total number of neighbors; The terminal constructs a geographical gradient field based on its own position and the target position The formula used is as follows: ; wherein, is the Euclidean distance, is the target location coordinate of the data packet, is the real-time geographical location of the terminal; If the target position is unknown, set , and make decisions solely relying on the energy gradient field.

4. A relay ad-hoc network communication method based on a mobile terminal according to claim 1, characterized in that: The logic for the mobile terminal to adjust the weight coefficients of energy and geography according to the network density and generate a comprehensive gradient vector to guide relay selection is: Statistically count the number of current neighbor nodes , define the density factor: , where is the preset maximum number of neighbors, and the dynamic weight coefficient formula is: ; Among them, is the density attenuation factor, which controls the influence speed of density on the weight, is the current number of neighbors, ; when there are no neighbors, that is, , it completely depends on the geographical gradient field. When it is a high density, , and the energy gradient field is given priority; Calculate the comprehensive gradient vector by fusing the energy gradient field and the geographical gradient field , and generate the optimal relay direction vector. The formula is as follows: ; Among them, is the energy gradient vector, is the geographical gradient vector, is the dynamic weight coefficient; the relay direction biases towards the node with better energy and closer to the target; The logic for the terminal to use the IMU to collect acceleration and angular velocity data, combine with the kinematic model to predict future displacements, and calculate the confidence of the position prediction through the magnitude of the velocity vector and correct the geographical gradient field to compensate for the path deviation caused by movement is: Acceleration calibration, removing the gravity component through attitude angle calculation to obtain linear acceleration The formula is as follows: ; wherein, is the pitch angle, is the original acceleration, is the gravitational acceleration; Angular velocity integration, calculating the yaw angle through gyroscope data : ; Wherein, is the Z-axis angular velocity, is the sampling interval, is the yaw angle at time t, is the previous moment of the yaw angle.

5. A relay ad-hoc network communication method based on a mobile terminal according to claim 4, characterized in that: Predict displacement using a kinematic model. For velocity calculation, obtain the velocity by integrating the linear acceleration : ; Among them, is the velocity vector at time t, is the velocity vector at the previous moment ; Predicted displacement , assuming uniform motion, predict the displacement in the future seconds, and the formula is as follows: ; Regarding the calculation of position prediction confidence The formula used is as follows: ; Among them, is the adjustment coefficient, which controls the influence intensity 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 geographical gradient weight is halved; According to the predicted displacement and confidence to correct the geographical gradient field, calculate the predicted position: ; Among them, is the yaw angle, is the position information at time t, is the predicted position information, is the predicted displacement; are the direction cosine and sine, that is, the displacement is decomposed into the projection components of the plane coordinates; The formula for correcting the geographical gradient field is: ; Among them, is the corrected geographic gradient vector, which combines the predicted displacement and the geographic direction vector of confidence, and corrects the original geographic gradient field through the prediction model ; is the predicted geographic gradient field, and ; The corrected comprehensive gradient vector is calculated according to the corrected geographical gradient field as follows: ; Select the optimal relay node according to the corrected comprehensive gradient, only considering neighbors with an included angle less than 45° with the direction of the comprehensive gradient vector The node priority is sorted according to the gradient projection value, and the formula is as follows: ; Among them, is the score of the neighbor node, is the position coordinate of the neighbor node, is its own position coordinate, is the rating of the neighbor node; select the node with the highest score as the relay.

6. The relay ad-hoc network communication method based on a mobile terminal according to claim 1, characterized in that: The logic for when a relay link fails due to node movement or energy exhaustion, the upstream terminal of the failed node will re-broadcast a request, triggering an update of the local gradient field is: Through the ACK confirmation mechanism: After the upstream node sends a data packet, it starts the ACK waiting timer and sets the timeout to seconds. If the ACK / NACK from the next hop is not received after the timeout, it is determined that the link has 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 determined to be failed; The upstream node sends a request packet, and the request packet is initial , and for each hop passed, , when , stop forwarding, limit the propagation within 3 hops, and neighbor nodes only process request packets. The node only responds to requests with a distance less than 100 meters from the upstream node, that is, a circular area with a radius meters centered on the failed node. Determine the affected nodes through the signal strength attenuation model: ; Upon receiving the request, the neighbor node immediately measures the current energy replenishment rate and updates the energy sustainability index , and when the node is in a moving state, it predicts and updates its own position through the IMU: ; Wherein, 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 : ; Among them, is the physical distance from the neighbor node, that is, the straight-line distance between the terminal and neighbor j, is the distance weight coefficient, and the closer the neighbor is, the greater the influence on the gradient, is the safety distance offset, which is used to avoid numerical instability with a denominator of zero when the neighbor and the terminal are completely coincident; The logic for surrounding nodes to refresh the gradient field according to the latest energy sustainability index and location information, and recalculate the comprehensive gradient vector, thereby selecting a new relay node is: The updated geographical gradient field is divided into a geographical direction unit and a distance scalar: ; Among them, used to indicate the orientation, used to reflect the distance; introduce geographical weights: , where is to prevent zero constants; Based on the number of neighbors within the coverage range of the current local request packet , that is, the number of neighbors within the coverage range of the request packet, calculate : ; Updated Integrated Gradients Calculated as: ; Among them, is the geographical direction amplified by the weight; By excluding the nodes with insufficient remaining energy and only selecting the nodes with an included angle less than or equal to 30° with The updated priority sorting is arranged in descending order of the gradient projection value, and the formula is as follows: ; Among them, is the score of the updated neighbor node, is the position coordinate of the neighbor node, is the self-position coordinate, and the node with the highest score is selected as the new relay.

7. A relay ad-hoc network communication method based on a mobile terminal according to claim 1, characterized in that: The logic for embedding the gradient information into the packet header of the terminal and introducing an energy attenuation factor and exiting the relay task when the energy sustainability index of the terminal is lower than the threshold is: Embed the energy gradient, geographical gradient, and energy state into the packet header to avoid sending control packets separately. Only when the data packet is sent to the relay node, the gradient information of the sender is carried in the header. The receiving node extracts the gradient information to update the local neighbor table without additional control packet exchange; Introduce an energy decay factor in the energy gradient calculation Periodically check 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 period by 20%; When , exit mode, , exit relay, send an alarm; The formula for reducing its own influence in the neighbor gradient field is: ; Among them, is the influence of the node in the neighbor gradient field, is the original energy gradient vector, is the energy decay factor; When the attenuation is 20%, the attraction drops to ; When the attenuation is 50%, the attraction drops to ; When there is no attenuation ; Extend the status broadcast period: ; Among them, is the updated status broadcast period; when , the broadcast period is extended to ; set the node status flag in the data packet header to 0, that is, do not participate in relaying, and the neighbor nodes will no longer regard it as a candidate after receiving it; send an energy warning packet to the upstream node of the current relay link to trigger it to select an alternative path in advance; The logic for high-energy nodes to take over to balance network energy consumption is: Calculate high-energy nodes and increase the weight coefficient in gradient calculation : ; Among them, 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, namely , shorten the broadcast period to , quickly spread the state, mark a high-priority flag in the packet header, and attract downstream nodes to preferentially select.

8. A relay ad hoc network communication system based on a mobile terminal, characterized in that: The system is used to execute a relay ad-hoc network communication method based on a mobile terminal according to any one of claims 1-7, including: A gradient calculation module, which is used for the mobile terminal to monitor its energy replenishment rate in real time through an integrated kinetic energy converter, calculate the energy sustainability index based on a preset time window and the current energy consumption rate, and at the same time, the terminal estimates the distance to neighboring nodes through RSSI, broadcasts its own energy state and geographical location information, constructs an energy gradient field and a geographical gradient field, and forms an energy-geographical joint gradient field in a multi-dimensional space; A modified gradient module, which is used for the mobile terminal to collect acceleration and angular velocity data using an IMU, predict future displacements in combination with a kinematic model, calculate the confidence of position prediction through the magnitude of the velocity vector, use this confidence to correct the geographical gradient field to compensate for the path deviation caused by movement, and the mobile terminal adjusts the weight coefficients of energy and geography according to the network density to generate a comprehensive gradient vector to guide relay selection; An updated relay module, which is used when a certain relay link fails due to node movement or energy exhaustion, the upstream terminal of the failed node will rebroadcast a request to trigger an update of the local gradient field, and surrounding nodes will refresh the gradient field according to the latest energy sustainability index and position information, and recalculate the comprehensive gradient vector to select a new relay node; An energy consumption balancing module, which is used to embed gradient information into the packet header of the terminal. When the energy sustainability index of the terminal is lower than the threshold, an energy decay factor is introduced and the relay task is exited, and high-energy nodes take over to balance 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

  • Multi-hop communication node intelligent scheduling method and system

    CN120091294A

  • Intelligent money box anti-theft control method and system based on block chain and storage medium

    CN120151084A

  • Energy harvesting sensing nodes

    US20190222055A1

Cited By

  • Aviation airborne miniature 5G ad hoc network multimode communication terminal

    CN120640371A

  • High-precision holder control method and system

    CN120669764A

  • Distributed emergency resource node data consistency collaborative system oriented to weak network environment

    CN122269233A