Routing Information Management Method, Device and Computer Storage Medium

By decoupling the main route generation unit and the backup route generation unit, the route information synchronization is achieved using TCP message identification information, solving the problems of high software complexity and low performance, ensuring that BGP routing is not interrupted, and improving the reliability and performance of the system.

CN115208824BActive Publication Date: 2025-07-25HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210685760.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-03-13
Publication Date
2025-07-25
Estimated Expiration
2039-03-13

AI Technical Summary

Technical Problem

In BGP uninterrupted routing technology, the coupling between the main route generation unit and the backup route generation unit leads to high software complexity, affecting the performance of the main route generation unit, and the routing information synchronization process occupies system resources for a long time.

Method used

The main route generation unit generates routing information related to the TCP message, and sends routing information and first identification information to the database unit. The backup route generation unit generates new routing information based on the identification information and TCP message, realizing the decoupling of the main route generation unit and the backup route generation unit, reducing software complexity and improving performance.

Benefits of technology

The main route generation unit is not required to directly synchronize the routing information to the backup route generation unit, reducing system resource usage, improving the performance of the main route generation unit and the reliability of routing information synchronization, and ensuring that BGP routing is not interrupted.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115208824B_ABST
    Figure CN115208824B_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose a routing information management method, apparatus, and computer storage medium. In this method, a primary routing generation unit generates routing information related to TCP packets. The primary routing generation unit sends the routing information and the first identification information of the routing information to a database unit, where the first identification information is determined based on the TCP packets. The embodiments of the present application can decouple the primary routing generation unit and the backup routing generation unit, reduce software complexity, and improve the performance of the primary routing generation unit.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the application with the application date of March 13, 2019, application number 201910190984.7, and invention title "Routing Information Management Method, Device and Computer Storage Medium" submitted to the State Intellectual Property Office of China. Technical Field

[0002] This application relates to the field of communication technologies, and in particular, to a routing information management method, device and computer storage medium. Background Art

[0003] The Border Gateway Protocol (BGP) Non-Stop Routing (NSR) technology can ensure that BGP neighbors and BGP routes are not interrupted in case of device failures, so as to improve system reliability. In the specific implementation process, system reliability can be improved at the hardware level or the software level. Taking the improvement of system reliability at the software level as an example, the traditional system architecture can deploy two routing generation units, including a primary routing generation unit and a standby routing generation unit. When the primary routing generation unit fails, the standby routing generation unit can take over the tasks of the primary routing generation unit. In the specific implementation, when the primary routing generation unit senses that the standby routing generation unit goes online, the primary routing generation unit needs to actively synchronize routing information to the standby routing generation unit. Since the amount of routing information to be synchronized is very large, the system resources of the primary routing generation unit will be occupied for a long time during the synchronization, thus affecting the performance of the primary routing generation unit in processing real-time packets. Based on this, the primary routing generation unit and the standby routing generation unit are mutually coupled, and the software complexity is relatively high. Summary of the Invention

[0004] Embodiments of the present invention provide a routing information management method, device and computer storage medium, which can decouple the primary routing generation unit and the standby routing generation unit, reduce software complexity, and improve the performance of the primary routing generation unit.

[0005] In a first aspect, an embodiment of the present application provides a routing information management method, characterized in that a primary routing generation unit generates routing information related to a TCP packet, and sends the routing information and first identification information of the routing information to a database unit, where the first identification information is determined based on the above TCP packet.

[0006] In this technical solution, the main route generation unit realizes the synchronization of the route information of the main route generation unit and the standby route generation unit by sending the route information and the first identification information of the route information to the database unit, without the main route generation unit directly synchronizing the route information to the standby route generation unit, which can decouple the main route generation unit and the standby route generation unit, reduce software complexity, and improve the performance of the main route generation unit.

[0007] In a possible implementation manner, the main TCP transceiver unit may synchronize the above TCP packets to at least one standby route generation unit of the main route generation unit.

[0008] In this technical solution, the main route generation unit sends the TCP packets to the standby route generation unit through the main TCP transceiver unit, without the main route generation unit directly sending the TCP packets to the standby route generation unit, which can decouple the main route generation unit and the standby route generation unit, reduce software complexity, and improve the performance of the main route generation unit.

[0009] In a possible implementation manner, the first identification information may be the end sequence number of the TCP packet.

[0010] In a possible implementation manner, the first identification information may be the timestamp corresponding to the TCP packet.

[0011] In a possible implementation manner, the route information is generated by the main route generation unit based on the TCP packets.

[0012] In a possible implementation manner, the TCP packet includes part or all of the route information.

[0013] In a second aspect, an embodiment of the present application discloses a method for managing route information, which is characterized in that the standby route generation unit receives the route information and the first identification information of the route information from the database unit, and receives the TCP packets from the main TCP transceiver unit. After the standby route generation unit determines that the route information matches the TCP packet according to the first identification information and the TCP packet, it may generate new route information based on the route information and the TCP packet.

[0014] In this technical solution, after the standby route generation unit determines that the route information matches the TCP packet according to the first identification information and the TCP packet, it generates new route information based on the route information and the TCP packet, without continuously receiving the route information from the database unit, which can decouple the main route generation unit and the standby route generation unit, reduce software complexity, and improve the performance of the main route generation unit.

[0015] In a possible implementation manner, after the standby route generation unit determines that the route information matches the TCP packet according to the first identification information and the TCP packet, it may stop receiving the route information from the database unit.

[0016] In a possible implementation, the manner in which the standby route generation unit determines that the route information matches the TCP packet according to the first identification information and the TCP packet may be: when the first identification information is greater than or equal to the second identification information carried in the TCP packet, the standby route generation unit determines that the route information matches the TCP packet.

[0017] In this technical solution, the master route generation unit does not need to perceive the standby route generation unit. The standby route generation unit can determine whether delimitation is completed, without occupying the system resources of the master route generation unit, which can improve the performance of the master route generation unit and reduce software complexity.

[0018] In a possible implementation, the standby route generation unit may also calculate a first difference set between the route information and the new route information, and a second difference set between the new route information and the route information. When the first difference set is not an empty set and the second difference set is an empty set, the standby route generation unit may send a deletion instruction to the route node. The deletion instruction carries the first difference set, and the deletion instruction is used to instruct the route node to delete the first difference set.

[0019] In a possible implementation, after the standby route generation unit calculates the first difference set between the route information and the new route information, and the second difference set between the new route information and the route information, when both the first difference set and the second difference set are not empty sets, the standby route generation unit may send an update instruction to the route node. The update instruction carries the first difference set and the second difference set, and the update instruction is used to instruct the route node to update the first difference set to the second difference set.

[0020] In a possible implementation, after the standby route generation unit calculates the first difference set between the route information and the new route information, and the second difference set between the new route information and the route information, when the first difference set is an empty set and the second difference set is not an empty set, the standby route generation unit sends an addition instruction to the route node. The addition instruction carries the second difference set, and the addition instruction is used to instruct the route node to add the second difference set.

[0021] In the embodiments of the present application, when the master route generation unit fails, without the standby route generation unit being aware of the route node, by calculating the difference set, it is possible to avoid incorrect route information sent by the standby route generation unit to the route node after being elected as the master route generation unit, and BGP routing interruption can be achieved.

[0022] In a third aspect, the embodiments of the present application provide a communication device. The device includes a master route generation unit, and the master route generation unit includes a route information generation module and a sending module. The route information generation module and the sending module are used to implement the route information management method described in the first aspect.

[0023] Fourthly, an embodiment of the present application provides a communication device. The device includes a standby route generation unit, and the standby route generation unit includes a routing information receiving module, a packet receiving module, a determination module, and a routing information generation module. The routing information receiving module, the packet receiving module, the determination module, and the routing information generation module are used to implement the routing information management method described in the second aspect.

[0024] Fifthly, an embodiment of the present application provides a computer storage medium, characterized in that the computer storage medium stores a computer program or instruction. When the program or instruction is executed by a processor, the processor is caused to execute the routing information management method described in the first aspect.

[0025] Sixthly, an embodiment of the present application provides a computer storage medium, characterized in that the computer storage medium stores a computer program or instruction. When the program or instruction is executed by a processor, the processor is caused to execute the routing information management method described in the second aspect.

[0026] Seventhly, an embodiment of the present application provides a primary route generation unit, including a processor, and the processor is coupled to a memory, characterized in that

[0027] the memory is used to store instructions;

[0028] the processor is used to execute the instructions in the memory, so that the primary route generation unit executes the routing information management method described in the first aspect.

