Gear protocol routing method, router, terminal device and storage medium
By adding a hole avoidance table and calculating priority values to the routing nodes, the problems of routing holes and load imbalance in the GEAR protocol are solved, the data transmission path of the power Internet of Things is optimized, and the reliability and efficiency of data transmission are improved.
Patent Information
- Application Number
- PCT/CN2024/140490
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-23
- Filing Date
- 2024-12-19
- Publication Date
- 2026-01-29
AI Technical Summary
The existing GEAR routing protocol suffers from routing gaps and load imbalances in the power Internet of Things, resulting in unstable and inefficient data transmission.
By adding a hole avoidance table to the routing nodes, the next-hop routing node is selected based on the estimated cost and urgency values of neighboring nodes, and holes are avoided by calculating priority and estimated cost values, thus optimizing the data transmission path.
It effectively avoids routing holes, reduces data transmission latency and packet loss rate, and improves the reliability and efficiency of data transmission.
Smart Images

Figure CN2024140490_29012026_PF_FP_ABST
Abstract
Description
GEAR protocol routing method, router, terminal device and storage medium TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, in particular to a GEAR protocol routing method, a router, a terminal device and a storage medium. BACKGROUND
[0002] The power Internet of Things is an industrial Internet of Things applied to the power field, is the key to realizing the overall coordinated scheduling of a new power system, and plays an important role in the power industry. As a transitional form of the iteration and development of the power industry to the energy Internet, the power Internet of Things should be developed in the direction of reliable data transmission, massive terminal access, etc. As a kind of wireless access technology, the wireless sensor network has the corresponding characteristics of realizing massive terminal access, such as self-organization, low cost, low power consumption, etc., so the wireless sensor network is suitable as an implementation technology for data transmission of the power Internet of Things. In order to realize reliable transmission of sensing data in the power Internet of Things, the ability of reliable and efficient transmission of wireless sensors should be improved.
[0003] At present, the geographic routing protocol for the power Internet of Things is not extensive, mainly focusing on the classic GPSR routing protocol and the GEAR routing protocol. The GEAR protocol considers energy efficiency, selects the next hop based on geographical location and residual energy, greatly prolongs the life cycle of the network, but has the problem of "routing hole". SUMMARY
[0004] The present application provides a GEAR protocol routing method, a router, a terminal device and a storage medium to solve the technical problems that the existing GEAR cannot avoid the "routing hole" phenomenon and load imbalance.
[0005] In order to solve the above technical problems, the embodiment of the present application provides a GEAR protocol routing method, comprising:
[0006] Obtaining a first estimated cost value of a current routing node and a second estimated cost value of all neighbor routing nodes of the current routing node;
[0007] In order of second estimated cost value from low to high, a neighbor routing node is selected in turn, the neighbor routing node is judged for hole, until a certain neighbor routing node is confirmed as a non-hole routing node, and the neighbor routing node as the non-hole routing node is taken as the next hop routing node of the current routing node;
[0008] determining whether the second estimated cost value of the next hop routing node is lower than the first estimated cost value, if yes, sending the to-be-forwarded data packet to the next hop routing node, if no, adding the current node routing to a hole avoidance table of the current node routing, and sending the to-be-forwarded data packet and the hole avoidance table to the next hop routing node.
[0009] As a preferred solution, before obtaining the first estimated cost value of the current routing node and the second estimated cost value of all neighbor routing nodes of the current routing node, further comprising:
[0010] obtaining an urgency value of all data packets in the current routing node;
[0011] selecting one data packet as the to-be-forwarded data packet in turn according to the order from high to low of the urgency value;
[0012] for each selected to-be-forwarded data, performing the following operations:
[0013] obtaining a first residual energy value of the current routing node, a target area of the to-be-forwarded data packet and a first queuing delay of the to-be-forwarded data packet in the current routing node;
[0014] obtaining a second residual energy value of all neighbor routing nodes of the current routing node and a second queuing delay of the to-be-forwarded data packet in each neighbor node;
[0015] calculating a first estimated cost value of the to-be-forwarded data packet from the current routing node to the target area according to the first residual energy value, the target area and the first queuing delay;
[0016] for each neighbor node, calculating a second estimated cost value of the to-be-forwarded data packet from the neighbor node to the target area according to the corresponding second residual energy value, the target area and the corresponding second queuing delay.
[0017] As a preferred solution, obtaining the second queuing delay of the to-be-forwarded data packet in each neighbor node comprises:
[0018] sending a probe packet to each neighbor routing node, so that each neighbor routing node measures the second queuing delay of the neighbor routing node and returns the second queuing delay to the current routing node.
[0019] As a preferred solution, the calculating a first estimated cost value of the to-be-forwarded data packet from the current routing node to the target area according to the first residual energy value, the target area and the first queuing delay comprises:
[0020] determine a first transmission distance from the current routing node to the target region according to the target region;
[0021] calculate a current priority value of the data packet to be forwarded at the current routing node according to the first transmission distance and the first queuing delay;
[0022] calculate the first estimated cost value according to the current priority value, the first residual energy value and the first queuing delay;
[0023] the second estimated cost value of the data packet to be forwarded from the neighbor routing node to the target region is calculated according to the corresponding second residual energy value, the target region and the corresponding second queuing delay, which comprises:
[0024] determine a second transmission distance from the neighbor routing node to the target region according to the target region;
[0025] calculate a neighbor priority value of the data packet to be forwarded at the neighbor routing node according to the second transmission distance and the second queuing delay;
[0026] calculate the second estimated cost value according to the neighbor priority value, the second residual energy value and the second queuing delay;
[0027] wherein, the calculation formula of the priority value is: p(A, E, G) = d(A, E) / t(A, G);
[0028] wherein, A represents a routing node; E represents a target region; G represents a data packet to be forwarded; p(A, E, G represents a priority value of the data packet G to be forwarded in the target region E at the routing node A; d(A, E) represents a transmission distance from the routing node A to the target region E; t(A, G) represents a queuing delay of the data G to be processed at the routing node A;
[0029] the calculation formula of the estimated cost value is: c(A, E, G) = α * d(A, E) + β * p(A, E, G) + (1-α-β) * e(A);
[0030] wherein, c(A, E, G) represents an estimated cost value of the data packet G from the routing node A to the target region E; e(A) represents a residual energy value of the routing node A; and α and β are adjustable parameters.
[0031] As a preferred solution, the hole judgment on the neighbor routing node comprises:
[0032] judging whether the neighbor routing node is in the hole avoidance table, and if the neighbor routing node is in the hole avoidance table, confirming that the neighbor routing node is a hole routing node.
[0033] If the neighbor routing node is not in the hole avoidance table, it is determined whether there is an intermediate routing node in the straight line path from the neighbor routing node to the target area in the hole avoidance table, if there is an intermediate routing node in the hole avoidance table, the neighbor routing node is confirmed as a hole routing node, otherwise, the neighbor routing node is determined as a non-hole routing node.
[0034] Preferably, the fields of the hole avoidance table include: routing node number;
[0035] The current node routing is added to the hole avoidance table of the current node routing, including:
[0036] The current routing node number is obtained;
[0037] A data item is added in the hole avoidance table, and a routing node field of the data item is filled according to the current routing node number.
[0038] Preferably, the GEAR protocol routing method further includes:
[0039] When no data packet from the neighbor routing node is received within a preset detection period, the hole avoidance table of the current routing node is emptied;
[0040] When the hole avoidance table from the neighbor routing node is received, the hole avoidance table of the current routing node is updated according to the received hole avoidance table.
[0041] On the basis of the above embodiment, another embodiment of the present application provides a router, including: a data acquisition module and a data processing module;
[0042] The data acquisition module is used to obtain a first estimated cost value of a current routing node and second estimated cost values of all neighbor routing nodes of the current routing node;
[0043] The data processing module is used to select a neighbor routing node in turn according to the second estimated cost value from low to high, perform hole judgment on the neighbor routing node, until a neighbor routing node is confirmed as a non-hole routing node, and the neighbor routing node as the non-hole routing node is taken as a next hop routing node of the current routing node; it is determined whether the second estimated cost value of the next hop routing node is lower than the first estimated cost value, if yes, the to-be-forwarded data packet is sent to the next hop routing node, if not, the current node routing is added to the hole avoidance table of the current node routing, and the to-be-forwarded data packet and the hole avoidance table are sent to the next hop routing node.
[0044] On the basis of the above-mentioned embodiments, a terminal device is provided in another embodiment of the application, which comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor implements the GEAR protocol routing method described in the above-mentioned embodiments of the application when executing the computer program.
[0045] On the basis of the above-mentioned embodiments, a storage medium is provided in another embodiment of the application, which comprises a stored computer program, wherein the device where the storage medium is located executes the GEAR protocol routing method described in the above-mentioned embodiments of the application when the computer program runs.
[0046] Compared with the prior art, the embodiments of the application have the following beneficial effects:
[0047] The first estimated cost value of the current routing node and the second estimated cost values of all neighbor routing nodes of the current routing node are obtained; a neighbor routing node is selected in turn according to the order from low to high of the second estimated cost values, the neighbor routing node is subjected to a hole judgment, until a neighbor routing node is confirmed to be a non-hole routing node, and the neighbor routing node which is the non-hole routing node is taken as a next-hop routing node of the current routing node; it is judged whether the second estimated cost value of the next-hop routing node is lower than the first estimated cost value, if yes, the to-be-forwarded data packet is sent to the next-hop routing node, and if no, the current node routing is added to a hole avoidance table of the current node routing, and the to-be-forwarded data packet and the hole avoidance table are sent to the next-hop routing node. The hole avoidance table is added to the routing node, which is used to judge whether the neighbor routing node is a hole, so as to find the next-hop routing node which can avoid the hole phenomenon, and the "routing hole" phenomenon is avoided. BRIEF DESCRIPTION OF DRAWINGS
[0048] Fig. 1 is a flow diagram of a GEAR protocol routing method provided in an embodiment of the application;
[0049] Fig. 2 is a structural diagram of a router provided in an embodiment of the application. DETAILED DESCRIPTION
[0050] In order to make the objectives, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative work fall within the scope of protection of the present application.
[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of this application; the use of the terms "including," "comprising," "having" and "with" in the specification and claims herein are used to mean "including but not limited to"; the use of the terms "first," "second," and the like does not imply a relative importance or a specific order but is used only to identify individual features.
[0052] In the description of the embodiments of the present application, the technical terms "first", "second" and the like are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the technical features indicated.
[0053] Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearance of the phrase in various places in the specification does not necessarily all refer to the same embodiment, nor is it necessarily independent or alternative embodiments to each other. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0054] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0055] Embodiment one
[0056] Please refer to Fig. 1, which is a flowchart of a GEAR protocol routing method according to an embodiment of the present application, including:
[0057] S1, obtaining a first estimated cost value of a current routing node and second estimated cost values of all neighbor routing nodes of the current routing node.
[0058] It should be noted that the current routing node is the execution subject of the GEAR routing protocol of the present application.
[0059] In a preferred embodiment, before obtaining the first estimated cost value of the current routing node and the second estimated cost values of all neighbor routing nodes of the current routing node, it further includes:
[0060] obtaining an urgency value of all data packets in the current routing node;
[0061] selecting a data packet as a to-be-forwarded data packet in turn according to the order from high to low of the urgency value;
[0062] For each selected to be forwarded data, the following operations are performed:
[0063] obtaining a first residual energy value of the current routing node, a target area of the to-be-forwarded data packet, and a first queuing delay of the to-be-forwarded data packet at the current routing node;
[0064] obtaining a second residual energy value of all neighbor routing nodes of the current routing node, and a second queuing delay of the to-be-forwarded data packet at each neighbor node;
[0065] calculating a first estimated cost value of the to-be-forwarded data packet from the current routing node to the target area according to the first residual energy value, the target area, and the first queuing delay;
[0066] For each neighbor node, a second estimated cost value of the to-be-forwarded data packet from the neighbor node to the target area is calculated according to the corresponding second residual energy value, the target area, and the corresponding second queuing delay.
[0067] It should be noted that the to-be-forwarded data packet refers to a data packet to be forwarded to other routing nodes by the current routing protocol.
[0068] In the embodiment, an emergency degree value is artificially set for the data packet according to the importance and urgency of power grid data collection, and the emergency degree value determines the sending order of all data packets. According to the order from high to low of the emergency degree value, one data packet is selected at a time, and data packets are selected in turn as the to-be-forwarded data packet of this time.
[0069] The application meets the demand of data collection emergency degree by considering the urgency and importance of events, thereby reducing the queuing delay of emergency messages and minimizing the impact of data packet loss.
[0070] In a preferred embodiment, obtaining the second queuing delay of the to-be-forwarded data packet at each neighbor node further comprises:
[0071] sending a probe packet to each neighbor routing node, so that each neighbor routing node measures the second queuing delay of the neighbor routing node and returns the second queuing delay to the current routing node.
[0072] In the embodiment, the current routing node sends a probe packet to each of its neighbor routing nodes for measuring the queuing delay of each neighbor routing node, so that the neighbor routing node returns the second queuing delay to the current routing node.
[0073] In a preferred embodiment, the calculating the first estimated cost value of the data packet to be forwarded from the current routing node to the target region according to the first residual energy value, the target region and the first queuing delay comprises:
[0074] determining a first transmission distance from the current routing node to the target region according to the target region;
[0075] calculating a current priority value of the data packet to be forwarded at the current routing node according to the first transmission distance and the first queuing delay by a priority value calculation formula;
[0076] calculating the first estimated cost value according to the current priority value, the first residual energy value and the first queuing delay by an estimated cost value calculation formula;
[0077] the calculating the second estimated cost value of the data packet to be forwarded from the neighbor node to the target region according to the corresponding second residual energy value, the target region and the corresponding second queuing delay comprises:
[0078] determining a second transmission distance from the neighbor routing node to the target region according to the target region;
[0079] calculating a neighbor priority value of the data packet to be forwarded at the neighbor routing node according to the second transmission distance and the second queuing delay by the priority value calculation formula;
[0080] calculating the second estimated cost value according to the neighbor priority value, the second residual energy value and the second queuing delay by the estimated cost value calculation formula;
[0081] wherein the priority value calculation formula is: p(A, E, G) = d(A, E) / t(A, G);
[0082] wherein A represents a routing node; E represents a target region; G represents a data packet to be forwarded; p(A, E, G represents a priority value of the data packet G to be forwarded with the target region E at the routing node A; d(A, E) represents a transmission distance from the routing node A to the target region E; t(A, G) represents a queuing delay of the data G to be processed at the routing node A;
[0083] the estimated cost value calculation formula is: c(A, E, G) = a * d(A, E) + β * p(A, E, G) + (1 - a - β) * e(A);
[0084] wherein c(A, E, G) represents an estimated cost value of the data packet G to be forwarded from the routing node A to the target region E; e(A) represents a residual capacity value of the routing node A; and a and β are adjustable parameters.
[0085] In the embodiment, the priority value is the quotient of the distance from the routing node to the target region and the queuing delay of the data packet to be forwarded at the routing node. The higher the priority value, the better the traffic condition of the data packet to be forwarded at the routing node. The application introduces the concept of priority, and incorporates the priority value into the standard for judging a neighbor routing node as the next hop node, thereby avoiding the aggregation of a large amount of data at the same routing node and the resulting excessive queuing delay, so as to reduce the forwarding congestion caused by the load imbalance.
[0086] The estimated cost value is the weighted sum of the distance from the routing node to the target region, the residual energy of the routing node, and the priority value of the data packet to be forwarded at the routing node. The application improves the estimated cost calculation formula in the traditional GEAR routing protocol, incorporates the priority value into the selection standard of the next hop routing, and flexibly adjusts the weight values of the transmission distance, network energy, and load balance through adjustable parameters.
[0087] S2, in the order from low to high according to the second estimated cost value, sequentially selects a neighbor routing node, judges whether the neighbor routing node is a hole routing node, and stops judging the remaining neighbor routing nodes if the neighbor routing node is a non-hole routing node, and takes the neighbor routing node as the next hop routing node of the current routing node.
[0088] In step S2, the neighbor routing nodes are sequentially judged in the order from low to high according to the neighbor estimated cost value. If a neighbor routing node is judged to be a hole routing node, the next neighbor routing node is judged. If a neighbor routing node is judged to be a non-hole routing node, the judgment of the remaining neighbor routing nodes is stopped, and the neighbor routing node is taken as the next hop routing node of the current routing node. That is, the next hop routing node of the current routing node must be the neighbor routing node with the minimum estimated cost value among the non-hole routing nodes. The application bypasses the neighbor routing node which is a hole routing node.
[0089] In a preferred embodiment, the judgment of the neighbor routing node includes:
[0090] judging whether the neighbor routing node is in the hole avoidance table, and if the neighbor routing node is in the hole avoidance table, confirming that the neighbor routing node is a hole routing node;
[0091] If the neighbor routing node is not in the hole avoidance table, it is determined whether there is an intermediate routing node on a straight path from the neighbor routing node to the target area in the hole avoidance table, and if there is an intermediate routing node in the hole avoidance table, the neighbor routing node is confirmed as a hole routing node, otherwise, the neighbor routing node is determined as a non-hole routing node.
[0092] In the embodiment, to determine whether the neighbor routing node is a hole routing node, it is first determined whether the neighbor routing node is recorded in the hole avoidance table, and if yes, the neighbor routing node is confirmed as a hole routing node. If the neighbor routing node is not recorded in the hole avoidance table, it is further determined whether there is a hole routing node on a straight path from the neighbor routing node to the target area, and if there is a hole routing node, the neighbor routing node is confirmed as a hole routing node. If there is no hole routing node on the straight path from the neighbor routing node to the target area, the neighbor routing node is determined as a non-hole routing node.
[0093] It should be noted that the straight path from the routing node to the target area refers to the shortest or most direct logical path therebetween.
[0094] The present application improves the solution strategy of the conventional GEAR protocol for "routing hole", and predicts the hole routing node in advance to some extent by determining whether there is a hole routing node on the direct path, which is beneficial to bypass the hole routing node in advance.
[0095] S3, determining whether the second estimated cost value of the next hop routing node is lower than the first estimated cost value, if yes, sending the to-be-forwarded data packet to the next hop routing node, if no, adding the current node routing to the hole avoidance table of the current node routing, and sending the to-be-forwarded data packet and the hole avoidance table to the next hop routing node.
[0096] In step S3, the second estimated cost value of the next hop routing node is compared with the current routing cost value of the current routing node, if the second estimated cost value is lower than the first estimated cost value, it indicates that the current routing node does not fall into a hole, and the to-be-forwarded data packet is directly sent to the next hop routing node; if the second estimated cost value is not lower than the first estimated cost value, it indicates that the current routing node falls into a hole, and the current routing node needs to be added to the hole avoidance table, and the hole avoidance table and the to-be-forwarded data packet are sent to the next hop routing node.
[0097] In a preferred embodiment, the fields of the hole avoidance table include: routing node number;
[0098] The adding of the current node routing into the hole avoidance table of the current node routing includes:
[0099] Obtaining the current routing node number;
[0100] Adding a data item in the hole avoidance table, and filling the routing node field of the data item according to the current routing node number.
[0101] In the embodiment, the fields of the hole avoidance table are shown in the following table:
[0102] The application can also set the field of node position information in the hole avoidance table, so that the nodes not adjacent to the hole node can directly obtain the position of the hole node, which is beneficial to the early planning of the path, thereby avoiding the hole node.
[0103] In a preferred embodiment, the GEAR protocol routing method further includes:
[0104] When no data packet from the neighbor routing node is received within a preset detection period, the hole avoidance table of the current routing node is emptied;
[0105] When the hole avoidance table sent by the neighbor routing node is received, the hole avoidance table of the current routing node is updated according to the received hole avoidance table.
[0106] In the embodiment, if a message arrives at the current routing node within the preset detection period, the information in the hole avoidance table of the current routing node is not cleared within the detection period, and if the hole avoidance table sent by the neighbor routing node is received, the hole avoidance table of the current routing node is updated; if no message arrives at the current routing node, the information in the hole avoidance table of the current routing node is emptied at the end of the period.
[0107] The application designs a hole avoidance table cleaning mechanism to prevent the high routing maintenance cost caused by the hole avoidance table.
[0108] In summary, the application improves the GEAR routing protocol under the background of the power Internet of Things, solves the problems of routing hole and load imbalance in the process of propagating data packets by adding the hole avoidance table to the node, setting the emergency degree value to the data packet and calculating the priority value, thereby establishing a more optimal data transmission path, reducing the time delay in the whole transmission process, effectively reducing the packet loss rate of data transmission, and making the data transmission more reliable.
[0109] Embodiment two
[0110] Please refer to Figure 2, which is a structural schematic diagram of a router according to an embodiment of the present application, comprising a data acquisition module and a data processing module.
[0111] The data acquisition module is configured to acquire a first estimated cost value of a current routing node and second estimated cost values of all neighbor routing nodes of the current routing node.
[0112] The data processing module is configured to select a neighbor routing node in turn according to the order from low to high of the second estimated cost values, perform a hole judgment on the neighbor routing node, until a neighbor routing node is confirmed as a non-hole routing node, and take the neighbor routing node as a next-hop routing node of the current routing node; judge whether the second estimated cost value of the next-hop routing node is lower than the first estimated cost value, if yes, send the to-be-forwarded data packet to the next-hop routing node, and if no, add the current node routing to a hole avoidance table of the current node routing, and send the to-be-forwarded data packet and the hole avoidance table to the next-hop routing node.
[0113] Embodiment three
[0114] Correspondingly, an embodiment of the present application provides a terminal device, which comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor implements the GEAR protocol routing method according to the above-mentioned embodiments of the present application when executing the computer program.
[0115] Embodiment four
[0116] Correspondingly, an embodiment of the present application provides a storage medium, which comprises a stored computer program, wherein the computer program controls a device where the storage medium is located to execute the GEAR protocol routing method according to the above-mentioned embodiments of the present application when running.
[0117] It should be noted that the apparatus embodiments described above are only schematic, wherein the units as described separately can or can not be physically separate, and the components as shown as units can or can not be physical components, i.e., can be located in one place or distributed on multiple network components. Some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments. In addition, the apparatus embodiments provided by the present application in the drawings represent that there is a communication connection between the modules, which can be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement without creative labor.
[0118] Those skilled in the art can clearly understand that, for the convenience and brevity, the specific working process of the above-described device can refer to the corresponding process in the foregoing method embodiments, and will not be described here.
[0119] The terminal device can be a desktop computer, a notebook computer, a palm computer, a cloud server, and the like. The terminal device can include, but is not limited to, a processor and a memory.
[0120] The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and the like. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor and the like. The processor is a control center of the device, and connects all parts of the device through various interfaces and lines.
[0121] The memory can be used to store the computer program, and the processor realizes various functions of the device by running or executing the computer program stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store an operating system, at least one application required by a function, and the like; and the data storage area can store data created according to the use of the mobile phone, and the like. In addition, the memory can include a high-speed random access memory, and can also include a nonvolatile memory, for example, a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state memory devices.
[0122] The storage medium is a storage medium, and the computer program is stored in the storage medium. When the processor executes the computer program, the steps of each method embodiment described above can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate forms, etc. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content contained in the computer readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
[0123] The above is the preferred embodiment of the present application. It should be noted that for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which are also considered within the scope of protection of the present application.
Claims
1. A GEAR protocol routing method, characterized in that, include: Obtain the first estimated cost value of the current routing node and the second estimated cost values of all neighboring routing nodes of the current routing node; According to the second estimated cost value in ascending order, select a neighboring routing node in turn, perform hole judgment on the neighboring routing node until a certain neighboring routing node is confirmed to be a non-holeing routing node, and use the non-holeing routing node as the next hop routing node of the current routing node. If the second estimated cost value of the next-hop routing node is lower than the first estimated cost value, then the data packet to be forwarded is sent to the next-hop routing node. If not, then the current node route is added to the hole avoidance table of the current node route, and the data packet to be forwarded and the hole avoidance table are sent to the next-hop routing node.
2. The GEAR protocol routing method as described in claim 1, characterized in that, Before obtaining the first estimated cost value of the current routing node and the second estimated cost values of all neighboring routing nodes of the current routing node, the following steps are also included: Get the urgency value of all data packets in the current routing node; In descending order of urgency, select one data packet at a time as the data packet to be forwarded; For each selected piece of data to be forwarded, perform the following operations: Obtain the first remaining energy value of the current routing node, the target area of the data packet to be forwarded, and the first queuing delay of the data packet to be forwarded at the current routing node; Obtain the second remaining energy value of all neighboring routing nodes of the current routing node and the second queuing delay of the data packet to be forwarded at each neighboring node; Based on the first remaining energy value, the target area, and the first queuing delay, calculate the first estimated cost value of the data packet to be forwarded from the current routing node to the target area; For each neighboring node, a second estimated cost value is calculated for the data packet to be forwarded from the neighboring node to the target area, based on the corresponding second remaining energy value, the target area, and the corresponding second queuing delay.
3. The GEAR protocol routing method as described in claim 2, characterized in that, Obtaining the second queuing delay of the data packet to be forwarded at each neighbor node includes: A probe packet is sent to each neighboring routing node so that each neighboring routing node measures the second queuing delay of the neighboring routing node and returns the second queuing delay to the current routing node.
4. The GEAR protocol routing method as described in claim 2, characterized in that, The step of calculating the first estimated cost value of the data packet to be forwarded from the current routing node to the target area based on the first remaining energy value, the target area, and the first queuing delay includes: Based on the target area, determine the first transmission distance from the current routing node to the target area; Based on the first transmission distance and the first queuing delay, calculate the current priority value of the data packet to be forwarded at the current routing node; The first estimated cost value is calculated based on the current priority value, the first remaining energy value, and the first queuing delay; The step of calculating the second estimated cost value of the data packet to be forwarded from the neighbor node to the target area based on the corresponding second remaining energy value, the target area, and the corresponding second queuing delay includes: Based on the target area, determine the second transmission distance from the neighboring routing node to the target area; Based on the second transmission distance and the second queuing delay, the neighbor priority value of the data packet to be forwarded at the neighbor routing node is calculated; The second estimated cost value is calculated based on the neighbor priority value, the second remaining energy value, and the second queuing delay; The formula for calculating the priority value is as follows: p(A,E,G)=d(A,E) / t(A,G); In the formula, A represents the routing node; E represents the target area; G represents the data packet to be forwarded; p(A,E,G) represents the priority value of the data packet G to be forwarded with the target area E at the routing node A; d(A,E) represents the transmission distance from the routing node A to the target area E; and t(A,G) represents the queuing delay of the data G to be processed at the routing node A. The formula for calculating the estimated cost is: c(A,E,G)=α*d(A,E)+β*p(A,E,G)+(1-α-β)*e(A); In the formula, c(A,E,G) represents the estimated cost of the data packet G to be forwarded from the routing node A to the target area E; e(A) represents the remaining capacity of the routing node A; α and β are adjustable parameters.
5. The GEAR protocol routing method as described in claim 1, characterized in that, The process of determining holes in the neighboring routing nodes includes: Determine whether the neighboring routing node is in the hole avoidance table. If the neighboring routing node is in the hole avoidance table, then confirm that the neighboring routing node is a hole routing node. If the neighboring routing node is not in the hole avoidance table, then it is determined whether there is an intermediate routing node in the hole avoidance table among all intermediate routing nodes on the straight path from the neighboring routing node to the target area. If there is an intermediate routing node in the hole avoidance table, then the neighboring routing node is confirmed to be a hole routing node; otherwise, the neighboring routing node is determined to be a non-hole routing node.
6. The GEAR protocol routing method as described in claim 1, characterized in that, The fields of the hole avoidance table include: route node number; Adding the current node route to the hole avoidance table of the current node route includes: Get the current routing node number; Add a data item to the hole avoidance table, and fill in the routing node field of the data item according to the current routing node number.
7. The GEAR protocol routing method as described in claim 1, characterized in that, Also includes: If no data packets are received from neighboring routing nodes within the preset detection period, clear the hole avoidance table of the current routing node. When a hole avoidance table is received from a neighboring routing node, the hole avoidance table of the current routing node is updated according to the received hole avoidance table.
8. A router, characterized in that, include: Data acquisition module and data processing module; The data acquisition module is used to acquire the first estimated cost value of the current routing node and the second estimated cost values of all neighboring routing nodes of the current routing node. The data processing module is configured to sequentially select a neighboring routing node in ascending order of the second estimated cost value, perform hole detection on the neighboring routing node until a neighboring routing node is confirmed to be a non-holeing routing node, and designate the non-holeing neighboring routing node as the next-hop routing node of the current routing node; determine whether the second estimated cost value of the next-hop routing node is lower than the first estimated cost value. If so, send the data packet to be forwarded to the next-hop routing node; if not, add the current node route to the hole avoidance table of the current node route, and send the data packet to be forwarded and the hole avoidance table to the next-hop routing node.
9. A terminal device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the GEAR protocol routing method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device where the storage medium is located to perform the GEAR protocol routing method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
GEAR protocol routing method, router, terminal equipment and storage medium
CN118945757A
Distributed collaborative evolution method, UAV and intelligent routing method therefor, and apparatus
WO2024021281A1