Protocol message transmission method and device

By setting up a main process and a backup process in the network device and backing up the currently used table entries to the backup process, the problem of protocol packet loss when the network device fails is solved, efficient protocol message transmission is achieved, and the storage overhead and hardware cost of the backup process are reduced.

CN120602410APending Publication Date: 2025-09-05RUIJIE NETWORKS CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202410250888.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-05
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

In network equipment, software-level failures may cause the protocol message forwarding process to restart, resulting in protocol message loss and network anomalies. Existing technologies using dual-machine or dual-processor solutions are costly.

Method used

A primary process and a backup process are set in the network device. When the primary process transmits protocol messages, it backs up the currently used table entries to the backup process. When the primary process fails, the backup process takes over the transmission of protocol messages, reducing the memory overhead of the table entries stored in the backup process.

Benefits of technology

It effectively reduces the packet loss rate during protocol message transmission, avoids the increase of additional hardware costs, and ensures that network devices continue to transmit protocol messages normally when the main process fails.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120602410A_ABST
    Figure CN120602410A_ABST
Patent Text Reader

Abstract

The invention discloses a protocol message transmission method and device which are used for reducing the packet loss rate in the protocol message transmission process. The method is applied to a main process included in network equipment, a plurality of table items used for transmitting protocol messages are stored in a main storage space of the main process, and the network equipment further comprises a standby process; the method comprises the steps of determining at least one to-be-backed-up table item from a plurality of table items in a process of transmitting a protocol message by using the plurality of table items; wherein the at least one table item is the table item used for transmitting the protocol message in the current time period; and sending at least one table item to the standby process, wherein the table item is used for the standby process to transmit the protocol message when the host process fails.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method and device for transmitting a protocol message. Background Art

[0002] The messages forwarded by network devices are mainly divided into two categories: service messages and protocol messages. Service messages are forwarded by the underlying chip, while protocol messages are forwarded by the network device's central processing unit (CPU) or need to be sent to the CPU for forwarding. For protocol messages, network devices generally use software forwarding components to perform forwarding processing. Since it is impossible to determine which forwarding table entries the network device uses, the software forwarding component needs to store all forwarding table entries for forwarding protocol messages.

[0003] In some cases, due to software-level failures, the process that performs protocol message forwarding in the network device needs to be restarted. It takes a certain amount of time to restart the process and restore all forwarding entries. During this process, protocol messages transmitted between network devices may be lost, which will cause protocol session timeouts and protocol anomalies, and further cause network anomalies within a certain range. Summary of the Invention

[0004] In an exemplary embodiment of the present application, a method and apparatus for transmitting a protocol message are provided to reduce the packet loss rate during the transmission of the protocol message.

[0005] In a first aspect, the present application proposes a method for transmitting a protocol message, the method being applied to a main process included in a network device, wherein a main storage space of the main process stores a plurality of table entries for transmitting protocol messages, and the network device further includes a standby process, the method comprising:

[0006] In the process of using the multiple entries to transmit protocol messages, determining at least one entry to be backed up from the multiple entries; wherein the at least one entry is an entry used to transmit protocol messages in the current time period;

[0007] The at least one table entry is sent to the standby process for use in transmitting protocol messages by the standby process when the primary process fails.

[0008] Based on the above scheme, the present application proposes to set up a main process and a backup process in the network device to jointly transmit protocol messages, and when the main process fails, the backup process takes over to continue transmitting the protocol messages. Compared with the solution of using dual machines or dual processors in traditional technology, the solution of the present application does not require additional hardware costs. In addition, in the process of transmitting protocol messages, the main process will back up the table entries used for transmitting protocol messages in the current period to the backup process, so that when the main process fails, the backup process can use some of the backed-up table entries to continue transmitting protocol messages. Since the table entries actually used to transmit protocol messages are far smaller than the full number of table entries stored in the main process, the solution of backing up some of the table entries used in a period of time proposed in the present application can effectively reduce the memory overhead of the backup process for storing table entries.

[0009] In some embodiments, in the process of using the multiple entries to transmit protocol messages, determining at least one entry to be backed up from the multiple entries specifically includes:

[0010] When transmitting any protocol message, querying a corresponding entry from the multiple entries according to the destination address of the any protocol message;

[0011] The queried table entries are used as the table entries to be backed up.

[0012] Since the other network devices with which a network device interacts with a protocol over a period of time are relatively fixed, backing up the table entries used over a period of time can support the backup process to take over the transmission of protocol messages when the main process fails.

[0013] In some embodiments, after sending the at least one entry to the standby process, the method further includes:

[0014] When the current update cycle expires, the backup time and usage count of each entry in the plurality of entries are obtained; wherein the backup time of any entry is the time when the entry is sent to the standby process;

[0015] Determining whether the number of times any one of the entries is used recorded at the backup time and at the current time is the same;

[0016] If the number of uses of any table entry recorded at the backup time and the current time is different, then when the backup duration of any table entry is not less than the update period, modify the backup time of any table entry to the current time and modify the number of uses of any table entry to zero; send the any table entry to the standby process so that the standby process updates the backup time of any table entry;

[0017] If the number of times any entry is used recorded at the backup time and at the current time is the same, then when the backup duration of any entry is not less than the preset retention time, deleting the recorded number of times and backup time of any entry, and sending instruction information instructing the standby process to delete any entry;

[0018] The backup duration of any entry is the time difference between the backup time of any entry and the current time.

[0019] Based on the above solution, the present application proposes to periodically update the backup entries to prevent entries that have not been used for a long time from occupying storage space.

[0020] In some embodiments, after obtaining the backup time and usage count of each entry in the plurality of entries, the method further includes:

[0021] Determine that there is an entry in the plurality of entries whose recorded usage count is greater than zero and has not been sent to the standby process;

[0022] The determined table entry is used as the table entry to be backed up.

[0023] In some embodiments, in the process of using the multiple table entries to transmit protocol messages, the method further includes:

[0024] updating a counter shared with the standby process each time a protocol message is transmitted; and / or,

[0025] updating the counter each time a main run period expires;

[0026] The counter is used by the backup process to detect whether the main process fails.

[0027] When the primary process fails, the network device's operating system will not release related resources until it generates an exception information dump file. Therefore, the backup process cannot detect the primary process failure in a timely manner. Based on this, the present application proposes setting a counter shared by the primary and backup processes. When the primary process is operating normally, the counter will be updated periodically or aperiodically. The backup process can determine whether the primary process has failed by detecting the counter's count value, allowing the backup process to detect the primary process failure in a timely manner.

[0028] In some embodiments, after sending the at least one entry to the standby process, the method further includes:

[0029] After performing a fault restart, loading the plurality of table entries in the network device memory into the main storage space;

[0030] Fault recovery indication information is sent to the standby process, the protocol stack of the network device, and the network chip of the network device; the fault recovery indication information is used to instruct the transmission of protocol messages through the main process.

[0031] Based on the above solution, after the main process restarts after a failure, the main process will take over the transmission of protocol messages again, avoiding the problem of some message forwarding failures due to the small number of backup entries stored in the standby process.

[0032] In a second aspect, the present application proposes another method for transmitting a protocol message, the method being applied to a standby process included in a network device, the network device also including a main process, the main storage space of the main process storing a plurality of table entries for transmitting the protocol message; the method comprising:

[0033] receiving at least one table entry sent by the master process; the at least one table entry being a table entry among the multiple table entries used by the master process to transmit protocol messages within a current time period;

[0034] Storing a target entry in the at least one entry in a spare storage space; the target entry is an entry not stored in the spare storage space;

[0035] The backup time of recording the at least one entry is the time when the at least one entry is received.

[0036] In some embodiments, the at least one table entry is determined from the multiple table entries according to the destination address of each protocol message during the process of transmitting the protocol message.

[0037] In some embodiments, after recording the backup time of the at least one entry as the time of receiving the at least one entry, the method further includes:

[0038] receiving, when the current update cycle expires, instruction information sent by the master process to instruct deletion of the first table entry; the instruction information is determined by the master process based on the fact that a backup duration of the first table entry is not less than a preset retention time, and the number of uses of the first table entry recorded at the time of expiration of the current update cycle and at the time of backup of the first table entry is the same; wherein the backup duration of the first table entry is the time difference between the backup time of the first table entry and the time of expiration of the current update cycle;

[0039] The first entry and the recorded backup time of the first entry stored in the spare storage space are deleted according to the instruction information.

[0040] In some embodiments, after recording the backup time of the at least one entry as the time of receiving the at least one entry, the method further includes:

[0041] When each aging cycle expires, the table entries stored in the spare storage space whose backup duration is greater than the aging cycle are deleted; wherein the backup duration of any table entry is the time difference between the backup time of any table entry and the current aging cycle expiration time.

[0042] In some embodiments, after receiving at least one entry sent by the master process, the method further includes:

[0043] When each standby operation cycle expires, obtaining a count value of a counter shared with the main process;

[0044] When the obtained count value is the same as the count value obtained last time, determining that the main process has failed;

[0045] The protocol stack of the network device and the network chip of the network device are notified to transmit the protocol message by the standby process, and the protocol message is transmitted according to the table entry stored in the standby storage space.

[0046] In some embodiments, after transmitting the protocol message according to the table entry stored in the spare storage space, the method further includes:

[0047] Receiving fault recovery instruction information sent by the main process;

[0048] Stop transmitting protocol messages according to the fault recovery indication information.

[0049] In a third aspect, the present application proposes a device for transmitting a protocol message, the device being applied to a network device, wherein a main storage space of the device stores a plurality of table entries for transmitting the protocol message, the network device including a standby process, and the device including:

[0050] a processing unit, configured to determine, in a process of using the multiple entries to transmit protocol messages, at least one entry to be backed up from the multiple entries; wherein the at least one entry is an entry used to transmit protocol messages within a current time period;

[0051] A communication unit is used to send the at least one table entry to the standby process, so that the standby process can transmit protocol messages when the device fails.

[0052] In some embodiments, the processing unit is specifically configured to:

[0053] When transmitting any protocol message, querying a corresponding entry from the multiple entries according to the destination address of the any protocol message;

[0054] The queried table entries are used as the table entries to be backed up.

[0055] In some embodiments, the processing unit is further configured to:

[0056] When the current update cycle expires, the backup time and usage count of each entry in the plurality of entries are obtained; wherein the backup time of any entry is the time when the entry is sent to the standby process;

[0057] Determining whether the number of times any one of the entries is used recorded at the backup time and at the current time is the same;

[0058] If the number of uses of any table entry recorded at the backup time and the current time is different, then when the backup duration of any table entry is not less than the update period, modify the backup time of any table entry to the current time and modify the number of uses of any table entry to zero; and send the any table entry to the standby process through the communication unit, so that the standby process updates the backup time of any table entry;

[0059] If the number of times the entry is used recorded at the backup time and the current time is the same, then when the backup duration of the entry is not less than the preset retention time, deleting the recorded number of times the entry is used and the backup time, and sending instruction information instructing the standby process to delete the entry through the communication unit;

[0060] The backup duration of any entry is the time difference between the backup time of any entry and the current time.

[0061] In some embodiments, the processing unit is further configured to:

[0062] Determine that there is an entry in the plurality of entries whose recorded usage count is greater than zero and has not been sent to the standby process;

[0063] The determined table entry is used as the table entry to be backed up.

[0064] In some embodiments, the processing unit is further configured to:

[0065] updating a counter shared with the standby process each time a protocol message is transmitted; and / or,

[0066] The counter is updated each time the main operation cycle expires; wherein, the counter is used by the backup process to detect whether the main process fails.

[0067] In some embodiments, the processing unit is further configured to load the plurality of entries in the network device memory into the main storage space after performing a fault restart;

