Routing method, device and routing equipment based on DSDV protocol
By sending the routing group message according to the relative motion type and distance -related judgment rules, through the routing communication of the DSDV protocol, the routing packet message is selectively selected, and the problem of network resources caused by routing node broadcast messages is solved, which improves the routing efficiency.
Patent Information
- Application Number
- CN202210120462.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-09
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2042-02-09
AI Technical Summary
During the routing communication process of the DSDV protocol, the routing node needs to periodically broadcast routing packet messages, resulting in excessive network resource occupation, especially in wireless Ad Hoc networks with many nodes and limited resources, the routing efficiency is greatly reduced.
By receiving the first routing group message sent by the neighboring node, the movement angle of the movement is obtained, and the relative motion type is determined according to the angle angle of the movement direction of the current node. Determine whether the second routing group message of the current node is sent to the neighboring node according to the relative motion type and distance related judgment rules.
This method can save network resources and reduce the occupation of wireless resources, thereby improving routing efficiency and avoiding redundant and invalid communications.
Smart Images

Figure CN114449607B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a routing method, apparatus and routing device based on a DSDV protocol. Background Art
[0002] The DSDV (Destination Sequenced Distance Vector) protocol is a proactive routing protocol, also known as a table-driven routing protocol, which mainly provides path finding and routing maintenance functions for data transmission in the network. In the process of implementing routing communication based on the DSDV protocol, each routing node, regardless of whether it needs to communicate at present, must establish and maintain one or more routing tables, which contain routing information to reach other routing nodes in the network. In order to maintain the routing table and obtain the state changes of the network in real time, each routing node needs to periodically broadcast routing packet messages to all other routing nodes, and the routing packet messages are broadcast within a one-hop range in the form of flooding. When there are many nodes in the network and the network resources are limited, the number of routing packet messages in the network will also increase sharply, which will occupy a large amount of wireless resources, especially in networks with limited resources (such as node energy consumption, communication bandwidth, spectrum resources, etc.), such as wireless Ad Hoc networks and military communication networks, which may greatly reduce the routing efficiency due to the occupation of a large amount of wireless resources. Summary of the invention
[0003] The present application provides a routing method, apparatus and routing device based on the DSDV protocol, which can not only save network resources but also improve routing efficiency.
[0004] The specific technical solutions are as follows:
[0005] In a first aspect, an embodiment of the present application provides a routing method based on the DSDV protocol, the method comprising:
[0006] Receiving a first routing grouping message sent by a neighboring node, wherein the first routing grouping message includes a first movement direction angle, and the first movement direction angle is a movement direction angle of the neighboring node;
[0007] Determining the relative motion type between the neighboring node and the current node according to the first motion direction angle and the second motion direction angle, wherein the second motion direction angle is the motion direction angle of the current node, and the relative motion type is divided according to the relative motion direction between the neighboring node and the current node;
[0008] Whether to send the second routing packet message of the current node to the neighboring node is determined according to the relative movement type and distance-related judgment rules, wherein the distance-related judgment rules are determined based on the distance between the neighboring node and the current node, the relative movement speed, the routing packet message sending period, and the communication range radius of the current node.
[0009] In one implementation, the first routing packet message further includes a first geographical location and a first speed magnitude, wherein the first geographical location is the geographical location of the neighboring node, and the first speed magnitude is the movement speed magnitude of the neighboring node;
[0010] The distance is determined according to a first geographical location and a second geographical location, wherein the second geographical location is the geographical location of the current node;
[0011] The relative motion speed v e Calculated according to the preset formula,
[0012] The preset formula includes: e =v*cos(Δangle), wherein v is the first velocity, Δangle is the target angle difference, and the target angle difference is determined according to the first motion direction angle and the second motion direction angle.
[0013] In one implementation, determining the relative motion type between the neighboring node and the current node according to the first motion direction angle and the second motion direction angle includes:
[0014] Calculating the target angle difference between the first motion direction angle and the second motion direction angle, the target angle difference being the absolute value of the difference between the first motion direction angle and the second motion direction angle;
[0015] The relative motion type is divided according to the value of the target angle difference, wherein:
[0016] Classifying the relative motion type according to the value of the target angle difference includes: determining the relative motion type as a same-direction motion type when 0°≤Δangle≤90° or 270°<Δangle≤360°;
[0017] In the case of 90°<Δangle≤270°, the relative motion type is determined to be a back-to-back motion type.
[0018] In one embodiment, the method further includes: dividing the direction areas of the neighboring nodes and the current node according to the relative motion type;
[0019] Wherein, dividing the direction areas of the neighboring nodes and the current node according to the relative motion type includes:
[0020] In the case where the relative motion type is the same direction motion type, when 0°≤Δangle≤45° or 315°<Δangle≤360°, the neighboring node and the current node are in one direction area; when 45°<Δangle≤90° or 270°<Δangle≤315°, the neighboring node and the current node are in two adjacent direction areas.
[0021] When the relative motion type is a back-to-back motion type, when 90°<Δangle≤135° or 225°<Δangle≤270°, the neighboring node and the current node are in two direction areas tending to opposite directions; when 135°<Δangle≤180° or 180°<Δangle≤225°, the neighboring node and the current node are in two opposite direction areas.
[0022] In one implementation, determining the relative motion type between the neighboring node and the current node according to the first motion direction angle and the second motion direction angle includes:
[0023] Calculating the target angle difference between the first motion direction angle and the second motion direction angle, the target angle difference being the absolute value of the difference between the first motion direction angle and the second motion direction angle;
[0024] In the case where the relative movement speed is determined to be a positive value according to the value of the target angle difference, determining the relative movement type to be a same-direction movement type;
[0025] When the relative movement speed is determined to be a negative value according to the value of the target angle difference, the relative movement type is determined to be a reverse movement type.
[0026] In one implementation, when the relative motion type is a same-direction motion type, judging whether to send the second routing grouping message of the current node to the neighboring node according to the relative motion type and the distance-related judgment rule includes:
[0027] In (D<R)&&(D+v e *t)<R), determine to send the second routing packet message to the neighboring node, wherein D is the distance between the first geographical location and the second geographical location, R is the communication range radius, t is the routing packet message sending period, (D+v e*t) is a first relative movement distance between the first geographical location and the second geographical location when a routing packet message sending cycle is reached;
[0028] In (D≥R)||(D+v e *t)≥R), determine not to send the second routing group message to the neighboring node.
[0029] In one implementation, when the relative motion type is a backward motion type, judging whether to send the second routing group message of the current node to the neighboring node according to the relative motion type and the distance-related judgment rule includes:
[0030] In (D<R)&&(D+2abs(v e *t))<R), determine to send the second routing packet message to the neighboring node, wherein D is the distance between the first geographical location and the second geographical location, R is the communication range radius, t is the routing packet message sending period, (D+2abs(v e *t)) is a second relative movement distance between the first geographical location and the second geographical location when a routing packet message sending cycle is reached;
[0031] In (D≥R)||(D+2abs(v e *t))≥R), determine not to send the second routing group message to the neighboring node.
[0032] In one embodiment, the second routing group message includes the second geographic location, the second movement direction angle, the second speed magnitude and target routing entry information, the target routing entry information is the latest routing entry information determined based on the routing group messages sent by all neighboring nodes of the current node, and the second speed magnitude is the movement speed magnitude of the current node.
[0033] In a second aspect, an embodiment of the present application provides a routing device based on the DSDV protocol, the device comprising:
[0034] A receiving unit, configured to receive a first routing grouping message sent by a neighboring node, wherein the first routing grouping message includes a first movement direction angle, and the first movement direction angle is a movement direction angle of the neighboring node;
[0035] a determination unit, configured to determine a relative motion type between the neighboring node and the current node according to the first motion direction angle and the second motion direction angle, wherein the second motion direction angle is a motion direction angle of the current node, and the relative motion type is a type divided according to the relative motion direction between the neighboring node and the current node;
[0036] A judgment unit is used to judge whether to send the second routing packet message of the current node to the neighboring node according to the relative movement type and distance-related judgment rules, wherein the distance-related judgment rules are determined based on the distance between the neighboring node and the current node, the relative movement speed, the routing packet message sending period, and the communication range radius of the current node.
[0037] In one implementation, the first routing packet message further includes a first geographical location and a first speed magnitude, wherein the first geographical location is the geographical location of the neighboring node, and the first speed magnitude is the movement speed magnitude of the neighboring node;
[0038] The distance is determined according to a first geographical location and a second geographical location, wherein the second geographical location is the geographical location of the current node;
[0039] The relative motion speed v e Calculated according to the preset formula,
[0040] The preset formula includes: e =v*cos(Δangle), wherein v is the first velocity, Δangle is the target angle difference, and the target angle difference is determined according to the first motion direction angle and the second motion direction angle.
[0041] In one embodiment, the determining unit includes:
[0042] A first calculation module, configured to calculate the target angle difference between the first motion direction angle and the second motion direction angle, wherein the target angle difference is an absolute value of a difference between the first motion direction angle and the second motion direction angle;
[0043] A first classification module, used for classifying the relative motion type according to the value of the target angle difference;
[0044] The first division module is specifically used to: when 0°≤Δangle≤90° or 270°<Δangle≤360°, determine that the relative motion type is a same-direction motion type; when 90°<Δangle≤270°, determine that the relative motion type is a back-to-back motion type.
[0045] In one embodiment, the device further comprises:
[0046] A division unit is used to divide the direction areas of the neighboring nodes and the current node according to the relative motion type:
[0047] The division units include:
[0048] The second division module is used for, when the relative motion type is the same direction motion type, when 0°≤Δangle≤45° or 315°<Δangle≤360°, the neighboring node and the current node are in one direction area, and when 45°<Δangle≤90° or 270°<Δangle≤315°, the neighboring node and the current node are in two adjacent direction areas,
[0049] The third division module is used for, when the relative motion type is a back-to-back motion type, when 90°<Δangle≤135° or 225°<Δangle≤270°, the neighboring node and the current node are in two direction areas tending to the opposite direction, and when 135°<Δangle≤180° or 180°<Δangle≤225°, the neighboring node and the current node are in two opposite direction areas.
[0050] In one embodiment, the determining unit includes:
[0051] A second calculation module, used for calculating the target angle difference between the first movement direction angle and the second movement direction angle, wherein the target angle difference is an absolute value of a difference between the first movement direction angle and the second movement direction angle;
[0052] A determination module is used to determine that the relative movement type is a same-direction movement type when the relative movement speed is determined to be a positive value according to the value of the target angle difference; and to determine that the relative movement type is a reverse movement type when the relative movement speed is determined to be a negative value according to the value of the target angle difference.
[0053] In one implementation, the determining unit includes:
[0054] The first determination module is used for determining, when the relative motion type is the same direction motion type, that (D<R) && (D+v e *t)<R), determine to send the second routing packet message to the neighboring node, wherein D is the distance between the first geographical location and the second geographical location, R is the communication range radius, t is the routing packet message sending period, (D+v e*t) is a first relative movement distance between the first geographical location and the second geographical location when a routing packet message sending cycle is reached;
[0055] The second determination module is used for determining, when the relative motion type is the same direction motion type, that (D≥R)||(D+v e *t)≥R), determine not to send the second routing group message to the neighboring node.
[0056] In one implementation, the determining unit includes:
[0057] The third determination module is used for determining, when the relative motion type is a back motion type, that (D<R)&&(D+2abs(v e *t))<R), determine to send the second routing packet message to the neighboring node, wherein D is the distance between the first geographical location and the second geographical location, R is the communication range radius, t is the routing packet message sending period, (D+2abs(v e *t)) is a second relative movement distance between the first geographical location and the second geographical location when a routing packet message sending cycle is reached;
[0058] The fourth determination module is used for determining, when (D≥R)||(D+2abs(v e *t))≥R), determine not to send the second routing group message to the neighboring node.
[0059] In one embodiment, the second routing group message includes the second geographic location, the second movement direction angle, the second speed magnitude and target routing entry information, the target routing entry information is the latest routing entry information determined based on the routing group messages sent by all neighboring nodes of the current node, and the second speed magnitude is the movement speed magnitude of the current node.
[0060] In a third aspect, an embodiment of the present application provides a storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement a method as described in any implementation of the first aspect.
[0061] In a fourth aspect, an embodiment of the present application provides a routing device, including:
[0062] one or more processors;
[0063] a storage device for storing one or more programs,
[0064] When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any embodiment of the first aspect.
[0065] As can be seen from the above content, the routing method, device and routing device based on the DSDV protocol provided by the embodiment of the present application can obtain the first motion direction angle from the first routing packet message after the current node receives the first routing packet message sent by the neighboring node, and then determine the relative motion type between the neighboring node and the current node according to the first motion direction angle and the second motion direction angle of the current node, and finally determine whether to send the second routing packet message of the current node to the neighboring node according to the relative motion type and the distance-related judgment rule. Compared with the blind broadcasting of the second routing packet message generated by the current node directly to the neighboring node in the related art, the embodiment of the present application can selectively broadcast the second routing packet message according to the relative motion type and the distance-related judgment rule, thereby reducing the number of broadcasts of the second routing packet message, thereby saving network resources and improving routing efficiency. Among them, the purpose of the distance-related judgment rule is that within the routing packet message sending cycle, if the neighboring node is always within the communication range of the current node, the second routing packet message can be sent to the neighboring node, and if the neighboring node is not within the communication range of the current node, the second routing packet message will not be sent to the neighboring node, thereby avoiding redundant invalid communication.
[0066] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art description are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative work.
[0068] Figure 1 A schematic diagram of a routing method based on the DSDV protocol provided in an embodiment of the present application;
[0069] Figure 2 A schematic diagram of node movement provided in an embodiment of the present application;
[0070] Figure 3 A schematic diagram of a coordinate system of a node movement direction provided in an embodiment of the present application;
[0071] Figure 4 A block diagram of a routing device based on the DSDV protocol provided in an embodiment of the present application. DETAILED DESCRIPTION
[0072] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0073] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present application and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0074] Figure 1 A flow chart of a routing method based on the DSDV protocol provided in an embodiment of the present application, the method is mainly applied to any node among multiple nodes in a network, wherein the "node" in the embodiment of the present application refers to a routing node, and the method includes:
[0075] S110: Receive a first routing grouping message sent by a neighboring node.
[0076] The first routing packet message includes a first movement direction angle, which is the movement direction angle of the neighboring node. The first routing packet message may also include a first node ID / IP address, a first sequence number, first routing entry information, and a first routing validity period. The first node ID / IP address is the ID / IP address of the neighboring node, the first sequence number is the sequence number of the route corresponding to the first routing entry information, the first routing entry information is the routing information from the original node to the neighboring node, and the first routing validity period is the validity period of the first routing entry information.
[0077] S120: Determine the relative motion type between the neighboring node and the current node according to the first motion direction angle and the second motion direction angle.
[0078] The second motion direction angle is the motion direction angle of the current node, and the relative operation type is divided according to the relative motion direction between the neighboring node and the current node.
[0079] The specific implementation method of this step can be: the current node first calculates the target angle difference between the first movement direction angle and the second movement direction angle, the target angle difference is the absolute value of the difference between the first movement direction angle and the second movement direction angle; then the relative movement type is divided according to the value of the target angle difference.
[0080] The target angle difference is calculated as Δangle = |angleS 1 -angleS 2 |, S 1 is the neighboring node, S 2 is the current node, angleS 1 is the first motion direction angle, angleS 2 is the second motion direction angle, and Δangle is the target angle difference.
[0081] The specific implementation methods of dividing the relative motion type according to the value of the target angle difference include but are not limited to the following two:
[0082] Division method 1: When 0°≤Δangle≤90° or 270°<Δangle≤360° (assuming the first angle range), the relative motion type is determined to be the same direction motion type; when 90°<Δangle≤270° (assuming the second angle range), the relative motion type is determined to be the opposite direction motion type. When the relative motion type is the same direction motion type, the distance between the neighboring node and the current node does not change significantly or changes slowly. When the relative motion type is the opposite direction motion type, the distance between the neighboring node and the current node changes relatively drastically and becomes farther and farther.
[0083] For example, Figure 2 As shown in the figure, there are 5 dynamically moving nodes in the network, namely node 1 to node 5, and the range of the node's movement direction angle is [0°, 360°]. Figure 2 The movement directions of each node in the Figure 3 As shown), and determine the movement direction angle of each node, wherein the positive direction of the x-axis in the coordinate system is 0°, starting from the positive direction of the x-axis, rotating counterclockwise, the movement direction angle increases successively until the movement direction angle is 360° when returning to the positive direction of the x-axis. Node 1 and node 2, node 1 and node 4, node 2 and node 4, node 3 and node 5 are four groups of nodes within the first angle range, so these four groups of nodes are of the same direction movement type, and node 1 and node 3, node 1 and node 5, node 2 and node 3, node 2 and node 5, node 3 and node 4, node 4 and node 5 are six groups of nodes within the second angle range, so these six groups of nodes are of the opposite direction movement type.
[0084] Classification method 2: When the relative movement speed is determined to be a positive value according to the value of the target angle difference, the relative movement type is determined to be a same-direction movement type; when the relative movement speed is determined to be a negative value according to the value of the target angle difference, the relative movement type is determined to be a reverse movement type.
[0085] Relative speed v eIt is calculated according to a preset formula, and the preset formula includes: e =v*cos(Δangle), wherein v is the first velocity, Δangle is the target angle difference, and the target angle difference is determined according to the first motion direction angle and the second motion direction angle.
[0086] From the preset formula, we can see that cos(Δangle) determines v e The value of is positive or negative. Therefore, in specific implementation, the positive or negative of the relative motion speed can be directly determined according to the cosine value of the target angle difference, that is, when the cosine value of the target angle difference is positive, the relative motion speed is positive, and when the cosine value of the target angle difference is negative, the relative motion speed is negative. Of course, the relative motion speed can also be directly calculated according to the first speed and the value of the target angle difference, and the positive or negative of the relative motion speed is determined by the calculation result.
[0087] In one implementation, the current node may also divide the direction areas of the neighboring nodes and the current node according to the relative motion type.
[0088] Specifically, when the relative motion type is the same direction motion type, when 0°≤Δangle≤45° or 315°<Δangle≤360°, the neighboring node and the current node are in a direction area, and the relative motion distance between the two does not change significantly, such as Figure 3 Node 1 and node 4. When 45°<Δangle≤90° or 270°<Δangle≤315°, the relative motion distance between the neighboring node and the current node in two adjacent direction regions changes but changes slowly, such as Figure 3 Middle nodes 3 and 5.
[0089] In the case where the relative motion type is a back-to-back motion type, when 90°<Δangle≤135° or 225°<Δangle≤270°, the relative motion distance between the neighboring node and the current node in two directions tending to be opposite changes is relatively drastic, such as Figure 3 When 135°<Δangle≤180° or 180°<Δangle≤225°, the neighboring node and the current node are in two opposite directions, and the relative motion distance between them changes dramatically and becomes farther and farther, such as Figure 3 Middle nodes 2 and 3.
[0090] It can be seen from the above directional area division that when the relative motion type is the same direction motion type or the opposite direction motion type, there are two directional area division results. The embodiment of the present application can also set more detailed distance-related judgment rules according to each area division result to further save network resources and improve routing efficiency. The embodiment of the present application does not limit the degree of sophistication of the distance-related judgment rules.
[0091] S130: Determine whether to send the second routing grouping message of the current node to the neighboring node according to the relative motion type and distance-related judgment rules.
[0092] The distance-related judgment rule is determined based on the distance between the neighboring node and the current node, the relative movement speed, the routing group message sending period, and the communication range radius of the current node. The distance between the neighboring node and the current node is determined based on the first geographical location and the second geographical location, that is, the difference between the two geographical locations, and the second geographical location is the geographical location of the current node. The first geographical location and the second geographical location can be position coordinates in a geographical coordinate system or in a geocentric coordinate system. The coordinate system is limited in the embodiment of the present application, as long as the distance between the two is calculated in the same coordinate system.
[0093] The second routing packet message includes a second geographical location, a second direction of motion, a second speed, and target routing entry information. The second routing packet message may also include a second node ID / IP address, a second sequence number, and a second routing validity period. The second node ID / IP address is the ID / IP address of the neighboring node, the second sequence number is the sequence number of the route corresponding to the target routing entry information, and the second routing validity period is the validity period of the target routing entry information. The target routing entry information is the latest routing entry information determined based on the routing packet messages sent by all neighboring nodes of the current node, that is, the target routing packet message is first selected from all routing packet messages sent by all neighboring nodes of the current node, and then the routing entry information in the routing packet message is obtained, and the routing information from the current node to the neighboring node is added to the routing entry information in the routing packet message to generate the target routing entry information. The second speed is the movement speed of the current node. The second geographical location, the second direction of motion, and the second speed are detected by the positioning device and the speed detection device in the current node, respectively.
[0094] In the DSDV protocol, a sequence number can be set for each route, and the route with a larger sequence number is the preferred route. When the sequence numbers are the same, the route with fewer hops is the preferred route. Therefore, when there is only one route grouping message with a larger sequence number among all route grouping messages, the route grouping message with the larger sequence number is determined as the target route grouping message; when there are multiple route grouping messages with the largest sequence number, the route grouping message with the least hops is selected from the multiple route grouping messages with the largest sequence number according to the route entry information in the multiple route grouping messages with the largest sequence number, and the finally selected route grouping message is determined as the target route grouping message.
[0095] In one implementation, the specific implementation process of step S130 includes:
[0096] (I) The relative motion type is the same direction motion type
[0097] In (D<R)&&(D+v e *t)<R), in the case of the neighboring node being always within the communication range of the current node during the routing packet message sending period, it can be determined that the second routing packet message is sent to the neighboring node, wherein D is the distance between the first geographical location and the second geographical location, R is the communication range radius, and v e is the target relative speed, t is the routing packet message sending period, (D+v e *t) is the first relative movement distance between the first geographical location and the second geographical location when a routing packet message sending cycle is reached; in (D≥R)||(D+v e *t)≥R), during the routing packet message sending period, the neighboring node is not within the communication range of the current node, so it can be determined not to send the second routing packet message to the neighboring node.
[0098] (ii) The relative motion type is the back motion type
[0099] In (D<R)&&(D+2abs(v e *t))<R), during the routing packet message sending period, the neighboring node is always within the communication range of the current node, so the second routing packet message can be sent to the neighboring node; in (D≥R)||(D+2abs(v e *t))≥R), during the routing packet message sending period, the neighboring node is not within the communication range of the current node, so the second routing packet message may not be sent to the neighboring node. e *t)) is the second relative movement distance between the first geographical location and the second geographical location when a routing packet message sending cycle is reached.
[0100] It should be added that the second routing grouping message may be generated before or after step S130. When the second routing grouping message is generated after step S130, if it is determined that the second routing grouping message does not need to be sent to the neighboring node after step S130, the second routing grouping message may not be generated again.
[0101] The routing method based on the DSDV protocol provided in the embodiment of the present application can obtain the first motion direction angle from the first routing packet message after the current node receives the first routing packet message sent by the neighboring node, and then determine the relative motion type between the neighboring node and the current node according to the first motion direction angle and the second motion direction angle of the current node, and finally determine whether to send the second routing packet message of the current node to the neighboring node according to the relative motion type and the distance-related judgment rule. Compared with the blind broadcasting of the second routing packet message generated by the current node directly to the neighboring node in the related art, the embodiment of the present application can selectively broadcast the second routing packet message according to the relative motion type and the distance-related judgment rule, thereby reducing the number of broadcasts of the second routing packet message, thereby saving network resources and improving routing efficiency. Among them, the purpose of the distance-related judgment rule is that within the routing packet message sending cycle, if the neighboring node is always within the communication range of the current node, the second routing packet message can be sent to the neighboring node, and if the neighboring node is not within the communication range of the current node, the second routing packet message will not be sent to the neighboring node, thereby avoiding redundant invalid communication.
[0102] Corresponding to the above method embodiment, the present application embodiment provides a routing device based on the DSDV protocol, such as Figure 4 As shown, the device comprises:
[0103] A receiving unit 20 is configured to receive a first routing grouping message sent by a neighboring node, wherein the first routing grouping message includes a first movement direction angle, and the first movement direction angle is a movement direction angle of the neighboring node;
[0104] A determination unit 22, configured to determine a relative motion type between the neighboring node and the current node according to the first motion direction angle and the second motion direction angle, wherein the second motion direction angle is a motion direction angle of the current node, and the relative motion type is a type divided according to the relative motion direction between the neighboring node and the current node;
[0105] The judgment unit 24 is used to judge whether to send the second routing group message of the current node to the neighboring node according to the relative movement type and the distance-related judgment rule, wherein the distance-related judgment rule is determined based on the distance between the neighboring node and the current node, the relative movement speed, the routing group message sending period and the communication range radius of the current node.
[0106] In one implementation, the first routing packet message further includes a first geographical location and a first speed magnitude, wherein the first geographical location is the geographical location of the neighboring node, and the first speed magnitude is the movement speed magnitude of the neighboring node;
[0107] The distance is determined according to a first geographical location and a second geographical location, wherein the second geographical location is the geographical location of the current node;
[0108] The relative motion speed v e Calculated according to the preset formula,
[0109] The preset formula includes: e =v*cos(Δangle), wherein v is the first velocity, Δangle is the target angle difference, and the target angle difference is determined according to the first motion direction angle and the second motion direction angle.
[0110] In one implementation, the determining unit 22 includes:
[0111] A first calculation module, configured to calculate the target angle difference between the first motion direction angle and the second motion direction angle, wherein the target angle difference is an absolute value of a difference between the first motion direction angle and the second motion direction angle;
[0112] A first classification module, used for classifying the relative motion type according to the value of the target angle difference;
[0113] The first division module is specifically used to: when 0°≤Δangle≤90° or 270°<Δangle≤360°, determine that the relative motion type is a same-direction motion type; when 90°<Δangle≤270°, determine that the relative motion type is a back-to-back motion type.
[0114] In one embodiment, the device further comprises:
[0115] A division unit, used for dividing the direction areas of the neighboring nodes and the current node according to the relative motion type;
[0116] The division units include:
[0117] The second division module is used for, when the relative motion type is the same direction motion type, when 0°≤Δangle≤45° or 315°<Δangle≤360°, the neighboring node and the current node are in one direction area, and when 45°<Δangle≤90° or 270°<Δangle≤315°, the neighboring node and the current node are in two adjacent direction areas,
[0118] The third division module is used for, when the relative motion type is a back-to-back motion type, when 90°<Δangle≤135° or 225°<Δangle≤270°, the neighboring node and the current node are in two direction areas tending to the opposite direction, and when 135°<Δangle≤180° or 180°<Δangle≤225°, the neighboring node and the current node are in two opposite direction areas.
[0119] In one implementation, the determining unit 22 includes:
[0120] A second calculation module, used for calculating the target angle difference between the first movement direction angle and the second movement direction angle, wherein the target angle difference is an absolute value of a difference between the first movement direction angle and the second movement direction angle;
[0121] A determination module is used to determine that the relative movement type is a same-direction movement type when the relative movement speed is determined to be a positive value according to the value of the target angle difference; and to determine that the relative movement type is a reverse movement type when the relative movement speed is determined to be a negative value according to the value of the target angle difference.
[0122] In one implementation, the determination unit 24 includes:
[0123] The first determination module is used for determining, when the relative motion type is the same direction motion type, that (D<R) && (D+v e *t)<R), determine to send the second routing packet message to the neighboring node, wherein D is the distance between the first geographical location and the second geographical location, R is the communication range radius, t is the routing packet message sending period, (D+v e *t) is a first relative movement distance between the first geographical location and the second geographical location when a routing packet message sending cycle is reached;
[0124] The second determination module is used for determining, when the relative motion type is the same direction motion type, that (D≥R)||(D+v e *t)≥R), determine not to send the second routing group message to the neighboring node.
[0125] In one implementation, the determination unit 24 includes:
[0126] The third determination module is used for determining, when the relative motion type is a back-to-back motion type, that (D<R)&&(D+2abs(v e *t))<R), determine to send the second routing packet message to the neighboring node, wherein D is the distance between the first geographical location and the second geographical location, R is the communication range radius, t is the routing packet message sending period, (D+2abs(v e *t)) is a second relative movement distance between the first geographical location and the second geographical location when a routing packet message sending cycle is reached;
[0127] The fourth determination module is used for determining, when (D≥R)||(D+2abs(v e *t))≥R), determine not to send the second routing group message to the neighboring node.
[0128] In one embodiment, the second routing group message includes the second geographic location, the second movement direction angle, the second speed magnitude and target routing entry information, the target routing entry information is the latest routing entry information determined based on the routing group messages sent by all neighboring nodes of the current node, and the second speed magnitude is the movement speed magnitude of the current node.
[0129] In a third aspect, an embodiment of the present application provides a storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement a method as described in any of the above embodiments.
[0130] In a fourth aspect, an embodiment of the present application provides a routing device, including:
[0131] one or more processors;
[0132] a storage device for storing one or more programs,
[0133] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any of the above embodiments.
[0134] The above device embodiment corresponds to the method embodiment and has the same technical effect as the method embodiment. For specific description, please refer to the method embodiment. The device embodiment is obtained based on the method embodiment. For specific description, please refer to the method embodiment part, which will not be repeated here. It can be understood by those skilled in the art that the accompanying drawings are only schematic diagrams of one embodiment, and the modules or processes in the accompanying drawings are not necessarily required to implement the present application.
[0135] Those skilled in the art can understand that the modules in the device in the embodiment can be distributed in the device in the embodiment according to the description of the embodiment, or can be changed accordingly and located in one or more devices different from the embodiment. The modules in the above embodiment can be combined into one module, or can be further divided into multiple sub-modules.
[0136] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A routing method based on the DSDV protocol, characterized in that: The method comprises: Receive a first routing grouping message sent by a neighboring node, wherein the first routing grouping message includes a first movement direction angle, a first sequence number, and first routing entry information, the first movement direction angle is the movement direction angle of the neighboring node, the first sequence number is the sequence number of the route corresponding to the first routing entry information, and the first routing entry information is routing information from the original node to the neighboring node; Determining the relative motion type between the neighboring node and the current node according to the first motion direction angle and the second motion direction angle, wherein the second motion direction angle is the motion direction angle of the current node, and the relative motion type is divided according to the relative motion direction between the neighboring node and the current node; Determine whether to send the second routing packet message of the current node to the neighboring node according to the relative movement type and the distance-related judgment rule, wherein the distance-related judgment rule is determined based on the distance between the neighboring node and the current node, the relative movement speed, the routing packet message sending period, and the communication range radius of the current node, the second routing packet message includes target routing entry information and a second sequence number, the target routing entry information is the latest routing entry information generated by adding the routing information from the current node to the neighboring node corresponding to the target routing packet message in the routing entry information in the target routing packet message after the target routing packet message is determined according to the routing packet messages sent by all the neighboring nodes of the current node, the second sequence number is the sequence number of the route corresponding to the target routing entry information, when there is only one routing packet message with a large sequence number among all the routing packet messages, the routing packet message with the large sequence number is determined as the target routing packet message, when there are multiple routing packet messages with the largest sequence number, the routing packet message with the least number of hops is selected from the multiple routing packet messages with the largest sequence number according to the routing entry information in the multiple routing packet messages with the largest sequence number, and the finally selected routing packet message is determined as the target routing packet message; In the case where the relative motion type is a same-direction motion type, judging whether to send the second routing grouping message of the current node to the neighboring node according to the relative motion type and the distance-related judgment rule includes: When (D < R) && (D + v e *t < R), it is determined to send the second routing packet message to the neighboring node, where D is the distance between the first geographical location and the second geographical location, the first geographical location is the geographical location of the neighboring node, the second geographical location is the geographical location of the current node, R is the communication range radius, and v e is the relative motion speed, t is the routing packet message sending period, and (D + v e *t) is the first relative motion distance between the first geographical location and the second geographical location when reaching a routing packet message sending period; when (D ≥ R) || (D + v e *t) ≥ R), it is determined not to send the second routing packet message to the neighboring node; In the case where the relative motion type is a backward motion type, judging whether to send the second routing grouping message of the current node to the neighboring node according to the relative motion type and the distance-related judgment rule includes: In the case of (D < R) && (D + 2abs(v e *t)) < R), it is determined to send the second routing packet message to the neighboring node, where (D + 2abs(v e *t)) is the second relative movement distance between the first geographical location and the second geographical location when reaching a routing packet message sending period; in the case of (D ≥ R) || (D + 2abs(v e *t)) ≥ R), it is determined not to send the second routing packet message to the neighboring node.
2. The method according to claim 1, characterized in that The first routing packet message also includes a first geographical location and a first speed, where the first speed is the movement speed of the neighboring node; The distance is determined based on the first geographic location and the second geographic location; The relative motion speed v e Calculated according to the preset formula, The preset formula includes: e =v*cos(Δangle), wherein v is the first velocity, Δangle is the target angle difference, and the target angle difference is determined according to the first motion direction angle and the second motion direction angle.
3. The method according to claim 2, characterized in that Determining the relative motion type between the neighboring node and the current node according to the first motion direction angle and the second motion direction angle includes: Calculating the target angle difference between the first motion direction angle and the second motion direction angle, the target angle difference being the absolute value of the difference between the first motion direction angle and the second motion direction angle; The relative motion type is divided according to the value of the target angle difference, wherein: Classifying the relative motion type according to the value of the target angle difference includes: determining the relative motion type as a same-direction motion type when 0°≤Δangle≤90° or 270°<Δangle≤360°, In the case of 90°<Δangle≤270°, the relative motion type is determined to be a back-to-back motion type.
4. The method according to claim 3, characterized in that The method further includes: dividing the direction areas of the neighboring nodes and the current node according to the relative motion type; Wherein, dividing the direction areas of the neighboring nodes and the current node according to the relative motion type includes: In the case where the relative motion type is the same direction motion type, when 0°≤Δangle≤45° or 315°<Δangle≤360°, the neighboring node and the current node are in the same direction area; when 45°<Δangle≤90° or 270°<Δangle≤315°, the neighboring node and the current node are in two adjacent direction areas. When the relative motion type is a back-to-back motion type, when 90°<Δangle≤135° or 225°<Δangle≤270°, the neighboring node and the current node are in two direction areas tending to the opposite direction; when 135°<Δangle≤180° or 180°<Δangle≤225°, the neighboring node and the current node are in two opposite direction areas.
5. The method according to claim 2, characterized in that Determining the relative motion type between the neighboring node and the current node according to the first motion direction angle and the second motion direction angle includes: Calculating the target angle difference between the first motion direction angle and the second motion direction angle, the target angle difference being the absolute value of the difference between the first motion direction angle and the second motion direction angle; In the case where the relative movement speed is determined to be a positive value according to the value of the target angle difference, determining the relative movement type to be a same-direction movement type; When the relative movement speed is determined to be a negative value according to the value of the target angle difference, the relative movement type is determined to be a reverse movement type.
6. The method according to any one of claims 2 to 5, characterized in that: The second routing packet message includes the second geographical location, the second movement direction angle, and a second speed magnitude, where the second speed magnitude is the movement speed magnitude of the current node.
7. A routing device based on the DSDV protocol, characterized in that: The device comprises: a receiving unit, configured to receive a first routing grouping message sent by a neighboring node, wherein the first routing grouping message includes a first movement direction angle, a first sequence number, and first routing entry information, wherein the first movement direction angle is the movement direction angle of the neighboring node, the first sequence number is the sequence number of the route corresponding to the first routing entry information, and the first routing entry information is routing information from an original node to the neighboring node; a determination unit, configured to determine a relative motion type between the neighboring node and the current node according to the first motion direction angle and the second motion direction angle, wherein the second motion direction angle is a motion direction angle of the current node, and the relative motion type is a type divided according to the relative motion direction between the neighboring node and the current node; a judgment unit, configured to judge whether to send a second routing packet message of the current node to the neighboring node according to the relative motion type and the distance-related judgment rule, wherein the distance-related judgment rule is determined based on the distance between the neighboring node and the current node, the relative motion speed, the routing packet message sending period, and the communication range radius of the current node; the second routing packet message includes target routing entry information and a second sequence number; the target routing entry information is the latest routing entry information generated by adding the routing information from the current node to the neighboring node corresponding to the target routing packet message in the routing entry information in the target routing packet message after the target routing packet message is determined according to the routing packet messages sent by all the neighboring nodes of the current node; the second sequence number is the sequence number of the route corresponding to the target routing entry information; when there is only one routing packet message with a large sequence number among all the routing packet messages, the routing packet message with the large sequence number is determined as the target routing packet message; when there are multiple routing packet messages with the largest sequence number, the routing packet message with the least number of hops is selected from the multiple routing packet messages with the largest sequence number according to the routing entry information in the multiple routing packet messages with the largest sequence number, and the finally selected routing packet message is determined as the target routing packet message; The judging unit comprises: The first determination module is used to, when the relative motion type is the same-direction motion type, determine to send the second routing packet message to the neighboring node when (D < R) && (D + v e * t) < R), where D is the distance between the first geographical location and the second geographical location, the first geographical location is the geographical location of the neighboring node, the second geographical location is the geographical location of the current node, R is the communication range radius, v e is the relative motion speed, t is the routing packet message sending period, and (D + v e * t) is the first relative motion distance between the first geographical location and the second geographical location when one routing packet message sending period arrives; The second determination module is used for determining, when the relative motion type is the same direction motion type, that (D≥R)||(D+v e *t)≥R), determining not to send the second routing group message to the neighboring node; A third determination module, configured to, when the relative motion type is a backward motion type, determine to send the second routing packet message to the neighboring node when (D < R) && (D + 2abs(v e *t)) < R), where (D + 2abs(v e *t)) is the second relative motion distance between the first geographic location and the second geographic location when reaching a routing packet message sending period; The fourth determination module is used for determining, when (D≥R)||(D+2abs(v e *t))≥R), determine not to send the second routing group message to the neighboring node.
8. A routing device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Position-based data packet forward method in wireless self-organized network
CN102143561A