A method and device for querying a routing path

CN118921315A8Active Publication Date: 2025-02-07BEIJING ELECTRONICS SCI & TECH INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410920361.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2025-02-07
Estimated Expiration
2044-07-10

AI Technical Summary

Technical Problem

In the third switching layer of the quantum confidential communication network, it is impossible to accurately and quickly query the routing path of messages, resulting in inefficient transmission.

Method used

By obtaining the IP addresses of the source node and destination node in the message to be transmitted, query the smallest domain and the sibling domain of the same level in the link state database, calculate the shortest path and find the boundary node to determine whether the source node is equal to the boundary node, if equal to the link state database Then use it as the first hop node and route the message to the node.

Benefits of technology

Accurate determination of the next hop node of the message is achieved, the accuracy and efficiency of the routing path are improved, and the problem that the routing path cannot be accurately determined in the prior art.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118921315A8_ABST
    Figure CN118921315A8_ABST
Patent Text Reader

Abstract

The present application provides a method and device for querying a routing path, which is applied to the third switching layer of a quantum secure communication network, wherein the method includes: obtaining a message to be transmitted; querying the minimum domain where the IP address of the destination node is located in the link state database, and using the minimum domain where the IP address of the destination node is located as the first target domain; querying the brother domain of the same level as the first target domain where the IP address of the source node is located in the link state database as the second target domain; calculating the shortest path from the second target domain to the first target domain, and finding the IP address of the boundary node from the second target domain to the second target domain of the first target domain; when the IP address of the source node is equal to the IP address of the boundary node, using the boundary node as the first hop node; routing the message to be transmitted to the first hop node. The above scheme achieves the technical effect of accurately determining the routing path.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of communication network technology, and in particular, relates to a method and device for querying a routing path. Background Art

[0002] Today's Internet technology has become the most important infrastructure supporting modern social and economic development, social progress and technological innovation. The current Internet operation and service models have become mature. With the continuous development of quantum technology in recent years, quantum secure communication systems have also emerged.

[0003] Unlike existing Internet technologies, the data transmitted in quantum secure communication networks are quantum keys, and the operation mode, service mode and user network construction of quantum secure communication networks are completely different from the current Internet. Based on this, a switching network including the first switching layer, the second switching layer and the third switching layer is established, which can build a reasonably designed, safe and effective operation mode and service mode under the quantum secure communication network architecture to support the user's quantum secure communication network.

[0004] However, the third switching layer of the switching network of the quantum secure communication network is user-oriented and requires message routing transmission. There is currently no effective solution for how to quickly query the routing path of the message. Summary of the invention

[0005] The purpose of the present application is to provide a method and device for querying a routing path, which can accurately and efficiently query the routing path of a message.

[0006] The present application provides a method and device for querying a routing path, which is implemented as follows:

[0007] A routing path query method, applied to the third switching layer of a quantum secure communication network, comprising:

[0008] Acquire a message to be transmitted, wherein the message to be transmitted carries an IP address of a source node and an IP address of a destination node;

[0009] Querying the minimum domain where the IP address of the destination node is located in the link state database, and using the minimum domain where the IP address of the destination node is located obtained from the query as the first target domain;

[0010] Querying a link state database for a sibling domain at the same level as the first target domain where the IP address of the source node is located, as the second target domain;

[0011] Calculate the shortest path from the second target domain to the first target domain, and find the IP address of the boundary node from the second target domain to the second target domain of the first target domain;

[0012] Determining whether the IP address of the source node is equal to the IP address of the border node;

[0013] When the IP address of the source node is equal to the IP address of the border node, the border node is used as the first hop node;

[0014] The message to be transmitted is routed to the first hop node.

[0015] A routing path query device, comprising:

[0016] An acquisition module, used to acquire a message to be transmitted, wherein the message to be transmitted carries an IP address of a source node and an IP address of a destination node;

[0017] A first query module, configured to query a link state database for a minimum domain where the IP address of the destination node is located, and use the minimum domain where the IP address of the destination node is located obtained by query as a first target domain;

[0018] A second query module, configured to query a link state database for a brother domain at the same level as the first target domain where the IP address of the source node is located, as a second target domain;

[0019] a search module, configured to calculate the shortest path from the second target domain to the first target domain, and to search for an IP address of a boundary node from the second target domain to the second target domain of the first target domain;

[0020] A determination module, used to determine whether the IP address of the source node is equal to the IP address of the boundary node;

[0021] A generating module, configured to use the border node as a first hop node when the IP address of the source node is equal to the IP address of the border node;

[0022] A routing module is used to route the message to be transmitted to the first hop node.

[0023] An electronic device comprises a processor and a memory for storing instructions executable by the processor, wherein the steps of the above method are implemented when the processor executes the instructions.

[0024] A computer-readable storage medium stores a computer program / instruction, which implements the steps of the above method when executed by a processor.

[0025] A computer program product comprises a computer program / instruction, which implements the steps of the above method when executed by a processor.

[0026] The query method and device of the routing path provided by the present application obtain the message to be transmitted, wherein the message to be transmitted carries the IP address of the source node and the IP address of the destination node; query the minimum domain where the IP address of the destination node is located in the link state database, and use the minimum domain where the IP address of the destination node is located as the first target domain; query the brother domain of the same level as the first target domain where the IP address of the source node is located in the link state database as the second target domain; calculate the shortest path from the second target domain to the first target domain, and find the IP address of the boundary node from the second target domain to the first target domain; determine whether the IP address of the source node is equal to the IP address of the boundary node; if the IP address of the source node is equal to the IP address of the boundary node, use the boundary node as the first hop node; and route the message to be transmitted to the first hop node. The above method realizes the accurate determination of the next hop node of the message, thereby solving the existing problem of being unable to accurately determine the routing path of the message, and achieving the technical effect of accurately determining the routing path of the message. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0028] Figure 1 It is a schematic diagram of the key synchronization process provided by this application;

[0029] Figure 2 This is a schematic diagram of the working principle of key synchronization provided by this application;

[0030] Figure 3 It is a schematic diagram of the general hierarchical structure of the quantum secure communication network provided by this application;

[0031] Figure 4 It is a structural schematic diagram of an embodiment of the network architecture of the quantum secure communication network provided by the present application;

[0032] Figure 5 It is a schematic diagram of the structure of the QKX-I network switching layer provided by this application;

[0033] Figure 6 It is a schematic diagram of routing configuration and forwarding of the QKX-I network switching layer provided by this application;

[0034] Figure 7It is a schematic diagram of IF and VQI of the QKX-I network switching layer provided by the present application;

[0035] Figure 8 It is a routing query diagram of the QKX-I network switching layer provided by this application;

[0036] Fig. 9 It is a networking diagram of the QKX-II network switching layer provided by this application;

[0037] Fig.10 This is a diagram of the hierarchical relationship of Districts provided by this application;

[0038] Fig.11 It is a schematic diagram of the virtual link establishment process provided by this application;

[0039] Fig.12 It is a networking diagram of the QKX-III network switching layer provided by this application;

[0040] Fig.13 It is a schematic diagram of the hierarchical relationship of Area provided by this application;

[0041] Fig.14 It is a network topology diagram formed by the LSDB of R1 provided in this application;

[0042] Fig.15 It is a method flow chart of an embodiment of a method for querying a routing path provided by the present application;

[0043] Fig.16 It is a hardware structure block diagram of an electronic device for a routing path query method provided by the present application;

[0044] Fig.17 It is a schematic diagram of the module structure of an embodiment of a routing path query device provided by the present application. DETAILED DESCRIPTION

[0045] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.

[0046] In order to better explain this application, some terms involved in this specification are explained as follows:

[0047] Quantum Secure Communication Network (QSCSN), a quantum key distribution secure communication network based on quantum communication technology;

[0048] Quantum Key Distribution (QKD) is a key distribution process in which both parties of a communication achieve information-theoretic security by transmitting quantum states. Any eavesdropping behavior will be discovered in time due to the disturbance of the quantum state.

[0049] Quantum Key (QK) is an information-theoretic secure key generated by quantum key distribution in quantum secure communication networks. Its security is guaranteed by the basic laws of quantum mechanics.

[0050] Cryptographic Application System (CAS) is a business application system that uses cryptographic technology for security protection in user business networks, referred to as cryptographic application or APP;

[0051] The Quantum Key Service System (QKS) is located between the quantum secure communication network and the user service network, and provides functions such as quantum key security output for the cryptographic applications of the user service network.

[0052] Quantum Key Exchange System: A system that achieves key synchronization between remote nodes based on key exchange between adjacent nodes in a quantum secure communication network. The so-called remote refers to non-adjacent network nodes, referred to as QKX;

[0053] Quantum Key Distribution (QKD) is a system that implements the quantum key distribution function between adjacent nodes in a quantum secure communication network.

[0054] Quantum Key Pool, a buffer for storing consistent quantum keys between adjacent nodes or remote nodes (i.e., non-adjacent nodes);

[0055] Link, which refers to the link association between network nodes (including adjacent nodes and non-adjacent nodes), referred to as LK;

[0056] Interface refers to the network interface for data exchange between adjacent network nodes, which is similar to the Interface of a router, abbreviated as IF.

[0057] Neighbor Pool (NP) and Application Pool (AP), according to different quantum key pairing relationships, the key pool is divided into Neighbor Pool (NP) and Application Pool (AP), where NP is a pair of key pools built between adjacent switching nodes (QKX), and key synchronization can make the quantum keys of key pools in adjacent switching nodes completely consistent, and AP is a pair of key pools built between service nodes (QKS), and the keys in the APs are directly provided to the quantum keys used by the cryptographic applications (APP), that is, the quantum keys in the APs do not need to be exchanged, but are provided to the final keys used by the APPs;

[0058] Key synchronization is to securely transmit the quantum key from one network node (source node) to another remote network node (destination node), so that the keys between the two nodes are completely consistent. The NP of the source node is the sending key pool, and the NP of the destination node is the receiving key pool.

[0059] Assuming that the quantum secure communication network is divided into M layers in total, the NP key pool of the Nth layer depends on the key synchronization of the N-1th layer, such as Figure 1 As shown, between node A and node B, the QKX key synchronization of the Nth layer needs to be protected and transmitted through the QKX of the N-1th layer. Usually, the key is split into key shards and transmitted hop by hop to the destination node (node ​​B) using the NP key pool of the intermediate node.

[0060] The key pool synchronization process includes:

[0061] S1: To limit the size of the key data packet that can be transmitted on the network, a maximum transmission unit (MTU) is set. According to the size of the MTU, the key in the NP of the N-1th layer QKX is divided into several fragments;

[0062] S2: Node A queries the forwarding table (Forward), finds the next hop on the path to the destination node, protects the key shard with the key in the NP of the N-1th layer QKX, and transmits it to the next hop intermediate node. After receiving the key shard, the intermediate node decrypts it to obtain the plaintext key shard, protects it with the key in its own and the NP of the next hop node, and then continues to transmit it to the next hop, and so on, iteratively transmits until the destination node (that is, node B);

[0063] S3: After receiving the key shard, the N-1th layer QKX of the B node decrypts it to obtain the plaintext key shard. After confirming that the key shard is correctly transmitted, the key shard is stored in the key pool NP corresponding to the Nth layer QKX of the B node.

[0064] Furthermore, considering that key pools appear in pairs between network nodes, that is, each sending key pool must have a corresponding receiving key pool. The synchronization, transmission and distribution of keys between network nodes corresponding to the key pool constitute a quantum key network, while the key pool itself does not have a network interface function. In the actual network link, a specific routing protocol is required to determine the network path for key synchronization. Based on this, the concepts of Interface (IF) and Link (LK) are proposed in this example. Based on IF and LK, on ​​the one hand, key pools that appear in pairs can be constructed, and on the other hand, the hierarchical design of network structure construction and routing protocols can be realized.

[0065] IF is similar to the network interface of a router, but different from it in that IF is a virtual network interface. Its construction depends on the LK of the lower layer QKX. LK represents the virtual link association between remote (i.e. non-adjacent) network nodes. The synchronization process of the upper layer IF quantum key can be realized through LK. Based on IF and LK, the following can be used: Figure 2 Key synchronization is performed in Figure 2 In the Nth layer, node A and node B are adjacent nodes, and in the N-1th layer, node A and node B are remote nodes. The key synchronization process is as follows:

[0066] S1: When the number of keys in the NP key pool of the QKX at the Nth layer is insufficient (usually below a certain threshold), a key synchronization request is sent to the LK at the lower layer (i.e., the N-1th layer). The LK identifies the association between the two remote nodes A and B. Correspondingly, the IF marks the network interface and points to the next adjacent relay node. If we use the train itinerary as an analogy, the LK is the itinerary consisting of the departure station and the terminal station, such as "city 1-city N", and the IF is other nodes adjacent to the A node, which can be analogized to "city 3, city 4, city 5", etc.

[0067] S2: After receiving the key request from the Nth layer QKX, LK queries the path that meets the conditions in the Forward table and uses the path to identify the corresponding IF (that is, the next adjacent node). If we still use the train itinerary as an analogy, the network interface identified by IF at this time points to the first station passed when going to city N, which can be "city 3" or "city 4", depending on the specific network path planned by the routing protocol of the Route module during routing;

[0068] S3: The key is transmitted hop by hop to the destination node through the QKX relay node at the N-1th layer. The IF at the destination node decrypts the protected key fragments after receiving them, and then the Forward module determines which LK to hand them over to for processing.

[0069] S4: LK transmits the key to the IF of the upper layer (Nth layer) QKX, and IF stores the key in the corresponding NP key pool.

[0070] Because QKX can be iterated at multiple levels, and then the universal hierarchical structure of quantum secure communication network can be obtained. Figure 3 As shown, n layers of switching nodes (1≤n≤N) can be designed according to actual needs, the NP key between the n-th layer QKX is realized by key synchronization based on IF and LK between the n-1-th layer remote nodes, and the key synchronization of the AP key pool is realized by key synchronization between the N-th layer switching nodes QKX-N.

[0071] Based on this, a quantum secure communication network is provided in this example. Aiming at the actual needs of network operators, network service providers and user network construction, a three-layer quantum secure communication network exchange structure suitable for network infrastructure developers, network operators and user network construction is designed. Network infrastructure developers, network operators and users can respectively carry out network construction, network operation and user network construction at different network levels, thus realizing the loosely coupled hierarchical design of quantum secure communication network. The quantum secure communication network can dynamically increase or decrease the number of quantum network exchange levels according to actual needs, and the network exchange of the quantum secure communication network will not be affected, which has strong versatility and adaptability.

[0072] like Figure 4 As shown, the switching network of the quantum secure communication network is used to realize the networking and routing switching functions of the network. According to different networking technologies, the switching network of the quantum secure communication network can be divided into three layers including: QKX-I, QKX-II and QKX-III, wherein QKX-I and the links therebetween constitute the QKX-I switching network, QKX-II and the links therebetween constitute the QKX-II switching network, and QKX-III and the links therebetween constitute the QKX-III switching network. The QKX-III switching network is built on the basis of the QKX-II switching network, the QKX-II switching network is built on the basis of the QKX-I switching network, and the QKX-I switching network is built on the basis of the QKD (Quantum Key Distribution) system. Among them:

[0073] 1) QKX-I:

[0074] QKX-I is the first exchange layer built on QKD. It is an underlying exchange network formed by the infrastructure developers. QKX-I sets network nodes according to the actual needs of quantum key services. The types of network nodes in QKX-I include: exchange nodes and relay nodes. The number of links connected to the exchange node is ≥3, that is, the exchange node has 3 (including) or more Interfaces (IF, network interfaces for data exchange between adjacent network nodes); the number of links connected to the relay node is "one in and one out", that is, the relay node has only two Interfaces (IF).

[0075] like Figure 5 As shown in the figure, taking "City 1 - City 2 - City 3" as an example, a QKD relay is set up at the City 2 site to extend the quantum transmission distance. However, if the City 1 and City 3 sites have quantum key requirements, and the City 2 site does not have a quantum key requirement, then the transmission link that needs to be built in QKX-I is "City 1 - City 3", and the City 2 site is only used for quantum key transfer. The QKX-I link of "City 1 - City 3" is realized by relying on the QKD link "City 1 - City 2 - City 3". In other words, it is a "virtual link", which is equivalent to building a QKX-I link with direct QKD in "City 1 - City 3". Therefore, this virtual link is called Link (LK for short), and a VQI (Virtual QKDIdentifier, the number of virtual QKD) is assigned to LK.

[0076] Taking the "city 1 - city 10" segment as an example, route configuration, route distribution and route query can be performed as follows:

[0077] The QKX-I switching layer uses static routing, and the network manager manually establishes the route in advance. Regardless of whether the user terminal initiates a service, the route is always maintained and unchanged. That is, the route configuration is completed once by the network manager and distributed to each switching node and relay node until the route is no longer used and then released manually by the network manager.

[0078] like Figure 6 As shown in the figure, the network manager collects information, plans routes, and issues routes for the entire QKX-I network through the routing calculation center. First, the network manager analyzes the quantum key requirements of each network node and between nodes in advance, and collects information such as key production rate, key consumption rate, and key freshness; then, the routing calculation center calculates the optimal path for key routing according to the predetermined routing algorithm and provides a routing solution for the network manager. The network manager then uniformly plans the entire network routing of the QKX-I switching layer according to the actual situation; finally, the network manager distributes the planned QKX-I routing information to each network switching node and relay node in the form of a "transfer table".

[0079] The QKX-I node determines how to forward the message by querying the forwarding table. The structure of the forwarding table is shown in Table 1 below:

[0080] Table 1

[0081] IF-I VQI-I IF-O VQI-O

[0082] The forwarding table may include the following four items:

[0083] (1) IF_I: indicates the ID of the IF in the input direction (i.e., IN direction). For a message from LK, its IF_I is 0;

[0084] (2) VQI_I: represents the VQI (virtual quantum key distribution number) in the input direction (i.e., IN direction);

[0085] (3) IF_O: indicates the ID of the IF in the output direction (i.e., OUT direction). For messages from LK, its IF_I is 0;

[0086] (4) VQI_O: represents the VQI (virtual quantum key distribution number) of the output direction (ie, OUT direction).

[0087] Similar to virtual circuits, IF represents a virtual path in a virtual circuit, and VQI represents a virtual channel in a virtual circuit. Figure 7 As shown, the virtual path and virtual channel for data forwarding are determined by the pairs of (IF-I, VQI-I) and (IF-O, VQI-O) in the forwarding table, thereby completing data forwarding. After querying the forwarding table, (IF1, VQI1) can determine that the forwarding path and channel are (IF1', VQI1').

[0088] Among them, IF_O specifies the forwarding direction of the network interface, and VQI_O specifies which LK of the lower layer will be used for forwarding. If the network node is a relay node, the direction of IF_O is usually determined, and its corresponding forwarding table structure is relatively simple; if the network node is a switching node, the direction of IF-O can be multiple directions, and IF_O and VQI_O need to be determined through the forwarding table. Figure 8 As shown, city 1 is the switching node of "city 0-city 8" and "city 0-city 11". By querying (IF-I, VQI-I1) in the forwarding table, (IF-O1, VQI-O1) can be obtained, and by querying (IF-I, VQI-I2) can be obtained (IF-O2, VQI-O2). (IF-O1, VQI-O1) and (IF-O2, VQI-O2) determine that the city 1 node has a virtual circuit to city 8 and city 11 respectively. Corresponding to the QKD layer, VQI corresponds to different LKs (LK1, LK2).

[0089] 2) QKX-II:

[0090] QKX-II is the second-layer switching network of the quantum secure communication network, which is configured, operated and managed by operators. Through QKX-II, basic operational business management such as bandwidth leasing, bandwidth allocation and bandwidth release can be easily performed. QKX-II mainly connects different QKX-I networks (for example, QKX-I networks of different operators) based on the user's network intercommunication requirements for quantum key distribution.

[0091] QKX-II uses a hierarchical and district-based networking approach. Fig. 9 The figure shows a four-layer, nine-district network structure. Each ellipse in the figure is a district, and each district has only one network node and its connected links, such as Fig.10 The following is a diagram showing the hierarchical relationship of District.

[0092] like Fig.10 As shown, the QKX-II network node adopts an addressing method similar to that of a telephone number. The prefix of the sub-district address is the address of the parent district. In other words, the parent district to which the sub-district belongs can be known through the prefix of the sub-district address, similar to the administrative region to which the telephone number belongs through the area code of the telephone number. For example, the address of Distinct5 is "01083631122", and the corresponding prefix is ​​"0108363", so it can be known that its parent Distinct is Distinct5; similarly, the address of District3 is "0108363", and the corresponding prefix is ​​"010", so it can be known that its parent Distinct is Distinct1.

[0093] QKX-II uses a call method to establish a "virtual link" between the source node and the destination node. The source node and the destination node transmit information through this "virtual link". Fig.11 As shown in the figure, when S5 in District 5 needs to communicate with S6 in District 6, a "virtual link" will be established between S5 and S6 by establishing a call, namely: S5-S3-S1-S2-S4-S6. After that, all communications between S5 and S6 will be carried out using this "virtual link". The "virtual link" is maintained by a keep-alive mechanism, that is, S1 regularly initiates a call request to maintain the current "virtual link"; if the node on the "virtual link" does not receive the corresponding request message after the update time expires, the "virtual link" will be removed.

[0094] In QKX-II, any node establishes a "virtual link" with another node by means of a call request. During the call establishment process, a forwarding table is formed for each node in the formed virtual link path. When a message is subsequently transmitted, the node decides how to forward the message based on the query forwarding table. The forwarding table structure of QKX-II can be shown in Table 2 below:

[0095] Table 2

[0096] IF-I VQI-I IF-O VQI-O TTL

[0097] Among them, the QKX-II forwarding table structure may include:

[0098] (1) IF_I: indicates the IF number in the IN direction, i.e., the IF ID. For messages from LK, IF_I is 0.

[0099] (2) VQI_I: indicates the VQI in the IN direction;

[0100] (3) IF_O: indicates the IF number in the IN direction, i.e., the IF ID. For messages from LK, IF_I is 0.

[0101] (4) VQI_O: indicates the VQI in the OUT direction;

[0102] (5)TTL: indicates the lifetime of this record.

[0103] Assume that the source node is S1, the address is SID, the destination node is Sm, the address is DID; the address of the adjacent node stored in S1 is recorded as AID, and its set is recorded as {AIDs}. The process of establishing a virtual link from S1 to Sm through calling may include the following steps:

[0104] Step 1: Node S1 configures the LK of "S1-Sm", establishes the corresponding VQI (denoted as VQIa), and forms a call request message;