[0029] Eighthly, an embodiment of the present application provides a standby route generation unit, including a processor, and the processor is coupled to a memory, characterized in that

[0030] the memory is used to store instructions;

[0031] the processor is used to execute the instructions in the memory, so that the standby route generation unit executes the routing information management method described in the second aspect.

[0032] Ninthly, an embodiment of the present application provides a chip system, characterized in that the chip system includes a processor and an interface circuit, and the interface circuit is coupled to the processor,

[0033] the processor is used to execute a computer program or instruction to implement the routing information management method described in the first aspect;

[0034] the interface circuit is used to communicate with other modules outside the chip system.

[0035] Tenth aspect, an embodiment of the present application provides a chip system, characterized in that the chip system includes a processor and an interface circuit, and the interface circuit is coupled to the processor.

[0036] The processor is configured to execute a computer program or instruction to implement the routing information management method as described in the second aspect.

[0037] The interface circuit is configured to communicate with other modules outside the chip system. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 is a schematic architecture diagram of a TCP packet management system disclosed in an embodiment of the present application;

[0039] Figure 2 is a schematic flowchart of a TCP packet management method disclosed in an embodiment of the present application;

[0040] Figure 3 is a schematic flowchart of another TCP packet management method disclosed in an embodiment of the present application;

[0041] Figure 4 is a schematic architecture diagram of a routing information management system disclosed in an embodiment of the present application;

[0042] Figure 5 is a schematic flowchart of a routing information management method disclosed in an embodiment of the present application;

[0043] Figure 6 is a schematic architecture diagram of another routing information management system disclosed in an embodiment of the present application;

[0044] Figure 7 is a schematic architecture diagram of another routing information management system disclosed in an embodiment of the present application;

[0045] Figure 8 is a schematic flowchart of another routing information management method disclosed in an embodiment of the present application;

[0046] Figure 9 is a schematic architecture diagram of another routing information management system disclosed in an embodiment of the present application;

[0047] Figure 10 is a schematic flowchart of another routing information management method disclosed in an embodiment of the present application;

[0048] Figure 11A is a schematic state diagram of a first difference set and a second difference set disclosed in an embodiment of the present application;

[0049] Figure 11B is a schematic state diagram of another first difference set and a second difference set disclosed in an embodiment of the present application;

[0050] Figure 11C It is a schematic diagram of the states of another first difference set and second difference set disclosed in an embodiment of the present application;

[0051] Figure 11D It is a schematic diagram of the states of another first difference set and second difference set disclosed in an embodiment of the present application;

[0052] Figure 12 It is a schematic structural diagram of a routing information management system disclosed in an embodiment of the present application;

[0053] Figure 13 It is a schematic structural diagram of a main route generation unit disclosed in an embodiment of the present application;

[0054] Figure 14 It is a schematic structural diagram of a standby route generation unit disclosed in an embodiment of the present application;

[0055] Figure 15 It is a schematic diagram of the message format of a TCP message disclosed in an embodiment of the present application. Detailed implementation manners

[0056] For a better understanding of the routing information management method, apparatus, and computer storage medium disclosed in the embodiments of the present application, a TCP message management system implemented in the present application will be described first below. Figure 1 It is a schematic structural diagram of a TCP message management system disclosed in an embodiment of the present application. The TCP message management system may include a main route generation unit and at least one standby route generation unit corresponding to the main route generation unit.

[0057] The main route generation unit and the at least one standby route generation unit may run in different virtual machines of the same communication device, or may run in different communication devices. Each route generation unit (such as the main route generation unit or the standby route generation unit) may include an application (APP) and a Transmission Control Protocol (TCP) module, and the TCP module is used to establish a TCP session with a route node.

[0058] The main route generation unit corresponds to a packet fault-tolerance service (Packets Fault-tolerance Service, PFS) 1 (for example, a first TCP transceiver unit), and PFS1 is independent of the main route generation unit. The standby route generation unit corresponds to PFS2 (for example, a second TCP transceiver unit), and PFS2 is independent of the standby route generation unit. Each PFS (for example, PFS1 or PFS2) may include a TCP fault-tolerance infrastructure (TCP FTI). The PFS and the corresponding route generation unit may run in different virtual machines of the same communication device, or in the same virtual machine of the same communication device, or in different communication devices, and are not specifically limited by the embodiments of the present application. One or more communication devices running the main route generation unit, one or more standby route units, and at least two PFSs include a processor and a memory storing computer-readable instructions for implementing the routing unit and the PFS. One or more processors may execute the computer-readable instructions to implement the routing unit and the PFS.

[0059] In this embodiment, multiple route generation units can be deployed in the TCP message management system, and the leader election service (LES) can elect a route generation unit from the multiple route generation units deployed as the main route generation unit, and the other route generation units except the main route generation unit from the multiple route generation units deployed as the backup route generation units. Among the multiple route generation units deployed, only the main route generation unit establishes a BGP neighbor with the routing node and sends and receives TCP messages, and the TCP message can include one or more of the first TCP message (i.e., the incoming message) or the second TCP message (i.e., the outgoing message). For example, the main route generation unit receives the first TCP message from the routing node, and the main route generation unit sends the second TCP message to the routing node.

[0060] Among the multiple route generation units deployed above, different route generation units correspond to different PFSs. The LES may also select a PFS as a main PFS (eg, a main TCP transceiver unit) from the PFSs corresponding to the multiple route generation units deployed above. Figure 1 Taking the main PFS as PFS1 as an example, PFS1 can synchronize TCP messages to the at least one standby route generation unit, that is, the main PFS realizes the consistency of messages of the multiple route generation units deployed above.

[0061] In a specific implementation, the main route generation unit can establish a TCP session with the routing node through a three-way handshake or the like, and the standby route generation unit can synchronously obtain the TCP messages sent and received by the main route generation unit through the main PFS.

[0062] In one implementation, taking the incoming direction packet as an example, assume that the primary PFS is PFS1, and the TCP FTI included in PFS1 is the primary TCP FTI. The primary TCP FTI receives the incoming direction packet from the routing node, and the primary TCP FTI sends the incoming direction packet to the primary routing generation unit and the standby routing generation unit. Taking the outgoing direction packet as an example, assume that the primary PFS is PFS1, and the TCP FTI included in PFS1 is the primary TCP FTI. The primary TCP FTI receives the outgoing direction packet from the primary routing generation unit, and the primary TCP FTI sends the outgoing direction packet to the primary routing generation unit and the standby routing generation unit. In this embodiment, since the primary TCP FTI does not perform packet synchronization acknowledgment, it is impossible to effectively ensure that the standby routing generation unit successfully receives the TCP packet sent by the primary TCP FTI. However, in order to achieve multi-point fault tolerance, the number of deployed routing generation units can be greater than the required number of reliable routing generation units. For example, the number of deployed routing generation units and the required number of reliable routing generation units can be in a proportional relationship, or the difference between the number of deployed routing generation units and the required number of reliable routing generation units is greater than a preset value. For example, in order to achieve n-point fault tolerance, it is necessary to ensure that at least n + 1 routing generation units are reliable, that is, it is necessary to ensure that at least n standby routing generation units are reliable. m * n + 1 routing generation units can be deployed. The m * n + 1 routing generation units include a primary routing generation unit and m * n standby routing generation units. The m * n standby routing generation units synchronize the packets sent and received by the primary routing generation unit through the primary TCP transceiver unit. Wherein, n is a positive integer, m is a positive number, and m > 1.

[0063] In one implementation, taking the incoming direction packet as an example, assume that the primary PFS is PFS1, and the TCP FTI included in PFS1 is the primary TCP FTI. The primary TCP FTI receives the incoming direction packet from the routing node, and the primary TCP FTI sends the incoming direction packet to the standby routing generation unit. After each standby routing generation unit receives the incoming direction packet from the primary TCP FTI, the standby routing generation unit sends a first confirmation message to the primary TCP FTI. After the primary routing generation unit receives the incoming direction packet from the primary TCP FTI, the primary routing generation unit sends a second confirmation message to the primary TCP FTI. After the primary TCP FTI receives the first confirmation messages from all standby routing generation units, the primary TCP FTI sends the second confirmation message to the routing node. Optionally, when the primary TCP FTI does not receive the first confirmation message from any standby routing generation unit, the primary TCP FTI can retransmit, for example, resend the incoming direction packet to the standby routing generation unit. In the embodiment of the present application, after the primary TCP FTI receives the first confirmation messages from all standby routing generation units, the second confirmation message from the primary routing generation unit is sent to the routing node, and retransmission is performed when the primary TCP FTI does not receive the first confirmation message from any standby routing generation unit, so as to achieve strong consistency of the incoming direction packet among each routing generation unit.

