Network equipment, UDP (User Datagram Protocol) message processing method and nonvolatile storage medium

By synchronizing UDP message information between the main control board and the backup control board, and using the network filtering queue module and automatic repair module, the problem of UDP protocol message synchronization in the main and backup architecture is solved, and UDP message synchronization and service uninterrupted between the main and backup boards is achieved, and the stability and reliability of the system are improved.

CN119520655AActive Publication Date: 2025-02-25CHINA TELECOM INTELLIGENT NETWORK TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411638974.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-02-25
Estimated Expiration
2044-11-15

AI Technical Summary

Technical Problem

The prior art is difficult to synchronize UDP protocol packets in the master and standby architecture, resulting in service interruption during the switch between the master and standby main control board.

Method used

By synchronizing the message information of UDP messages between the main control board and the backup control board, using the network filtering queue module and automatic repair module, we ensure that the backup control board can process and repair UDP messages without passing through the kernel protocol stack, and realize UDP messages synchronization between the main and backup boards.

Benefits of technology

It realizes the synchronization and uninterrupted service data based on UDP protocol between the main and backup boards, solves the problem of business interruption during switching between the main and backup boards, and improves the stability and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520655A_ABST
    Figure CN119520655A_ABST
Patent Text Reader

Abstract

The invention discloses network equipment, a UDP (User Datagram Protocol) message processing method and a nonvolatile storage medium. The device comprises a main main control board and a standby main control board, and the main main control board and the standby main control board are used for receiving a first UDP message; the standby main control board calls the first UDP message through a network filtering queue module arranged in the standby main control board, and sends the first UDP message to an automatic repair module in the standby main control board under the condition that the called first UDP message does not pass through a standby kernel protocol stack in the standby main control board; the main main control board is further used for generating and sending a second UDP message, and the standby main control board is further used for generating a third UDP message under the condition that the main main control board generates the second UDP message. According to the method and the device, the technical problem of service interruption during switching of the main and standby main control boards caused by asynchronous UDP protocol messages in the main and standby main control boards is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network technology and security, and specifically, to a network device, a UDP message processing method and a non-volatile storage medium. Background Art

[0002] The master-slave architecture is a way to ensure high availability of the system. In the master-slave architecture, the backup device needs to take over the business of the master device in real time when the master device fails. For UDP (User Datagram Protocol), when the master device fails, it is necessary to be able to take over the business of the master device from the backup device and ensure that data transmission is not interrupted. Considering the packet loss and reliability requirements of the UDP protocol itself, the existing transmission technology faces problems such as difficult development, long implementation cycle, and difficult unified maintenance.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present application provide a network device, a UDP message processing method and a non-volatile storage medium to at least solve the technical problem of service interruption when the primary and standby main control boards switch due to the asynchrony of UDP protocol messages in the primary and standby main control boards.

[0005] According to one aspect of an embodiment of the present application, a network device is provided, comprising: a main control board and a standby control board, wherein the main control board and the standby control board are used to receive a first UDP message, and the main control board uploads the first UDP message to the main kernel protocol stack of the main control board, and synchronizes the first message information of the first UDP message to the standby control board; the standby control board retrieves the first UDP message through a network filtering queue module set in the standby control board, and sends the first UDP message to an automatic repair module in the standby control board without passing through the standby kernel protocol stack in the standby control board during the retrieval, wherein the automatic repair module The block is used to determine a processing method for the first UDP message based on the first message information; the active main control board is also used to generate and send a second UDP message, and the standby main control board is also used to generate a third UDP message when the active main control board generates the second UDP message, wherein the active main control board is also used to synchronize the second message information of the second UDP message to the standby main control board, the line card module in the standby main control board is used to intercept the third UDP message, the network filtering queue module is used to send the third UDP message to the automatic repair module, and the automatic repair module is used to determine a processing method for the second UDP message and the third UDP message based on the second message information and the third message information of the third UDP message.

[0006] Optionally, the first message information includes first message offset information of the first UDP message; determining a processing method for the first UDP message based on the first message information includes: the automatic repair module determines the backup message offset information of the first UDP message received by the standby main control board; compares the backup message offset information with the first message offset information; when the comparison result is that the offset indicated by the first message offset information is greater than the offset indicated by the backup message offset information, determining a processing method is to synchronize the first UDP message received by the standby main control board to the active main control board until the first message offset information The indicated offset is equal to the offset indicated by the backup message offset information; when the comparison result is that the offset indicated by the first message offset information is smaller than the offset indicated by the backup message offset information, the processing method is determined to synchronize the first UDP message received by the active main control board to the backup main control board until the offset indicated by the first message offset information is equal to the offset indicated by the backup message offset information; when the comparison result is that the offset indicated by the first message offset information is equal to the offset indicated by the backup message offset information, the processing method is determined not to synchronize the first UDP message.

[0007] Optionally, sending the first UDP message to the automatic repair module in the standby main control board includes: the network filtering queue module sends the first UDP message to the automatic repair module in user state, and the automatic repair module records the quadruple information and message offset information of the first UDP message.