[0105] Step 2: Node S1 takes the first AID1 from {AIDs} and matches it with DID to find (i.e., the DID string contains the AID string) and the matching length between AID1 and DID is L1 (i.e., the first L1 characters of AID1 and DID are the same);

[0106] Step 3: Node S1 takes out the second AID2 from {AIDs} and matches it with DID, and obtains the matching length L2 between AID2 and DID according to step 1. And so on, until every AID in {AIDs} is matched with DID, and the matching length set {Ls} is obtained;

[0107] Step 4: Assuming that the element with the largest value in {Ls} is Lb, the AID corresponding to Lb is AIDb, the IF corresponding to AIDb is IFb, and the adjacent node corresponding to AIDb is S2, then S1 sends the formed call request message to node S2 via IFb. At the same time, node S1 updates the forwarding table, and the update process is as follows:

[0108] ① Node S1 creates a new VQI (referred to as VQIb) in IFb (referred to as IFb_NO, with each creation being incremental and unoccupied);

[0109] ② Node S1 adds two records to the forwarding table. The specific content of one record is: IF-I is 0, VQI-I is VQIa, IF-O is IFb_NO, and VQI-O is VQIb. The specific content of the other record is: IF-I is IFb_NO, VQI-I is VQIb, IF-O is 0, and VQI-O is VQIa.

[0110] Step 5: After receiving the call request message, node S2 repeats steps 2 to 4 to find the adjacent node S3 and the corresponding IF (denoted as IFb), sends the call request message to node S3, and updates the forwarding table. The update process is as follows:

[0111] ① If the IF of the call request message received by node S2 is IFa (numbered as IFa_NO), a new VQI is created in IFa (denoted as VQIa, VQIa=VQIb of S1, i.e. VQI in the call request message), and at the same time, a new VQI is created in IFb (numbered as IFb_NO) (denoted as VQIb, each new creation is incremental and unoccupied).

[0112] ②S2 adds two records to the forwarding table. The specific content of one record is: IF-I is IFa_NO, VQI-I is VQIa, IF-O is IFb_NO, and VQI-O is VQIb. The specific content of the other record is: IF-I is IFb_NO, VQI-I is VQIb, IF-O is IFa_NO, and VQI-O is VQIa.

[0113] Step 6: This process is repeated until the call request message reaches the node Sm, and the node Sm updates the forwarding table. The process of the node Sm updating the forwarding table is as follows:

[0114] ① After receiving the call request message, node Sm finds that the DID is the same as its own ID, so it extracts the SID and VQI (referred to as VQIa) in the call request message and establishes the corresponding LK and VQI (referred to as VQIb);

[0115] ② If the IF of the call request message received by the node Sm is IFa (numbered as IFa_NO), a new VQI is created in IFa with the value of VQIa;

[0116] ③ Node Sm adds two records to the forwarding table. The specific content of one record is: IF-I is IFa_NO, VQI-I is VQIa, IF-O is 0, VQI-O is VQIb, and the specific content of the other record is: IF-I is 0, VQI-I is VQIb, IF-O is IFa_NO, and VQI-O is VQIa.

[0117] At this point, the call establishment process between node S1 and node Sm is completed, and the "virtual link" from S1 to Sm is established (temporary).

[0118] Step 7: Node Sm responds to the call request message, and the response message is transmitted to S1 along the reverse path of S1-Sm. When the response message reaches each intermediate node, the corresponding "virtual link" is formally established.

[0119] For the maintenance and removal of the virtual link established above, the maintenance of the "virtual link" adopts a keep-alive mechanism, that is, the source node maintains the current "virtual link" to the destination node (the link between node S1 and node Sm) through a call request. If the node on the "virtual link" does not receive the corresponding request message after the update time expires, that is, when the TTL in the forwarding table becomes 0, the "virtual link" is removed. When the "virtual link" is removed, the corresponding LK of the source node and the destination node will be deleted, and the timing for the source node to initiate a call is when the TTL of the corresponding record in its forwarding table is 0, and each call request establishes a new LK and its VQI.

[0120] 3) QKX-III:

[0121] QKX-III is the third-layer exchange network of the quantum secure communication network. It is composed of different user networks. Users can build their own private networks based on QKX-III to achieve network-wide quantum key exchange. QKX-III adopts a hierarchical and area-based networking approach. Fig.12 The figure shows a schematic diagram of QKX-III network. The QKX-III network is a four-layer, 16-area network structure. Each router and each ellipse in the figure is an area. Fig.13 The figure shows the hierarchical relationship diagram of Area.

[0122] LSA (Link State Advertisement) is a link state advertisement in a packet switching network. The structure of the Link State Database (LSDB) of LSA is shown in Table 3 below. A link consists of two network nodes, set as QKX-III-A and QKX-III-B, and their corresponding IP addresses and network masks are set as AID, BID, ASM, BSM, respectively, and the parent mask is PM. In order to more reasonably optimize network routing, the key residual parameter is added to the LSDB to participate in routing selection, that is, when multiple paths exist at the same time, the path with a higher key residual is preferred.

[0123] Table 3

[0124] AID BID ASM BSM Parent Mask PM Key remaining amount

[0125] QKX-III network nodes are addressed according to the IP address of the IPv4 protocol family, for example: a certain Class C private IP address: "192.168.1.3". After the user configures the IP address and mask of the network node, the IF generates the corresponding LSA. The ID (i.e., IP address), SML, and PM of QKX-III can be obtained through network settings, and the IF can obtain the key production rate by obtaining each link of the lower layer (QKX-II), which is recorded as KR; finally, the IF combines (AID, ASM, APM), (BID, BSM, BPM), and KR into an LSA, which is recorded as LSA = (AID, BID, ASM, BSM, PM, KR).

[0126] For QKX-III network nodes, they need to flood the LSAs they know to the entire network, so that each network node can expand the LSDB and understand the topology of the entire network. The specific process may include the following steps:

[0127] Step 1: For the LSA generated by the QKX-III network node itself, extract the PM from the LSA. If the PM of the LSA is less than or equal to the PM of the IF, the LSA will be transmitted to the peer IF through this IF.

[0128] Step 2: For the LSA received from the IF (denoted as IF0), the AID and PM are taken from the LSA. If the AID is the same as its own IP address, the LSA is discarded. If the PM of the LSA ≤ the PM of the IF and the IF ≠ IF0, the LSA will be transmitted to the peer IF through this IF.

[0129] QKX-III network nodes collect the LSAs they generate and the LSAs they receive to form an LSDB. LSDB stores LSAs by PM classification, that is, LSAs with the same PM are treated as a data set. The router forms a directed graph (network topology graph) based on the LSAs collected in each data class. The points in the graph are Areas (including independent domains), and the edges are links (LSAs) between Areas. It can be seen that QKX-III network nodes will form a directed graph for each level of the network, such as Fig.14 As shown, for Fig.12 In the QKX-III network, R1 stores three graphs in its LSDB. Fig.14 This is the network topology diagram formed by R1's LSDB.

[0130] Assuming that the source node of QKX-III is R1, the IP address is SID, the destination node is Rm, the IP address is DID, the query of the message routing path may include the following steps:

[0131] Step 1: Query the smallest area (Arean) where the DID is located in the LSDB:

[0132] ① Query the domain where the DID is located: Assuming that the QKX-III node corresponding to the SID is R1, R1 first queries the LSA in the local LSDB, using "whether DID&BSM is equal to BID&BSM" as the query condition. If the corresponding LSA is not found, it is determined that the destination is unreachable.

[0133] ② Select the smallest domain in the query result set of ①: If it can be found and if the query result contains multiple LSAs, select the LSA with the largest ASM, that is, select the "Area containing the DID and the smallest level", and calculate:

[0134] The Areaid of this domain (set to Areaan) is Areaan = BID & BSM;

[0135] The AreaID of the direct parent domain of this domain (set as Pn) yields Pn=BID&PM.

[0136] Step 2: Query the sibling domain Areai at the same level as Arean in the LSDB:

[0137] In the LSDB, query the Area that contains R1 and is in the same direct parent domain as Areaan (that is, the Area that contains R1 and is the sibling domain of Areaan). The query method is as follows:

[0138] ① Find all the next-level subdomains of Pn: query the LSA that matches AID&PM==Pn in the LSDB;

[0139] ②Query the subdomain containing SID: Determine which subdomain contains R1, that is, search for LSA that meets SID&ASM==AID&ASM in the above result set, and record the obtained domain ID as Areai;

[0140] Step 3: Calculate the shortest path from Areai to Areaan:

[0141] According to the shortest path algorithm (Dijkstra algorithm), query the shortest path from Areai to Areaan in LSDB:

[0142] ①Build a graph from Areai to Areaan based on LSDB:

[0143] i) Search all LSAs with AID&ASM==Areai in LSDB. At this time, BID&BSM (set as Areai') is the first hop. According to graph theory, Areai and Areai' are two nodes, and the line connecting them is an edge in graph theory.

[0144] ii) Similarly, a directed graph of the level where Areai is located can be constructed based on LSDB. Based on this graph, the shortest path from Areai to Arean can be found based on the Dijkstra algorithm.

[0145] ② Assume that the first hop finally determined is denoted as Areaj.

[0146] Step 4: Find the border QKX-III node connecting from Areai to Arean:

[0147] ① Search the LSDB for LSAs that match AID&ASM==Areai and BID&BSM==Areaj;

[0148] ② In the end, there may be multiple LSAs that meet the conditions. In this case, the LSA with a larger KR is selected, and the AID of the LSA is found. This AID is recorded as the new DID, recorded as DID'.

[0149] Step 5: Determine whether the SID is equal to this boundary QKX-III node (DID'):

[0150] ① If SID is equal to DID', then the QKX-III node corresponding to the BID of the LSA in step ② in step 4 is the first hop (denoted as R2), and the process jumps to step 6.

[0151] ② If SID is not equal to DID', then for the DID', repeat the above steps 1 to 5 until a DID' is obtained such that SID == DID'.

[0152] Furthermore, when it is determined that SID is equal to DID', (DID, BIDR2) is put into R1's forwarding table (the forwarding table contains two pieces of information: the destination address and the next hop address, BIDR2 is the IP address of R2, and when sending information later, only the forwarding table needs to be queried).

[0153] Step 6: Routing the message to the first hop QKX-III node R2;

[0154] Step 7: Repeat the above steps: let SID = BIDR2, DID is still the ID of Rm, repeat steps 1 to 6, find the second hop QKX-III node R3, and so on, until reaching Rm.

[0155] In one embodiment, a switching network of a quantum secure communication network is provided in this example, which may include: a first switching layer (corresponding to the above-mentioned QKX-I), a second switching layer (corresponding to the above-mentioned QKX-II) and a third switching layer (corresponding to the above-mentioned QKX-III), wherein:

[0156] 1) The first exchange layer is constructed based on the quantum key distribution system. The first exchange layer is an underlying exchange network formed by the network infrastructure developer through infrastructure construction. The first exchange layer may include multiple network nodes. The types of multiple network nodes may include: exchange nodes and relay nodes. The exchange node is a node with a number of connected links greater than or equal to 3, and the relay node is a node with a number of connected links of one input and one output.

[0157] 2) The second exchange layer is constructed by interconnecting multiple networks of the first exchange layer based on the user's network intercommunication requirements for quantum key distribution. The second exchange layer is networked in a layered and regional manner. The second exchange layer is configured, operated and managed by the operator for bandwidth leasing, bandwidth allocation and bandwidth release;

[0158] 3) The third exchange layer is constructed based on the interconnection of multiple second exchange layer networks. The third exchange layer is networked in a layered and domain-based manner and is composed of different user networks. Users build private networks based on the third exchange layer to achieve network-wide quantum key exchange.

[0159] For the first switching layer, the first switching layer is pre-configured by the routing setting center, and the configured routes are distributed to the switching nodes and relay nodes until the routes are no longer used and then released by the network management node, wherein the pre-configured routes by the routing setting center may include:

[0160] S1: The routing setting center obtains the quantum key requirements of each network node in the first switching layer and between each node;

[0161] S2: The routing setting center determines the key production rate, key consumption rate and key freshness according to the quantum key requirements of each network node and between nodes in the first switching layer;

[0162] S3: The routing setting center determines the network-wide routing of the first switching layer by taking the optimal path of key routing as the goal through the key production rate, key consumption rate and key freshness;

[0163] S4: The routing setting center distributes the determined network-wide route of the first switching network to each switching node and relay node in the first switching network in the form of a first forwarding table, wherein the first forwarding table is used for network nodes in the first switching network to query when there is a need to send a message to determine the path for message forwarding.

[0164] The first forwarding table includes the following fields: the number of the virtual path in the virtual circuit in the input direction (corresponding to the above IF_I), the number of the virtual channel in the virtual circuit in the input direction (corresponding to the above VQI_I), the number of the virtual path in the virtual circuit in the output direction (corresponding to the above IF_O), and the number of the virtual channel in the virtual circuit in the output direction (corresponding to the above VQI_O);

[0165] Among them, the number of the virtual path in the virtual circuit in the output direction is used to characterize the forwarding direction of the network interface, and the number of the virtual channel in the virtual circuit in the output direction is used to indicate the link association between the lower-layer network nodes corresponding to the forwarding; when the network node is a relay node, the forwarding direction of the network interface is unique, and when the network node is a switching node, the forwarding direction of the network interface is multiple directions.

[0166] The network nodes in the above-mentioned second switching layer can be networked in a hierarchical and regional manner of sub-areas and parent areas, wherein the prefix of the address of the sub-area is the address of the parent area; a virtual link is established between the source node and the destination node with communication needs in the second switching layer, and the source node and the destination node interact through the virtual link. A virtual link includes one or more intermediate nodes in addition to the source node and the destination node, and the source node periodically initiates call requests to maintain the validity of the virtual link.

[0167] The first network node in the above-mentioned second switching layer can establish a virtual link with the second network node by means of a call request, and form a second forwarding table for each node in the virtual link, wherein the second forwarding table may include the following fields: the number of the virtual path in the virtual circuit in the input direction (corresponding to the above-mentioned IF_I), the number of the virtual channel in the virtual circuit in the input direction (corresponding to the above-mentioned VQI_I), the number of the virtual path in the virtual circuit in the output direction (corresponding to the above-mentioned IF_O), the number of the virtual channel in the virtual circuit in the output direction (corresponding to the above-mentioned VQI_O), and the lifetime of the forwarding table record (corresponding to the above-mentioned TTL).

[0168] The network nodes of the third switching layer mentioned above are addressed according to the IP addresses of the IPv4 protocol family. A link is composed of a first network node and a second network node. A link state notification is generated by the IP address of the first network node, the network mask of the first network node, the IP address of the second network node, the network mask of the second network node, the parent mask and the key production rate; each network node in the third switching layer floods its own link state notification to the entire network so that each network node expands the link state database; wherein the link state database also records a key remaining amount parameter, and the key remaining amount parameter is used for route selection. When multiple paths exist at the same time, the path with a higher key remaining amount is preferentially selected.