[0064] Taking the outgoing direction packet as an example, assume that the primary PFS is PFS1, and the TCP FTI included in PFS1 is the primary TCP FTI. The primary TCP FTI receives the outgoing direction packet from the primary routing generation unit, and the primary TCP FTI sends the outgoing direction packet to the standby routing generation unit. After each standby routing generation unit receives the outgoing direction packet from the primary TCP FTI, the standby routing generation unit can send a third confirmation message to the primary TCP FTI. After the primary TCP FTI receives the third confirmation messages from all standby routing generation units, the primary TCP FTI can send the outgoing direction packet to the routing node. Optionally, when the primary TCP FTI does not receive the third confirmation message from any standby routing generation unit, the primary TCP FTI can retransmit, for example, resend the outgoing direction packet to the standby routing generation unit. In the embodiment of the present application, after the primary TCP FTI receives the third confirmation messages from all standby routing generation units, the outgoing direction packet is sent to the routing node, and retransmission is performed when the primary TCP FTI does not receive the third confirmation message from any standby routing generation unit, so as to achieve strong consistency of the outgoing direction packet among each routing generation unit.

[0065] In one implementation, the number of routing generation units maintaining strong consistency can be greater than or equal to a first preset quantity threshold. Wherein, the first preset quantity threshold can be the required quantity of reliable routing generation units. For example, to achieve n-point fault tolerance, it is necessary to ensure that at least n + 1 routing generation units are reliable. Then, at least n + 1 routing generation units can be controlled to maintain strong consistency. Wherein, n is a positive integer. Exemplarily, assume that five routing generation units are deployed in a routing information management system. The above five routing generation units include one primary routing generation unit and four standby routing generation units. To achieve two-point fault tolerance, it is necessary to ensure that at least three routing generation units are reliable. If four routing generation units are configured to maintain strong consistency, then three standby routing generation units can be selected from the four standby routing generation units to synchronize the packets sent and received by the primary routing generation unit. In the embodiments of the present application, at least n + 1 routing generation units are controlled to maintain strong consistency, without controlling all the deployed routing generation units to maintain strong consistency. In the case of achieving n-point fault tolerance, the overhead caused by maintaining strong consistency can be reduced.

[0066] In a traditional TCP packet management system, the primary routing generation unit synchronizes the TCP packets sent and received by the primary routing generation unit to the standby routing generation units. Since the data volume of the TCP packets that the primary routing generation unit needs to synchronize is very large, the system resources of the primary routing generation unit will be occupied for a long time during packet synchronization, thus affecting the performance of the primary routing generation unit in processing real-time packets. In addition, if the packet synchronization process of the primary routing generation unit fails, it will cause the TCP packets sent by the primary routing generation unit to the standby routing generation units to be inconsistent with the TCP packets sent and received by the primary routing generation unit, reducing the reliability of packet synchronization.

[0067] However, in the embodiments of the present application, the TCP packets sent by the primary routing generation unit will all be sent to the standby routing generation units and routing nodes through the primary PFS; the packets sent by the routing nodes will all be sent to the standby routing generation units and the primary routing generation unit through the primary PFS, ensuring that the packets in the incoming direction and the outgoing direction maintain strong consistency among all routing generation units. The embodiments of the present application do not need to occupy the system resources of the primary routing generation unit for packet synchronization, and can improve the performance of the primary routing generation unit. In addition, the packets sent by the primary PFS to the primary routing generation unit and the standby routing generation units are always consistent, improving the reliability of packet synchronization. Since the packets in the incoming direction and the outgoing direction maintain strong consistency among all routing generation units, if the primary routing generation unit fails, the standby routing generation units in strong consistency synchronization can replace the primary routing generation unit to achieve uninterrupted BGP neighbors and uninterrupted BGP routes. Since all routing generation units are decoupled, the programming complexity is relatively low, and the number of standby routing generation units can be expanded to support multi-point fault tolerance protection and provide higher reliability.

[0068] Combined withFigure 1 The TCP packet management system shown Figure 2 provides a schematic flow diagram of a TCP packet management method, and the method includes but is not limited to the following steps:

[0069] Step S201: The main TCP FTI receives a first TCP packet from a routing node.

[0070] Step S202: The main TCP FTI sends the first TCP packet to at least one standby routing generation unit.

[0071] Among them, the standby routing generation units for receiving the first TCP packet can be some or all of the deployed multiple routing generation units. The standby routing generation units for receiving the first TCP packet can be greater than or equal to a first preset quantity threshold, and the first preset quantity threshold can be the difference obtained by subtracting 1 from the required quantity of reliable routing generation units.

[0072] Step S203: When each standby routing generation unit receives the first TCP packet from the main TCP FTI, it sends a first confirmation message to the main TCP FTI.

[0073] Step S204: The main TCP FTI sends the first TCP packet to the main routing generation unit.

[0074] The embodiments of the present application do not limit the execution order of step S202 and step S204. For example, the main TCP FTI can send the first TCP packet to the main routing generation unit and then send the first TCP packet to the standby routing generation units; or the main TCP FTI can send the first TCP packet to the main routing generation unit and the standby routing generation units simultaneously, which is not specifically limited by the embodiments of the present application.

[0075] Step S205: When the main routing generation unit receives the first TCP packet from the main TCP FTI, it sends a second confirmation message to the main TCP FTI.

[0076] Step S206: After the main TCP FTI receives the first confirmation messages from all the standby routing generation units, it sends the second confirmation message to the routing node.

[0077] Among them, all standby route generation units refer to all standby route generation units used to receive the first TCP packet. For example, the TCP packet management system includes a primary route generation unit and n standby route generation units. If it is necessary to ensure the reliability of at least three route generation units, then k route generation units can be configured to maintain strong consistency, where 2 ≤ k ≤ n + 1, and both k and n are positive integers. LES can select k - 1 standby route generation units from the n standby route generation units. After receiving the first TCP packet from the routing node, the primary TCP FTI can send the first TCP packet to the above k - 1 standby route generation units. When each standby route generation unit receives the first TCP packet from the primary TCP FTI, it sends a first confirmation message to the primary TCP FTI. After receiving the first confirmation messages from the above k - 1 standby route generation units, the primary TCP FTI sends a second confirmation message to the routing node.

[0078] In one implementation, when the primary TCP FTI does not receive the first confirmation message from any standby route generation unit within the first preset time period, the primary TCP FTI can resend the first TCP packet to this standby route generation unit. The embodiments of the present application can ensure that the first TCP packet is successfully transmitted to each standby route generation unit, improving the reliability of packet transmission.

[0079] In the embodiments of the present application, the primary TCP FTI synchronizes the first TCP packet to the standby route generation units. After receiving the first confirmation messages from all standby route generation units, the primary TCP FTI sends the second confirmation message from the primary route generation unit to the routing node, which can achieve strong consistency of the first TCP packet among each route generation unit.

[0080] Combined with Figure 1 the TCP packet management system shown in Figure 3 provides a schematic flowchart of another TCP packet management method, and the method includes but is not limited to the following steps:

[0081] Step S301: The primary TCP FTI receives the second TCP packet from the primary route generation unit.

[0082] Step S302: The primary TCP FTI sends the second TCP packet to at least one standby route generation unit.

[0083] Among them, the standby route generation units used to receive the second TCP packet can be some or all of the deployed multiple route generation units. The standby route generation units used to receive the second TCP packet can be greater than or equal to the first preset quantity threshold, and the first preset quantity threshold can be the difference between the required quantity of reliable route generation units minus 1.

[0084] Step S303: When the standby route generation unit receives the second TCP packet from the primary TCP FTI, it sends a third acknowledgment message to the primary TCP FTI.

[0085] Step S304: After the primary TCP FTI receives the third acknowledgment messages from all standby route generation units, it sends the second TCP packet to the routing node.

[0086] Among them, all standby route generation units refer to all standby route generation units used to receive the second TCP packet. For example, the TCP packet management system includes a primary route generation unit and n standby route generation units. If it is necessary to ensure the reliability of at least three route generation units, then k route generation units can be configured to maintain strong consistency, where 2 ≤ k ≤ n + 1, and both k and n are positive integers. The LES can select k - 1 standby route generation units from the n standby route generation units. After the primary TCP FTI receives the second TCP packet from the primary route generation unit, it can send the second TCP packet to the above k - 1 standby route generation units. When each standby route generation unit receives the second TCP packet from the primary TCP FTI, it sends a third acknowledgment message to the primary TCP FTI. After the primary TCP FTI receives the third acknowledgment messages from the above k - 1 standby route generation units, it sends the second TCP packet to the routing node.