[0008] Optionally, the second message information includes second message offset information of the second UDP message, and the third message information includes third message offset information of the third UDP message; determining a processing method for the second UDP message and the third UDP message based on the second message information and the third message information of the third UDP message includes: comparing the second message offset information and the third message offset information; when the comparison result is that the offset indicated by the second message offset information is greater than the offset indicated by the third message offset information, determining a processing method is to synchronize the third UDP message to the main control board until the second message offset is greater than the offset indicated by the third message offset information. The offset indicated by the shift information is equal to the offset indicated by the third message offset information; when the comparison result is that the offset indicated by the second message offset information is smaller than the offset indicated by the third message offset information, the processing method is determined to be to synchronize the second UDP message to the backup main control board until the offset indicated by the second message offset information is equal to the offset indicated by the third message offset information; when the comparison result is that the offset indicated by the second message offset information is equal to the offset indicated by the third message offset information, the processing method is determined to not synchronize the second UDP message and the third UDP message.

[0009] Optionally, after generating the third UDP message, the standby main control board is also used to: encapsulate the third UDP message and start the timeout timer; send the encapsulated third UDP message to the standby kernel protocol stack; intercept the third UDP message processed by the standby kernel protocol stack through the line card module, and upload the intercepted third UDP message to the user state.

[0010] Optionally, after uploading the intercepted third UDP message to the user state, the automatic repair module is further used to record the quadruple information and message offset information of the third UDP message in the user state.

[0011] Optionally, when the active main control board receives a master-standby switching signal, the active main control board executes the master-standby downgrade process, thereby switching to the standby main control board; when the standby main control board receives a master-standby switching signal, the standby main control board executes the standby-upgrade process, thereby switching to the active main control board, wherein, during the process of the standby main control board executing the standby-upgrade process, the automatic repair module in the standby main control board is used to maintain the deviation value between the message offsets corresponding to the standby main control board and the active main control board within a preset range.

[0012] Optionally, when the active main control board executes the main-to-standby process, the active main control board shuts down the protocol module in the active main control board, and enables the network filtering queue module and the automatic repair module in the active main control board, thereby switching to the standby main control board.

[0013] According to another aspect of the embodiment of the present application, a network device is also provided, including a main main control board and a standby main control board, wherein the main main control board and the standby main control board are used to receive a first UDP message, and the main main control board uploads the first UDP message to the main kernel protocol stack of the main main control board, and synchronizes the first message information of the first UDP message to the standby main control board; the standby main control board calls the first UDP message through a network filtering queue module set in the standby main control board, and determines the processing method of the first UDP message according to the first message information when the first UDP message does not pass through the standby kernel protocol stack in the standby main control board during the calling; the main main control board is also used to generate a second UDP message, and synchronize the second message information of the second UDP message to the standby main control board, and the standby main control board is also used to generate a third UDP message and intercept the third UDP message when the main main control board generates the second UDP message; determine the processing method of the second UDP message and the third UDP message according to the second message information and the intercepted third UDP message.

[0014] According to another aspect of the embodiment of the present application, a UDP message processing method is also provided, including: receiving and uploading a first UDP message to the main kernel protocol stack of the main control board for processing, and synchronizing the first message information of the first UDP message to the standby main control board, the first message information quadruple information including a quadruple and a message offset; after generating a second UDP message, synchronizing the second message information of the second UDP message to the standby main control board, so that the standby main control board can synchronously repair the UDP message during the main-standby switching process.

[0015] According to another aspect of the embodiment of the present application, a UDP message processing method is also provided, including: intercepting a first UDP message from the network interface of a standby main control board, and directly sending the first UDP message to a target application process without passing through the standby kernel protocol stack of the standby main control board; in response to the execution of the target application process, determining whether it is necessary to synchronize the missing UDP message from the main main control board according to the first message information of the first message synchronized from the main main control board, so that the UDP message status on the standby main control board is consistent with the UDP message status on the main main control board; before the main-standby switching, when the standby main control board generates a third UDP message, intercepting the third UDP message, and determining whether it is necessary to synchronize or send redundant UDP messages to the main main control board according to the second message information of the second UDP message synchronized from the main main control board.

[0016] According to another aspect of an embodiment of the present application, a UDP message receiving method is also provided, including: a main main control board in a communication device receives a first UDP message, and synchronizes the first message information of the first UDP message to a standby main control board in the communication device; when the main main control board receives the first UDP message, the standby main control board receives the first UDP message, wherein the standby main control board is also used to maintain the deviation value between the message offsets corresponding to the standby main control board and the main main control board within a preset range based on the first message information and the first UDP message.

[0017] According to another aspect of an embodiment of the present application, a UDP message sending method is also provided, including: a main main control board in a communication device generates and sends a second UDP message, and synchronizes the second message information of the second UDP message to a standby main control board in the communication device; when the main main control board generates the second UDP message, the standby main control board generates and intercepts a third UDP message, and based on the third message information and the second message information of the third UDP message, maintains the deviation value between the message offsets corresponding to the standby main control board and the main main control board within a preset range.

[0018] According to another aspect of an embodiment of the present application, a non-volatile storage medium is further provided, in which a program is stored, wherein when the program is running, a device where the non-volatile storage medium is located is controlled to execute a UDP message sending method.

[0019] According to another aspect of an embodiment of the present application, a computer program product is also provided, including a computer program, and when the computer program is executed by a processor, a UDP message sending method is implemented.