[0169] Fig.15 It is a method flow chart of an embodiment of the query method of the routing path provided by the present application. Although the present application provides the method operation steps or device structure as shown in the following embodiments or drawings, more or fewer operation steps or module units may be included in the method or device based on routine or no creative labor. In the steps or structures where there is no necessary causal relationship logically, the execution order of these steps or the module structure of the device is not limited to the execution order or module structure described in the embodiments of the present application and shown in the drawings. When the method or module structure is applied to an actual device or terminal product, it can be connected according to the method or module structure shown in the embodiment or drawings for sequential execution or parallel execution (for example, a parallel processor or a multi-threaded processing environment, or even a distributed processing environment).

[0170] Specifically, Fig.15 As shown, the above-mentioned query method of the routing path, applied to the third switching layer of the quantum secure communication network, may include the following steps:

[0171] Step 1501: Acquire a message to be transmitted, wherein the message to be transmitted carries an IP address of a source node and an IP address of a destination node;

[0172] Step 1502: query the link state database for the smallest domain where the IP address of the destination node is located, and use the smallest domain where the IP address of the destination node is located obtained from the query as the first target domain;

[0173] Step 1503: Query the link state database for a brother domain at the same level as the first target domain where the IP address of the source node is located, and use it as the second target domain;

[0174] Step 1504: Calculate the shortest path from the second target domain to the first target domain, and find the IP address of the boundary node from the second target domain to the first target domain;

[0175] Step 1505: Determine whether the IP address of the source node is equal to the IP address of the border node;

[0176] Step 1506: When the IP address of the source node is equal to the IP address of the border node, use the border node as the first hop node;

[0177] Step 1507: Routing the message to be transmitted to the first hop node.

[0178] In one embodiment, after routing the message to be transmitted to the first hop node, the following steps may be repeated until the message to be transmitted is routed to the destination node:

[0179] S1: Determine whether the current boundary node is the destination node;

[0180] S2: When the current boundary node is not the destination node, use the boundary node as the current source node;

[0181] S3: querying the link state database for the smallest domain where the IP address of the destination node is located, and using the smallest domain where the IP address of the destination node is located obtained from the query as the third target domain;

[0182] S4: Query the link state database for a brother domain at the same level as the third target domain where the IP address of the current source node is located, and use it as the fourth target domain;

[0183] S5: Calculate the shortest path from the fourth target domain to the third target domain, and find the IP address of the boundary node from the fourth target domain to the third target domain;

[0184] S6: Determine whether the IP address of the current source node is equal to the IP address of the boundary node from the fourth target domain to the third target domain;

[0185] S7: when the IP address of the current source node is equal to the IP address of the boundary node from the fourth target domain to the third target domain, use the boundary node from the fourth target domain to the third target domain as the next hop node;

[0186] S8: Routing the message to be transmitted to the next hop node.

[0187] In one embodiment, after determining whether the IP address of the source node is equal to the IP address of the boundary node, it also includes: when it is determined that the IP address of the source node is not equal to the IP address of the boundary node, using the IP address of the boundary node as the address of the current destination node, and repeating the following steps until the IP address of the boundary node equal to the IP address of the source node is found: querying the link state database for the minimum domain where the IP address of the current destination node is located, and using the minimum domain where the IP address of the current destination node obtained by the query is located as the fifth target domain; querying the link state database for a sibling domain of the same level as the fifth target domain where the IP address of the source node is located as the sixth target domain; calculating the shortest path from the sixth target domain to the fifth target domain, and searching for the IP address of the boundary node from the sixth target domain to the fifth target domain; determining whether the IP address of the source node is equal to the IP address of the boundary node from the sixth target domain to the fifth target domain.

[0188] In one embodiment, querying the minimum domain where the IP address of the destination node is located in the link state database may include: determining that the network node of the third switching layer of the switching network of the quantum secure communication network corresponding to the IP address of the destination node is the initial node; the initial node searches the local link state database for a link state announcement that meets the preset query condition as a query result set, wherein the preset query condition is: the result of the AND operation of the IP address of the destination node and the BSM is equal to the result of the AND operation of the BID and the BSM; when the query result set does not include the link state announcement, it is determined that the destination node is unreachable; when the query result set includes multiple link state announcements, the domain corresponding to the link state announcement with the largest number of network addresses in the ASM is selected as the minimum domain where the IP address of the destination node is located; wherein a link is composed of a first network node and a second network node, and a link state announcement includes: the IP address of the first network node, the network mask of the first network node, the IP address of the second network node, and the network mask of the second network node, wherein BID is the IP address of the second network node, ASM is the network mask of the first network node, and BSM is the network mask of the second network node.

[0189] In one embodiment, querying the link state database for a sibling domain at the same level as the first target domain where the IP address of the source node is located includes: determining the parent domain of the first target domain; searching for all next-level subdomains of the parent domain as a subdomain set; determining whether each subdomain in the subdomain set contains the source node; and treating the subdomain in the subdomain set that contains the source node as a sibling domain at the same level as the first target domain.

[0190] In one embodiment, calculating the shortest path from the second target domain to the first target domain may include: searching the link state database for all link state advertisements that meet a preset condition, wherein the preset condition is: the result of an AND operation of AID and ASM is equal to the second target domain; determining the domain corresponding to each link state advertisement in the link state advertisements that meet the preset condition as an intermediate domain; connecting the second target domain and the intermediate domain as nodes to form edges to form a directed graph at the level of the second target domain; based on the directed graph, finding the shortest path from the second target domain to the first target domain based on a shortest path algorithm; wherein a link is composed of a first network node and a second network node, and a link state advertisement includes: an IP address of the first network node, a network mask of the first network node, an IP address of the second network node, and a network mask of the second network node, wherein AID is the IP address of the first network node and ASM is the network mask of the first network node.

[0191] For example, assuming that the source node of QKX-III is R1, the IP address is SID, the destination node is Rm, the IP address is DID, the query of the routing path may include the following steps:

[0192] Step 1: Query the smallest area (Arean) where the DID is located in the LSDB:

[0193] ① Query the domain where the DID is located: Assuming that the QKX-III node corresponding to the SID is R1, R1 first queries the LSA in the local LSDB, using "whether DID&BSM is equal to BID&BSM" as the query condition. If the corresponding LSA is not found, it is determined that the destination is unreachable.

[0194] ② Select the smallest domain in the query result set of ①: If it can be found and if the query result contains multiple LSAs, select the LSA with the largest ASM, that is, select the "Area containing the DID and the smallest level", and calculate:

[0195] The Areaid of this domain (set to Areaan) is Areaan = BID & BSM;

[0196] The AreaID of the direct parent domain of this domain (set as Pn) yields Pn=BID&PM.

[0197] Step 2: Query the sibling domain Areai at the same level as Arean in the LSDB:

[0198] In the LSDB, query the Area that contains R1 and is in the same direct parent domain as Areaan (that is, the Area that contains R1 and is the sibling domain of Areaan). The query method is as follows:

[0199] ① Find all the next-level subdomains of Pn: query the LSA that matches AID&PM==Pn in the LSDB;

[0200] ②Query the subdomain containing SID: Determine which subdomain contains R1, that is, search for LSA that meets SID&ASM==AID&ASM in the above result set, and record the obtained domain ID as Areai;

[0201] Step 3: Calculate the shortest path from Areai to Areaan:

[0202] According to the shortest path algorithm (Dijkstra algorithm), query the shortest path from Areai to Areaan in LSDB:

[0203] ①Build a graph from Areai to Areaan based on LSDB:

[0204] i) Search all LSAs with AID&ASM==Areai in LSDB. At this time, BID&BSM (set as Areai') is the first hop. According to graph theory, Areai and Areai' are two nodes, and the line connecting them is an edge in graph theory.

[0205] ii) Similarly, a directed graph of the level where Areai is located can be constructed based on LSDB. Based on this graph, the shortest path from Areai to Arean can be found based on the Dijkstra algorithm.