[0087] In one implementation, when the primary TCP FTI does not receive the third acknowledgment message from any standby route generation unit within the second preset time period, the primary TCP FTI can re - send the second TCP packet to this standby route generation unit. The embodiments of the present application can ensure that the second TCP packet is successfully transmitted to each standby route generation unit, improving the reliability of packet transmission.

[0088] In the embodiments of the present application, the primary TCP FTI synchronizes the second TCP packet from the primary route generation unit to the standby route generation units. After receiving the third acknowledgment messages from all standby route generation units, the primary TCP FTI sends the second TCP packet to the routing node, which can achieve strong consistency of the second TCP packet among each route generation unit.

[0089] Figure 4It is a schematic architecture diagram of another routing information management system disclosed in the embodiments of the present application. The routing information management system may include a primary route generation unit, at least one backup route generation unit, and a data fault-tolerance service (DFS) (such as a database unit). Among them, each route generation unit (such as the primary route generation unit or the backup route generation unit) may include a BGP module and a DFS software development kit (SDK) module. For example, the BGP module included in the primary route generation unit is BGP1, and the BGP module included in the backup route generation unit is BGP2. The BGP module is used to generate data, which may include one or more of BGP neighbor information, the route received from the neighbor (Route information base Input, RibIn), the route sent to the neighbor (Route informationbase Output, RibOut), or route information. The BGP neighbor information may include neighbor negotiation results or neighbor status, etc. The DFS SDK module is used to transfer data between the DFS.

[0090] The DFS may include a message broker and a database (DB), and supports one producer to generate and multiple consumers to consume. The primary route generation unit, as the DFS producer, calls the DFS SDK module in the primary route generation unit to write the data generated by the BGP module in the primary route generation unit into the DB. After the message broker receives the data from the DFS SDK module in the primary route generation unit, it can send the data to the backup route generation unit through the DFS SDK module in the backup route generation unit. In addition, the backup route generation unit, as the DFS consumer, can synchronize the data generated by the primary route generation unit through the DFS in the following way: after the newly launched backup route generation unit sends registration information to the DFS, the DFS can determine that the backup route generation unit is a new consumer, then the DFS can send the historical data stored in the DB to the backup route generation unit, and the DFS can also send the data generated in real time by the primary route generation unit to the backup route generation unit. For the already launched backup route generation unit, the DFS can send the data generated in real time by the primary route generation unit to the backup route generation unit.

[0091] In one implementation, the way for the primary route generation unit to parse the TCP packet to obtain the route information may be: the primary route generation unit unpacks the TCP packet to obtain the data, and then the primary route generation unit parses the data based on a predefined format to obtain the route information.

[0092] ToFigure 15 Taking the schematic diagram of the TCP packet format shown as an example, the TCP packet consists of a TCP header and data. The TCP header includes a source port, a destination port, a sequence number, an acknowledgement number, a data offset, reserved bits, control bits, a window, a checksum, an urgent pointer, as well as options and padding. The control bits can include an urgent pointer flag (Urget, URG), an acknowledgement number flag (Acknowledgement, ACK), a push flag (Push, PSH), a reset connection flag (Password, PST), a synchronous sequence number flag (Synchronous, SYN), and a finish flag (Finish, FIN). The primary route generation unit can perform decapsulation on the TCP packet to obtain the data contained in the TCP packet, and then parse the data based on a predefined format to obtain routing information.

[0093] In one implementation, the backup route generation unit can read the neighbor status in real time. Since only the primary route generation unit in the routing information management system establishes a routing neighbor with the routing node, when the routing neighbor between the primary route generation unit and the routing node is established, the neighbor status is online; when the routing neighbor between the primary route generation unit and the routing node is disconnected, the neighbor status is offline. Based on this, the backup route generation unit can determine whether the routing neighbor between the primary route generation unit and the routing node is disconnected through the neighbor status.

[0094] Compared with the traditional routing information management system, the primary route generation unit needs to sense the newly online backup route generation unit, and the primary route generation unit also needs to back up the historical data generated by the primary route generation unit. After sensing the newly online backup route generation unit, the primary route generation unit needs to send the historical data to the backup route generation unit, that is, the primary route generation unit and the backup route generation unit are coupled. In addition, due to the large amount of historical data, the system resources of the primary route generation unit will be occupied for a long time during data transmission, thus affecting the performance of the primary route generation unit to generate data in real time.

[0095] In the embodiment of the present application, the data generated by the primary route generation unit is cached by DFS, and the data generated by the primary route generation unit is sent to the backup route generation unit through DFS to achieve data synchronization between the primary route generation unit and the backup route generation unit. The primary route generation unit does not need to sense the backup route generation unit, decoupling the primary route generation unit and the backup route generation unit. In addition, there is no need to occupy the system resources of the primary route generation unit for data synchronization, which can improve the performance of the primary route generation unit.

[0096] Combined with Figure 4 the routing information management system shown Figure 5 provides a schematic flowchart of another routing information management method, and the method includes but is not limited to the following steps:

[0097] Step S501: The master route generation unit generates first data.

[0098] For example, the master route generation unit can parse the first TCP packet from the routing node to generate the first data. Alternatively, the master route generation unit can parse the second TCP packet sent to the routing node to generate the first data.

[0099] Step S502: The master route generation unit sends the first data to the DFS.

[0100] Step S503: The DFS stores the first data in the DB.

[0101] Step S504: The standby route generation unit sends registration information to the DFS.

[0102] Step S505: The DFS sends the first data stored in the DB to the standby route generation unit.

[0103] For example, the first data stored in the DB includes the first route, the second route, and the third route. After the standby route generation unit registers, the DFS can send the first route, the second route, and the third route in the DB to the standby route generation unit.

[0104] Step S506: The DFS receives the second data generated by the master route generation unit.

[0105] Step S507: The DFS sends the second data to the standby route generation unit.

[0106] For example, during the process of the DFS sending the first route, the second route, and the third route in the DB to the standby route generation unit, the master route generation unit generates the second data in real time. If the second data is the fourth route, the DFS can send the fourth route to the standby route generation unit.

[0107] In the embodiments of the present application, the DFS is used to send the data generated by the master route generation unit to the standby route generation unit to achieve data synchronization between the master route generation unit and the standby route generation unit. The master route generation unit does not need to perceive the standby route generation unit, decoupling the master route generation unit and the standby route generation unit. In addition, it is not necessary to occupy the system resources of the master route generation unit for data synchronization, which can improve the performance of the master route generation unit.

[0108] Figure 6It is a schematic diagram of the architecture of another routing information management system disclosed in an embodiment of the present application. The routing information management system may include a primary routing generation unit, at least one backup routing generation unit, a PFS corresponding to each routing generation unit, and a DFS. Among them, each routing generation unit (such as the primary routing generation unit or the backup routing generation unit) may include a BGP module and a socket module. For example, the BGP module included in the primary routing generation unit is BGP1, and the BGP module included in the backup routing generation unit is BGP2. The BGP module is used to generate data. Different routing generation units correspond to different PFSs, and each PFS may include a TCP FTI. The LES can elect a PFS as the primary PFS from the PFSs corresponding to multiple routing generation units deployed in the routing information management system. The primary PFS can synchronize the TCP packets sent and received by the primary routing generation unit to the backup routing generation unit. In addition, the primary routing generation unit, as a DFS producer, writes the data generated by BGP1 into the DB. After the Message Broker receives the data from the DFS SDK module in the primary routing generation unit, it can send the data to the backup routing generation unit through the DFS SDK module in the backup routing generation unit. In addition, the backup routing generation unit, as a DFS consumer, can obtain the data generated by the primary routing generation unit through DFS synchronization in the following way: after the newly online backup routing generation unit registers with the DFS, the DFS can determine that the backup routing generation unit is a new consumer, and then the DFS can send the historical data stored in the DB to the backup routing generation unit. The DFS can also send the data generated in real time by the primary routing generation unit to the backup routing generation unit through the Message Broker.