[0020] In an embodiment of the present application, a network device is adopted, including a main main control board and a standby main control board, wherein the main main control board and the standby main control board are used to receive a first UDP message, and the main main control board uploads the first UDP message to the main kernel protocol stack of the main main control board, and synchronizes the first message information of the first UDP message to the standby main control board; the standby main control board calls the first UDP message through a network filtering queue module set in the standby main control board, and sends the first UDP message to the automatic repair module in the standby main control board without passing through the standby kernel protocol stack in the standby main control board, wherein the automatic repair module is used to determine the processing method of the first UDP message according to the first message information; the main main control board is also used to generate and send a second UDP message, and the standby main control board is also used to generate the second UDP message on the main main control board The third UDP message is generated in the case of a text, wherein the active main control board is also used to synchronize the second message information of the second UDP message to the standby main control board, the line card module in the standby main control board is used to intercept the third UDP message, the network filtering queue module is used to send the third UDP message to the automatic repair module, the automatic repair module is used to determine the processing method for the second UDP message and the third UDP message according to the second message information and the third message information of the third UDP message, and send the UDP message to the automatic repair module through the network filtering queue module, the automatic repair module repairs the UDP message, and the purpose of synchronizing UDP is achieved, thereby realizing the technical effect of synchronization and uninterrupted service data of the active and standby boards based on the UDP protocol, and further solving the technical problem of service interruption when the active and standby main control boards switch due to the asynchronization of UDP protocol messages in the active and standby main control boards. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0022] Figure 1 It is a schematic diagram of a UDP protocol connection solution provided according to an embodiment of the present application;

[0023] Figure 2It is a schematic diagram of a UDP protocol connection solution provided according to an embodiment of the present application;

[0024] Figure 3 is a schematic diagram of the structure of a network device provided according to an embodiment of the present invention;

[0025] Figure 4 This is a schematic diagram of the structure of the interaction between various modules in a network device provided according to an embodiment of the present invention;

[0026] Figure 5 It is a schematic diagram of a process of receiving packets by a network device according to an embodiment of the present application;

[0027] Figure 6 It is a schematic diagram of a process of sending a packet by a network device according to an embodiment of the present application;

[0028] Figure 7 It is a schematic diagram of a process of switching a main board and a standby board of a network device provided according to an embodiment of the present application;

[0029] Figure 8 It is a structural schematic diagram of a computer terminal (mobile device) provided according to an embodiment of the present application;

[0030] Fig. 9 It is a flowchart of a UDP message processing method provided according to an embodiment of the present application;

[0031] Fig.10 It is a flowchart of a UDP message processing method provided according to an embodiment of the present application;

[0032] Fig.11 It is a flowchart of a UDP message receiving method provided according to an embodiment of the present application;

[0033] Fig.12 It is a flow chart of a UDP message sending method provided according to an embodiment of the present application. DETAILED DESCRIPTION

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

[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0036] In order to better understand the embodiments of the present application, the technical terms involved in the embodiments of the present application are explained as follows:

[0037] NSR (No-Stopping Route): A reliability technology that ensures uninterrupted data transmission when the device performs active / standby switchover.

[0038] In the related art, there are two main connection solutions for handling NSR UDP: Figure 1 A UDP protocol connection scheme is shown, such as Figure 1 As shown in FIG. 1 , this solution fragments the message and adds an interactive protocol to reduce UDP protocol packet loss. Since the message needs to be fragmented and a private protocol needs to be customized, the interoperability between manufacturers is low and cannot be universal. Figure 2 Another UDP protocol connection scheme is shown, such as Figure 2 As shown in the figure, the data is correct by re-encoding the UDP protocol message. This solution is affected by the scale of the UDP protocol message of the active and standby processes. Each message needs to be encoded and decoded, which cannot adapt to large traffic scenarios.

[0039] In summary, to achieve uninterrupted services based on the UDP protocol under NSR (No-Stopping Route), some existing technologies extend the UDP protocol, some not only require the customization of new protocols, but also require the fragmentation of UDP protocol messages, and some require the use of TCP channels. Considering the packet loss and reliability requirements of the UDP protocol itself, the existing technologies face problems such as difficult development, long implementation cycle, and difficulty in unified maintenance.

[0040] In order to solve the above problems, relevant solutions are provided in the embodiments of the present application, which are described in detail below.

[0041] The present application embodiment provides a network device, such as Figure 3As shown, the network device includes a main control board 01 and a standby control board 03, wherein the main control board 01 and the standby control board 03 are used to receive a first UDP message, and the main control board 01 uploads the first UDP message to the main kernel protocol stack 02 of the main control board 01, and synchronizes the first message information of the first UDP message to the standby control board 03; the standby control board 03 retrieves the first UDP message through the network filtering queue module 05 set in the standby control board 03, and sends the first UDP message to the automatic repair module 06 in the standby control board 03 without passing through the standby kernel protocol stack 04 in the standby control board 03, wherein the automatic repair module 06 is used to Determine the processing method of the first UDP message according to the first message information; the main main control board 01 is also used to generate and send the second UDP message, and the standby main control board 03 is also used to generate a third UDP message when the main main control board 01 generates the second UDP message, wherein the main main control board 01 is also used to synchronize the second message information of the second UDP message to the standby main control board 03, the line card module 07 in the standby main control board 03 is used to intercept the third UDP message, the network filtering queue module 05 is used to send the third UDP message to the automatic repair module 06, and the automatic repair module 06 is used to determine the processing method of the second UDP message and the third UDP message according to the second message information and the third message information of the third UDP message.

