Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The following describes a routing method for network layer addressing based on spatial location information according to an embodiment of the present invention with reference to fig. 1 to 6.
As shown in fig. 1, the routing method for network layer addressing based on spatial location information includes the following steps:
step S100, acquiring the position information of the current satellite receiving the data packet, acquiring the position information of a destination address, and acquiring the interface direction of an interface establishing link connection with an adjacent satellite on the current satellite.
It will be appreciated that a plurality of satellites are arranged around a planet, such as the earth, forming a network, wherein the satellite of the plurality of satellites that receives a packet is the current satellite and the destination of the packet is the destination address, which is typically located on the ground.
The satellite operation has periodicity and predictability, so that the position information of the current satellite is very easy to obtain, and the interface direction of the current satellite can be conveniently obtained based on the topological connection relation of the satellite.
The current satellite is provided with a plurality of interfaces, the current satellite establishes link connection with a plurality of adjacent satellites respectively through one part of the plurality of interfaces, the direction of the interface is the interface establishing link connection with the adjacent satellites, and the interface which does not establish link connection with the adjacent satellites does not need to acquire the corresponding interface direction.
The interface direction is a direction of a physical interface (antenna) that establishes a link connection between the current satellite and an adjacent satellite node, and specifically, the interface direction is a direction that is from the current satellite to a link established between the current satellite and the adjacent satellite node and is away from the current satellite.
And S200, determining that the destination address cannot be accessed to the current satellite, and determining a forwarding interface based on the relative direction between the connection line from the current satellite to the destination address and the interface direction.
It can be understood that the destination address cannot access the current satellite, that is, the current satellite cannot directly send the data packet to the destination address, and then it needs to forward through other adjacent satellites, which adjacent satellite is selected, which is determined by the relative orientation between the connection line from the current satellite to the destination address and the direction of the interface, and through the relative orientation, it can be determined that the data packet is forwarded from the interface, and the corresponding forwarding direction is considered to be closer to the destination address, that is, the corresponding forwarding is the maximum gain.
And step S300, forwarding the data packet through the determined forwarding interface.
In other words, after the optimal forwarding interface is determined, the data packet is forwarded to the adjacent satellite through the determined forwarding interface, so as to shorten the distance from the data packet to the destination address.
It can be understood that, if the destination address still cannot access the current satellite after one satellite forwarding, the above steps are continuously executed, and the above steps are executed in a loop until the destination address can access the current satellite.
According to the routing method for network layer addressing based on the spatial position information, disclosed by the embodiment of the invention, the optimal forwarding path is determined by utilizing the periodicity and predictability of satellite operation and the relative orientation obtained by the topological connection relation of the satellite, so that the routing performance can be improved, and the routing protocol overhead can be reduced.
In some embodiments, as shown in fig. 2, the determining of the destination address in step S200 cannot access the current satellite includes the following steps: determining a coverage area of the current satellite based on the position information of the current satellite; and if the position of the destination address is positioned outside the coverage area of the current satellite, determining that the destination address cannot be accessed to the current satellite. Namely, based on the position information of the destination address and the position information of the current satellite, the position of the destination address is judged to be out of the coverage area of the current satellite, and then the destination address is determined to be unable to access the current satellite.
In other embodiments, as shown in fig. 2, the determining that the destination address in step S200 cannot access the current satellite includes the following steps: determining a coverage area of the current satellite based on the position information of the current satellite; and if the position of the destination address is positioned in the coverage area of the current satellite and the terminal access user table of the current satellite does not contain the destination address, determining that the destination address cannot be accessed to the current satellite. Namely, based on the position information of the destination address and the position information of the current satellite, the position of the destination address is judged to be in the coverage area of the current satellite, but the terminal access user table of the current satellite does not contain the destination address, and the destination address cannot be accessed to the current satellite.
In other words, in at least two cases, the destination address cannot access the current satellite, one is that the location of the destination address is not within the coverage area of the current satellite, and the other is that the location of the destination address is within the coverage area of the current satellite, but the terminal access user table of the current satellite does not contain the destination address.
It can be understood that, if the destination address is located in the coverage of the current satellite, the satellite terminal access user table is searched, and if the search fails, and the terminal access user table has no destination address user, the next-hop routing step based on the interface direction is continuously executed.
In some embodiments, as shown in fig. 2, the routing method for network layer addressing based on spatial location information further includes: determining a coverage area of the current satellite based on the position information of the current satellite; and if the position of the destination address is positioned in the coverage area of the current satellite and the terminal access user table of the current satellite contains the destination address, the current satellite forwards the data packet to the destination address. That is, based on the location information of the destination address and the location information of the current satellite, it is determined that the location of the destination address is within the coverage area of the current satellite, and the terminal access user table of the current satellite contains the destination address, it is determined that the destination address can be accessed to the current satellite, and the current satellite forwards the data packet to the destination address.
In other words, if the destination address is located in the coverage area of the current satellite, the user table accessed by the satellite terminal is searched, and if the search is successful, the data packet is directly forwarded to the destination address user.
It should be noted that, in the above embodiment, the satellite carries and maintains a terminal access user table, and when the coverage area of the satellite changes, the terminal access user table is updated.
In some embodiments, as shown in fig. 2, determining the forwarding interface based on the relative position between the current satellite to destination address line and the direction of the interface in step S200 includes:
step S210, obtaining the azimuth angle between the connection line from the current satellite to the destination address and each interface direction.
Step S220, comparing the azimuth angles, and determining that the interface corresponding to the smallest azimuth angle is the forwarding interface.
As shown in fig. 5, each satellite and destination address is a node, and node D represents an end user located on the surface of the earth, assuming that the current satellite a receives a data packet addressed to node D.
The satellite B, the satellite C and the satellite E are all adjacent satellites which establish link connection with the satellite A, an included angle formed by the direction of the link connected with the neighbor A, which is far away from the satellite A, and the connection line between the satellite A and the node D is marked as alpha, wherein the alpha is1Is CAD of-2Is < EAD, alpha3Is < BAD.
In the embodiment of the invention, when an included angle formed by the direction of an interface and a connecting line between a current satellite and an adjacent satellite is less than 90 degrees, the current interface is considered to be forwarded close to a destination address; and when the included angle formed by the interface direction and the connecting line between the current node and the destination node is more than 90 degrees, the forwarding through the current interface is considered to be forwarding away from the destination address.
Specifically, the more the size of the formed angle is close to 0 °, the higher the forwarding degree of the current interface close to the destination address is considered, and the more the size of the formed angle is close to 180 °, the higher the forwarding degree of the current interface far from the destination address is considered.
As shown in fig. 5, the angle α formed by the links between the satellite a and the adjacent satellite B3Greater than 90 deg., indicating that forwarding via the interface is forwarding away from the destination address; an included angle alpha formed by links established between the satellite A and the adjacent satellite C1Less than 90 deg., indicating that forwarding via the interface is near the destination address.
In the next hop routing step, whether the data packet forwarded through a certain interface of the current satellite is forwarded close to the destination address or forwarded far from the destination address is judged according to the interface direction definition and the definition of gain or obstruction of forwarding through the certain interface, the angle comparison results are sorted, and the interface for forwarding the data packet is selected.
Such as the embodiment shown in fig. 5, the magnitude of the above-mentioned azimuth angles, such as the azimuth angle α in fig. 5, are compared2And if the minimum value is reached, the interface connected with the satellite E is the determined forwarding interface.
In some embodiments, the step S220 of comparing the azimuth angles and determining that the interface corresponding to the smallest azimuth angle is the forwarding interface includes:
and when the at least two azimuth angles are equal and are the minimum values, determining that an interface establishing link connection with the satellite in the same orbit with the current satellite is a forwarding interface in the at least two interfaces corresponding to the at least two azimuth angles.
In other words, when the azimuth angles corresponding to the two interfaces are equal, the satellite in the same orbit as the current satellite is preferentially forwarded, so that the forwarding of the whole method is more stable.
As shown in fig. 6, in some embodiments, acquiring the interface direction of the interface on the current satellite for establishing the link connection with the adjacent satellite includes: when the position information of the current satellite is located in the polar circle of the planet, the adjacent satellite is the satellite in the same orbit with the current satellite.
It can be understood that, in this embodiment, it is considered that, after a satellite enters a polar circle (for the earth, the polar circle includes a south polar circle and a north polar circle), frequent link disconnection and connection may occur, so that the inter-orbit neighbor relationship is unstable, and the probability of a data packet forwarding failure increases.
In other words, if the current satellite receiving the data packet enters the polar circle, the angle formed by the connection line between the current satellite and the destination address and the interface direction in which the current satellite and the adjacent satellite in the same orbit establish the link is only compared to obtain a data packet forwarding interface, and the data packet is forwarded to the next hop forwarding node.
For each of the above embodiments, the position information of the current satellite refers to longitude and latitude information with a certain precision obtained after the center of the current satellite is projected onto the earth surface, or partition number information obtained after the earth surface is divided into partitions.
Two specific examples are described below.
As shown in fig. 3, the routing method for network layer addressing based on the spatial location information expressed in latitude and longitude form is shown.
As shown in fig. 3, the routing method includes the following steps:
obtaining current satellite position information (lat)c,lonc) (ii) a Obtaining the direction information d of the interface which establishes link connection with n adjacent satellites on the current satellite1,d2,...,dn(ii) a Obtaining destination address location information (lat)d,lond);
According to the position information, next hop routing is executed, and whether the destination address position is located in the coverage range of the current satellite is judged;
if the satellite terminal is located in the coverage range of the current satellite, searching the user table accessed by the satellite terminal, and if the search is successful, forwarding the user table to a destination address user; if the search fails, the terminal accesses the user table without the destination address user, the next hop routing step based on the interface direction is continuously executed, the direction of the interface which establishes link connection with n adjacent satellites on the current satellite is compared with the azimuth angle formed by the connection of the current satellite and the destination position, the interface with the minimum azimuth angle is the optimal forwarding interface, when the formed azimuth angles are equal in size, the interface which establishes link connection in the orbit is preferentially selected for forwarding, and the data packet is forwarded to the adjacent satellite through the interface.
In particular, satellite position information (lat) as described in the examples of the inventionc,lonc) The satellite positioning method refers to longitude and latitude information with certain precision obtained after the center of a satellite is projected to the surface of the earth.
As shown in fig. 4, the routing method for network layer addressing based on the spatial location information represented by the ground partition coding form is shown.
As shown in fig. 4, the routing method includes the following steps:
obtaining current satellite space position information coding string ScAcquiring the direction information d of the interface establishing link connection with n adjacent satellites on the current satellite1,d2,...,dn(ii) a Obtaining destination address space position information coding string Sd;
According to the position information, next hop routing is executed, and whether the destination address position is located in the coverage range of the current satellite is judged;
if the satellite terminal is located in the coverage range of the current satellite, searching the user table accessed by the satellite terminal, and if the search is successful, forwarding the user table to a destination address user; if the search fails and the terminal accesses the user table without the destination address, comparing the directions of the interfaces establishing link connection with n adjacent satellites on the current satellite, and calculating the character string S according to different partition coding rulescAnd SdWhen the formed azimuth angles are equal, the interface which establishes link connection in the orbit is preferentially selected for forwarding, and the data packet is forwarded to the adjacent satellite through the interface.
In particular, the current satellite spatial location information code string S described in the examples of the present inventioncThe method refers to partitioned encoding information obtained by projecting the satellite center to partitioned areas on the earth surface.
The following describes a routing device for performing network layer addressing based on spatial location information according to an embodiment of the present invention, and the following described routing device for performing network layer addressing based on spatial location information and the above described routing method for performing network layer addressing based on spatial location information may be referred to correspondingly.
As shown in fig. 7, a routing device for network layer addressing based on spatial location information according to an embodiment of the present invention includes: a receiving unit 710, a path determining unit 720, and a forwarding unit 730.
The receiving unit 710 is configured to obtain position information of a current satellite receiving the data packet, obtain position information of a destination address, and obtain an interface direction of an interface on the current satellite, where the interface establishes a link connection with an adjacent satellite; a path determining unit 720, configured to determine that the destination address cannot access the current satellite, and determine a forwarding interface based on a relative orientation between a connection line from the current satellite to the destination address and an interface direction; and a forwarding unit 730, configured to forward the data packet through the determined forwarding interface.
The routing device for network layer addressing based on the spatial position information determines the optimal forwarding path by utilizing the periodicity and predictability of satellite operation and the relative orientation obtained by the satellite topological connection relation, and has high routing performance and low routing protocol overhead.
Fig. 8 illustrates a physical structure diagram of an electronic device, and as shown in fig. 8, the electronic device may include: a processor (processor)810, a communication Interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication Interface 820 and the memory 830 communicate with each other via the communication bus 840. The processor 810 may invoke logic instructions in the memory 830 to perform a routing method for network layer addressing based on spatial location information, the method comprising: acquiring the position information of a current satellite receiving a data packet, acquiring the position information of a destination address, and acquiring the interface direction of an interface which establishes link connection with an adjacent satellite on the current satellite; determining a forwarding interface based on a relative orientation between a connection line from the current satellite to the destination address and the interface direction if the destination address cannot be accessed to the current satellite; and forwarding the data packet through the determined forwarding interface.
It should be noted that, when being implemented specifically, the electronic device in this embodiment may be a server, a PC, or other devices, as long as the structure includes the processor 810, the communication interface 820, the memory 830, and the communication bus 840 shown in fig. 8, where the processor 810, the communication interface 820, and the memory 830 complete mutual communication through the communication bus 840, and the processor 810 may call the logic instructions in the memory 830 to execute the above method. The embodiment does not limit the specific implementation form of the electronic device.
In addition, the logic instructions in the memory 830 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Further, an embodiment of the present invention discloses a computer program product, the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, when the program instructions are executed by a computer, the computer can execute the routing method for network layer addressing based on spatial location information provided by the above method embodiments, the method includes: acquiring the position information of a current satellite receiving a data packet, acquiring the position information of a destination address, and acquiring the interface direction of an interface which establishes link connection with an adjacent satellite on the current satellite; determining a forwarding interface based on a relative orientation between a connection line from the current satellite to the destination address and the interface direction if the destination address cannot be accessed to the current satellite; and forwarding the data packet through the determined forwarding interface.
In another aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented to, when executed by a processor, perform the routing method for network layer addressing based on spatial location information provided in the foregoing embodiments, where the method includes: acquiring the position information of a current satellite receiving a data packet, acquiring the position information of a destination address, and acquiring the interface direction of an interface which establishes link connection with an adjacent satellite on the current satellite; determining a forwarding interface based on a relative orientation between a connection line from the current satellite to the destination address and the interface direction if the destination address cannot be accessed to the current satellite; and forwarding the data packet through the determined forwarding interface.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.