[0109] After the primary routing generation unit and the backup routing generation unit achieve data synchronization and packet synchronization, they can reach the real-time protection state through delimitation. If the primary routing generation unit fails, the LES can elect a routing generation unit as the primary routing generation unit from the backup routing generation units that have reached the real-time protection state, establish a routing neighbor with the routing node, and send and receive BGP routes to ensure that the BGP neighbor is not interrupted and the BGP route is not interrupted. Among them, delimitation means that the data obtained by the backup routing generation unit from the DFS and the TCP packets received by the backup routing generation unit from the primary PFS are seamlessly connected, ensuring that the primary routing generation unit and the backup routing generation unit maintain final consistency.

[0110] Taking the inbound direction demarcation as an example, the main route generation unit receives the inbound direction packets from the route nodes. BGP1 parses the inbound direction packets and generates multiple RibIns. The main route generation unit writes the RibIns into the DFS in real time according to the parsing order. The DFS writes a Dummy route after the last RibIn regarding the inbound direction packet. The TCP end sequence number corresponding to the inbound direction packet is carried in the Dummy route, which represents the boundary of the inbound direction packet. Each inbound direction packet corresponds to a TCP end sequence number, and different inbound direction packets correspond to different TCP end sequence numbers. As Figure 6 shown, the Dummy route is the ESN in the figure k or ESN k-1 etc. The route between ESN k and ESN k-1 corresponds to an inbound direction packet. A RibIn can include r k-1,1 , r k-1,2 , …, r k-1,m , r k,1 , …, r k,m . For example, the RibIns generated after parsing a complete inbound direction packet include r k-1,1 , r k-1,2 , …, r k-1,m . The main route generation unit can write a Dummy route after r k-1,m . The Dummy route carries ESN k-1 . Another example is that the RibIns generated after parsing the next complete inbound direction packet include r k,1 , r k,2 , …, r k,m . The main route generation unit can write a Dummy route after r k,m . The Dummy route carries ESN k。The DFS stores the RibIn carrying the Dummy route into the DB. After the newly launched standby route generation unit registers with the DFS, the DFS can send the historical data stored in the DB to the standby route generation unit. The historical data includes RibIn and the Dummy route. When the standby route generation unit reads the Dummy route, it indicates that a complete inbound packet has been read. During the data synchronization process, the standby route generation unit can receive inbound packets from the primary TCP FTI in real time. After the standby route generation unit reads the Dummy route, it can compare the TCP end sequence number in the Dummy route with the minimum TCP end sequence number in the inbound packet received from the primary TCP FTI. When the TCP end sequence number in the Dummy route is greater than or equal to the above minimum TCP end sequence number, it can be determined that the inbound delimitation is completed. Before the delimitation is completed, the standby route generation unit can only cache the inbound packets received from the primary TCP FTI and cannot parse and process the inbound packets. After the delimitation is completed, the standby route generation unit no longer reads data from the DFS but receives inbound packets from the primary TCP FTI, parses the inbound packets, and generates RibIn.

[0111] Taking the outbound delimitation as an example, when the primary route generation unit sends an outbound packet to the primary TCP FTI, it can carry a timestamp T. BGP1 parses the outbound packet to generate multiple RibOuts. The primary route generation unit writes the RibOuts into the DFS in the parsing order in real time. The DFS writes a Dummy route after the last RibOut of the outbound packet. The Dummy route carries the timestamp T corresponding to the outbound packet, indicating the boundary of the outbound packet. As Figure 7 shown in the routing information management system, in the DFS message queue, the routes between two timestamps correspond to an outbound packet. Each outbound packet corresponds to a timestamp, and different outbound packets correspond to different timestamps. The DFS stores the RibOut carrying the Dummy route into the DB. The RibOut can include r k-1,1 , r k-1,2 , …, r k-1,m , r k,1 , …, r k,m . For example, the RibOut generated after parsing a complete outbound packet includes r k-1,1 , r k-1,2 , …, r k-1,m . The primary route generation unit can write a Dummy route after r k-1,m , and the Dummy route carries T k-1 . Another example is that the RibOut generated after parsing the next complete inbound packet includes rk,1 , r k,2 , …, r k,m , the master route generation unit can write a Dummy route after r k,m , and this Dummy route carries T k . After the newly online standby route generation unit registers with the DFS, the DFS can send the historical data stored in the DB to the standby route generation unit, and the historical data includes RibOut and Dummy routes. When the standby route generation unit reads the Dummy route, it indicates that a complete outbound packet has been read. During the data synchronization process, the standby route generation unit can receive the outbound packets from the master TCP FTI in real time. After the standby route generation unit reads the Dummy route, it can compare the timestamp in the Dummy route with the minimum timestamp in the inbound packets received from the master TCP FTI. When the timestamp in the Dummy route is greater than or equal to the above minimum timestamp, it can be determined that the outbound delimitation is completed. Before the delimitation is completed, the standby route generation unit can only cache the outbound packets received from the master TCP FTI and cannot parse and process the outbound packets. After the delimitation is completed, the standby route generation unit no longer reads data from the DFS, but receives the outbound packets from the master TCP FTI, parses the outbound packets, and generates RibOut.

[0112] In one implementation, before delimitation is completed, the standby route generation unit can only cache the received outbound packets from the primary TCPFTI and cannot parse and process the outbound packets. At this time, if there are a large number of route flapping in the BGP neighbor, a large number of TCP packets will be generated. To avoid a large number of packets cached by the standby route generation unit, resulting in more memory occupation, the maximum number of packets cached by the standby route generation unit can be set. When the number of packets cached by the standby route generation unit is greater than the second preset quantity threshold, packet overwrite can be performed, that is, the packet with the longest storage time is deleted. Once overwrite is performed, it will cause the route catch-up to fail, so multiple catch-ups are required, and the delimitation time is long. In extreme cases, when the oscillation frequency exceeds a certain speed, it may never be caught up. The reason for multiple catch-ups is as follows: A TCP packet is synchronized to the primary route generation unit and the standby route generation unit through PFS. The standby route generation unit caches the packet, the primary route generation unit parses the packet to generate a route, and writes the route into the DFS; the standby route generation unit reads the route written by the primary route generation unit from the DFS. It can be seen that the process of the standby route generation unit reading the route written by the primary route generation unit from the DFS is much longer than the process of the standby route generation unit caching the packet. If the BGP neighbor route flaps quickly, a large number of TCP packets will be generated, resulting in the number of packets cached by the standby route generation unit being greater than the second preset quantity threshold, and the packet with the longest storage time needs to be deleted, so that the Dummy route read by the standby route generation unit from the DFS is less than the minimum TCP end sequence number or timestamp cached, and this catch-up fails and can only wait for the next time. To solve the problem of long catch-up time caused by route flapping, before delimitation is completed, the standby route generation unit can parse the cached packets to generate RibIn and RibOut, and then cache the generated RibIn and RibOut; when route flapping occurs, since RibIn and RibOut are cached, RibIn and RibOut can be merged, so less memory is occupied and overwrite is not required. When the standby route generation unit reads the Dummy route from the DFS, if the Dummy route is greater than or equal to the minimum TCP end sequence number of the cached RibIn, the inbound delimitation is completed; if the Dummy route is greater than or equal to the minimum timestamp of the cached RibOut, the outbound delimitation is completed. Then, the standby route generation unit merges the cached RibIn, RibOut with the RibIn, RibOut read from the DFS, and the delimitation is completed after the merge is completed.

[0113] Compared with the traditional routing information management system, the primary route generation unit needs to sense the newly online standby route generation unit, and the primary route generation unit determines whether the newly online standby route generation unit has completed delimitation. During delimitation, the system resources of the primary route generation unit will be occupied for a long time, thus affecting the performance of the primary route generation unit to generate data in real time.

[0114] In the embodiment of the present application, the master route generation unit does not need to sense the standby route generation unit. The standby route generation unit can judge whether the delimiter is completed, without occupying the system resources of the master route generation unit, which can improve the performance of the master route generation unit and reduce software complexity.

[0115] Combined with Figure 6 and Figure 7 the routing information management system shown in Figure 8 a schematic flow chart of another routing information management method is provided. The method includes but is not limited to the following steps:

[0116] Step S801: The standby route generation unit sends registration information to the DFS.

[0117] The standby route generation unit can send registration information to the DFS. The registration information can include the unit identifier of the standby route generation unit, and the registration information can be used to indicate that the standby route generation unit is a new consumer.

[0118] Step S802: The DFS sends the first data in the DB to the standby route generation unit. The last route included in the first data carries the TCP end sequence number. The first data is obtained by the master route generation unit parsing the first TCP packet.