[0042] Optionally, Figure 4 A schematic diagram showing the interaction of various modules in a network device is shown, such as Figure 4 As shown, the main interaction processes are:

[0043] (1) Use the dual-receive and single-transmit User Datagram Protocol messages of the master and standby boards to synchronize the User Datagram Protocol messages and business data of the master and standby boards in real time, wherein the main board (main main control board 01) receives the first UDP message and the standby board (standby main control board 03) receives the second UDP message.

[0044] (2) Using the nf_queue mechanism (i.e., network filter queue module 05) based on the four-tuple of user datagram protocol messages (i.e., UDP messages) to ensure that the user datagram protocol messages of the standby board (standby main control board 03) are not sent through the kernel protocol stack (standby kernel protocol stack 04) but are directly sent to the automatic repair module 06 in the user state;

[0045] (3) An automatic repair mechanism for the User Datagram Protocol is used to dynamically repair the packet loss status of the User Datagram Protocol (the second UDP message) of the standby board (standby main control board 03), thereby ensuring the synchronization and uninterrupted service data of the main and standby boards based on the User Datagram Protocol, mainly utilizing parameters such as the quadruple of the User Datagram Protocol message.

[0046] Optionally, the nf_queue module (network filtering queue module 05) will only run on the standby board and will only target user datagram protocol messages, while other messages still go through the kernel protocol stack, so that the user datagram protocol messages can be directly sent to user-mode applications (including automatic repair module 06) for flexible processing.

[0047] Optionally, the auto-repair module (automatic repair module 06): will only run on the spare board, parse the received user datagram protocol messages, record the four-tuple, message offset, user datagram protocol load and other user datagram protocol parameters of each user datagram protocol message, and when a new user datagram protocol message is received, it will perform a four-tuple parameter comparison to determine whether the user datagram protocol message is ahead of the main board or behind the main board, thereby notifying the application module (such as the ISIS module) to perform corresponding processing.

[0048] Specifically, when the automatic repair module of the standby board receives a new UDP message, it first parses the four-tuple parameters of the message, which include: source IP address, destination IP address, source port number, and destination port number. Check whether these four-tuple parameters match the four-tuple parameters of a previously recorded session. Each session is identified by a unique set of four-tuple parameters, so this comparison can determine which established session the new message belongs to. Once the session of the message is determined, the automatic repair module checks the message offset of the session. The message offset is an indicator that tracks the message sequence and is used to identify the location where the message is interrupted or lost.

[0049] It should be noted that the various modules in the above-mentioned network device can be program modules (for example, a set of program instructions that implement a certain specific function) or hardware modules. For the latter, it can be expressed in the following forms, but is not limited to this: the expression form of each of the above-mentioned modules is a processor, or the functions of each of the above-mentioned modules are implemented by a processor.

[0050] In some embodiments of the present application, the first message information includes the first message offset information of the first UDP message; determining the processing method for the first UDP message based on the first message information includes: the automatic repair module determines the backup message offset information of the first UDP message received by the standby main control board; compares the backup message offset information with the first message offset information; when the comparison result is that the offset indicated by the first message offset information is greater than the offset indicated by the backup message offset information, determining the processing method is to synchronize the first UDP message received by the standby main control board to the active main control board until the first message offset is greater than the offset indicated by the backup message offset information. The offset indicated by the shift information is equal to the offset indicated by the backup message offset information; when the comparison result is that the offset indicated by the first message offset information is smaller than the offset indicated by the backup message offset information, the processing method is determined to be to synchronize the first UDP message received by the active main control board to the backup main control board until the offset indicated by the first message offset information is equal to the offset indicated by the backup message offset information; when the comparison result is that the offset indicated by the first message offset information is equal to the offset indicated by the backup message offset information, the processing method is determined to not synchronize the first UDP message.

[0051] Optionally, the processing process is continuously performed, and the network device continuously receives the next first UDP message, and continuously updates the standby message offset information according to the first message information in the newly received first UDP message.

[0052] Optionally, Figure 5 The flowchart of the network device receiving the packet is shown as Figure 5 As shown in the figure, the packet receiving process of the main board (main control board 01) is as follows:

[0053] 1. The mainboard receives the user datagram message (the first UDP message) sent by DeviceA and sends it to the kernel protocol stack (main kernel protocol stack 02).

[0054] 2. The kernel protocol stack receives the user datagram message, resets the timeout timer, and the protocol processes the user datagram message.

[0055] 3. Synchronize the message offset of the main board to the standby board (standby main control board 03).

[0056] The packet receiving process of the standby board is as follows:

[0057] 1. After the standby board receives the user datagram message, the message bypasses the kernel protocol stack (standby kernel protocol stack 04) and is directly sent to the repair module (automatic repair module 06). The user state parses the user datagram message and puts the message into the buffer queue.

[0058] 2. Perform automatic repair of user datagrams, record user datagram message quadruple, synchronously update message offset, and compare the primary and backup message offsets of the same quadruple of user datagrams:

[0059] If the current message offset of the standby board is equal to the message offset of the master board, no processing will be done;

[0060] If the current message offset of the standby board is less than the message offset of the master board, the slave board synchronizes the user data message until the current offset equals the message offset of the master board.