[0068] The communication unit is further used to send fault recovery indication information to the standby process, the protocol stack of the network device and the network chip of the network device; the fault recovery indication information is used to instruct the transmission of protocol messages through the device.

[0069] In a fourth aspect, the present application proposes another apparatus for transmitting a protocol message, the apparatus being applied to a network device, the network device including a main process, the main storage space of the main process storing a plurality of table entries for transmitting the protocol message, the apparatus comprising:

[0070] a communication unit, configured to receive at least one table entry sent by the master process; the at least one table entry being a table entry among the multiple table entries used by the master process to transmit protocol messages within a current time period;

[0071] a processing unit, configured to store a target entry in the at least one entry into a spare storage space; the target entry being an entry not stored in the spare storage space;

[0072] The processing unit is further configured to record the backup time of the at least one entry as the time when the at least one entry is received.

[0073] In some embodiments, the at least one table entry is determined from the multiple table entries according to the destination address of each protocol message during the process of transmitting the protocol message.

[0074] In some embodiments, the communication unit is further configured to receive instruction information sent by the master process when the current update cycle expires, instructing the master process to delete the first table entry; the instruction information is determined by the master process based on the backup duration of the first table entry being not less than a preset retention time, and the number of uses of the first table entry recorded at the time of expiration of the current update cycle and at the time of backup of the first table entry being the same; wherein the backup duration of the first table entry is the time difference between the backup time of the first table entry and the time of expiration of the current update cycle;

[0075] The processing unit is further configured to delete the first entry and the recorded backup time of the first entry stored in the spare storage space according to the indication information.

[0076] In some embodiments, the processing unit is further configured to:

[0077] When each aging cycle expires, the table entries stored in the spare storage space whose backup duration is greater than the aging cycle are deleted; wherein the backup duration of any table entry is the time difference between the backup time of any table entry and the current aging cycle expiration time.

[0078] In some embodiments, the processing unit is further configured to:

[0079] When each standby operation cycle expires, obtaining a count value of a counter shared with the main process;

[0080] When the obtained count value is the same as the count value obtained last time, determining that the main process has failed;

[0081] The communication unit notifies the protocol stack of the network device and the network chip of the network device to transmit the protocol message by the apparatus, and transmits the protocol message according to the table entry stored in the spare storage space.

[0082] In some embodiments, the communication unit is further configured to receive fault recovery indication information sent by the main process;

[0083] The processing unit is further configured to stop transmitting protocol messages according to the fault recovery indication information.

[0084] In a fifth aspect, embodiments of the present application provide an electronic device comprising a controller and a memory. The memory is configured to store computer-executable instructions, and the controller executes the computer-executable instructions in the memory to utilize hardware resources in the controller to perform the steps of any possible implementation of the method of the first or second aspect.

[0085] In a sixth aspect, the present application provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the methods in the above aspects.

[0086] In addition, the beneficial effects of the second to fourth aspects can refer to the beneficial effects described in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0087] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present application.

[0088] Figure 1 A schematic diagram of a communication system architecture provided in an embodiment of the present application;

[0089] Figure 2 A schematic diagram of a protocol message transmission method provided in an embodiment of the present application;

[0090] Figure 3 A schematic diagram of a process for backing up protocol messages and table entries in a master process provided in an embodiment of the present application;

[0091] Figure 4A flowchart of a method for updating backup entries provided in an embodiment of the present application;

[0092] Figure 5 A flowchart of a method for detecting a main process failure provided in an embodiment of the present application;

[0093] Figure 6 A schematic diagram of the architecture of a network device provided in an embodiment of the present application;

[0094] Figure 7 A schematic diagram of another method for transmitting a protocol message according to an embodiment of the present application;

[0095] Figure 8 A schematic diagram of the structure of a protocol message transmission device provided in an embodiment of the present application;

[0096] Figure 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0097] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of the technical solutions of this application, but not all of them. Based on the embodiments described in this application document, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the technical solutions of this application.

[0098] The terms "first" and "second" in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of its variations are intended to cover non-exclusive protection. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. "Multiple" in this application can mean at least two, for example, two, three or more, and the embodiments of this application are not limited thereto.

[0099] In addition, the term "and / or" in this document simply describes an association between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document, unless otherwise specified, generally indicates an "or" relationship between the related objects.

[0100] In order to facilitate understanding of the solution of this application, the communication system involved in this application is first introduced below. For example, see Figure 1 , which is a schematic diagram of a communication system architecture. Figure 1 The network domain shown includes network device R1 and network device R2, and the external network includes at least one network device. This application does not limit the specific implementation form of the network device, for example, it can be a router or a switch. Figure 1 Network devices in the network domain shown in the figure run network protocols to discover routing information in the network, thereby achieving full network connectivity. Common network protocols include Intermediate System to Intermediate System (IS-IS), Open Shortest Path First (OSPF), and Border Gateway Protocol (BGP).

[0101] For example, each network device in the network domain will propagate a trusted protocol message generated based on the local interface status and routing information to the network domain. In the embodiment of the present application, the routing information message sent and announced between devices in the network is referred to as a protocol message. For example, the protocol message may include a BGP protocol message, an OSPF protocol message, etc.

[0102] It should be noted that Figure 1 The communication system shown is only an example. This application does not limit the number of network devices included in the network domain, nor does it limit the network devices in the network domain connected to the external network.

[0103] Since the protocol message is forwarded by the software of the network device, when there is a software-level fault problem such as an operation error, an excessively high CPU occupancy rate, or no response from the program, the software process of the transmission protocol message in the network device will crash abnormally. In this case, the operating system of the network device will not release the process-related resources until it generates its abnormal information dump file (used for abnormal location. The time required for this process is proportional to the memory resources occupied by the main forwarding process, and the longest time can reach the minute level). Therefore, it takes a certain amount of time for the process failure of the transmission protocol message to restart and reply to the forwarding table item. In this process, the situation of protocol message packet loss may occur, resulting in abnormal operation of the network protocol. In order to solve this problem, it is proposed in the related art to adopt dual machines or dual processors to deal with it, but this solution requires additional backup equipment, backup processors or backup control boards, and the implementation cost is relatively high.