[0119] After receiving the first TCP packet from the routing node, the master route generation unit can parse the first TCP packet to obtain the first data. The first TCP packet can include part or all of the first data, and the first data can include at least one route. The master route generation unit stores the first data in the DB of the DFS. After the standby route generation unit sends registration information to the DFS, the DFS can determine that the standby route generation unit is a new consumer, and then the DFS can send the first data stored in the DB to the standby route generation unit.

[0120] Step S803: The master TCP FTI receives the third TCP packet from the routing node.

[0121] After the routing node generates the third TCP packet in real time, it can send the third TCP packet to the master TCP FTI, and the master TCP FTI can send the third TCP packet to the master route generation unit and the standby route generation unit respectively. The third TCP packet can be an inbound packet.

[0122] The embodiments of the present application do not limit the execution order of step S802 and step S803. For example, after the primary TCP FTI receives the third TCP packet from the routing node, the DFS sends the first data in the DB to the standby routing generation unit; another example is that while the primary TCP FTI receives the third TCP packet from the routing node, the DFS sends the first data in the DB to the standby routing generation unit, which is not specifically limited by the embodiments of the present application.

[0123] Step S804: The primary TCP FTI sends the third TCP packet to the standby routing generation unit.

[0124] Step S805: The standby routing generation unit compares the TCP end sequence number carried by the first data with the minimum TCP end sequence number in the third TCP packet.

[0125] The TCP end sequence number can be used to identify the first TCP packet. For example, the primary routing generation unit parses the first TCP packet to obtain the first data, which includes the first route, the second route, and the third route. The primary routing generation unit can write a Dummy route after the third route, and the Dummy route carries the TCP end sequence number. After the standby routing generation unit obtains the TCP end sequence number, it can determine that it has successfully obtained the complete data included in the first data.

[0126] After the primary TCP FTI receives each third TCP packet from the routing node, it can generate the TCP end sequence number of the third TCP packet. The primary TCP FTI sends the third TCP packet and the TCP end sequence number of the third TCP packet to the standby routing generation unit.

[0127] When the standby routing generation unit receives the first data, it can obtain the TCP end sequence number carried by the first data. In addition, after the standby routing generation unit receives the third TCP packet, it can find the minimum TCP end sequence number among the TCP end sequence numbers of all the received third TCP packets, and compare the TCP end sequence number carried by the first data with the minimum TCP end sequence number in the third TCP packet.

[0128] Step S806: The DFS sends the second data in the DB to the standby routing generation unit. The last route included in the second data carries a timestamp, and the second data is obtained by the primary routing generation unit parsing the second TCP packet.

[0129] After the master route generation unit generates the second TCP packet, it can parse the second TCP packet to obtain the second data. The second TCP packet may include some or all of the second data, and the second data may include at least one route. The master route generation unit stores the second data in the DB of the DFS. After the standby route generation unit sends the registration information to the DFS, the DFS can determine that the standby route generation unit is a new consumer, and then the DFS can send the second data stored in the DB to the standby route generation unit.

[0130] The embodiments of the present application do not limit the execution order of steps S802 to S805 and steps S806 to S809.

[0131] Step S807: The master TCP FTI receives the fourth TCP packet from the master route generation unit.

[0132] After the master route generation unit generates the fourth TCP packet in real time, it can send the fourth TCP packet to the master TCP FTI, and the master TCP FTI can send the fourth TCP packet to the routing node and the standby route generation unit respectively. The fourth TCP packet may be an out-direction packet.

[0133] Step S808: The master TCP FTI sends the fourth TCP packet to the standby route generation unit.

[0134] Step S809: The standby route generation unit compares the timestamp carried by the second data with the minimum timestamp in the fourth TCP packet.

[0135] The timestamp can be used to identify the second TCP packet, and the timestamp can be the time when the second data is sent from the master route generation unit to the DFS. For example, the master route generation unit parses the second TCP packet to obtain the second data, and the second data includes the fourth route, the fifth route, and the sixth route. The master route generation unit can write a Dummy route after the sixth route, and the Dummy route carries the timestamp. The master route generation unit sends the second data and the timestamp carried by the second data to the DFS. After the standby route generation unit obtains the timestamp, it can determine that it has successfully obtained the complete data included in the second data.

[0136] After the master TCP FTI receives the fourth TCP packet from the master route generation unit each time, it can generate the timestamp of the fourth TCP packet. The master TCP FTI sends the fourth TCP packet and the timestamp of the fourth TCP packet to the standby route generation unit.

[0137] When the standby route generation unit receives the second data, it can obtain the timestamp carried by the second data. Additionally, after the standby route generation unit receives the fourth TCP packet, it can search for the minimum timestamp among the timestamps of all the received fourth TCP packets, and compare the timestamp carried by the first data with the minimum timestamp in the fourth TCP packets.

[0138] Step S810: When the TCP end sequence number carried by the first data is greater than or equal to the minimum TCP end sequence number, and the timestamp carried by the second data is greater than or equal to the minimum timestamp, the standby route generation unit stops obtaining data from the DFS.

[0139] In the embodiments of the present application, the primary route generation unit does not need to sense the standby route generation unit. The standby route generation unit can determine whether demarcation is completed, without occupying the system resources of the primary route generation unit, which can improve the performance of the primary route generation unit and reduce software complexity.

[0140] Figure 9 FIG. 10 is a schematic structural diagram of another routing information management system disclosed in the embodiments of the present application. The routing information management system may include a primary route generation unit 901, at least one standby route generation unit (such as standby route generation units 902 and 903), and routing nodes. Among them, each route generation unit (such as the primary route generation unit or the standby route generation unit) may include a BGP module. For example, the BGP module included in the primary route generation unit 901 is BGP1, and the BGP modules included in the standby route generation units are BGP2, BGP3,..., BGPn. The BGP module is used to generate data.

[0141] After the primary route generation unit 901 and at least one standby route generation unit form a real-time protection state, if the primary route generation unit 901 fails, the LES can elect a route generation unit (such as the standby route generation unit 902) from at least one standby route generation unit as the primary route generation unit, and the other route generation units in at least one standby route generation unit except the primary route generation unit as standby route generation units. The elected primary route generation unit establishes a BGP neighbor with the routing node to ensure that the BGP neighbor is not interrupted and the BGP route is not interrupted.

[0142] In specific implementation, through Figure 2 or Figure 3The message management method shown. Before the main route generation unit 901 fails, the TCP messages sent and received by the main route generation unit 901 are the same as the TCP messages of each standby route generation unit in at least one standby route generation unit. For example, the main TCP FTI sends the first TCP message from the route node to the main route generation unit 901 and at least one standby route generation unit respectively. Another example is that the main TCP FTI sends the second TCP message generated by the main route generation unit 901 to the route node and at least one standby route generation unit respectively. After the main route generation unit 901 fails, the TCP module in the elected main route generation unit (such as the standby route generation unit 902) can establish a TCP session with the route node, avoiding the situation where TCP messages are discontinuous, resulting in a TCP error disconnection, and can achieve an uninterrupted TCP connection.

[0143] In addition, after the backup route generation unit 902 completes delimitation, it parses the incoming direction packets from the primary PFS to generate RibIn. The backup route generation unit 902 can generate new routing information based on the incoming direction packets and RibIn, and obtain the outgoing direction packets based on this routing information (that is, the backup route generation unit 902 simulates sending the outgoing direction packets of the backup route generation unit 902 to the routing node based on RibIn). The backup route generation unit 902 parses the outgoing direction packets of the backup route generation unit 902 to generate the RibOut set of the backup route generation unit 902. The primary route generation unit 901 generates the outgoing direction packets of the primary route generation unit 901 in response to the incoming direction packets from the primary PFS, and synchronizes the outgoing direction packets of the primary route generation unit 901 to the backup route generation unit 902 through the primary PFS. The backup route generation unit 902 can parse the outgoing direction packets of the primary route generation unit 901 from the primary PFS to generate the RibOut set of the primary route generation unit 901. After the backup route generation unit 902 is elected as the primary route generation unit, the backup route generation unit 902 can calculate the first difference set between the RibOut set of the primary route generation unit 901 and the RibOut set of the backup route generation unit 902, and the second difference set between the RibOut set of the backup route generation unit 902 and the RibOut set of the primary route generation unit 901. If the first difference set is not an empty set and the second difference set is an empty set, the backup route generation unit 902 can send a deletion instruction to the routing node. The deletion instruction carries the above first difference set, and the deletion instruction is used to instruct the routing node to delete the above first difference set. If both the first difference set and the second difference set are not empty sets, the backup route generation unit 902 can send an update instruction to the routing node. The update instruction carries the first difference set and the second difference set, and the update instruction is used to instruct the routing node to update the first difference set to the second difference set. If the first difference set is an empty set and the second difference set is not an empty set, the backup route generation unit 902 can send an addition instruction to the routing node. The addition instruction carries the second difference set, and the addition instruction is used to instruct the routing node to add the second difference set. If both the first difference set and the second difference set are empty sets, the backup route generation unit 902 can determine that the routing sent by the primary route generation unit 901 to the routing node is correct. In the embodiments of the present application, when the primary route generation unit fails, without the backup route generation unit being aware of the routing node, by calculating the difference set, it is possible to avoid routing errors sent by the backup route generation unit to the routing node after being elected as the primary route generation unit, and achieve uninterrupted BGP routing.