[0061] If the current standby board message offset is greater than the master message offset, the user datagram message is synchronized to the master. After receiving the message, the master performs the same operation, that is, synchronizes the user datagram message from the standby until the master message offset equals the standby offset.

[0062] 3. Perform protocol processing and update user datagram configuration and status.

[0063] In some embodiments of the present application, sending the first UDP message to the automatic repair module in the backup main control board includes: the network filtering queue module sends the first UDP message to the automatic repair module in user state, and the automatic repair module records the quadruple information and message offset information of the first UDP message.

[0064] Optionally, updating the user datagram configuration and status includes recording and updating quadruple information and message offset information corresponding to the user datagram.

[0065] In some embodiments of the present application, the second message information includes second message offset information of the second UDP message, and the third message information includes third message offset information of the third UDP message; determining a processing method for the second UDP message and the third UDP message based on the second message information and the third message information of the third UDP message includes: comparing the second message offset information and the third message offset information; when the comparison result is that the offset indicated by the second message offset information is greater than the offset indicated by the third message offset information, determining a processing method is to synchronize the third UDP message to the main control board until the third message offset information is received. The offset indicated by the second message offset information is equal to the offset indicated by the third message offset information; when the comparison result is that the offset indicated by the second message offset information is smaller than the offset indicated by the third message offset information, the processing method is determined to be to synchronize the second UDP message to the backup main control board until the offset indicated by the second message offset information is equal to the offset indicated by the third message offset information; when the comparison result is that the offset indicated by the second message offset information is equal to the offset indicated by the third message offset information, the processing method is determined to not synchronize the second UDP message and the third UDP message.

[0066] In some embodiments of the present application, after generating the third UDP message, the standby main control board is also used to: encapsulate the third UDP message and start the timeout timer; send the encapsulated third UDP message to the standby kernel protocol stack; intercept the third UDP message processed by the standby kernel protocol stack through the line card module, and upload the intercepted third UDP message to the user state.

[0067] In some embodiments of the present application, after the intercepted third UDP message is uploaded to the user state, the automatic repair module is further used to record the quadruple information and message offset information of the third UDP message in the user state.

[0068] Optionally, Figure 6 The flowchart of the network device sending a packet is shown in FIG. Figure 6 As shown in the figure, the package issuance process of the main board (main control board 01) is as follows:

[0069] 1. The mainboard sends the protocol message and encapsulates the user datagram message.

[0070] 2. Start the timeout timer, send it to the kernel protocol stack, and send it to the neighbor device through the interface.

[0071] The process of issuing spare boards is as follows:

[0072] 1. Encapsulate the user datagram message and start the timeout timer, and send the user datagram message to the kernel protocol stack.

[0073] 2. Protocol stack processing: the line card prohibits the sending of messages, and the sent messages are sent to the user state.

[0074] 3. The user state receives and parses the user datagram message and puts the message into the buffer queue.

[0075] 4. The auto-repair module records the user datagram message quadruple and message offset, and compares the primary and backup message offsets of the same quadruple of the user datagram:

[0076] If the current message offset of the standby board is equal to the message offset of the master board, no processing will be done;

[0077] If the current message offset of the standby board is less than the message offset of the master board, the slave board synchronizes the user data message until the current offset equals the message offset of the master board.

[0078] If the current standby board message offset is greater than the master message offset, the user datagram message is synchronized to the master. After receiving the message, the master performs the same operation, that is, synchronizes the user datagram message from the standby until the master message offset equals the standby offset.

[0079] 5. Update user datagram configuration and status.

[0080] In some embodiments of the present application, when the active main control board receives a master-standby switching signal, the active main control board executes the master-standby downgrade process, thereby switching to the standby main control board; when the standby main control board receives a master-standby switching signal, the standby main control board executes the standby-master upgrade process, thereby switching to the active main control board, wherein, during the process of the standby main control board executing the standby-master upgrade process, the automatic repair module in the standby main control board is used to maintain the deviation value between the message offsets corresponding to the standby main control board and the active main control board within a preset range.

[0081] In some embodiments of the present application, during the process of the main control board executing the main-to-standby process, the main control board shuts down the protocol module in the main control board and enables the network filtering queue module and automatic repair module in the main control board, thereby switching to the standby main control board.

[0082] Optionally, Figure 7 The flowchart of the switching of the main and standby boards of the network equipment is shown in FIG. Figure 7 As shown in the figure, the switching process of the mainboard is as follows:

[0083] 1. The mainboard receives the active-standby switching signal, executes the active-standby reduction process, and the hardware switches to standby mode.

[0084] 2. Stop the protocol module and start the nf_queue module and the uto-repair module.

[0085] 3. After the switch is completed, the automatic repair process of the new standby board is executed to dynamically keep the active and standby user datagrams synchronized.

[0086] The standby board switching process is as follows:

[0087] 1. The standby board receives the master-slave switch signal and executes the standby-to-master upgrade process. The hardware switches to the master mode and the protocol module operates normally.

[0088] 2. Wait for the specified period and continue automatic repair to handle transient asynchrony during the switching process to ensure stable switching. Transient asynchrony means that there is a deviation value between the message offsets corresponding to the standby main control board and the main main control board during the switching process. The automatic repair module in the standby main control board continues to run during the switching period to determine whether there is transient asynchrony and repair it to ensure that the deviation value is within the preset range.