[0104] In view of this, the present application proposes a method and device for forwarding protocol messages, in which a main process and a backup process are set in a network device. When the main process transmits the protocol message, the forwarding table entries used for transmitting the protocol message within the current period will be backed up to the backup process, so that when the main process fails, the backup process can take over the forwarding of the protocol message based on the backed-up partial forwarding table entries. Since the number of forwarding table entries actually used to transmit the protocol message is much smaller than the full forwarding table entries stored in the main process, the solution of the present application effectively reduces the memory overhead of the backup process for storing the forwarding table entries. In addition, the solution of the present application implements the forwarding of the protocol message through two softwares without adding additional hardware costs.

[0105] For the convenience of description, the forwarding table entries used to transmit protocol messages will be referred to as table entries in the following text.

[0106] Next, combine Figure 1 The schematic diagram of the communication system shown in FIG. 1 introduces the solution of the present application. For example, see Figure 2 , is a flow chart of a method for transmitting a protocol message provided in an embodiment of the present application. Optionally, Figure 2 The method flow shown can be Figure 1 The communication system shown may be executed by any one of the network devices R1 or R2, or by a specific component in any one of the network devices, such as a processor or processing chip in any one of the network devices, and this application does not limit this. For ease of description, the following description will be based on an example of execution by network device R1, wherein network device R1 includes a main process and a backup process, and the main storage space of the main process stores multiple entries for transmitting protocol messages. Figure 2 The method flow shown is executed by the main process and the backup process in the network device R1, and specifically includes:

[0107] 201. In the process of using multiple entries to transmit protocol messages, the main process determines at least one entry to be backed up from the multiple entries.

[0108] The at least one entry is an entry among the multiple entries that has been used to transmit the protocol message in the current time period.

[0109] For example, the master process may query multiple table entries based on the destination address of each protocol message to be transmitted, determine the table entry that matches the protocol message, and then transmit the protocol message according to the determined table entry. In this process, the master process may use the table entry used for transmitting protocol messages within the current period (or the table entry hit by the protocol message, or the table entry that matches the protocol message) as the table entry to be backed up.

[0110] 202. The primary process sends at least one entry to the backup process.

[0111] The at least one table entry sent is used by the backup process to transmit protocol messages when a subsequent main process fails.

[0112] 203 : The standby process receives at least one table entry, and stores a target table entry in the at least one table entry into a standby storage space.

[0113] The target entry is an entry not stored in the standby storage space. The standby storage space is a storage space corresponding to a standby process in the network device.

[0114] For example, when receiving at least one entry, the standby process may determine whether each entry is stored in the standby storage space one by one, and use the at least one entry that is not stored in the standby storage space as the target entry.

[0115] 204. The standby process records the backup time of at least one entry as the time when the entry is received.

[0116] Exemplarily, after storing the target entry in the at least one entry, the backup time of the at least one entry stored in the spare storage space may be updated to the time when the at least one entry is received.

[0117] Based on the above scheme, the present application proposes to set up a main process and a backup process in the network device to jointly transmit protocol messages, and when the main process fails, the backup process takes over to continue transmitting the protocol messages. Compared with the solution of using dual machines or dual processors in traditional technology, the solution of the present application does not require additional hardware costs. In addition, in the process of transmitting protocol messages, the main process will back up the table entries used for transmitting protocol messages in the current period to the backup process, so that when the main process fails, the backup process can use some of the backed-up table entries to continue transmitting protocol messages. Since the table entries actually used to transmit protocol messages are far smaller than the full number of table entries stored in the main process, the solution of backing up some of the table entries used in a period of time proposed in the present application can effectively reduce the memory overhead of the backup process for storing table entries.

[0118] In some embodiments, when the main process transmits a protocol message according to a plurality of stored table entries, it may query a plurality of table entries according to the destination address of each protocol message, and use the queried hit table entry to transmit the protocol message. Optionally, if the main process does not query the hit table entry, the protocol message may be discarded. Synchronously, the main process will back up the hit table entry. In one possible case, the hit table entry has not been backed up, then the main process may back up the hit table entry, that is, send the hit table entry to the standby process. Exemplarily, after the backup, the main process may also record the hit count of the hit table entry (that is, the number of times the table entry has been used within the current period of time. If the hit table entry has not been backed up before, the hit count is 1. It can also be called the number of uses. For the sake of convenience of description, the hit count will continue to be used for introduction in the following), and may also record the backup time of the hit table entry (the time when the main process sends the hit table entry to the standby process).

[0119] In another possible scenario, the hit entry has been backed up, such as having been used in a previous protocol message transmission. In this case, the master process can update the hit count of the hit entry. For example, if the master process hits entry A among multiple entries while transmitting a protocol message and determines that entry A has been backed up before and the hit count for entry A is 1, the master process can update the hit count for entry A to 2.

[0120] Due to the high performance requirements of the transmission protocol message, in order to avoid the impact of the backup table entries on the normal transmission protocol message process, this application proposes to set up two threads in the main process to handle the two processes of transmission protocol message and backup table entries. For the sake of convenience, the thread used for transmission protocol message in the main process is referred to as transmission thread, and the thread used for backup table entries is referred to as backup thread. The following is a description of the process of these two threads handling message transmission and table entry backup in conjunction with specific embodiments. As an example, see Figure 3 , is a schematic diagram of a process of main process transmission protocol message and table entry backup provided by an embodiment of the present application. Figure 3 As shown:

[0121] The transmission thread executes step 301A to query multiple table entries according to the protocol message to be transmitted. For example, the transmission thread may query multiple forwarding table entries according to the destination address of the protocol message to be transmitted. For example, Figure 1 In the scenario shown, the protocol message to be transmitted is a message sent to network device R2. For example, network device R1 can send a protocol message to network device R2 every 10 seconds. For example, this could be a BGP message. The address of network device R2 is (2.2.2.2). The transmission thread of network device R1 queries multiple table entries based on the destination address (2.2.2.2).