[0144] In addition, the standby route generation unit is in an active state. Before the main route generation unit fails, the standby route generation unit can parse the packets from the main PFS to generate RibIn and RibOut. After the standby route generation unit is elected as the main route generation unit, the routing node senses the switch of the main route generation unit and directly switches the Rib route to the elected main route generation unit. Compared with the traditional routing information management system, there is no need for full-scale smoothing, which improves the processing performance of the routing information management system.

[0145] In addition, in the routing information management system, the standby route generation unit is in the active state just like the main route generation unit. Both the main route generation unit and the standby route generation unit calculate routes, distribute routes, and generate routing neighbors. If the data distributed by one of the route generation units is inconsistent with the data distributed by other route generation units, the routing node can determine that the route generation unit has a service logic failure. The routing node can generate the service logic description information of the route generation unit and output the service logic description information of the route generation unit. The user can respond to the service logic description information of the route generation unit to perform version upgrade or other repair measures on the route generation unit. If the main route generation unit has a service logic failure, the routing node can trigger the switch of the main route generation unit. The embodiments of the present application can timely detect logic failures and reduce the service-impaired time delay.

[0146] In the embodiments of the present application, because multiple route generation units are deployed in the routing information management system, as long as there is still one standby route generation unit in the real-time protection state during multi-point failures, the BGP service will not be affected.

[0147] Combined with Figure 9 the routing information management system shown in Figure 10 a schematic flowchart of another routing information management method is provided. The method includes but is not limited to the following steps:

[0148] Step S1001: The standby route generation unit receives the first TCP packet from the main PFS.

[0149] Step S1002: The standby route generation unit parses the first TCP packet to obtain routing information.

[0150] Step S1003: The standby route generation unit generates new routing information based on the first TCP packet and the routing information.

[0151] Step S1004: The standby route generation unit obtains the second TCP packet of the standby route generation unit based on the new routing information.

[0152] Step S1005: The standby route generation unit parses the second TCP packet of the standby route generation unit to generate the RibOut set of the standby route generation unit.

[0153] Step S1006: The primary route generation unit receives the first TCP packet from the primary PFS.

[0154] Step S1007: The primary route generation unit responds to the first TCP packet to generate the second TCP packet of the primary route generation unit.

[0155] Step S1008: The primary route generation unit sends the second TCP packet of the primary route generation unit to the standby route generation unit through the primary PFS.

[0156] Step S1009: The standby route generation unit parses the second TCP packet of the primary route generation unit to generate the RibOut set of the primary route generation unit.

[0157] Step S1010: The standby route generation unit calculates the first difference set between the RibOut set of the primary route generation unit and the RibOut set of the standby route generation unit, and the second difference set between the RibOut set of the standby route generation unit and the RibOut set of the primary route generation unit.

[0158] The first difference set refers to the set whose elements are those that belong to the RibOut set of the primary route generation unit but do not belong to the RibOut set of the standby route generation unit. The second difference set refers to the set whose elements are those that belong to the RibOut set of the standby route generation unit but do not belong to the RibOut set of the primary route generation unit.

[0159] Take Figure 11A as an example. If the RibOut set M of the primary route generation unit completely contains the RibOut set N of the standby route generation unit, then the first difference set is Figure 11A the shaded part in, and the shape of the shaded part is annular, that is, the first difference set is not an empty set. The second difference set is an empty set.

[0160] Take Figure 11B as an example. If the RibOut set N of the standby route generation unit completely contains the RibOut set M of the primary route generation unit, then the first difference set is an empty set, and the second difference set is Figure 11B the shaded part in, and the shape of the shaded part is annular, that is, the second difference set is not an empty set.

[0161] Take Figure 11C as an example. If the RibOut set M of the primary route generation unit and the RibOut set N of the standby route generation unit partially overlap, then the first difference set and the second difference set can be as shown in Figure 11CAs shown, that is, neither the first empty set nor the second difference set is an empty set.

[0162] Taking Figure 11D as an example, if the RibOut set M of the primary route generation unit and the RibOut set N of the standby route generation unit do not overlap at all, the first difference set can be M, and the second difference set can be N, that is, neither the first empty set nor the second difference set is an empty set.

[0163] Step S1011: If the first difference set is not an empty set and the second difference set is an empty set, the standby route generation unit sends a deletion instruction to the routing node. If neither the first difference set nor the second difference set is an empty set, the standby route generation unit sends an update instruction to the routing node.

[0164] Step S1012: If neither the first difference set nor the second empty set is an empty set, the standby route generation unit sends an update instruction to the routing node.

[0165] Step S1013: If the first difference set is an empty set and the second difference set is not an empty set, the standby route generation unit sends an addition instruction to the routing node.

[0166] In the embodiment of the present application, when the primary route generation unit fails, without the standby route generation unit being aware of the routing node, by calculating the difference set, it is possible to avoid routing errors sent by the standby route generation unit to the routing node after being elected as the primary route generation unit, realizing uninterrupted BGP routing.

[0167] Figure 12 is a schematic structural diagram of a routing information management system provided by an embodiment of the present application. The routing information management system may include a primary route generation unit 1201, at least one standby route generation unit 1202, a database unit 1203, a primary TCP transceiver unit 1204, and a routing node 1205. The primary route generation unit 1201 may include a routing information generation module 12011 and a sending module 12012. Each standby route generation unit 1202 may include a routing information receiving module 12021, a message receiving module 12022, a determination module 12023, and a routing information generation module 12024:

[0168] The routing information generation module 12011 is used to generate routing information related to the TCP message;

[0169] The sending module 12012 is used to send the routing information and the first identification information of the routing information to the database unit 1203, where the first identification information is determined based on the TCP message.

[0170] The routing information receiving module 12021 is used to receive the routing information and the first identification information of the routing information from the database unit 1203;

[0171] The message receiving module 12022 is configured to receive the TCP message from the main TCP transceiver unit;

[0172] The determination module 12023 is configured to determine that the routing information matches the TCP message according to the first identification information and the TCP message;

[0173] The routing information generation module 12024 is configured to generate new routing information based on the routing information and the TCP message.

[0174] In one implementation, the routing information is generated by the routing information generation module 12011 based on the TCP message.

[0175] In one implementation, the routing information receiving module 12021 is further configured to stop receiving routing information from the database unit 1203 after the determination module 12023 determines that the routing information matches the TCP message according to the first identification information and the TCP message.

[0176] In one implementation, when the first identification information is greater than or equal to the second identification information carried in the TCP message, the determination module 12023 determines that the routing information matches the TCP message.

[0177] In one implementation, each standby routing generation unit 1202 may further include a difference set calculation module 12025 and a sending module 12026;

[0178] The difference set calculation module 12025 is configured to calculate a first difference set between the routing information and the new routing information, and a second difference set between the new routing information and the routing information;

[0179] The sending module 12026 is configured to send a deletion instruction to the routing node 1205 when the first difference set is not an empty set and the second difference set is an empty set, where the deletion instruction carries the first difference set, and the deletion instruction is used to instruct the routing node to delete the first difference set.

[0180] In one implementation, the sending module 12026 is further configured to send an update instruction to the routing node when both the first difference set and the second difference set are not empty sets, where the update instruction carries the first difference set and the second difference set, and the update instruction is used to instruct the routing node 1205 to update the first difference set to the second difference set.

[0181] In one implementation, the sending module 12026 is further configured to send an adding instruction to the routing node when the first difference set is an empty set and the second difference set is not an empty set, where the adding instruction carries the second difference set, and the adding instruction is used to instruct the routing node 1205 to add the second difference set.