[0206] ② Assume that the first hop finally determined is denoted as Areaj.

[0207] Step 4: Find the border QKX-III node connecting from Areai to Arean:

[0208] ① Search the LSDB for LSAs that match AID&ASM==Areai and BID&BSM==Areaj;

[0209] ② In the end, there may be multiple LSAs that meet the conditions. In this case, the LSA with a larger KR is selected, and the AID of the LSA is found. This AID is recorded as the new DID, recorded as DID'.

[0210] Step 5: Determine whether the SID is equal to this boundary QKX-III node (DID'):

[0211] ①If SID is equal to DID', then the QKX-III node corresponding to the BID of the LSA in step ② in step 4 is the first hop (denoted as R2), and the process jumps to step 6.

[0212] ② If SID is not equal to DID', then for the DID', repeat the above steps 1 to 5 until a DID' is obtained such that SID == DID'.

[0213] Furthermore, when it is determined that SID is equal to DID', (DID, BIDR2) is put into R1's forwarding table (the forwarding table contains two pieces of information: the destination address and the next hop address, BIDR2 is the IP address of R2, and when sending information later, only the forwarding table needs to be queried).

[0214] Step 6: Routing the message to the first hop QKX-III node R2;

[0215] Step 7: Repeat the above steps: let SID = BIDR2, DID is still the ID of Rm, repeat steps 1 to 6, find the second hop QKX-III node R3, and so on, until reaching Rm.

[0216] The method embodiments provided in the above embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on an electronic device as an example, Fig.16 This is a hardware structure diagram of an electronic device for a routing path query method provided by the present application. Fig.16 As shown, the electronic device 10 may include one or more (only one is shown in the figure) processors 02 (the processor 02 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 04 for storing data, and a transmission module 06 for communication functions. It can be understood by those skilled in the art that Fig.16 The structure shown is only for illustration and does not limit the structure of the above electronic device. Fig.16 More or fewer components as shown, or with Fig.16 Different configurations are shown.

[0217] The memory 04 can be used to store software programs and modules of application software, such as program instructions / modules corresponding to the query method of the routing path in the embodiment of the present application. The processor 02 executes various functional applications and data processing by running the software programs and modules stored in the memory 04, that is, the query method of the routing path of the above-mentioned application is realized. The memory 04 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 04 may further include a memory remotely arranged relative to the processor 02, and these remote memories may be connected to the electronic device 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0218] The transmission module 06 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the electronic device 10. In one example, the transmission module 06 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission module 06 can be transmitted by optical fiber.

[0219] At the software level, the query device of the routing path is applied to the third switching layer of the quantum secure communication network, which can be Fig.17 As shown, including:

[0220] The acquisition module 1701 is used to acquire a message to be transmitted, wherein the message to be transmitted carries an IP address of a source node and an IP address of a destination node;

[0221] A first query module 1702 is used to query the link state database for the smallest domain where the IP address of the destination node is located, and use the smallest domain where the IP address of the destination node is located obtained by query as the first target domain;

[0222] A second query module 1703 is used to query the link state database for a brother domain at the same level as the first target domain where the IP address of the source node is located, as the second target domain;

[0223] A search module 1704 is configured to calculate the shortest path from the second target domain to the first target domain, and to search for an IP address of a boundary node from the second target domain to the first target domain;

[0224] A determination module 1705, configured to determine whether the IP address of the source node is equal to the IP address of the boundary node;

[0225] A generating module 1706, configured to use the border node as a first hop node when the IP address of the source node is equal to the IP address of the border node;

[0226] The routing module 1707 is used to route the message to be transmitted to the first hop node.

[0227] In one embodiment, after routing the message to be transmitted to the first hop node, the query device for the routing path repeats the following steps until the message to be transmitted is routed to the destination node: determining whether the current boundary node is the destination node; if the current boundary node is not the destination node, taking the boundary node as the current source node; querying the link state database for the minimum domain where the IP address of the destination node is located, and taking the minimum domain where the IP address of the destination node is located obtained by the query as the third target domain; querying the link state database for the brother domain of the same level as the third target domain where the IP address of the current source node is located, as the fourth target domain; calculating the shortest path from the fourth target domain to the third target domain, and finding the IP address of the boundary node from the fourth target domain to the third target domain; determining whether the IP address of the current source node is equal to the IP address of the boundary node from the fourth target domain to the third target domain; if the IP address of the current source node is equal to the IP address of the boundary node from the fourth target domain to the third target domain, taking the boundary node from the fourth target domain to the third target domain as the next hop node; routing the message to be transmitted to the next hop node.

[0228] In one embodiment, after determining whether the IP address of the source node is equal to the IP address of the boundary node, the query device for the routing path uses the IP address of the boundary node as the address of the current destination node if it is determined that the IP address of the source node is not equal to the IP address of the boundary node, and repeatedly performs the following steps until the IP address of the boundary node equal to the IP address of the source node is found: querying the link state database for the minimum domain where the IP address of the current destination node is located, and using the minimum domain where the IP address of the current destination node is located as the fifth target domain; querying the link state database for a sibling domain of the same level as the fifth target domain where the IP address of the source node is located as the sixth target domain; calculating the shortest path from the sixth target domain to the fifth target domain, and searching for the IP address of the boundary node from the sixth target domain to the fifth target domain; determining whether the IP address of the source node is equal to the IP address of the boundary node from the sixth target domain to the fifth target domain.

[0229] In one embodiment, the first query module 1702 is specifically used to determine that the network node of the third switching layer of the switching network of the quantum secure communication network corresponding to the IP address of the destination node is the initial node; the initial node searches the local link state database for a link state announcement that meets the preset query condition as a query result set, wherein the preset query condition is: the AND operation result of the IP address of the destination node and the BSM is equal to the AND operation result of the BID and the BSM; when the query result set does not include the link state announcement, it is determined that the destination node is unreachable; when the query result set includes multiple link state announcements, the domain corresponding to the link state announcement with the largest number of network addresses in the ASM is selected as the minimum domain where the IP address of the destination node is located; wherein a link is composed of a first network node and a second network node, and a link state announcement includes: the IP address of the first network node, the network mask of the first network node, the IP address of the second network node, and the network mask of the second network node, wherein BID is the IP address of the second network node, ASM is the network mask of the first network node, and BSM is the network mask of the second network node.

[0230] In one embodiment, the second query module 1703 can be specifically used to determine the parent domain of the first target domain; search for all next-level subdomains of the parent domain as a subdomain set; determine whether each subdomain in the subdomain set contains a source node; and treat the subdomain in the subdomain set that contains the source node as a sibling domain of the same level as the first target domain.

[0231] In one embodiment, calculating the shortest path from the second target domain to the first target domain may include: searching the link state database for all link state advertisements that meet a preset condition, wherein the preset condition is: the result of an AND operation of AID and ASM is equal to the second target domain; determining the domain corresponding to each link state advertisement in the link state advertisements that meet the preset condition as an intermediate domain; connecting the second target domain and the intermediate domain as nodes to form edges to form a directed graph at the level of the second target domain; based on the directed graph, finding the shortest path from the second target domain to the first target domain based on a shortest path algorithm; wherein a link is composed of a first network node and a second network node, and a link state advertisement includes: an IP address of the first network node, a network mask of the first network node, an IP address of the second network node, and a network mask of the second network node, wherein AID is the IP address of the first network node and ASM is the network mask of the first network node.

[0232] The embodiment of the present application also provides a specific implementation of an electronic device capable of implementing all the steps in the query method for the routing path in the above embodiment, and the electronic device specifically includes the following contents: a processor, a memory, a communication interface, and a bus; wherein the processor, the memory, and the communication interface communicate with each other through the bus; the processor is used to call a computer program in the memory, and the processor implements all the steps in the query method for the routing path in the above embodiment when executing the computer program. The embodiment of the present application also provides a computer-readable storage medium capable of implementing all the steps in the query method for the routing path in the above embodiment, and the computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, it implements all the steps of the query method for the routing path in the above embodiment. For example, when the processor executes the computer program, it implements the following steps:

[0233] Step 1: Obtain a message to be transmitted, wherein the message to be transmitted carries an IP address of a source node and an IP address of a destination node;

[0234] Step 2: query the link state database for the smallest domain where the IP address of the destination node is located, and use the smallest domain where the IP address of the destination node is located obtained from the query as the first target domain;

[0235] Step 3: Query the link state database for a brother domain at the same level as the first target domain where the IP address of the source node is located, and use it as the second target domain;

[0236] Step 4: Calculate the shortest path from the second target domain to the first target domain, and find the IP address of the boundary node from the second target domain to the first target domain;

[0237] Step 5: Determine whether the IP address of the source node is equal to the IP address of the border node;

[0238] Step 6: When the IP address of the source node is equal to the IP address of the border node, use the border node as the first hop node;

[0239] Step 7: Routing the message to be transmitted to the first hop node.

[0240] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the hardware + program embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0241] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0242] Although the present application provides method operation steps as described in the embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-creative labor. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the actual device or client product is executed, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel (for example, in a parallel processor or multi-threaded processing environment).