[0122] Furthermore, the transmission thread executes step 302A to determine whether a hit entry is found. If not, the process proceeds to step 303A; if so, the process proceeds to step 304A.

[0123] The transmission thread executes step 303A and discards the protocol message to be transmitted. The transmission thread executes step 304A to determine whether the hit table entry has been backed up. Exemplarily, the transmission thread queries multiple table entries based on the destination address (2.2.2.2) and determines that the hit table entry is (2.2.2.2 / 32). Further, the transmission thread can determine whether the table entry (2.2.2.2 / 32) has been backed up. If so, continue to execute step 305A, update the hit count of the recorded hit table entry, and forward the protocol message to be transmitted according to the hit table entry. If not, trigger the table entry backup signal to the backup thread. Exemplarily, after triggering the table entry backup signal, the transmission thread can also update the hit count of the hit table entry from 0 to 1.

[0124] Furthermore, after receiving the entry backup signal, the backup thread executes step 301B to traverse the multiple entries stored in the primary storage space and determine the entries that have a hit count greater than zero and have not been backed up.

[0125] Furthermore, the backup thread executes step 302B, sends the determined entry to the standby process, and records the backup time of the determined entry as the current time.

[0126] Because the network devices that interact with each other over a period of time are relatively fixed, backing up the table entries used over a period of time can support the backup process to take over the transmission of protocol messages during the main process failure phase. Based on this, this application also proposes an update mechanism for backup table entries, which deletes backup table entries that have not been used for a long time to avoid occupying the memory of the backup process.

[0127] In some embodiments, the master process may set an update cycle for updating entries. When the current update cycle expires, the backup time and usage count of each entry in the recorded multiple entries are obtained, and the backup time of each entry is calculated as the time difference between the current time and the backup time of each entry. In one possible scenario, if entries that have not been backed up are found when obtaining the backup time of each entry in the recorded multiple entries, and the hit count for these entries is greater than zero, these entries may be backed up.

[0128] Exemplarily, after obtaining the backup time and usage count of each of the multiple table entries recorded, it can be determined whether the usage counts of each table entry recorded at the current time and at the backup time are the same. In one possible case, if the usage counts recorded at the two times are different, it means that the table entry has been used within an update cycle, so the backup time of the table entry can be modified to the current time, and the hit count of the table entry can be cleared to avoid the hit count of the recorded table entry being too large. Furthermore, a table entry can be sent to the standby process to instruct the standby process to update the backup time of the table entry to the current time. In another possible case, if the usage counts recorded at the two times are the same, it means that the table entry has not been used within an update cycle, so the parameter table entry and the hit count and backup time of the recorded table entry can be set. Furthermore, the standby process can be notified to delete the table entry synchronously. After receiving the notification, the standby process can delete the table entry notified for deletion from the standby storage space, and also delete the backup time of the recorded table entry.

[0129] In order to further understand the update scheme of the backup table entries proposed in this application, the following is an introduction with reference to specific embodiments. Figure 4 , is a flowchart of a method for updating a backup entry provided in an embodiment of the present application, specifically including:

[0130] 401. When the current update cycle expires, obtain the backup time and usage count of the first entry among the multiple entries.

[0131] It should be noted that multiple entries need to be updated, and here only the process of updating the first entry is described as an example. The first entry is any one of the multiple entries.

[0132] For example, the expiration of each update period can be determined by setting a timer. For example, the set time can be referred to as an update timer or an entry backup refresh timer. For ease of description, the update timer is used in the following description. For example, the timeout period of the update timer can be set as the update period, for example, it can be set to 1 minute, so that when the timer reaches the timeout period, the update period is determined to have expired.

[0133] 402. Determine whether the first entry has been backed up.

[0134] If yes, continue to execute step 403.

[0135] If not, continue to execute step 406.

[0136] 403. Determine whether the hit counts of the first entry recorded at the backup time and at the current time are the same.

[0137] If yes, continue to step 404.

[0138] If not, continue to execute step 405.

[0139] 404 , determining that the backup duration of the first entry is not less than the preset retention time, deleting the first entry and the recorded backup time and usage count of the first entry in the primary storage space, and notifying the backup process to delete the first entry.

[0140] The preset retention time is greater than the update period, for example, N times the update period can be used as the retention time, where N is greater than 1. The backup duration of the first entry is the time difference between the backup time of the first entry and the current time.

[0141] 405 , determining that the backup duration of the first entry is not less than the update period, updating the first entry in the primary storage space, and sending the first entry to the backup process.

[0142] Exemplarily, updating the first entry may include updating the backup time of the first entry to the current time, and updating the hit count of the first entry. Further, sending the first entry to the standby process. Figure 2 As can be seen from step 204 in FIG. 1 , when the standby process receives the first entry, it updates the backup time of the first entry to the time when the first entry is received.

[0143] Exemplarily, after the first entry is updated, an update timer may be started to wait for the next update period to expire.

[0144] 406. When the hit count of the first entry is greater than zero, back up the first entry.

[0145] Exemplarily, backing up the first table entry may include sending the first table entry to a standby process, updating the hit count of the first table entry to 1, and recording a backup time of the first table entry.

[0146] In one possible implementation, the standby process may also periodically update the backup entries. For example, the standby process may delete the entries stored in the standby storage space whose backup time is greater than the aging period each time the aging period expires. As an optional method, the standby process may also determine the expiration of the aging period by setting a timer. For example, the timer set by the standby process may be called an aging timer, and the timeout time of the aging timer is the aging period. For example, the timeout time may be set to 10 minutes. When the aging timer reaches the timeout time, the standby process may determine whether the backup time of each entry stored in the standby storage space is greater than the start time of the aging timer. If so, the entry will be deleted; if not, the aging timer will be restarted.