[0089] 3. After the waiting timer expires, stop the nf_queue module and the auto-repair module, and the new motherboard runs stably.

[0090] According to an embodiment of the present application, a network device is provided, including a main main control board and a standby main control board, wherein the main main control board and the standby main control board are used to receive a first UDP message, and the main main control board uploads the first UDP message to the main kernel protocol stack of the main main control board, and synchronizes the first message information of the first UDP message to the standby main control board; the standby main control board calls the first UDP message through a network filtering queue module set in the standby main control board, and determines the processing method of the first UDP message according to the first message information when the first UDP message does not pass through the standby kernel protocol stack in the standby main control board during the calling; the main main control board is also used to generate a second UDP message, and synchronize the second message information of the second UDP message to the standby main control board, and the standby main control board is also used to generate a third UDP message and intercept the third UDP message when the main main control board generates the second UDP message; the processing method of the second UDP message and the third UDP message is determined according to the second message information and the intercepted third UDP message.

[0091] Through the above-mentioned network equipment, automatic recovery can be achieved in the user state when the user datagram protocol packet is lost, and the service based on the user datagram protocol in the NSR scenario can be uninterrupted without manual intervention, thereby ensuring the stable operation of the service and traffic, and improving the high reliability and stability of the service based on the user datagram protocol. There is no need to modify the kernel, pure user state; the development cycle of the NSR function is greatly shortened, and the development cost is reduced; it has strong versatility and independent module development; it has good performance and can meet the scenarios of large traffic and large business volume, and the maximum packet loss during the primary and standby switching is within 50ms. It supports the effective realization of disaster recovery in large-scale 5G bearer networks, and realizes effective disaster recovery scenarios through uninterrupted routing technology with high stability and consistency of business data before and after switching. Specifically, the embodiments of the present application have the following advantages:

[0092] 1. Able to support high traffic and high business volume scenarios.

[0093] 2. The master and backup systems support real-time synchronization and batch backup.

[0094] 3. The master and standby are processed completely asynchronously, and the master and standby will not wait and be blocked.

[0095] 4. User Datagram Protocol connections are automatically repaired without manual intervention.

[0096] 5. Ensure the stability and reliability of business and systems before and after switching.

[0097] 6. There is no need to fragment the User Datagram Protocol messages, and there is no need to expand new protocol modules. The master and standby boards reduce unnecessary encapsulation and decapsulation, and the master and standby boards implement asynchronous processing, effectively improving performance.

[0098] According to an embodiment of the present application, a method embodiment of a UDP message processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0099] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 8 The hardware structure block diagram of a computer terminal (or mobile device) for implementing the UDP message processing method is shown. Figure 8 As shown, the computer terminal 80 (or mobile device 80) may include one or more (802a, 802b, ..., 802n are used to illustrate) processors 802 (the processor 802 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 804 for storing data, and a transmission device 806 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 8 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 8 More or fewer components as shown, or with Figure 8 Different configurations are shown.

[0100] It should be noted that the one or more processors 802 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 80 (or mobile device). As involved in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0101] The memory 804 may be used to store software programs and modules of application software, such as the UDP message processing method in the embodiment of the present application.

[0102] Corresponding program instructions / data storage devices, the processor 802 executes various functional applications and data processing by running the software programs and modules stored in the memory 804, that is, realizing the above-mentioned UDP message processing method. The memory 804 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 804 may further include a memory remotely arranged relative to the processor 802, and these remote memories may be connected to the computer terminal 80 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0103] The transmission device 806 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 80. In one example, the transmission device 806 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 806 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0104] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 80 (or mobile device).

[0105] In the above operating environment, the embodiment of the present application provides a UDP message processing method, such as Fig. 9 As shown, the method comprises the following steps:

[0106] Step S902, receiving and uploading the first UDP message to the active kernel protocol stack of the active main control board for processing, and synchronizing the first message information of the first UDP message to the standby main control board, wherein the first message information quadruple information includes a quadruple and a message offset.

[0107] Step S904: after generating the second UDP message, synchronizing the second message information of the second UDP message to the standby main control board, so that the standby main control board can synchronously repair the UDP message during the active-standby switching process.

[0108] Optionally, after generating the second UDP message, the active main control board encapsulates the key information carried in the message, such as the source IP address, the destination IP address, the source port number, the destination port number and the message offset, and synchronizes the second message information to the standby main control board. This synchronization process utilizes the close connection between the active main control board and the standby main control board to ensure low latency and high success rate of information transmission. After the second message information reaches the standby main control board, the second message information will be received and parsed by the automatic repair module. The module will compare the UDP message sequence state on the current standby main control board, especially the standby message offset information, with the second message offset information synchronized from the active main control board. If the offset indicated by the standby message offset information of the standby main control board is less than the offset in the second message information of the active main control board, the automatic repair module will trigger the synchronization repair process, request and receive the missing UDP message from the active main control board, until the UDP message sequence on the standby main control board is completely synchronized with the active main control board, and the message offset is consistent, thereby eliminating the data asynchronization problem that may be caused by the active-standby switching.