[0243] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0244] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. In the description of this specification, the description of the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of this specification. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, in the absence of contradiction, a person skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0245] The above is only an example of the embodiment of the present specification and is not intended to limit the embodiment of the present specification. For those skilled in the art, the embodiment of the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiment of the present specification shall be included in the scope of the claims of the embodiment of the present specification.

Claims

1. A method for querying a routing path, characterized in that: The third switching layer applied to quantum secure communication network includes: Acquire a message to be transmitted, wherein the message to be transmitted carries an IP address of a source node and an IP address of a destination node; Querying the minimum domain where the IP address of the destination node is located in the link state database, and using the minimum domain where the IP address of the destination node is located obtained from the query as the first target domain; Querying a link state database for a sibling domain at the same level as the first target domain where the IP address of the source node is located, as the second target domain; Calculate the shortest path from the second target domain to the first target domain, and find the IP address of the boundary node from the second target domain to the second target domain of the first target domain; Determining whether the IP address of the source node is equal to the IP address of the border node; When the IP address of the source node is equal to the IP address of the border node, the border node is used as the first hop node; The message to be transmitted is routed to the first hop node.

2. The method according to claim 1, characterized in that: After routing the message to be transmitted to the first hop node, the method further includes: Repeat the following steps until the message to be transmitted is routed to the destination node: Determine whether the current boundary node is the destination node; When the current boundary node is not a destination node, taking the boundary node as a current source node; Querying the minimum domain where the IP address of the destination node is located in the link state database, and using the minimum domain where the IP address of the destination node is located obtained from the query as the third target domain; Querying the link state database for a brother domain at the same level as the third target domain where the IP address of the current source node is located, as the fourth target domain; Calculating the shortest path from the fourth target domain to the third target domain, and finding the IP address of the boundary node from the fourth target domain to the third target domain; Determine whether the IP address of the current source node is equal to the IP address of the boundary node from the fourth target domain to the third target domain; When the IP address of the current source node is equal to the IP address of the boundary node from the fourth target domain to the third target domain, the boundary node from the fourth target domain to the third target domain is used as the next hop node; The message to be transmitted is routed to the next hop node.

3. The method according to claim 1, characterized in that After determining whether the IP address of the source node is equal to the IP address of the border node, the method further includes: When it is determined that the IP address of the source node is not equal to the IP address of the border node, the IP address of the border node is used as the address of the current destination node, and the following steps are repeatedly performed until the IP address of the border node equal to the IP address of the source node is found: Querying the link state database for the smallest domain where the IP address of the current destination node is located, and using the smallest domain where the IP address of the current destination node is located obtained from the query as the fifth target domain; Querying a link state database for a sibling domain at the same level as the fifth target domain where the IP address of the source node is located, as the sixth target domain; Calculating the shortest path from the sixth target domain to the fifth target domain, and finding the IP address of the boundary node from the sixth target domain to the fifth target domain; It is determined whether the IP address of the source node is equal to the IP address of the boundary node from the sixth target domain to the fifth target domain.

4. The method according to claim 1, characterized in that: Querying the minimum domain where the IP address of the destination node is located in the link state database includes: Determine a network node of a third switching layer of a switching network of a quantum secure communication network corresponding to the IP address of the destination node as an initial node; The initial node searches the local link state database for a link state advertisement that meets a preset query condition as a query result set, wherein the preset query condition is: the AND operation result of the IP address of the destination node and the BSM is equal to the AND operation result of the BID and the BSM; In a case where the query result set does not include a link state advertisement, determining that the destination node is unreachable; In the case where the query result set includes multiple link state advertisements, selecting the domain corresponding to the link state advertisement with the largest number of network addresses in the ASM as the minimum domain where the IP address of the destination node is located; Among them, a link consists of a first network node and a second network node, and a link state announcement includes: the IP address of the first network node, the network mask of the first network node, the IP address of the second network node, and the network mask of the second network node, wherein BID is the IP address of the second network node, ASM is the network mask of the first network node, and BSM is the network mask of the second network node.

5. The method according to claim 1, characterized in that Querying a link state database for a sibling domain at the same level as the first target domain where the IP address of the source node is located, including: determining a parent domain of the first target domain; Find all the next-level subdomains of the parent domain as a subdomain set; Determine whether each subdomain in the subdomain set contains a source node; The subdomain in the subdomain set that includes the source node is taken as a sibling domain at the same level as the first target domain.

6. The method according to claim 1, characterized in that Calculating the shortest path from the second target domain to the first target domain includes: Searching the link state database for all link state advertisements that meet a preset condition, wherein the preset condition is: an AND operation result of the AID and the ASM is equal to the second target domain; Determine a domain corresponding to each link state advertisement in the link state advertisements that meet the preset condition as an intermediate domain; The second target domain and the intermediate domain are used as nodes, connected to form edges, so as to form a directed graph of the level where the second target domain is located; Based on the directed graph and using a shortest path algorithm, finding the shortest path from the second target domain to the first target domain; Among them, a link is composed of a first network node and a second network node, and a link state announcement includes: the IP address of the first network node, the network mask of the first network node, the IP address of the second network node, and the network mask of the second network node, wherein AID is the IP address of the first network node and ASM is the network mask of the first network node.

7. A routing path query device, characterized in that: include: An acquisition module, used to acquire a message to be transmitted, wherein the message to be transmitted carries an IP address of a source node and an IP address of a destination node; A first query module, configured to query a link state database for a minimum domain where the IP address of the destination node is located, and use the minimum domain where the IP address of the destination node is located obtained by query as a first target domain; A second query module, configured to query a link state database for a brother domain at the same level as the first target domain where the IP address of the source node is located, as a second target domain; a search module, configured to calculate the shortest path from the second target domain to the first target domain, and to search for an IP address of a boundary node from the second target domain to the second target domain of the first target domain; A determination module, used to determine whether the IP address of the source node is equal to the IP address of the boundary node; A generating module, configured to use the border node as a first hop node when the IP address of the source node is equal to the IP address of the border node; A routing module is used to route the message to be transmitted to the first hop node.

8. An electronic device comprising a processor and a memory for storing instructions executable by the processor, characterized in that: When the processor executes the instructions, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.