[0182] It should be noted that Figure 12 For the content not mentioned in the corresponding embodiments and the specific implementation manners of the steps executed by each module, reference may be made to Figures 1 to 9 the embodiments shown and the foregoing content, which will not be elaborated here.

[0183] In one implementation, Figure 12 the related functions implemented by each module in can be implemented in combination with a processor and a communication interface. Figure 13 FIG. 14 is a schematic structural diagram of a main routing generation unit provided by an embodiment of the present invention. The main routing generation unit includes a processor 1301, a memory 1302, and a communication interface 1303. The processor 1301, the memory 1302, and the communication interface 1303 are connected by one or more communication buses.

[0184] The processor 1301 includes one or more general-purpose processors. Among them, the general-purpose processor can be any type of device capable of processing electronic instructions, including a central processing unit (CPU), a microprocessor, a microcontroller, a main processor, a controller, and an ASIC (Application Specific Integrated Circuit), etc. The processor 1301 executes routing information generation instructions and transmission instructions, such as generating routing information related to TCP packets, and sending the routing information and the first identification information of the routing information to the database unit. The communication interface 1303 can be a wired interface (such as an Ethernet interface) for communicating with the database unit.

[0185] The memory 1302 can include a volatile memory, such as a random access memory (RAM); the memory can also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD). The memory 1302 can also include a combination of the above types of memories. The memory 1302 can store program codes, TCP packets, and routing information.

[0186] Among them, the processor 1301 is used to execute the following steps by calling the program code in the memory 1302:

[0187] The processor 1301 is used to generate routing information related to the TCP packet;

[0188] The communication interface 1303 is used to send the routing information and the first identification information of the routing information to the database unit, where the first identification information is determined based on the TCP packet.

[0189] It should be noted that Figure 13 For the content not mentioned in the corresponding embodiments and the specific implementation manners of each device to execute the steps, reference can be made to Figures 1 to 9 the embodiments shown and the foregoing content, which will not be elaborated here.

[0190] In one implementation manner, Figure 12 the related functions implemented by each module in can be implemented in combination with the processor and the communication interface. Figure 14 FIG. is a schematic structural diagram of a standby routing generation unit provided by an embodiment of the present invention. The standby routing generation unit includes a processor 1401, a memory 1402, and a communication interface 1403. The processor 1401, the memory 1402, and the communication interface 1403 are connected by one or more communication buses.

[0191] The processor 1401 includes one or more general-purpose processors. Among them, the general-purpose processor can be any type of device capable of processing electronic instructions, including CPU, microprocessor, microcontroller, main processor, controller, and ASIC, etc. The processor 1401 executes routing information matching instructions and routing information generation instructions. For example, it determines that the routing information matches the TCP packet according to the first identification information and the TCP packet, and generates new routing information based on the routing information and the TCP packet. The communication interface 1403 can be a wired interface (such as an Ethernet interface) for communicating with the database unit and the main TCP transceiver unit.

[0192] The memory 1402 may include volatile memory, such as RAM; the memory may also include non-volatile memory, such as ROM, flash memory, HDD, or SSD. The memory 1402 may also include a combination of the above types of memory. The memory 1402 may store program code, routing information, the first identification information of the routing information, and the TCP packet.

[0193] Among them, the processor 1401 is used to execute the following steps by calling the program code in the memory 1402:

[0194] The communication interface 1403 is used to receive routing information and first identification information of the routing information from the database unit;

[0195] The communication interface 1403 is further used to receive TCP packets from the main TCP transceiver unit;

[0196] The processor 1401 is used to determine that the routing information matches the TCP packet according to the first identification information and the TCP packet;

[0197] The processor 1401 is further used to generate new routing information based on the routing information and the TCP packet.

[0198] It should be noted that Figure 14 For the content not mentioned in the corresponding embodiments and the specific implementation manners of the steps executed by each device, reference can be made to Figures 1 to 9 the illustrated embodiments and the foregoing content, which will not be elaborated here.

[0199] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server integrating one or more available media. The available medium can be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it can also be an optical medium, such as a DVD; or it can be a semiconductor medium, such as a solid state disk (SSD).

[0200] In various embodiments of the present application, if there is no special description and logical conflict, the terms and descriptions between different embodiments are consistent and can be referenced to each other, and the technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationships.

[0201] In the present application, "a plurality of" means two or more. In the formulas of the present application, the character " / " indicates that the related objects before and after are in a "division" relationship.

[0202] It is understood that the various numerical numbers involved in the embodiments of the present application are only for the convenience of description and are not used to limit the scope of the embodiments of the present application. The magnitude of the sequence numbers of the above processes does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic.

Claims

1. A routing information management method, characterized in that Including: The main route generation unit generates route information; The main route generation unit sends the route information and the first identification information of the route information to the database unit, and the database unit is used to send the route information and the first identification information to at least one standby route generation unit in response to a message from at least one standby route generation unit of the main route generation unit.

2. The method according to claim 1, wherein The method further includes: The main TCP transceiver unit synchronizes TCP packets to at least one standby route generation unit of the main route generation unit.

3. The method according to claim 2, wherein The first identification information is the end sequence number of the TCP packet.

4. The method according to claim 2, characterized in that The first identification information is the timestamp corresponding to the TCP packet.

5. The method according to claim 2, characterized in that the route information is generated by the main route generation unit based on the TCP packet.

6. The method according to claim 5, characterized in that the TCP packet includes part or all of the route information.

7. A routing information management method, characterized in that Including: The standby route generation unit receives TCP packets from the main TCP transceiver unit; The standby route generation unit generates new route information based on the route information and the TCP packet; Before the standby route generation unit generates new route information based on the route information and the TCP packet, it includes: the standby route generation unit obtains the route information; The standby route generation unit obtains the route information, including: the standby route generation unit receives the route information and the first identification information of the route information sent from the database unit.

8. The method according to claim 7, wherein Before the standby route generation unit generates new route information based on the route information and the TCP packet, it further includes: The standby route generation unit determines that the route information matches the TCP packet according to the first identification information and the TCP packet.

9. The method according to claim 8, wherein After the standby route generation unit determines that the route information matches the TCP packet according to the first identification information and the TCP packet, it further includes: The standby route generation unit stops receiving route information from the database unit.

10. The method according to claim 8 or 9, characterized in that, The standby route generation unit determines that the route information matches the TCP packet according to the first identification information and the TCP packet, including: When the first identification information is greater than or equal to the second identification information carried in the TCP packet, the standby route generation unit determines that the route information matches the TCP packet.

11. A communication device, characterized in that, The device includes a main route generation unit, and the main route generation unit includes a route information generation module and a sending module, The route information generation module is used to generate route information; The sending module is used to send the route information and the first identification information of the route information to the database unit, and the database unit is used to send the route information and the first identification information to at least one standby route generation unit in response to a message from at least one standby route generation unit of the main route generation unit.

12. The device according to claim 11, characterized in that, The device further includes a main TCP transceiver unit, The main TCP transceiver unit is used to synchronize TCP packets to at least one standby route generation unit of the main route generation unit.

13. The device according to claim 12, characterized in that, The first identification information is the end sequence number of the TCP packet.

14. The device according to claim 12, characterized in that, The first identification information is the timestamp corresponding to the TCP packet.

15. The device according to claim 12, wherein the routing information is generated by the primary routing generation unit based on the TCP packet.

16. The device according to claim 15, wherein the TCP packet includes part or all of the routing information.

17. A communication device, characterized in that, The communication device includes a primary routing generation unit, and the communication device comprises: a memory including instructions; a processor, when the processor executes the instructions, enabling the communication device to implement the routing information management method according to any one of claims 1-6.

18. A communication device, characterized in that, The communication device includes a standby routing generation unit, and the communication device comprises: a memory including instructions; a processor, when the processor executes the instructions, enabling the communication device to implement the routing information management method according to any one of claims 7-10.

19. A computer storage medium, characterized in that, The computer storage medium stores a computer program or instructions, and when the program or instructions are executed by a processor, causing the processor to execute the routing information management method according to any one of claims 1-10.

20. A routing information management system, characterized in that, The routing information management system includes a primary routing generation unit and at least one standby routing generation unit. The primary routing generation unit implements the routing information management method according to any one of claims 1-6, and the at least one standby routing generation unit implements the routing information management method according to any one of claims 7-10.

Citation Information

Patent Citations

  • Routing system and method for synchronizing a routing system with peers after failover

    US20040090913A1

  • Method for recovery of a controlled failover of a border gateway protocol speaker

    US20110213890A1