[0109] The key advantage of this embodiment is that it can achieve real-time synchronization and automatic repair of UDP messages by the standby main control board by synchronizing the second message information before and after the main control board switches, without relying on the kernel protocol stack or complex hardware customization. As a user-state component, the automatic repair module can flexibly handle and repair any interruptions or inconsistencies in the UDP message sequence, ensuring that UDP-based service data can remain continuous during the main-standby switching process, avoiding service interruptions caused by switching, and improving the overall stability and reliability of the system. It is especially suitable for 5G bearer network scenarios that require high reliability and large traffic processing.

[0110] In the above operating environment, the embodiment of the present application provides a UDP message processing method, such as Fig.10 As shown, the method comprises the following steps:

[0111] Step S1002: intercepting a first UDP message from the network interface of the standby main control board, and directly sending the first UDP message to the target application process without passing through the standby kernel protocol stack of the standby main control board.

[0112] Step S1004, in response to the execution of the target application process, determines whether it is necessary to synchronize the missing UDP message from the main control board according to the first message information of the first message synchronized from the main control board, so that the UDP message status on the standby control board is consistent with the UDP message status on the main control board.

[0113] Step S1006, before the active-standby switching, when the standby main control board generates a third UDP message, intercept the third UDP message, and determine whether to synchronize or send a redundant UDP message to the active main control board according to the second message information of the second UDP message synchronized from the active main control board.

[0114] In the above operating environment, the embodiment of the present application provides a UDP message receiving method, such as Fig.11 As shown, the method comprises the following steps:

[0115] Step S1102: the active main control board in the communication device receives the first UDP message, and synchronizes the first message information of the first UDP message to the standby main control board in the communication device.

[0116] Step S1104, when the active main control board receives the first UDP message, the standby main control board receives the first UDP message, wherein the standby main control board is also used to maintain the deviation value between the message offsets corresponding to the standby main control board and the active main control board within a preset range based on the first message information and the first UDP message.

[0117] Under the above operating environment, the embodiment of the present application provides a UDP message sending method, such as Fig.12 As shown, the method comprises the following steps:

[0118] Step S1202, the active main control board in the communication device generates and sends a second UDP message, and synchronizes the second message information of the second UDP message to the standby main control board in the communication device;

[0119] Step S1204, when the active main control board generates a second UDP message, the standby main control board generates and intercepts a third UDP message, and based on the third message information and the second message information of the third UDP message, maintains the deviation value between the message offsets corresponding to the standby main control board and the active main control board within a preset range.

[0120] An embodiment of the present application provides a non-volatile storage medium, in which a program is stored, wherein when the program is running, a device where the non-volatile storage medium is located is controlled to execute the above method.

[0121] An embodiment of the present application provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0122] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0123] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0124] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0125] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0126] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the relevant technology or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.

[0127] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A network device, characterized in that: It includes the main control board and the backup control board, among which: The active main control board and the standby main control board are used to receive a first UDP message, and the active main control board uploads the first UDP message to the active kernel protocol stack of the active main control board, and synchronizes the first message information of the first UDP message to the standby main control board; The standby main control board retrieves the first UDP message through a network filtering queue module set in the standby main control board, and sends the first UDP message to an automatic repair module in the standby main control board without passing through a standby kernel protocol stack in the standby main control board during the retrieval, wherein the automatic repair module is used to determine a processing method for the first UDP message according to the first message information; The active main control board is also used to generate and send a second UDP message, and the standby main control board is also used to generate a third UDP message when the active main control board generates the second UDP message, wherein the active main control board is also used to synchronize the second message information of the second UDP message to the standby main control board, the line card module in the standby main control board is used to intercept the third UDP message, the network filtering queue module is used to send the third UDP message to the automatic repair module, and the automatic repair module is used to determine the processing method of the second UDP message and the third UDP message according to the second message information and the third message information of the third UDP message.

2. The network device according to claim 1, characterized in that: The first message information includes first message offset information of the first UDP message; and determining a processing method for the first UDP message according to the first message information includes: The automatic repair module determines the standby message offset information of the first UDP message received by the standby main control board; Comparing the standby message offset information with the first message offset information; When the comparison result is that the offset indicated by the first message offset information is greater than the offset indicated by the standby message offset information, determining that the processing method is to synchronize the first UDP message received by the standby main control board to the active main control board until the offset indicated by the first message offset information is equal to the offset indicated by the standby message offset information; When the comparison result is that the offset indicated by the first message offset information is less than the offset indicated by the standby message offset information, determining that the processing method is to synchronize the first UDP message received by the active main control board to the standby main control board until the offset indicated by the first message offset information is equal to the offset indicated by the standby message offset information; When the comparison result is that the offset indicated by the first message offset information is equal to the offset indicated by the backup message offset information, it is determined that the processing method is not to perform synchronous processing on the first UDP message.

3. The network device according to claim 1, characterized in that: Sending the first UDP message to the automatic repair module in the standby main control board includes: The network filtering queue module sends the first UDP message to the automatic repair module in user mode, and the automatic repair module records the quadruple information and message offset information of the first UDP message.

