Forwarding method and device based on geographical relative position, equipment and medium
The Geohash-based forwarding method in NDN addresses the geographic spatial attributes of data, reducing network overhead and enhancing reliability by encoding producer coordinates and determining geographic orientation for efficient data routing.
Patent Information
- Application Number
- CN202510565758.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-07-15
AI Technical Summary
Traditional NDN forwarding strategies cannot effectively utilize geospatial attributes when there is a lack of FIB table entries, resulting in high network communication overhead and low data retrieval success rate, affecting network reliability.
The Geohash algorithm is used to encode and name D_pkt for the producer, and the relative orientation of the forwarding node and the target is determined by inversely analyzing the geospatial coordinates. I_pkt is forwarded based on the geographical relative position to reduce dependence on FIB.
It reduces the forwarding plane storage overhead and inter-node communication overhead, improves the reliability of the network and the success rate of data retrieval.
Smart Images

Figure CN120321162A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network data communication, and in particular, to a forwarding method, device, equipment and medium based on geographical relative positions. Background Art
[0002] Named Data Networking (NDN) is currently recognized as the most promising future Internet paradigm. NDN directly processes the variable-length, location-independent names generated by applications, searches for and obtains content for users, without caring about the location where the content is located.
[0003] NDN obtains content through names. The naming scheme is specific to applications and has nothing to do with the network. The names used to obtain data must be globally unique. As Figure 1 shown in the data packet in the NDN architecture, and, Figure 2 shown in the NDN node data structure, which includes two types of packets: the basic structures of I_pkt (interest packet, data request) and D_pkt (data packet). I_pkt consists of fields such as content name, selector, random number, etc., and is mainly used to request data; among them, the content name identifies the target data, the selector can refine the request conditions (such as range or priority), and the random number avoids the interference of duplicate packets. D_pkt includes content name, signature, marking information and data body, and is used to respond to data requests, where the signature is used for data integrity verification, and the marking information includes publisher ID, location information of data, validity period, etc.
[0004] Reference Figure 3 shown in the NDN node forwarding process, the traditional NDN naming scheme is a naming method based on a hierarchical path, using human-readable strings as identifiers, and reflecting the organization method of data in a hierarchical structure. Each name consists of multiple levels of name components, similar to a URL, but location-independent, directly identifying the data itself. The names are usually separated by a forward slash " / ", for example, " / university / cs / course / lecture1", and each part describes the semantic attributes of the content. This naming scheme has the characteristics of self-explanation, flexibility and scalability, and is widely used in content distribution and caching mechanisms.
[0005] In specific scenarios (such as the aviation field), data has its own characteristics. For example, target data for reconnaissance, flight track data of equipment, etc. have strong geospatial attributes. However, the traditional NDN forwarding strategy relies on FIB table entries to forward I_pkt, without considering geospatial attributes. When the forwarding strategy lacks FIB table entries, it can only discard and retransmit or flood I_pkt to all interfaces, introducing additional resource consumption, resulting in higher network communication overhead, affecting the success rate of data retrieval, and reducing network reliability. Summary of the Invention
[0006] The main objective of the embodiments of the present invention is to propose a forwarding method, device, equipment, and medium based on geographical relative positions, which reduces the storage overhead of the forwarding plane and the communication overhead between nodes, and improves the reliability of the network.
[0007] One aspect of the present invention provides a forwarding method based on geographical relative positions, including:
[0008] Encoding according to the geographical space coordinates of the producer using the Geohash algorithm to assign a unique Geohash code to each producer;
[0009] Naming the Geohash code assigned to the producer based on the Geohash algorithm as D_pkt to obtain the data name of the producer D_pkt;
[0010] Inverse-parsing the I_pkt data name by the forwarding node to obtain the geographical space coordinates, and determining the geographical relative orientation between the forwarding node and the forwarding target according to the coordinates of the forwarding node itself and the geographical space coordinates;
[0011] Sending the I_pkt by the forwarding node to the forwarding interface corresponding to the geographical orientation.
[0012] According to the forwarding method based on geographical relative positions, where encoding according to the geographical space coordinates of the producer using the Geohash algorithm to assign a unique Geohash code to each producer includes:
[0013] Determining the binary encoding of the geographical space coordinates using the binary encoding method according to the longitude and latitude values of the geographical space coordinates;
[0014] Performing cross-merging on the binary encoding of the geographical space coordinates to obtain a binary sequence, where cross-merging includes sequentially merging the encoding bits of longitude and the encoding bits of latitude;
[0015] Grouping the binary sequence, calculating the decimal value of each group, converting the decimal value to Base32 characters, and combining the Base32 characters to obtain the Geohash code.
[0016] According to the forwarding method based on geographical relative positions, where determining the binary encoding of the geographical space coordinates using the binary encoding method includes:
[0017] Determining the longitude and latitude values of the geographical space coordinates, and determining the longitude and latitude intervals according to the longitude and latitude values;
[0018] Performing binary division on the longitude and latitude intervals to determine the longitude and latitude sub-intervals where the longitude and latitude intervals are located, and performing binary encoding processing according to the longitude and latitude sub-intervals;
[0019] Divide the sub - interval where the producer is located into two equal parts and perform binary encoding processing until the binary encoding length reaches the preset encoding length, obtaining the binary encoding of the geospatial coordinates.
[0020] According to the forwarding method based on geographical relative position described above, name D_pkt with the Geohash code assigned to the producer based on the Geohash algorithm, obtaining the data name of the producer D_pkt, including:
[0021] Obtain the location area of the producer, and recursively divide the location area until each divided area includes at most one producer.
[0022] According to the Geohash code of the producer, combine and name D_pkt by appending the Geohash code after the traditional NDN naming scheme, obtaining the data name of the producer D_pkt.
[0023] According to the forwarding method based on geographical relative position described above, where the forwarding node performs inverse parsing on the data name of I_pkt to obtain the geospatial coordinates, and determines the geographical relative orientation between the forwarding node and the forwarding target according to the coordinates of the forwarding node itself and the geospatial coordinates, including:
[0024] Obtain the geospatial coordinates obtained by inverse parsing, where the geospatial coordinates are longitude and latitude coordinates.
[0025] Construct a coordinate system with the forwarding node as the center, and determine the geographical relative orientation between the forwarding node and the forwarding target according to the coordinate system.
[0026] According to the forwarding method based on geographical relative position described above, where the forwarding node sends I_pkt to the forwarding interface corresponding to the geographical orientation, including:
[0027] When the forwarding target is in the positive direction of the coordinate system, the forwarding node sends I_pkt to the interface related to the positive direction; when the forwarding target is not in the positive direction of the coordinate system, the forwarding node sends I_pkt to the corresponding interface.
[0028] When there is no available interface in the coordinate system, process I_pkt in the traditional NDN manner.
[0029] According to the forwarding method based on geographical relative position described above, where the forwarding node further includes:
[0030] Determine the true signal transmission direction of the forwarding node according to the geographical relative orientation, and automatically adjust the signal transmission direction according to the true signal transmission direction.
[0031] Another aspect of the embodiments of the present invention provides a forwarding device based on geographical relative positions, including:
[0032] A first module that encodes according to the geographical coordinates of producers using the Geohash algorithm and assigns a unique Geohash code to each producer;
[0033] A second module that names D_pkt based on the Geohash code assigned to the producer by the Geohash algorithm to obtain the data name of the producer D_pkt;
[0034] A third module that performs inverse parsing on the I_pkt data name through a forwarding node to obtain the geographical coordinates, and determines the geographical relative orientation between the forwarding node and the forwarding target according to the coordinates of the forwarding node itself and the geographical coordinates;
[0035] A fourth module that is used to send I_pkt to the forwarding interface corresponding to the geographical orientation through the forwarding node.
[0036] Another aspect of the embodiments of the present invention provides an electronic device, including a processor and a memory;
[0037] The memory is used to store programs;
[0038] The processor executes the program to implement the method described above.
[0039] The embodiments of the present invention also disclose a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to enable the computer device to execute the method described above.
[0040] The beneficial effects of the present invention are as follows: Naming is carried out by combining NDN and Geohash encoding. The geographical location of the original multi-dimensional data is represented by a one-dimensional encoded string, reducing the storage overhead of the forwarding plane (FIB, PIT, and CS), and providing support for the NDN protocol to utilize the geographical space attributes of data; Based on Geohash encoding, the relative position relationship between itself and the target area pointed to by I_pkt is judged, allowing the forwarding node to forward I_pkt based on the geographical relative position when there is no FIB entry, without having to discard and retransmit or flood, reducing the communication overhead between nodes; When there are nodes that can forward, the node reduces its dependence on the FIB when forwarding I_pkt, and can handle the problem of data query failure caused by the lack of a forwarding path, improving the reliability of the network. Description of the Drawings
[0041] The above and / or additional aspects and advantages of the present invention will become apparent and be readily understood from the description of the embodiments in conjunction with the following drawings, where:
[0042] Figure 1 Schematic diagram of a data packet in the NDN architecture.
[0043] Figure 2 Data structure diagram of an NDN node.
[0044] Figure 3 Forwarding process diagram of an NDN node.
[0045] Figure 4 Schematic diagram of the forwarding method based on geographical relative position according to an embodiment of the present invention.
[0046] Figure 5 Schematic diagram of the Geohash algorithm process according to an embodiment of the present invention.
[0047] Figure 6 Schematic diagram of cross-merging binary coding according to an embodiment of the present invention.
[0048] Figure 7 Base32 coding table according to an embodiment of the present invention.
[0049] Figure 8 Schematic diagram of the Geohash coding of point X according to an embodiment of the present invention.
[0050] Figure 9 Schematic diagram of the Geohash coding of a certain area according to an embodiment of the present invention.
[0051] Figure 10 Schematic diagram of converting Geohash coding to binary according to an embodiment of the present invention.
[0052] Figure 11 Base32 coding conversion table.
[0053] Figure 12 Flowchart of traditional NDN forwarding I_pkt.
[0054] Figure 13 Forwarding process of I_pkt according to an embodiment of the present invention
[0055] Figure 14 Schematic diagram of an unmanned aerial vehicle (UAV) realizing azimuth perception based on a directional antenna according to an embodiment of the present invention.
[0056] Figure 15 Schematic diagram of the forwarding device based on geographical relative position according to an embodiment of the present invention. Detailed implementation manners
[0057] Embodiments of the present invention will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. In the following description, suffixes such as "module", "component", or "unit" used to denote elements are only for the convenience of describing the present invention and have no specific meaning in themselves. Therefore, "module", "component", or "unit" can be used interchangeably. "First", "second", etc. are only for the purpose of distinguishing technical features and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features or implicitly indicating the sequence relationship of the indicated technical features. In the following description, the consecutive numbering of method steps is for the convenience of review and understanding. Combining the overall technical solution of the present invention and the logical relationship between each step, adjusting the execution order between steps will not affect the technical effect achieved by the technical solution of the present invention. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention and should not be construed as a limitation of the present invention.
[0058] Term Explanation:
[0059] Content Store (CS): Caches the routed D_pkt. CS stores data according to the caching policy for quick response to subsequent identical I_pkts;
[0060] Pending Interest Table (PIT): Stores unfulfilled I_pkts and their corresponding forwarding interfaces. PIT tracks the forwarded I_pkts and sends the D_pkt back to the consumer in reverse.
[0061] Forwarding Information Base (FIB): Maintains the mapping between name prefixes and forwarding interfaces. FIB forwards the I_pkt to the possible next-hop node according to the I_pkt name prefix.
[0062] Reference Figure 4 The schematic flow diagram of the forwarding method based on geographical relative position shown, which includes but is not limited to steps S100 to S400:
[0063] S100, Encode according to the geospatial coordinates of the producer using the Geohash algorithm, and assign a unique Geohash code to each producer.
[0064] Reference Figure 5 The schematic flow diagram of the Geohash algorithm shown, which includes but is not limited to steps S110 to S130:
[0065] S110. Determine the binary encoding of the geospatial coordinates using a binary encoding method based on the longitude and latitude values of the geospatial coordinates.
[0066] S120. Cross - merge the binary encoding of the geospatial coordinates to obtain a binary sequence, where cross - merging includes sequentially merging the encoding bits of longitude and latitude.
[0067] S130. Group the binary sequence, calculate the decimal value of each group, convert the decimal value to Base32 characters, and combine the Base32 characters to obtain the Geohash encoding.
[0068] In some embodiments, the Geohash algorithm is a grid - based geographic information encoding technology that divides the Earth's surface into grids of different levels and represents positions with strings.
[0069] The specific embodiments are as follows: Taking the point X (longitude: 104.0638546, latitude: 30.6599157) as an example, the process of converting the two - dimensional geospatial attributes into a one - dimensional coordinate encoding by the Geohash geographic information encoding technology is as follows:
[0070] Calculate the binary encoding corresponding to the longitude and latitude respectively:
[0071] Determine the longitude and latitude ranges. The longitude range is [-180°, + 180°], and the latitude range is [-90°, + 90°].
[0072] Divide the longitude and latitude intervals into two equal parts respectively (starting from the overall range), and determine which sub - interval the current value belongs to according to the input longitude and latitude values (take 0 for the left interval and 1 for the right interval).
[0073] Recursively divide the sub - interval where the target position is located in the previous step into two equal parts, and calculate the next - bit binary encoding in the same way until the desired encoding length is reached. Taking the Geohash algorithm with latitude as an example, the 10 - bit binary encoding is shown in Table 1. The binary encoding of latitude 30.6599157 is 1010101110. Similarly, the 10 - bit binary encoding of longitude 104.0638546 can be calculated as 1100101000.
[0074] Table 1 Conversion of latitude to 10 - bit binary encoding
[0075]
[0076]
[0077] Reference Figure 6 As shown in the schematic diagram of cross - merging binary encoding, starting from the 0th bit, sequentially merge the encoding bits of longitude and latitude to generate a binary sequence.
[0078] Reference Figure 7 Based on the Base32 encoding table shown, convert binary to Base32 characters: divide the merged binary sequence into groups of 5 bits each, calculate the corresponding decimal value, and convert each group to the corresponding Base32 character.
[0079] For S200, name the Geohash code assigned to the producer based on the Geohash algorithm as D_pkt to obtain the data name of the producer D_pkt.
[0080] In some embodiments, naming the Geohash code assigned to the producer based on the Geohash algorithm as D_pkt to obtain the data name of the producer D_pkt includes: obtaining the location area of the producer, recursively dividing the location area until each divided area includes at most one producer; according to the Geohash code of the producer, combine and name D_pkt by appending the Geohash code after the traditional NDN naming scheme to obtain the data name of the producer D_pkt.
[0081] As Figure 8 Shown in the Geohash coding schematic diagram of point X, the Geohash code of point X is "wm6n", which realizes representing two-dimensional geographical space attributes through one-dimensional coordinate coding.
[0082] Among them, the Geohash code does not represent a specific point, but generally refers to an area, and the codes of all points within this range are the same. The Geohash code has the following characteristics:
[0083] Hierarchy: The longer the string, the more precise the location represented;
[0084] Proximity: Points with adjacent geographical locations are usually similar in coding;
[0085] Compactness: Represent longitude and latitude through short strings, which is convenient for storage and indexing;
[0086] In some embodiments, point X is deployed as a producer in the sensor network and is responsible for collecting data such as temperature, humidity, and pressure in the area. An example of the traditional NDN naming with the geographical space attributes of point X attached is shown in Table 2. One-dimensional data names require at least two components to identify two-dimensional geographical coordinates (latitude, longitude), and the numerical values of latitude and longitude are usually relatively complex, resulting in longer data names and higher storage overhead in the forwarding plane.
[0087] Table 2 Naming example of point X based on traditional NDN
[0088] Temperature data naming: temperature / latitude:30.6599157 / longitude:104.0638546 Humidity data naming: moist / latitude:30.6599157 / longitude:104.0638546 Pressure data naming: pressure / latitude:30.6599157 / longitude:104.0638546
[0089] The embodiments of the present invention name data according to the following steps:
[0090] Based on the Geohash algorithm, recursively divide the area where the producer is located until each sub-region contains no more than one producer (to ensure naming uniqueness);
[0091] Based on the above Geohash coding calculation method, convert the two-dimensional geospatial attributes in the area where the producer is located into a one-dimensional coding representation;
[0092] When the producer names the data, append its own Geohash code after the traditional hierarchical naming of NDN.
[0093] An example of naming data in the embodiments of the present invention is shown in Table 3. By using a concise Geohash code as a single component to represent the geospatial attributes of point X, it effectively shortens the length of the data name compared to traditional NDN, reduces the storage overhead of the forwarding plane, and provides support for the NDN protocol to utilize the geospatial attributes of data.
[0094] Table 3 Naming example of point X based on the solution of the embodiments of the present invention
[0095] Temperature data naming: temperature / wm6n Humidity data naming: moist / wm6n Pressure data naming: pressure / wm6n
[0096] S300, through the forwarding node, perform inverse parsing on the data name of I_pkt to obtain the geospatial coordinates. According to the coordinates of the forwarding node itself and the geospatial coordinates, determine the geographical relative orientation between the forwarding node and the forwarding target. S400, through the forwarding node, send I_pkt to the forwarding interface corresponding to the geographical orientation.
[0097] It can be understood that the data request forwarding in NDN refers to the process in which network nodes forward requests to the direction where the target data may be stored according to the content name in I_pkt, usually implemented by forwarding strategies. The traditional NDN forwarding strategies and their principles are shown in Table 4, and it can be seen that the existing strategies all rely on the FIB to forward I_pkt.
[0098] Table 4 Traditional NDN forwarding strategies and their principles
[0099] Policy name Principle Best-Route Select the single interface with the lowest cost in the FIB to forward I_pkt Multicast Select multiple interfaces from the FIB to forward I_pkt Random Randomly select an interface from the FIB to forward I_pkt
[0100] The forwarding strategy decides how to handle I_pkt according to the network scale when the FIB lacks forwarding table entries:
[0101] Large-scale network: The forwarding strategy directly discards I_pkt, but in order to obtain the required data, the consumer will retransmit I_pkt after a certain time interval.
[0102] Small-scale network: The forwarding policy forwards the I_pkt to all interfaces to maximize the possibility of retrieving the required data.
[0103] In some embodiments, the geographical relative orientation of the forwarding node and the forwarding target is determined for reference. Figure 9 The schematic diagram of Geohash coding for a certain area shown.
[0104] In some embodiments, when the forwarding node lacks a forwarding entry in the FIB, it guides the forwarding of the I_pkt according to the following steps:
[0105] Geographical information coding processing: The forwarding node extracts the Geohash code from the I_pkt data name and performs inverse parsing with the Geohash code of its own location area to obtain the corresponding longitude and latitude coordinates.
[0106] Geographical relative position judgment: The forwarding node judges the geographical orientation of the target area pointed to by the I_pkt relative to itself according to the longitude and latitude difference.
[0107] Data request forwarding: The forwarding node forwards the I_pkt to the interface in the corresponding direction based on the geographical relative position, rather than forwarding it to all interfaces or discarding and retransmitting it.
[0108] Such as Figure 9 The schematic diagram of Geohash coding for a certain area shown. A, B, C, D, E, F, G, M are nodes deploying the NDN protocol. Assume that node M receives the I_pkt: "detection / ws10k4w" for retrieving data in the area "ws10k4w" from node A and lacks the FIB entry to guide the forwarding of this I_pkt.
[0109] The traditional NDN protocol will directly discard this I_pkt, wait for node A to retransmit, or forward this I_pkt to all interfaces (nodes B, C, D, E) except the interface where the I_pkt enters (node A), resulting in a high communication overhead between nodes.
[0110] The processing process of the Geohash algorithm in the embodiments of the present invention is as follows
[0111] Node M extracts the Geohash code "ws10k4w" in the I_pkt data name and performs inverse parsing (the inverse process of Geohash coding) with the Geohash code "ws10k70" of its own location area to obtain the corresponding longitude and latitude coordinates: the area pointed to by the I_pkt (longitude: 114.09096, latitude: 22.5610), M (longitude: 114.09370, latitude: 22.5611).
[0112] Specifically, refer to Figure 10The Geohash code shown is converted into a binary map, and, referring to Figure 11 the Base32 encoding conversion table shown, taking the area "ws10k70" pointed to by I_pkt as an example, the reverse parsing process of the Geohash code:
[0113] Convert the Geohash code into the corresponding decimal, and then convert it into a 5-bit binary code respectively.
[0114] Refer to Figure 11 , cross-separate the binary code: Separate the binary codes corresponding to longitude and latitude according to the rule that odd bits are for longitude and even bits are for latitude. The longitude binary code is "1101000100 10001 000", and the latitude binary code is "10100 00000 01011 00".
[0115] First, calculate the longitude and latitude corresponding to the binary code:
[0116] Determine the longitude and latitude ranges. The longitude is [-180°, +180°], and the latitude is [-90°, +90°];
[0117] Divide the longitude and latitude intervals into two equal parts respectively (starting from the overall range) according to the binary code, and determine which sub-interval the current value belongs to according to whether the input binary code is 0 or 1 (0 takes the left interval, 1 takes the right interval);
[0118] Recursively divide the sub-interval where the target position is located in the previous step, and obtain the next sub-interval in the same way until the number of iterations reaches the number of bits of the binary code. Taking the latitude binary code "10100 00000 01011 00" of the area "ws10k70" as an example, the conversion to the corresponding latitude is shown in Table 5. After the iteration ends, it can be known that the latitude is in the interval [22.5604248046875, 22.56179809570313], and the median value "22.5610" is taken as the latitude. Similarly, the longitude can be calculated as "114.09096".
[0119] Table 5 Conversion of binary code to latitude
[0120]
[0121]
[0122] Secondly, point M judges the geographical orientation of the target area pointed to by I_pkt relative to itself according to the longitude and latitude differences. The geographical relative position judgment rule is shown in Table 6. Point M judges that the latitude difference between the target area pointed to by I_pkt and itself is negative, and the longitude difference is negative. The target area is located in the southwest direction of point M.
[0123] Table 6 Geographical Relative Position Judgment Rules
[0124] Latitude difference Longitude difference Relative position Positive Positive Northeast Positive Negative Northwest Negative Positive Southeast Negative Negative Southwest Positive 0 Due north Negative 0 Due south 0 Positive Due east 0 Negative Due west
[0125] Finally, based on the geographical relative position, point M forwards I_pkt to the interfaces (points D and E) in the corresponding directions.
[0126] Wherein:
[0127] When the relative position judgment is in the positive directions (due north, due south, due east, and due west), the node shall forward the I_pkt to all relevant interfaces. For example, when the relative position judgment is due north, the node shall forward the I_pkt to the interfaces in the northeast and northwest directions.
[0128] The forwarding interface shall not include the incoming interface of the I_pkt.
[0129] When there is no available interface for forwarding the I_pkt in the relative position, the node processes the I_pkt in the traditional NDN manner (discard and retransmit or flood).
[0130] Such as Figure 12 the traditional NDN I_pkt forwarding flowchart, and, referring to Figure 13 the I_pkt forwarding process of the embodiment of the present invention.
[0131] It can be understood that the technical solution of the embodiment of the present invention allows the forwarding node to judge the relative position relationship between itself and the target area pointed by the I_pkt based on the Geohash encoding, and guide the forwarding of the I_pkt in the direction where the target data may be stored without relying on the FIB forwarding entry.
[0132] Therefore, the nodes and forwarding nodes in the named data network need to perform the following processing:
[0133] The node has the computing ability of Geohash encoding, such as by deploying a GPS geographic information system. Since Geohash encoding only involves simple binary calculations, modern processors can easily handle it.
[0134] The forwarding node senses the geographical directions pointed by different interfaces and automatically adjusts the communication signal forwarding direction, otherwise it will not be able to forward the I_pk according to the geographical relative position. Such as Figure 14 the azimuth perception diagram of the unmanned aerial vehicle based on the directional antenna shown. Flying devices such as unmanned aerial vehicles commonly use directional antennas as interfaces to achieve azimuth perception. The directional antenna usually faces a specific direction, can rotate within a specified angle, or can flexibly adjust the signal direction through a directional antenna array. In addition to using directional antennas, other ground devices can also directly associate the interface with a specific azimuth according to the networking protocol or interface configuration to achieve perception.
[0135] Figure 15 This is a diagram of the forwarding analysis device based on geographical relative position according to an embodiment of the present invention. The device includes a first module 1510, a second module 1520, a third module 1530, and a fourth module 1540.
[0136] Among them, the first module is used to encode according to the geospatial coordinates of the producer using the Geohash algorithm, and assign a unique Geohash code to each producer.
[0137] The second module is used to name D_pkt based on the Geohash code assigned to the producer by the Geohash algorithm, and obtain the data name of the producer D_pkt.
[0138] The third module is used to inversely resolve the I_pkt data name through the forwarding node to obtain the geospatial coordinates, and determine the geographical relative orientation between the forwarding node and the forwarding target according to the coordinates of the forwarding node itself and the geospatial coordinates.
[0139] The fourth module is used to send I_pkt to the forwarding interface corresponding to the geographical orientation through the forwarding node.
[0140] Exemplarily, with the cooperation of the first module, the second module, the third module, and the fourth module in the device, the device in the embodiment can implement any one of the foregoing forwarding methods based on geographical relative position, that is
[0141] Encoding is performed using the Geohash algorithm based on the geospatial coordinates of producers, and a unique Geohash code is assigned to each producer; the Geohash code assigned to the producer based on the Geohash algorithm is named D_pkt to obtain the data name of the producer D_pkt; the inverse resolution of the I_pkt data name is performed by the forwarding node to obtain the geospatial coordinates, and based on the coordinates of the forwarding node itself and the geospatial coordinates, the geographical relative orientation between the forwarding node and the forwarding target is determined; the I_pkt is sent by the forwarding node to the forwarding interface at the corresponding geographical orientation. The beneficial effects of the present invention are as follows: Naming is performed by combining NDN and Geohash encoding, and the geographical location of the original multi-dimensional data is represented by a one-dimensional encoded string, reducing the storage overhead of the forwarding plane (FIB, PIT, and CS), and providing support for the NDN protocol to utilize the geospatial attributes of data; based on the Geohash encoding to judge the relative position relationship between itself and the target area pointed to by the I_pkt, allowing the forwarding node to forward the I_pkt based on the geographical relative position when there is no FIB entry, without having to discard and retransmit or flood, reducing the communication overhead between nodes; when there are nodes that can forward, the node reduces its dependence on the FIB when forwarding the I_pkt, and can cope with the problem of data query failure caused by the lack of a forwarding path, improving the reliability of the network.
[0142] An embodiment of the present invention further provides an electronic device, which includes a processor and a memory;
[0143] The memory stores a program;
[0144] The processor executes the program to execute the foregoing forwarding method based on geographical relative position; the electronic device has the function of carrying and running the software system for forwarding based on geographical relative position provided by the embodiment of the present invention. For example, a personal computer, a minicomputer, a mainframe, a workstation, a network or distributed computing environment, a separate or integrated computer platform, or communicating with charged particle tools or other imaging devices, etc.
[0145] An embodiment of the present invention further provides a computer-readable storage medium, and the storage medium stores a program, and the program is executed by the processor to implement the forwarding method based on geographical relative position as described above.
[0146] In some alternative embodiments, the functions / operations recited in the block diagrams may not occur in the order presented in the operational illustrations. For example, depending upon the functionality / operation involved, two blocks shown in succession may actually be executed substantially concurrently or the blocks may sometimes be executed in reverse order. Further, the embodiments presented and described in the flowcharts of the present invention are provided by way of example to provide a more thorough understanding of the technology. The disclosed methods are not limited to the operations and logical flows presented herein. Alternative embodiments are contemplated in which the order of various operations is altered and in which sub-operations described as part of a larger operation are performed independently.
[0147] Embodiments of the present invention also disclose a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device may read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to execute the foregoing forwarding method based on geographical relative positions.
[0148] In addition, although the present invention has been described in the context of functional modules, it should be understood that one or more of the recited functions and / or features may be integrated in a single physical device and / or software module unless otherwise stated to the contrary, or one or more functions and / or features may be implemented in separate physical devices or software modules. It should also be understood that a detailed discussion of the actual implementation of each module is not necessary for an understanding of the present invention. Rather, the actual implementation of the modules will be understood within the ordinary skill of an engineer considering the attributes, functions and internal relationships of the various functional modules in the devices disclosed herein. Accordingly, those skilled in the art can implement the present invention as set forth in the claims without undue experimentation. It should also be understood that the specific concepts disclosed are illustrative only and not intended to limit the scope of the present invention, which scope is determined by the full scope of the appended claims and their equivalents.
[0149] When the above-described functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs, etc., which can store program codes of various kinds.
[0150] The logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch instructions from the instruction execution system, apparatus, or device and execute the instructions), or used in combination with these instruction execution systems, apparatuses, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device.
[0151] More specific examples (non-exhaustive list) of computer-readable media include the following: electrical connection parts with one or more wirings (electronic devices), portable computer disk cartridges (magnetic devices), random access memories (RAMs), read-only memories (ROMs), erasable programmable read-only memories (EPROMs or flash memories), optical fiber devices, and portable compact disc read-only memories (CDROMs). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, then editing, interpreting, or processing it in other suitable ways when necessary, and then storing it in a computer memory.
[0152] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
[0153] In the description of this specification, the description with reference to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples.
[0154] Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the claims and their equivalents.
[0155] The above has specifically described the preferred embodiments of the present invention, but the present invention is not limited to the described embodiments. Those skilled in the art can also make various equivalent deformations or substitutions without departing from the spirit of the present invention, and these equivalent deformations or substitutions are all included within the scope defined by the claims of this application.
Claims
1. A forwarding method based on geographical relative positions, characterized in that, Including: Encoding using the Geohash algorithm based on the geospatial coordinates of the producer to assign a unique Geohash code to each producer; Naming D_pkt based on the Geohash code assigned to the producer by the Geohash algorithm to obtain the data name of the producer D_pkt; Performing inverse parsing on the I_pkt data name through the forwarding node to obtain the geospatial coordinates, and determining the geographical relative orientation between the forwarding node and the forwarding target according to the coordinates of the forwarding node itself and the geospatial coordinates; Sending I_pkt to the forwarding interface corresponding to the geographical orientation through the forwarding node.
2. The forwarding method based on geographical relative position according to claim 1, wherein, The encoding using the Geohash algorithm based on the geospatial coordinates of the producer to assign a unique Geohash code to each producer includes: Determining the binary encoding of the geospatial coordinates using the binary encoding method according to the longitude and latitude values of the geospatial coordinates; Performing cross-merging on the binary encoding of the geospatial coordinates to obtain a binary sequence, where cross-merging includes sequentially merging the encoding bits of longitude and latitude; Grouping the binary sequence, calculating the decimal value of each group, converting the decimal value to Base32 characters, and combining the Base32 characters to obtain the Geohash code.
3. The forwarding method based on geographical relative position according to claim 2, characterized in that The determining the binary encoding of the geospatial coordinates using the binary encoding method includes: Determining the longitude and latitude values of the geospatial coordinates, and determining the longitude and latitude intervals according to the longitude and latitude values; Performing binary division on the longitude and latitude intervals to determine the longitude and latitude sub-intervals where the longitude and latitude intervals are located, and performing binary encoding processing according to the longitude and latitude sub-intervals; Dividing the sub-interval where the producer is located into two equal parts and performing binary encoding processing until the binary encoding length reaches the preset encoding length to obtain the binary encoding of the geospatial coordinates.
4. The forwarding method based on geographical relative position according to claim 1, wherein The naming D_pkt based on the Geohash code assigned to the producer by the Geohash algorithm to obtain the data name of the producer D_pkt includes: Obtaining the location area of the producer, and recursively dividing the location area until each divided area includes at most one producer; Combining and naming D_pkt in the way of appending the Geohash code after the traditional naming scheme of NDN according to the Geohash code of the producer to obtain the data name of the producer D_pkt.
5. The forwarding method based on geographical relative position according to claim 4, wherein, The performing inverse parsing on the data name through the forwarding node to obtain the geospatial coordinates, and determining the geographical relative orientation between the forwarding node and the forwarding target according to the coordinates of the forwarding node itself and the geospatial coordinates includes: Obtaining the geospatial coordinates obtained by inverse parsing, where the geospatial coordinates are longitude and latitude coordinates; Constructing a coordinate system with the forwarding node as the center, and determining the geographical relative orientation between the forwarding node and the forwarding target according to the coordinate system.
6. The forwarding method based on geographical relative position according to claim 1, wherein, The sending I_pkt to the forwarding interface corresponding to the geographical orientation through the forwarding node includes: When the forwarding target is in the positive direction of the coordinate system, sending I_pkt to the interface related to the positive direction through the forwarding node; when the forwarding target is not in the positive direction of the coordinate system, sending I_pkt to the corresponding interface through the forwarding node; When there is no available interface in the coordinate system, the NDN traditional method is used to process I_pkt.
7. The forwarding method based on geographical relative position according to claim 1, wherein The forwarding node further includes: According to the geographical relative orientation, determine the real signal transmission direction of the forwarding node, and automatically adjust the signal transmission direction according to the real signal transmission direction.
8. A forwarding device based on geographical relative positions, characterized in that, It includes: The first module encodes according to the geographical space coordinates of the producer using the Geohash algorithm, and assigns a unique Geohash code to each producer; The second module names D_pkt based on the Geohash code assigned to the producer by the Geohash algorithm to obtain the data name of the producer D_pkt; The third module performs inverse parsing on the data name of I_pkt through the forwarding node to obtain the geographical space coordinates, and determines the geographical relative orientation between the forwarding node and the forwarding target according to the coordinates of the forwarding node itself and the geographical space coordinates; The fourth module is used to send I_pkt to the forwarding interface at the corresponding geographical orientation through the forwarding node.
9. An electronic device, characterized in that, It includes a processor and a memory; The memory is used to store programs; The processor executes the program to implement the forwarding method based on geographical relative position according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a program, and the program is executed by the processor to implement the forwarding method based on geographical relative position according to any one of claims 1-7.
Citation Information
Cited By
Spatial data relation determination method and device and storage medium
CN121478895A