[0147] When the primary process fails, the network device's operating system will not release related resources until it generates an exception information dump file. Therefore, the backup process cannot detect the primary process failure in a timely manner. Based on this, the present application proposes setting a counter (or also called a running counter) shared by the primary and backup processes. When the primary process is running normally, the counter will be updated periodically or aperiodically. The backup process can determine whether the primary process has failed by detecting the count value of the counter.

[0148] In one possible approach, the master process can update a counter shared with the backup process each time a protocol message is transmitted. For example, the master process increments the counter by one each time a protocol message is transmitted. In another possible approach, the master process can update the counter according to a set main operation period. For example, the main operation period can be set to 1 second. That is, the master process updates the counter every 1 second. It should be noted that the two counter updating methods described above can be used independently or in combination, and this application does not limit this.

[0149] Alternatively, the backup counter can also obtain and record a counter value at predetermined backup operation intervals, and determine whether the primary process has failed based on a comparison between the currently obtained count value and the previously recorded count value. For example, if the two count values ​​are equal, the primary process can be determined to have failed; if the two count values ​​are different, the primary process can be determined to have not failed. Furthermore, the backup process can update the recorded count value to the most recently obtained count value.

[0150] In order to further understand the fault detection solution introduced in this application, the following is an introduction with reference to specific embodiments. Figure 5 , is a flow chart of a method for detecting a main process failure provided by an embodiment of the present application. Specifically, it includes:

[0151] 501, the main process updates the counter shared with the standby process during operation.

[0152] For example, the main process may update the counter each time a protocol message is transmitted, and may update the counter each time a main run period expires. For example, the main run period may be set to 1 second.

[0153] 502. When the current standby operation cycle expires, the standby process obtains the count value A of the counter.

[0154] The standby operation period is greater than or equal to the main operation period.

[0155] Exemplarily, the standby process can determine the expiration of each standby operation cycle by setting a timer. For example, the timer set by the standby process can be called a main process failure detection timeout timer, and the timeout time of the main process failure detection timeout timer is set to the standby operation cycle. For example, the standby operation cycle can be set to 3 seconds.

[0156] For example, when a main process failure detection timeout timer with a timeout period of 3 seconds reaches a timeout period, the standby process may obtain a count value of a counter and define the currently obtained count value as count value A.

[0157] 503. The standby process determines whether the count value A is the same as the previously acquired count value B.

[0158] If they are the same, continue to step 504.

[0159] If they are not the same, continue to execute step 505.

[0160] 504. The standby process determines that the primary process has no faults and updates the count value of the record to count value A.

[0161] Exemplarily, if the standby process uses a main process failure detection timeout timer to determine the standby operation period, the main process failure detection timeout timer is restarted after the count value is updated.

[0162] 505 , the standby process determines that the main process fails, notifies the protocol stack and the network chip of the network device to transmit the protocol message through the standby process, and transmits the protocol message according to the table entry stored in the standby storage space.

[0163] For example, when the backup process determines that the primary process has failed, it can notify the protocol stack to output protocol packets to the backup process, and notify the network chip to output received protocol packets to the backup process. Furthermore, the backup process can transmit protocol packets based on the table entries stored in the backup storage space.

[0164] As an optional method, the main process will be restarted after a failure occurs. After the restart, multiple table entries in the network device memory will be loaded into the main storage space one by one. In this process, the main process can also use some of the loaded table entries to transmit protocol messages. Therefore, the embodiment of the present application proposes that when the standby process is transmitting protocol messages, if a protocol message that cannot be forwarded appears, the protocol message can be sent to the main process. For example, when the standby process forwards message A, it will query the backup table entries based on the destination address of message A, and determine that there is no table entry in the backup table entries that matches the destination address, thereby determining that message A cannot be forwarded, and the standby process can send message A to the main process. If the main process has completed loading the table entries that match message A at this time, the transmission of message A can be processed.

[0165] In some embodiments, after the main process loads multiple table entries in the network device memory into the main storage space, it can further send fault recovery indication information to the backup process, the protocol stack of the network device, and the network chip of the network device to indicate that the main process has completed the fault restart and can resume the transmission of protocol messages. After receiving the fault recovery indication information, the backup process will stop transmitting protocol messages. After receiving the fault recovery indication information, the protocol stack will output the protocol messages that need to be sent to the main process. After receiving the fault recovery indication information, the network chip will output the protocol messages for accessing the local machine to the main process. Furthermore, the main process will re-transmit the protocol messages based on the multiple table entries in the main storage space.

[0166] As an example, see Figure 6 , is a schematic diagram of the architecture of a network device provided by an embodiment of the present application, which includes a main process, a backup process, a protocol stack and a network chip. Figure 6 The schematic diagram of the architecture shown in FIG further introduces the transmission method of the protocol message proposed in this application. For example, see Figure 7 , is a flow chart of a protocol message transmission method provided in an embodiment of the present application, specifically including:

[0167] 701 : A primary process determines at least one entry to be backed up during the process of transmitting protocol messages using multiple entries stored in a primary storage space.

[0168] 702. The primary process sends at least one entry to the backup process.

[0169] For example, after sending at least one table entry to the backup process, the main process can also record the sending time as the backup time of each table entry, and record the number of hits of each table entry for subsequent updating of the backup table entry. The update of the backup table entry will not be introduced in detail here.

[0170] 703 : The standby process receives at least one entry and stores the at least one entry in a standby storage space.

[0171] 704: The backup process detects that the primary process fails.

[0172] For example, the specific fault detection method can be found in the introduction of the above embodiment and will not be described in detail here.

[0173] 705. The standby process sends a first message to the protocol stack.

[0174] The first message is used to instruct the protocol stack to output the protocol message to be sent to the standby process.

[0175] 706. The standby process sends a second message to the network chip.

[0176] The second message is used to instruct the network chip to output the protocol message for accessing the local machine to the standby process.

[0177] 707 , the standby process transmits the protocol message according to the entry stored in the standby storage space.