4. The network device according to claim 1, characterized in that: The second message information includes second message offset information of the second UDP message, and the third message information includes third message offset information of the third UDP message; Determining a processing method for the second UDP message and the third UDP message according to the second message information and the third message information of the third UDP message includes: Comparing the second message offset information with the third message offset information; If the comparison result is that the offset indicated by the second message offset information is greater than the offset indicated by the third message offset information, determining that the processing method is to synchronize the third UDP message to the main control board until the offset indicated by the second message offset information is equal to the offset indicated by the third message offset information; If the comparison result is that the offset indicated by the second message offset information is less than the offset indicated by the third message offset information, determine that the processing method is to synchronize the second UDP message to the standby main control board until the offset indicated by the second message offset information is equal to the offset indicated by the third message offset information; When the comparison result is that the offset indicated by the second message offset information is equal to the offset indicated by the third message offset information, it is determined that the processing method is not to synchronously process the second UDP message and the third UDP message.

5. The network device according to claim 1, characterized in that: After generating the third UDP message, the standby main control board is further used for: Encapsulate the third UDP message and start a timeout timer; Sending the encapsulated third UDP message to the standby kernel protocol stack; The third UDP message processed by the standby kernel protocol stack is intercepted by the line card module, and the intercepted third UDP message is uploaded to the user state.

6. The network device according to claim 5, characterized in that: After uploading the intercepted third UDP message to the user state, the automatic repair module is further used to record the quadruple information and message offset information of the third UDP message in the user state.

7. The network device according to claim 1, characterized in that: When the active main control board receives the active-standby switching signal, the active main control board executes the active-standby reduction process, thereby switching to the standby main control board; When the standby main control board receives the master-standby switching signal, the standby main control board executes the standby-to-master process, thereby switching to the master main control board. In the process of the standby main control board executing the standby-to-master process, the automatic repair module in the standby main control board is used to maintain the deviation value between the message offsets corresponding to the standby main control board and the master main control board within a preset range.

8. The network device according to claim 7, characterized in that: During the process of the main control board executing the main-to-standby process, the main control board shuts down the protocol module in the main control board and enables the network filtering queue module and the automatic repair module in the main control board, thereby switching to the standby main control board.

9. A network device, characterized in that: It includes the main control board and the backup control board, among which: The active main control board and the standby main control board are used to receive a first UDP message, and the active main control board uploads the first UDP message to the active kernel protocol stack of the active main control board, and synchronizes the first message information of the first UDP message to the standby main control board; The standby main control board calls the first UDP message through a network filtering queue module set in the standby main control board, and determines a processing method for the first UDP message according to the first message information when the first UDP message does not pass through the standby kernel protocol stack in the standby main control board during the calling process; The active main control board is also used to generate a second UDP message, and synchronize the second message information of the second UDP message to the standby main control board, The backup main control board is also used to generate a third UDP message and intercept the third UDP message when the main main control board generates the second UDP message; determine the processing method of the second UDP message and the third UDP message based on the second message information and the intercepted third UDP message.

10. A UDP message processing method, characterized in that: include: Receive and upload the first UDP message to the main kernel protocol stack of the main control board for processing, and synchronize the first message information of the first UDP message to the standby main control board, wherein the first message information quadruple information includes a quadruple and a message offset; After the second UDP message is generated, the second message information of the second UDP message is synchronized to the standby main control board, so that the standby main control board performs synchronous repair on the UDP message during the master-slave switching process.

11. A UDP message processing method, characterized in that: include: intercepting a first UDP message from a network interface of the standby main control board, and directly sending the first UDP message to a target application process without passing through a standby kernel protocol stack of the standby main control board; In response to the execution of the target application process, determining whether it is necessary to synchronize the missing UDP message from the main control board according to the first message information of the first message synchronized from the main control board, so that the UDP message state on the standby main control board is consistent with the UDP message state on the main control board; Before the active-standby switching, when the standby main control board generates a third UDP message, the third UDP message is intercepted, and based on the second message information of the second UDP message synchronized from the active main control board, it is determined whether it is necessary to synchronize or send redundant UDP messages to the active main control board.

12. A UDP message receiving method, characterized in that: include: The active main control board in the communication device receives the first UDP message, and synchronizes the first message information of the first UDP message to the standby main control board in the communication device; When the active main control board receives the first UDP message, the standby main control board receives the first UDP message, wherein the standby main control board is also used to maintain the deviation value between the message offsets corresponding to the standby main control board and the active main control board within a preset range based on the first message information and the first UDP message.

13. A UDP message sending method, characterized in that: include: The active main control board in the communication device generates and sends a second UDP message, and synchronizes the second message information of the second UDP message to the standby main control board in the communication device; When the active main control board generates the second UDP message, the standby main control board generates and intercepts the third UDP message, and based on the third message information and the second message information of the third UDP message, maintains the deviation value between the message offsets corresponding to the standby main control board and the active main control board within a preset range.

14. A non-volatile storage medium, characterized in that: A program is stored in the non-volatile storage medium, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the UDP message processing method described in claim 10 or the UDP message processing method described in claim 11 or the UDP message receiving method described in claim 12 or the UDP message sending method described in claim 13.

15. A computer program product, characterized in that It comprises a computer program, which, when executed by a processor, implements the steps of executing the UDP message processing method described in claim 10, the UDP message processing method described in claim 11, the UDP message receiving method described in claim 12, or the UDP message sending method described in claim 13.

Citation Information

Patent Citations

  • Data synchronization method between the main board and spare board in the communication system

    CN101056195A

  • Method for ensuring graceful restarting and dual master control network device

    CN101827035A

  • Route retransmission realization device and method, and switching equipment

    CN101977139A

  • Message processing method and device

    CN111314432A

  • Message synchronization method and device

    CN117082081A