[0178] 708. The main process is restarted after the failure, and a third message is sent to the backup process.

[0179] The third message is used to instruct the main process to transmit the protocol message.

[0180] Illustratively, after the fault restart is completed, the main process may load multiple messages in the memory of the network device into the main storage space.

[0181] 709 : The standby process receives the third message and stops transmitting protocol messages according to the third message.

[0182] 710. The main process sends a fourth message to the protocol stack.

[0183] The fourth message is used to instruct the protocol stack to output the protocol message to be sent to the main process.

[0184] 711. The main process sends a fifth message to the network chip.

[0185] The fifth message is used to instruct the network chip to output the protocol message for accessing the local machine to the main process.

[0186] Based on the same concept as the above method, see Figure 8 , is a protocol message transmission device 800 provided in an embodiment of the present application, and the device 800 is used to implement each step in the above method embodiment. To avoid repetition, the device 800 is not described here. The device 800 includes: a processing unit 801 and a communication unit 802.

[0187] In one possible scenario:

[0188] The processing unit 801 is configured to determine at least one table entry to be backed up from the plurality of table entries during a process of using the plurality of table entries to transmit protocol messages; wherein the at least one table entry is an entry used to transmit protocol messages within a current time period;

[0189] The communication unit 802 is configured to send the at least one table entry to the standby process, for the standby process to transmit protocol messages when the device fails.

[0190] In some embodiments, the processing unit 801 is specifically configured to:

[0191] When transmitting any protocol message, querying a corresponding entry from the multiple entries according to the destination address of the any protocol message;

[0192] The queried table entries are used as the table entries to be backed up.

[0193] In some embodiments, the processing unit 801 is further configured to:

[0194] When the current update cycle expires, the backup time and usage count of each entry in the plurality of entries are obtained; wherein the backup time of any entry is the time when the entry is sent to the standby process;

[0195] Determining whether the number of times any one of the entries is used recorded at the backup time and at the current time is the same;

[0196] If the number of uses of any table entry recorded at the backup time and the current time is different, then when the backup duration of any table entry is not less than the update period, modify the backup time of any table entry to the current time and modify the number of uses of any table entry to zero; send the any table entry to the standby process through the communication unit 802, so that the standby process updates the backup time of any table entry;

[0197] If the number of times the entry is used recorded at the backup time and the current time is the same, then when the backup duration of the entry is not less than the preset retention time, the recorded number of times the entry is used and the backup time are deleted, and instruction information instructing the standby process to delete the entry is sent through the communication unit 802;

[0198] The backup duration of any entry is the time difference between the backup time of any entry and the current time.

[0199] In some embodiments, the processing unit 801 is further configured to:

[0200] Determine that there is an entry in the plurality of entries whose recorded usage count is greater than zero and has not been sent to the standby process;

[0201] The determined table entry is used as the table entry to be backed up.

[0202] In some embodiments, the processing unit 801 is further configured to:

[0203] updating a counter shared with the standby process each time a protocol message is transmitted; and / or,

[0204] The counter is updated each time the main operation cycle expires; wherein, the counter is used by the backup process to detect whether the main process fails.

[0205] In some embodiments, the processing unit 801 is further configured to load the plurality of entries in the network device memory into the main storage space after performing a fault restart;

[0206] The communication unit 802 is further configured to send fault recovery indication information to the standby process, the protocol stack of the network device, and the network chip of the network device; the fault recovery indication information is configured to instruct the transmission of protocol messages through the device.

[0207] In another possible scenario:

[0208] The communication unit 802 is configured to receive at least one entry sent by the master process; the at least one entry is an entry among the multiple entries used by the master process to transmit protocol messages within a current time period;

[0209] The processing unit 801 is configured to store a target entry in the at least one entry into a spare storage space; the target entry is an entry not stored in the spare storage space;

[0210] The processing unit 801 is further configured to record the backup time of the at least one entry as the time when the at least one entry is received.

[0211] In some embodiments, the at least one table entry is determined from the multiple table entries according to the destination address of each protocol message during the process of transmitting the protocol message.

[0212] In some embodiments, the communication unit 802 is further configured to receive instruction information sent by the master process when the current update cycle expires, instructing the master process to delete the first entry; the instruction information is determined by the master process based on the backup duration of the first entry being not less than a preset retention time, and the number of uses of the first entry recorded at the time of expiration of the current update cycle and at the time of backup of the first entry being the same; wherein the backup duration of the first entry is the time difference between the backup time of the first entry and the time of expiration of the current update cycle;

[0213] The processing unit 801 is further configured to delete the first entry and the recorded backup time of the first entry stored in the spare storage space according to the indication information.

[0214] In some embodiments, the processing unit 801 is further configured to:

[0215] When each aging cycle expires, the table entries stored in the spare storage space whose backup duration is greater than the aging cycle are deleted; wherein the backup duration of any table entry is the time difference between the backup time of any table entry and the current aging cycle expiration time.

[0216] In some embodiments, the processing unit 801 is further configured to:

[0217] When each standby operation cycle expires, obtaining a count value of a counter shared with the main process;

[0218] When the obtained count value is the same as the count value obtained last time, determining that the main process has failed;

[0219] The communication unit 802 notifies the protocol stack of the network device and the network chip of the network device to transmit the protocol message by the apparatus, and transmits the protocol message according to the table entry stored in the spare storage space.

[0220] In some embodiments, the communication unit 802 is further configured to receive fault recovery indication information sent by the main process;

[0221] The processing unit 801 is further configured to stop transmitting protocol messages according to the fault recovery indication information.

[0222] Figure 9 The electronic device 900 in the embodiment of the present application may further include a communication interface 903, which is, for example, a network port. The electronic device may transmit data through the communication interface 903, for example, the communication interface 903 may be used to implement the above Figure 8 Functions of the communication unit 802

[0223] In the embodiment of the present application, the memory 902 stores instructions that can be executed by at least one controller 901. At least one controller 901 can be used to execute the various steps in the above method by executing the instructions stored in the memory 902. For example, the controller 901 can implement the above Figure 8 The function of the processing unit 801.

[0224] The controller 901 is the control center of the electronic device, and can connect the various parts of the entire electronic device using various interfaces and lines, by running or executing instructions stored in the memory 902 and calling data stored in the memory 902. Optionally, the controller 901 may include one or more processing units. The controller 901 may integrate an application controller and a modem controller, wherein the application controller mainly processes the operating system and application programs, and the modem controller mainly processes wireless communications. It is understood that the modem controller may not be integrated into the controller 901. In some embodiments, the controller 901 and the memory 902 may be implemented on the same chip. In some embodiments, they may also be implemented on separate chips.

[0225] The controller 901 can be a general controller, such as a central processing unit (CPU), a digital signal controller, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, which can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general controller can be a microcontroller or any conventional controller, etc. The steps performed by the data statistics platform disclosed in the embodiments of the present application can be performed directly by a hardware controller, or performed by a combination of hardware and software modules in the controller.

[0226] The memory 902 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 902 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 902 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 902 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0227] By designing and programming the controller 901, for example, the code corresponding to the method introduced in the aforementioned embodiment can be solidified into the chip, so that the chip can execute the steps of the aforementioned method during operation. How to design and program the controller 901 is a technology well known to those skilled in the art and will not be repeated here.

[0228] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

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

[0230] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device that implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0231] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0232] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.

[0233] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A method for transmitting a protocol message, characterized in that: The method is applied to a main process included in a network device, wherein a main storage space of the main process stores a plurality of table entries for transmitting protocol messages, and the network device further includes a standby process, and the method includes: In the process of using the multiple entries to transmit protocol messages, determining at least one entry to be backed up from the multiple entries; wherein the at least one entry is an entry used to transmit protocol messages in the current time period; The at least one table entry is sent to the standby process for use in transmitting protocol messages by the standby process when the primary process fails.

2. The method according to claim 1, characterized in that In the process of using the multiple entries to transmit the protocol message, determining at least one entry to be backed up from the multiple entries specifically includes: When transmitting any protocol message, querying a corresponding entry from the multiple entries according to the destination address of the any protocol message; The queried table entries are used as the table entries to be backed up.

3. The method according to claim 1 or 2, characterized in that After sending the at least one entry to the standby process, the method further includes: When the current update cycle expires, the backup time and usage count of each entry in the plurality of entries are obtained; wherein the backup time of any entry is the time when the entry is sent to the standby process; Determining whether the number of times any one of the entries is used recorded at the backup time and at the current time is the same; If the number of uses of any table entry recorded at the backup time and the current time is different, then when the backup duration of any table entry is not less than the update period, modify the backup time of any table entry to the current time and modify the number of uses of any table entry to zero; send the any table entry to the standby process so that the standby process updates the backup time of any table entry; If the number of times any entry is used recorded at the backup time and at the current time is the same, then when the backup duration of any entry is not less than the preset retention time, deleting the recorded number of times and backup time of any entry, and sending instruction information instructing the standby process to delete any entry; The backup duration of any entry is the time difference between the backup time of any entry and the current time.

4. The method according to claim 3, characterized in that After obtaining the backup time and usage count of each entry in the plurality of entries, the method further includes: Determine that there is an entry in the plurality of entries whose recorded usage count is greater than zero and has not been sent to the standby process; The determined table entry is used as the table entry to be backed up.

5. The method according to claim 1 or 2, characterized in that In the process of using the multiple table entries to transmit protocol messages, the method further includes: updating a counter shared with the standby process each time a protocol message is transmitted; and / or, updating the counter each time a main run period expires; The counter is used by the backup process to detect whether the main process fails.

6. The method according to claim 1 or 2, characterized in that After sending the at least one entry to the standby process, the method further includes: After performing a fault restart, loading the plurality of table entries in the network device memory into the main storage space; Fault recovery indication information is sent to the standby process, the protocol stack of the network device, and the network chip of the network device; the fault recovery indication information is used to instruct the transmission of protocol messages through the main process.

7. A method for transmitting a protocol message, characterized in that: The method is applied to a standby process included in a network device, the network device also including a main process, wherein a main storage space of the main process stores a plurality of table entries for transmitting protocol messages; the method includes: receiving at least one table entry sent by the master process; the at least one table entry being a table entry among the multiple table entries used by the master process to transmit protocol messages within a current time period; Storing a target entry in the at least one entry in a spare storage space; the target entry is an entry not stored in the spare storage space; The backup time of recording the at least one entry is the time when the at least one entry is received.

8. A device for transmitting protocol messages, characterized in that: The apparatus is applied to a network device, wherein a main storage space of the apparatus stores a plurality of table entries for transmitting protocol messages, the network device includes a standby process, and the apparatus includes: a processing unit, configured to determine, in a process of using the multiple entries to transmit protocol messages, at least one entry to be backed up from the multiple entries; wherein the at least one entry is an entry used to transmit protocol messages within a current time period; A communication unit is used to send the at least one table entry to the standby process, so that the standby process can transmit protocol messages when the device fails.

9. An electronic device, characterized in that: The electronic device includes a controller and a memory, The memory is used to store computer programs or instructions; The controller is configured to execute a computer program or instruction in a memory so that the method according to any one of claims 1 to 6 or claim 7 is performed.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which, when called by a computer, enable the computer to execute the method according to any one of claims 1 to 6 or claim 7.

Citation Information

Patent Citations

  • ARP (address resolution protocol) table item backup method, ARP (address resolution protocol) table item backup device and network device

    CN105991792A

  • System for realizing uninterrupted routing through linkage of applications and protocol stacks and method thereof

    CN107645451A

  • Network anomaly recovery method, device, apparatus, and computer-readable storage medium

    CN109257235A

  • Fault evading method for router and router node

    JP2000278305A

  • System and method for fault tolerant data communication

    US20040078625A1