Message processing method and device, computer equipment, storage medium and computer program product
By analyzing and processing data packets containing FEC message headers, and using forward error correction technology to restore the original packet loss, it solves the network jitter and packet loss problems caused by data congestion in the wide area network, and improves network transmission Quality and user experience.
Patent Information
- Application Number
- CN202510001297.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-02-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In a wide area network, due to the complex network architecture and long transmission distance, data congestion is prone to occur, resulting in network jitter and packet loss, affecting the user experience.
Provides a message processing method, by parsing the data packet containing the FEC message header, determining it as a FEC message, and cache it to the decoding cache queue of the corresponding FEC tunnel interface. Through timed polling, the FEC message group that meets the decoding conditions is determined, and forward error correction is performed based on the redundant message to restore the original packet of the packet loss.
In the case of network congestion, packet loss messages are effectively restored through forward error correction technology, significantly improving network transmission quality and improving user experience.
Smart Images

Figure CN119402145A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a message processing method, apparatus, computer equipment, storage medium and computer program product. Background Art
[0002] In related technologies, software-defined networking (SDN) redefines the traditional network structure, deploying the original network equipment on cloud hosts or general-purpose x86 servers to provide services to users more flexibly and conveniently. Software-defined wide area network (SDWAN) is an important application of SDN technology in wide area network scenarios.
[0003] Wide area networks are prone to data congestion due to their complex network architecture and long transmission distances. Network congestion is very likely to cause network jitter and packet loss, affecting the user experience. In the case of network congestion, there are problems with network transmission quality. Summary of the invention
[0004] Based on this, it is necessary to provide a message processing method, device, computer equipment, computer-readable storage medium and computer program product that can improve network transmission quality under network congestion conditions in response to the above technical problems.
[0005] In a first aspect, the present application provides a message processing method. The method comprises:
[0006] In the case where the received data message includes an FEC message header, determining that the data message is an FEC message;
[0007] Determine the FEC tunnel interface corresponding to the FEC message by parsing the FEC message header;
[0008] Cache the FEC message in a decoding cache queue corresponding to the FEC tunnel interface;
[0009] According to the FEC tunnel interface, determining the FEC message group that meets the decoding condition in the decoding cache queue through periodic polling; each FEC message in the FEC message group has the same coding group identifier;
[0010] Forward error correction is performed based on the redundant messages in the FEC message group to obtain the original messages lost in the FEC message group.
[0011] In a second aspect, the present application also provides a message processing device. The device comprises:
[0012] Configuration module, used to configure basic parameters of PEC message and configuration parameters of FEC tunnel interface;
[0013] A forwarding module, used for determining that a received data message is an FEC message when the received data message contains an FEC message header; determining the FEC tunnel interface corresponding to the FEC message by parsing the FEC message header; caching the FEC message to a decoding cache queue corresponding to the FEC tunnel interface; determining an FEC message group that meets a decoding condition in the decoding cache queue by periodic polling according to the FEC tunnel interface; each FEC message in the FEC message group has the same coding group identifier; performing forward error correction based on redundant messages in the FEC message group to obtain an original message that is lost in the FEC message group.
[0014] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the above message processing method when executing the computer program.
[0015] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the above message processing method when executed by a processor.
[0016] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the above message processing method is implemented.
[0017] The above-mentioned message processing method, device, computer equipment, storage medium and computer program product, when the received data message contains an FEC message header, determine that the data message is an FEC message, determine the FEC tunnel interface corresponding to the FEC message by parsing the FEC message header, cache the FEC message to the decoding cache queue corresponding to the FEC tunnel interface, and determine the FEC message group that meets the decoding conditions in the decoding cache queue through periodic polling according to the FEC tunnel interface, introduce a point-to-point FEC tunnel interface, and efficiently implement FEC encapsulation and decapsulation of data packets; at the same time, utilizing the specific fact that each FEC message in the FEC message group has the same coding group identifier, forward error correction is performed based on the redundant messages in the FEC message group to obtain the original message lost in the FEC message group, and by enabling the forward error correction function, the network transmission quality is greatly improved in the case of network congestion, thereby enhancing the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] FIG1 is an application environment diagram of a message processing method in one embodiment;
[0019] FIG2 is a schematic diagram of a decoding process of a message processing method in one embodiment;
[0020] FIG3 is a schematic diagram of a FEC message format in one embodiment;
[0021] FIG4 is a schematic diagram of a message header format of an FEC message in one embodiment;
[0022] FIG5 is a schematic diagram of a decoding flow chart of a message processing method in another embodiment;
[0023] FIG6 is a schematic diagram of a process of decoding an FEC message in one embodiment;
[0024] FIG7 is a schematic diagram of an encoding flow of a message processing method in one embodiment;
[0025] FIG8 is a schematic diagram of an encoding process in one embodiment;
[0026] FIG9 is a block diagram of a message processing system in one embodiment;
[0027] FIG10 is a schematic diagram of an encoding flow of a message processing method in one embodiment;
[0028] FIG11 is a schematic diagram of a decoding process of a message processing method according to an embodiment;
[0029] FIG12 is a schematic diagram of cache contents of a decoding cache area in one embodiment;
[0030] FIG13 is a structural block diagram of a message processing device in one embodiment;
[0031] FIG. 14 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0033] Software Defined Network (SDN) redefines the traditional network structure, deploying the original network equipment on cloud hosts or general x86 servers to provide services to users more flexibly and conveniently. Software Defined Wide Area Network (SDWAN) is an important application of SDN technology in wide area network scenarios. VPP is a platform in SD-WAN open source, which can provide out-of-the-box switch or router functions. It can be deployed and run in a virtualized environment or on an x86 server, and has the characteristics of high performance, modularity, flexibility and a rich feature set. VPP is deployed in the enterprise branch as an SDWAN gateway device, and is interconnected with the enterprise headquarters through VPN through the wide area network. Due to the complex network architecture and long transmission distance, the wide area network is prone to data congestion. Network congestion is very likely to cause network jitter and cause packet loss in the transmission, affecting the user experience.
[0034] The message processing method provided in the embodiment of the present application can be applied in the application environment shown in Figure 1. The sending end 102 communicates with the receiving end 106 via the forwarding device 104 through the network.
[0035] The transmitting end 102 and the receiving end 106 may be, but are not limited to, terminals or servers, and the forwarding device 104 may be a network element device that can be used as both a transmitting end and a receiving end, and can implement the functions of a switch or a router. The terminal includes, but is not limited to, various desktop computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT device may be a smart speaker, a smart TV, a smart air conditioner, a smart car device, etc. The server may be implemented as an independent server or a server cluster consisting of multiple servers.
[0036] In one embodiment, as shown in FIG. 2 , a message processing method is provided, and the method is applied to a receiving end as an example for explanation. The receiving end may be the forwarding device 104 in FIG. 1 , or the receiving end 106 in FIG. 1 . The message processing method includes the following steps:
[0037] Step 202: When the received data message includes an FEC message header, determine that the data message is an FEC message.
[0038] Among them, a data message is an information unit transmitted in the network, containing specific data content and control information. An FEC message is a message that uses forward error correction technology, usually containing redundant information, which is used to detect and correct errors during transmission. An FEC message header is the header information of an FEC message, which is used to identify the type and related attributes of the message. An FEC message header is a specific byte sequence in a message, which is used to distinguish an FEC message from other types of messages.
[0039] In some embodiments, the data message received by the receiving end includes an FEC message with a forward error correction function and other messages without a forward error correction function. The receiving end can determine the message type of the received data message by parsing the message header of the received data message.
[0040] As shown in FIG3, the message format of the FEC message in some embodiments is shown in FIG4, and the message header format of the FEC message in some embodiments is shown in FIG4. In the FEC message of FIG3, there are FEC tunnel encapsulated messages and original messages. The FEC tunnel encapsulated messages include IP HDR, UDP HDR, and FEC HDR, and the original messages include IP HDR and data. In the FEC message header of FIG4, sequence num refers to the FEC packet sequence number, which is mainly used to identify whether the message is a coding group during decryption; Mode refers to the FEC coding mode; original packet num refers to the number of original messages in the packet; Redundant packet num refers to the number of redundant messages generated in the packet; packet num refers to the number of the current message in the packet, which must be filled in strictly according to the order of encoding, otherwise it will affect FEC decoding; packet length refers to the actual message length, and reserver is a reserved field. The receiving end parses the message header of the received data message. When the message header contains fec hdr, it can be determined that the data message contains the FEC message header and the data message is an FEC message.
[0041] Step 204: determine the FEC tunnel interface corresponding to the FEC message by parsing the FEC message header, and cache the FEC message to the decoding cache queue corresponding to the FEC tunnel interface.
[0042] The FEC tunnel interface is a specific interface for processing FEC messages, and is associated with a specific communication channel or network connection. Specifically, the FEC tunnel interface may be a logical interface specifically used to transmit FEC messages in a virtual private network (VPN).
[0043] The decoding buffer queue is a queue for storing FEC messages waiting to be decoded, and is classified according to the FEC tunnel interface. For example, the forwarding device or the receiving end opens up an area in the memory according to the FEC tunnel interface to temporarily store FEC messages and wait for them to be processed after the decoding conditions are met.
[0044] In some embodiments, after receiving the data message, the receiving end parses the FEC message header, extracts the relevant information therein, determines the FEC tunnel interface corresponding to the FEC message, and caches the data message identified as the FEC message into the decoding cache queue of the corresponding FEC tunnel interface, thereby ensuring that the FEC messages of the same tunnel interface can be processed centrally, thereby improving processing efficiency.
[0045] Step 206: According to the FEC tunnel interface, determine the FEC message group that meets the decoding condition in the decoding cache queue through periodic polling, and each FEC message in the same FEC message group has the same coding group identifier.
[0046] Among them, timed polling is an operation to check or process specific resources at certain time intervals. For example, the decoding cache queue is checked at regular intervals to see if there is an FEC message group that meets the decoding conditions. An FEC message group is a group of FEC messages with the same coding group identifier, which is used for forward error correction processing. Multiple FEC messages in the same FEC message group belong to the same coding group and are used to jointly recover the original message that has been lost. The coding group identifier is a specific code or symbol used to identify that a group of FEC messages belongs to the same coding group.
[0047] Specifically, the receiving end can check the decoding cache queue by timing polling according to the FEC tunnel interface, and the timing polling can be performed at a certain time interval, such as once every several milliseconds or seconds. For example, the system checks the decoding cache queue of each FEC tunnel interface at regular intervals to see if there is an FEC message group that meets the decoding condition.
[0048] When a group of FEC messages with the same coding group identifier is found in the decoding cache queue, the group of messages is determined to be an FEC message group. The coding group identifier is usually assigned when the message is encoded and is used to group related original messages and redundancies together for processing.
[0049] Step 208: Perform forward error correction based on the redundant messages in the FEC message group to obtain the original message that is lost in the FEC message group.
[0050] The original message is a message that carries specific transmission data, and the redundant message is a message that carries redundant information and is used for packet loss recovery and error correction of the original message. Forward error correction is a technology based on redundant messages in the FEC message group for packet loss recovery. Redundant messages contain additional information used to restore the original message. By analyzing and processing these redundant messages, the original message lost during the transmission process can be restored.
[0051] For example, when the message lost during the transmission process is the original message, it is necessary to perform forward error correction through the redundant messages in the FEC message group to obtain the lost original message.
[0052] In one embodiment, as shown in FIG. 5 , according to the FEC tunnel interface, determining the FEC message group that meets the decoding condition in the decoding cache queue by periodic polling includes:
[0053] Step 502: Determine the index information of the FEC message group to be processed from the decoding buffer matched with the FEC tunnel interface through periodic polling; the decoding buffer stores the index information of each FEC message according to the coding group sequence.
[0054] Step 504, determining the number of received messages of the same FEC message group based on the index information;
[0055] Step 506: When the number of received messages is less than the number of sent messages in the FEC message group and is greater than the number of original messages in the FEC message group, it is determined that the FEC message group meets the decoding condition.
[0056] Step 508: When the FEC message group meets the decoding condition, the FEC message group is obtained from the decoding cache queue according to the index information.
[0057] The decoding buffer is an area for storing index information related to the FEC message, and is organized according to the coding group sequence. For example, the decoding buffer can be a memory area storing a specific data structure, including the position information of each FEC message in the decoding cache queue.
[0058] Index information is information stored in the decoding buffer for quickly locating FEC messages, and may include the position of the message in the decoding cache queue, the coding group identifier, etc. The index information of the FEC message group to be processed is information used to identify the position of the FEC message group to be processed in the decoding buffer, and may be a number, a pointer, or other forms of identifiers.
[0059] The coding group sequence is a coding group organized in a certain order. Each coding group contains a group of related FEC messages. For example, the coding group sequence can be a series of consecutive digital numbers used to distinguish different coding groups. The header of the FEC message can carry the coding group sequence corresponding to the FEC message.
[0060] The number of received messages is the number of messages that have been received in the FEC message group. For example, for a specific FEC message group, the system has received 5 messages in it, so the number of received messages is 5. Correspondingly, the number of sent messages is the total number of messages sent when the FEC message group is sent, including original messages and redundant messages. For example, if a FEC message group contains 5 messages when it is sent, the number of sent messages is 8.
[0061] In some embodiments, the receiving end starts a timed polling operation according to the FEC tunnel interface. The time interval of the timed polling can be adjusted according to the performance requirements of the transmission and the network conditions. The receiving end determines the index information of the FEC message group to be processed from the decoding buffer matching the FEC tunnel interface through timed polling. The decoding buffer stores the index information of each FEC message according to the coding group sequence. Based on the found index information, the number of received messages of the same FEC message group is determined. The receiving end can count the number of messages belonging to the message group that have been received by querying the decoding cache queue or other related data structures. After determining the number of received messages, the receiving end compares it with the number of sent messages and the number of original messages of the FEC message group to determine whether the message group meets the decoding conditions.
[0062] The specific judgment condition is: the number of received messages is less than the number of sent messages in the FEC message group, and is greater than the number of original messages in the FEC message group. If this condition is met, the FEC message group is determined to meet the decoding condition. For example, the number of sent messages in an FEC message group is 8, and the number of original messages is 5. If the system has received 6 messages, then the number of received messages is less than the number of sent messages (8), and is greater than the number of original messages (5), and the decoding condition is met.
[0063] When the FEC message group meets the decoding condition, the FEC message group is obtained from the decoding cache queue according to the index information. The receiving end can use the index information to quickly locate the position of the message group in the decoding cache queue and extract it for further processing or send it to the next receiving end.
[0064] In this embodiment, through the above specific implementation methods, the receiving end can accurately determine the FEC message groups that meet the decoding conditions during the periodic polling process, and obtain these message groups from the decoding cache queue for processing, thereby improving the processing efficiency of FEC messages and the reliability of data transmission.
[0065] In some of the embodiments, the message processing method also includes: when the number of received messages is equal to the number of sent messages in the FEC message group, discarding redundant messages obtained from the decoding cache queue and sending original messages obtained from the decoding cache queue; when the number of received messages is less than or equal to the number of original messages in the FEC message group, discarding redundant messages obtained from the decoding cache queue and sending part of the original messages obtained from the decoding cache queue.
[0066] Specifically, the receiving end continuously monitors the received messages and counts the number of received messages of a specific FEC message group. For example, the receiving end determines the number of received messages by checking the number of messages in the decoding cache queue. Whenever a new message is received, the receiving end updates the count of the number of received messages. The receiving end compares the number of received messages with the number of sent messages of the FEC message group.
[0067] If the number of received messages is equal to the number of sent messages, it means that the receiving end has received all messages of the FEC message group. When the number of received messages is equal to the number of sent messages of the FEC message group, the receiving end discards the redundant messages obtained from the decoding cache queue. Then, the receiving end sends the original message obtained from the decoding cache queue. For example, the number of sent messages of an FEC message group is 8. When the receiving end receives 8 messages, it determines that the number of received messages is equal to the number of sent messages. The receiving end discards the redundant messages and sends all the original messages to the subsequent receiving end.
[0068] If the number of received messages is less than or equal to the number of original messages, it means that the message received by the receiving end is incomplete. When the number of received messages is less than or equal to the number of original messages in the FEC message group, the receiving end discards the redundant messages obtained from the decoding cache queue. Then, the receiving end sends part of the original messages obtained from the decoding cache queue. For example, there are 5 original messages in the FEC message group. When the receiving end only receives 3 messages, the receiving end discards the redundant messages in the 3 messages and sends the original messages in the 3 messages to the subsequent receiving end.
[0069] As shown in Figure 6, the receiving end first traverses the encoding buffer area to determine whether the status of the pending packet ID in the buffer area is valid. If it is invalid, this scheduling ends. If it is valid, proceed to the next step. Determine that all messages in the packet ID have been received, and directly send the original message to the subsequent receiving end, and discard the redundant message. Determine whether the packet ID has reached the timeout time and determine whether the FEC decoding conditions are met. If the conditions are met, call the FEC decoding function. After the FEC decoding is completed, send the original message to the subsequent receiving end, and discard the redundant message. If the decoding conditions are not met, in order to reduce the packet loss rate, send the original message to the subsequent receiving end, and discard the redundant message.
[0070] In this embodiment, the receiving end can take corresponding processing measures according to different situations of the number of received messages, so as to ensure that the FEC message group can be effectively processed under different receiving states, thereby improving the reliability and efficiency of data transmission.
[0071] In some embodiments, as shown in FIG7 , the message processing method further includes a message encoding and sending process, wherein the message encoding and sending process can be implemented based on a sending end, and the sending end can specifically be the forwarding device 104 shown in FIG1 , or the sending end 102. The message processing method further includes the following steps:
[0072] Step 702: Buffer the original message to be sent into the message buffer area.
[0073] Step 704: perform redundant encoding on the original message in the message buffer area to generate a redundant message belonging to the same encoding group as the original message.
[0074] Step 706: Generate an FEC message header according to the number of original messages and the number of redundant messages in the same coding group.
[0075] Step 708: Based on the FEC message header, UDP encapsulate the original message and the redundant message respectively, obtain the FEC message belonging to the same coding group and send it.
[0076] The message buffer is a storage area configured based on the FEC tunnel interface. The message buffer can be an area in the memory or a file on the hard disk. Its purpose is to process the original message and generate redundant messages.
[0077] A coding group is a set of related original messages and redundant messages. These messages have the same coding characteristics and are used for forward error correction during data transmission. For example, in a video transmission system, the sender divides a video file into multiple original messages and generates some redundant messages. These original messages and redundant messages form a coding group. For example, a video file is divided into 1000 original messages, and the sender generates 100 redundant messages. These 1100 messages form a coding group. During the transmission process, if part of the original message is lost, the receiver can recover the lost original message through the redundant message in the coding group. The receiver performs forward error correction based on the message characteristics in the coding group, thereby receiving the video file completely.
[0078] In a data transmission system, the FEC message header can contain information such as the code group identifier, the number of original messages, the number of redundant messages, and the checksum. For example, a code group contains 100 original messages and 20 redundant messages. The FEC message header generated by the sender will clearly identify the characteristics of this code group. After receiving the FEC message, the receiver first parses the FEC message header to obtain the information of the code group, and then performs forward error correction based on this information. If the receiver finds that the checksum in the FEC message header does not match the content of the received message, it means that an error may have occurred during the transmission of the message, and the receiver can perform error correction based on the redundant message.
[0079] UDP (User Datagram Protocol) encapsulation is a technology that encapsulates the original message and redundant message into a UDP data packet. UDP is a connectionless transport layer protocol that has the characteristics of fast transmission, but does not guarantee the reliability of data. Through UDP encapsulation, FEC messages can be quickly transmitted in the network. For example, in an online game system, the sender needs to send the game player's operation data as the original message. To ensure that the message can pass smoothly through the security device in the network that may have recognition obstacles to the custom protocol, the sender uses UDP encapsulation technology to encapsulate the original message and redundant message into a UDP data packet for transmission. This avoids the risk of being misjudged and discarded. This solution not only enhances the compatibility and accessibility of the message, but also has a high degree of flexibility. For example, the game player's movement, attack and other operation data in the game are used as original messages. After the sender generates some redundant messages, these messages are encapsulated into UDP data packets. Since the UDP protocol does not guarantee the reliability of data, the sender needs to generate redundant messages to ensure that the receiving end can correctly receive the player's operation data. After receiving the UDP data packet, the receiving end parses the data packet, obtains the original message and redundant messages, and performs forward error correction operations to ensure the normal progress of the game.
[0080] The sender first determines the original messages to be sent. These original messages can come from various data sources, such as files, sensor data, user input, etc. Then, the sender stores these original messages in the message buffer. The message buffer can be a specific area in the memory of the sender device or a file on the hard disk. For example, in a video surveillance system, the sender is a camera device. The video frames collected by the camera are stored in the message buffer as original messages by the sender. The sender can set a buffer size, and when the number of messages in the buffer reaches a certain threshold, subsequent processing operations are performed. This ensures that the sender can efficiently process and send messages in the form of coding groups, and can also implement forward error correction through redundant messages to avoid message loss due to network congestion and other reasons.
[0081] The sender reads the original message from the message buffer and performs redundant coding on it. Redundant coding can use various algorithms, such as Hamming code, Reed-Solomon Code, etc. The purpose of redundant coding is to generate some additional messages, which can help the receiver recover the lost original message when some packets of the original message are lost. The generated redundant message belongs to the same coding group as the original message, and they have the same coding characteristics, so forward error correction can be performed on the receiver.
[0082] For example, in a file transfer system, the sender performs redundant encoding on the original message in the message buffer. The sender first determines the encoding parameters, such as the number of original messages, the number of redundant messages, etc. Then, the sender encodes the original message according to these parameters to generate multiple redundant messages. These redundant messages together with the original message form a coding group. During the transmission process, if part of the original message is lost, the receiving end can perform error correction and recovery operations based on the redundant messages in the coding group, thereby receiving the file completely.
[0083] In some embodiments, the sending end determines the number of original messages and the number of redundant messages in the same coding group, and the sending end generates an FEC message header based on the number of original messages and the number of redundant messages, as well as other relevant information. For example, in a network communication system, the sending end determines that a coding group contains 100 original messages and 20 redundant messages. The sending end generates an FEC message header based on this information, which includes information such as the identifier of the coding group, the number of original messages, and the number of redundant messages. The sending end can also calculate the checksum of the message and include it in the FEC message header. In this way, after receiving the FEC message, the receiving end can verify the integrity of the message through the checksum. If the checksum does not match, it means that an error may have occurred in the message during transmission, and the receiving end can perform error correction operations based on the redundant message.
[0084] The sender combines the generated FEC message header with the original message and the redundant message. Then, the sender uses the UDP protocol to encapsulate the original message and the redundant message to obtain the FEC message belonging to the same coding group. Finally, the sender sends these FEC messages and can send them to the receiver through the network. For example, in an online game system, the sender combines the generated FEC message header with the game player's operation data (original message) and redundant message. Then, the sender uses the UDP protocol to encapsulate these messages to obtain FEC messages. The sender sends these FEC messages to the receiver through the network. After receiving the FEC message, the receiver parses the message, obtains the original message and the redundant message, and performs forward error correction operations to ensure the normal progress of the game.
[0085] In this embodiment, the sending end can process the original message to be sent, generate an FEC message and send it out, so as to ensure the reliability of the data during the transmission process.
[0086] In some embodiments, the maximum number of original messages in the same coding group is M, the maximum number of redundant messages is N, and both M and N are positive integers. Redundant encoding is performed on the original message in the message buffer to generate redundant messages belonging to the same coding group as the original message, including:
[0087] If the number of original messages cached in the message buffer reaches M within the preset time length, N redundant messages are generated through redundant coding; if the number of original messages cached in the message buffer is less than M after exceeding the preset time length, a corresponding number of redundant messages are generated according to the preset redundancy ratio.
[0088] The maximum number of original messages, M, is the maximum number of original messages that can be accommodated in a coding group. This number is pre-set and determined according to the specific application scenario and data transmission requirements. The larger the value of M, the more original messages can be included in the coding group, but it will also increase the complexity of processing and transmission. For example, in a file transfer system, assume that the maximum number of original messages, M, is 100. The sender divides a large file into multiple original messages for transmission, and each coding group can contain up to 100 original messages. If the file is large, multiple coding groups may be required to transmit the entire file. When generating a coding group, the sender determines whether to generate a new coding group based on the number of original messages and the value of M. If the number of original messages reaches M, a new coding group is started. This ensures that the size of each coding group is moderate and easy to process and transmit.
[0089] The maximum number of redundant messages N is the maximum number of redundant messages that can be generated in a coding group. Redundant messages are generated by redundantly encoding the original messages and are used to recover when the original messages are lost. The value of N is usually determined based on the number of original messages and the reliability requirements of data transmission, such as the maximum allowable packet loss rate. For example, in a network communication system, it is assumed that the maximum number of redundant messages N is 20. When the sender performs redundant encoding on the original message, it determines the number of redundant messages to be generated based on the number of original messages and the value of N. If the number of original messages is large, more redundant messages can be generated to improve the reliability of data transmission. However, if the value of N is too large, the bandwidth occupancy of the transmission and the complexity of processing will increase. Therefore, it is necessary to reasonably set the redundancy ratio or the maximum allowable packet loss rate according to the actual situation to determine the value of N.
[0090] The preset duration is a pre-set time length. During this time, if the number of original messages in the message buffer reaches the maximum number of original messages M, redundant coding is performed to generate N redundant messages. If the number of original messages in the buffer is less than M after the preset duration, a corresponding number of redundant messages are generated according to the preset redundancy ratio. The setting of the preset duration can be determined according to the real-time requirements of data transmission and the processing capacity of the system. For example, in an online game system, it is assumed that the preset duration is 100 milliseconds. When the sender sends the player's operation data as original messages, it caches these messages in the message buffer. If the number of original messages in the message buffer reaches the maximum number of original messages M within 100 milliseconds, the sender immediately performs redundant coding to generate N redundant messages and sends these messages out. This ensures that the player's operation can be transmitted to other players' clients in a timely manner, ensuring the real-time nature of the game. If the number of original messages in the buffer is less than M after more than 100 milliseconds, the sender generates a corresponding number of redundant messages according to the preset redundancy ratio and sends them out. This can ensure the reliability of data transmission to a certain extent. Even if part of the original message is lost, it can be restored through the redundant message.
[0091] The redundancy ratio is used to determine the ratio of the number of redundant messages generated. The redundancy ratio can be determined based on the reliability requirements of data transmission and the resource limitations of the system. Generally, the higher the redundancy ratio, the more redundant messages are generated, and the higher the reliability of data transmission, but it also increases the bandwidth occupancy and processing complexity of transmission. For example, in a data backup system, assuming that the redundancy ratio is 5:1, this means that when the number of original messages in the message buffer is less than the maximum number of original messages M, the sender will generate redundant messages according to 20% of the number of original messages. For example, if there are 80 original messages in the message buffer, according to the redundancy ratio, the sender will generate 16 redundant messages. This can ensure the reliability of data backup to a certain extent. Even if some original messages are lost during transmission, they can be restored through redundant messages. However, if the redundancy ratio is set too high, it will result in too many redundant messages being generated, increasing the bandwidth occupancy and storage pressure of transmission. Therefore, it is necessary to set the redundancy ratio reasonably according to the actual situation.
[0092] In some specific embodiments, the sending end continuously monitors the number and time of original messages in the message buffer area, and the sending end may use a timer or other time monitoring mechanism to determine whether the preset time length has been exceeded. For example, in a real-time video transmission system, the sending end checks the number and time of original messages in the message buffer area once per second. If it is found that the number of original messages in the message buffer area has reached the maximum number of original messages M, or has exceeded the preset time length, corresponding processing will be performed.
[0093] If the number of original messages cached in the message buffer reaches the maximum number of original messages M within the preset time, it means that batch processing can be performed at this time to improve processing efficiency. For example, in a file transfer system, assume that the preset time is 5 seconds and the maximum number of original messages M is 1000. If the number of original messages in the message buffer reaches 1000 within 5 seconds, the sender will immediately perform redundant encoding to generate N redundant messages. Avoid frequent processing of small batches of messages and improve processing efficiency.
[0094] When the number of original messages cached in the message buffer reaches M within the preset time, the sender generates N redundant messages through redundant coding. These redundant messages form a coding group together with the original message and send it to the receiver. After receiving the message, the receiver can perform forward error correction based on the redundant message to recover the lost original message.
[0095] If the number of original messages cached in the message buffer is less than the maximum number of original messages M after exceeding the preset time, it means that batch processing cannot be performed at this time, and a corresponding number of redundant messages need to be generated according to the preset redundancy ratio. For example, in a real-time data acquisition system, assume that the preset time is 100 milliseconds, the maximum number of original messages M is 100, and the redundancy ratio is 1:0.1. If after 100 milliseconds, the number of original messages in the message buffer is only 80, then the sender will generate 8 redundant messages according to the redundancy ratio. This can ensure the reliability of data transmission to a certain extent, and even if the number of original messages is small, it can be recovered through redundant messages.
[0096] When the number of original messages cached in the message buffer is less than M after exceeding the preset time, the sender generates a corresponding number of redundant messages according to the preset redundancy ratio. For example, in a sensor data transmission system, the sender collects sensor data as original messages once a second and caches them in the message buffer. Assume that the preset time is 2 seconds, the maximum number of original messages M is 100, and the redundancy ratio is 5:1. If after 2 seconds, the number of original messages in the message buffer is only 70, then the sender will generate 14 redundant messages according to the redundancy ratio. These redundant messages form a coding group together with the original message and send it to the receiver. After receiving the message, the receiver can perform forward error correction operations based on the redundant message to recover the lost original message.
[0097] In this embodiment, through the above specific implementation methods, the sending end can flexibly generate redundant messages according to the number and time of original messages in the message buffer area, thereby improving the reliability and efficiency of data transmission.
[0098] In some embodiments, based on the original message read from the message buffer, generating a redundant message belonging to the same coding group as the original message through redundant coding includes:
[0099] Based on the message lengths of the multiple original messages read from the message buffer area, the maximum message length is determined; the maximum message length is used as the message length of the redundant message, and redundant encoding is performed based on each original message to generate a redundant message belonging to the same encoding group as the original message.
[0100] Among them, the message length refers to the amount of data contained in the original message or redundant message. It is usually measured in bytes. The message length is of great significance for determining the generation method of redundant messages and the resource allocation in the process of data transmission and storage. In an image transmission system, the sender needs to send a series of image files. Each image file is divided into multiple original messages for transmission. Different image files have different sizes, so the message lengths of the corresponding original messages are also different. For example, the original message length corresponding to a smaller image file may be 10KB, while the original message length corresponding to a larger image file may be 50KB. When determining the generation method of redundant messages, the sender needs to consider the message lengths of these original messages. If the message lengths of all original messages are quite different, then when generating redundant messages, it is necessary to select a redundant coding algorithm that can adapt to different message lengths to ensure that the lost original messages can be effectively restored in various situations.
[0101] The maximum message length is the length of the original message with the largest message length among the multiple original messages read from the message buffer. Using the maximum message length as the message length of the redundant message can ensure that the redundant message can contain enough information for error correction and recovery operations. In a data backup system, the sender uses multiple files as original messages for backup transmission. The sizes of these files are different, and the message lengths of the corresponding original messages are also different. After reading these original messages from the message buffer, the sender determines the maximum message length. For example, suppose there are three files corresponding to the original messages in the message buffer, and the message lengths are 20KB, 30KB and 40KB respectively. Then the maximum message length is 40KB. The sender uses this maximum message length as the message length of the redundant message and performs redundant encoding to generate redundant messages. The redundant messages generated in this way can adapt to the loss of original messages of different sizes to a certain extent, and improve the reliability of data backup.
[0102] In some embodiments, the sending end reads multiple original messages from the message buffer. These original messages may be added to the message buffer at different time points and may have different message lengths and contents. For example, in a network monitoring system, the sending end continuously receives data packets from various monitoring devices as original messages and stores them in the message buffer. The sending end periodically reads these original messages from the message buffer, processes them, and generates redundant messages. Assume that the sending end reads an original message from the message buffer every 10 milliseconds. In one reading, multiple original messages of different lengths may be read, and these messages contain information such as images, videos, or sensor data collected by the monitoring device during this period.
[0103] The sender compares the message lengths of the multiple original messages read to determine the maximum message length, which can be achieved by traversing all the original messages and comparing their message lengths one by one.
[0104] For example, as shown in Figure 8, the sender reads five original messages pkt1, pkt2, pkt3, pkt4, and pkt5 from the message buffer, and their message lengths are len1, len2, len1, len3, and len1, respectively. The sender compares these message lengths and determines that the maximum message length is len3, the message length of pkt4. This maximum message length will serve as an important reference for the subsequent generation of redundant messages, and the message lengths of the subsequent redundant messages are all len3.
[0105] The sender uses the determined maximum message length as the message length of the redundant message, performs redundant encoding based on each original message, and generates redundant messages that belong to the same coding group as the original message. The sender encodes each original message based on the maximum message length to generate corresponding redundant messages. Assuming that the maximum message length is 200KB, the sender generates a certain number of redundant messages based on this length and the content of the original message. These redundant messages, together with the original message, form a coding group for error correction and recovery during data storage and transmission. If part of the original message is lost or damaged during storage or transmission, the receiver can use the characteristics of the redundant message and the coding group to recover the lost original message through decoding and error correction algorithms to ensure data integrity and reliability.
[0106] During the encoding process, the source data message will not be segmented. Instead, the maximum message length of the source data message in the current group to be encoded is obtained, and the maximum lengths of all messages are aligned. Furthermore, in order to prevent the presence of dirty data in the message buffer area and affect the decoded data, the insufficient part of the source data message needs to be initialized to 0. The encoding process can directly use the vlib_buffer message buffer area to perform encoding without allocating additional memory. The advantage of this processing is that the original data message is directly decrypted in the FEC decryption process, and no other processing is required. The message modification is minimized to improve the processing performance.
[0107] In this embodiment, based on the redundant data generation strategy of the maximum message size, the redundant data required for FEC is automatically generated according to the maximum message size in the data stream. This strategy effectively reduces the intensive occupation and frequent access of memory during the encoding and decoding process, greatly improves the processing efficiency, ensures the high-speed and low-latency characteristics of data transmission, and optimizes the resource allocation and system response sensitivity when executing FEC tasks.
[0108] In a specific application, a message processing method is provided, which can implement forward error correction based on VPP. By enabling the forward error correction function, the network transmission quality is greatly improved in the case of network congestion, and the user experience is enhanced.
[0109] Specifically, software-defined networking (SDN) redefines the traditional network structure, deploying the original network equipment on cloud hosts or general-purpose x86 servers to provide services to users more flexibly and conveniently. Software-defined wide area network (SDWAN) is an important application of SDN technology in wide area network scenarios. VPP is a good platform in SD-WAN open source, which can provide out-of-the-box switch or router functions. VPP is deployed in enterprise branches as an SDWAN gateway device, and is interconnected with the enterprise headquarters through VPN through the wide area network. The wide area network is prone to data congestion due to its complex network architecture and long transmission distance. Network congestion is very likely to cause network jitter and cause packet loss, affecting the user experience. Therefore, some error control technologies are needed to improve the reliability of data transmission on the network. Forward error correction technology is a packet loss recovery technology applied in the wide area network. Its core purpose is to improve the reliability and integrity of data transmission without relying on the retransmission mechanism. Its working principle is to use some encoding technology before sending data to generate a certain number of redundant data packets from a certain number of source data packets according to the link quality, and mark the source data packets and redundant packets with FEC encoding information and send them to the receiving end. The receiving end can identify whether there is packet loss on the link based on the FEC encoding information carried by the message. In the case of packet loss, as long as the number of received packets (source data packets + redundant data packets) is greater than the number of source data packets, the source data packets can be restored through the redundant data packets. As an SDWAN network element device, VPP software implements the forward error correction function in VPP, which can effectively improve the transmission quality of data in the wide area network.
[0110] In order to prevent the custom IP protocol from being easily discarded by security devices in the network due to inability to identify it, UDP encapsulation is used to carry FEC messages. Users can customize the port number to identify FEC messages. The system architecture of implementing forward error correction based on VPP software is shown in Figure 9.
[0111] The overall system framework is divided into two parts: configuration module and forwarding module. The configuration module mainly allows users to connect to the VPP software system through the VPP command line configuration program vppctl or the vapi interface to perform basic FEC configuration and FEC tunnel interface configuration. The forwarding module mainly allows VPP to read messages from the network card through the PMD module of the data platform development kit (DPDK) and store them in the message buffer area of VPP. The FEC encoding module reads messages from the message buffer area, calls the FEC encoding module to perform encoding, and obtains redundant data messages; after filling in the FEC message header information, it encapsulates the outer UDP header and IP header of the FEC tunnel, and sends it to the routing module for routing forwarding processing and then sends it out from the network card. After receiving the data message, the receiving end determines whether it is an FEC message; if it is an FEC message, the FEC message header information is parsed and stored in the current FEC tunnel decoding cache queue. The FEC decoding module periodically polls the cache area based on the FEC interface information. After the decoding conditions are met, the FEC decoding operation is performed to obtain the source message data after the loss. The source message data is sent to the routing module for routing forwarding processing and then sent out from the network card.
[0112] Configuration module, used to implement FEC basic configuration, FEC basic configuration contains the following fields:
[0113] packet-loss-ratio: FEC packet loss ratio. Users can set a set of redundancy ratios to cope with different network packet loss situations and select different redundancy ratios to improve transmission quality with minimal additional bandwidth consumption.
[0114] block-size: Configures the number of encoding blocks, that is, the number of original packets per which redundant packets are calculated.
[0115] encode-timeout: FEC encryption timeout waiting time. During the encryption waiting time, if the number of redundant received messages is less than the number of encoding blocks, message encryption and decryption are performed according to the redundancy corresponding to the number of received messages.
[0116] decode-timeout FEC decryption timeout waiting time. Users can set the decryption timeout length to choose between optimal latency or optimal packet loss. Configure the decryption timeout waiting time to a smaller value, and directly perform FEC decryption on the received cached message without waiting, ensuring the lowest transmission delay for a single message. Configure the decryption timeout waiting time to a larger value, and wait as long as possible to receive the message, ensuring the lowest packet loss.
[0117] Configuration module, used to configure parameters of FEC tunnel interface.
[0118] After the FEC tunnel interface is created, it is necessary to allocate the message encoding buffer, FEC decoding buffer and initialize the message group sequence number based on the interface. The FEC encoding buffer is a message buffer structure created based on the tunnel interface to store the key parameters required by the FEC encoding module. In order to improve access efficiency and avoid cache consistency issues, the data structure is defined according to the message cacheline alignment.
[0119] The specific pseudo code is as follows:
[0120] / Pseudocode: FEC encoding buffer data structure definition
[0121] / / Purpose: Encapsulate all key parameters required by the FEC encoding module, with a focus on management and transmission.
[0122] typedef struct {
[0123] CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
[0124] u32 seq_num; / *packet sequence number* /
[0125] / *Tunnel encapsulation outer IP header information* /
[0126] u32 sw_if_index;
[0127] u32 outer_fib_index;
[0128] ip4_address_t tunnel_src;
[0129] ip4_address_t tunnel_dst;
[0130] / *Record the message arrival time in the buffer area* /
[0131] f64 start_time;
[0132] / *Number of messages in the current buffer* /
[0133] u32 n_vectors;
[0134] / *Message buffer area* /
[0135] u32 buffer_index[4*1024 + 4];
[0136] };
[0137] The FEC decoding buffer is a contiguous memory space pre-configured according to the FEC packet ID data structure in order to improve FEC processing efficiency. The size of the buffer is deliberately designed to be a power of 2, for example, it is set to a length of 2048, and the mask value used at this time is 2047. With this processing method, the index value of the packet ID can be quickly determined by performing a bitwise AND operation on the sequence number in the FEC header and the buffer length mask.
[0138] Furthermore, based on the packet number (packet num) in the FEC header, the position of the corresponding message to be processed in the FEC decoding buffer can be accurately located, and then the index of the message in the vlib_buffer cache system is recorded. This process is summarized as follows:
[0139] 1. Calculate the packet ID index: Packet ID index = (Sequence Num in FEC header) & (Buffer length mask)
[0140] 2. Locate the message location and record the vlib_buffer message index: According to the Packet Num in the FEC header, find the exact location in the FEC decoding buffer and save the index information of the message in the VLIB cache. This design not only ensures efficient memory usage, but also speeds up the packet identification and processing process, improving the overall FEC decoding efficiency.
[0141] In addition, the maximum transmission unit (MTU) of the FEC interface should be set to an appropriate value based on actual business needs to reduce the fragmentation of data packets. Especially for TCP traffic, the MSS clamp function can be enabled on the FEC tunnel interface to optimize by adjusting the maximum segment size (MSS). The specific approach is to monitor the MSS negotiation process during the handshake phase of TCP connection establishment and dynamically adjust it to a more appropriate value as needed, thereby improving data transmission efficiency at the source and further speeding up network transmission performance.
[0142] VPP is a high-performance network processor. In order to reduce the loss of FEC encoding processing on VPP performance, it is proposed to generate redundant messages according to the maximum length of the original message in the packet sequence number.
[0143] The encoding module does not perform any segmentation on the source data message, but obtains the maximum message length of the source data message in the current group to be encoded, and aligns the maximum lengths of all messages. In order to prevent the presence of dirty data in the message buffer area and affect the decoded data, the insufficient part of the source data message needs to be initialized to 0. The encoding module can directly use the vlib_buffer message buffer area to perform encoding without allocating additional memory.
[0144] The advantage of this method is that the original data message is directly decrypted in the FEC decryption process, and no other processing is required. The message modification is minimized, which improves the processing performance.
[0145] Figure 10 is a basic FEC encoding service processing flow chart. After the original message is sent to the fec interface through routing query, the fec interface caches the message in the encryption cache queue. fec-encode-input is a coding node registered as input type, which periodically polls the number of messages in the message cache. There are two processing logics: 1. When the number of messages reaches the number of coding blocks, the fec encoding function is called to perform fec encoding; 2. After the encoding timeout arrives, when the number of messages in the cache does not reach the number of coding blocks, the redundancy ratio is selected according to the number of messages for fec encoding. After the encoded message is encapsulated with fec header + udp header + ip header, the route is queried again and sent out from the network card.
[0146] Figure 11 is a basic FEC decoding service processing flow chart. After the FEC message is sent to the fec-decode-node node for processing after the destination IP address is queried by the routing and is identified as the FEC message port, the FEC message is sent to the fec-decode-node node for processing. The FEC interface index can be queried through the outer encapsulation IP header. Get the FEC decoding buffer location. Get the packet ID index through the mask of sequencenum & cache length in the FEC header information. Get the position of the message in the packet ID cache through the packet num in the FEC header information, and store the message vlib_buffer index. And set the current packet ID status to valid.
[0147] fec-encode-input is a coding node registered as input type, which periodically polls the decoding buffer. The schematic diagram of the decoding buffer is shown in Figure 12. The general process of periodically polling the decoding buffer is as follows:
[0148] 1. First, traverse the decoding buffer area to determine whether the status of the pending packet ID in the buffer area is valid. If not, this scheduling ends. If valid, proceed to the next step.
[0149] 2. Determine that all messages in the group ID have been received, send the original message directly, and discard the redundant message.
[0150] 3. Determine whether the packet ID has reached the timeout time and whether the FEC decoding conditions are met. If the conditions are met, the FEC decoding function is called. After FEC decoding is completed, the original message is sent and the redundant message is discarded. If the decoding conditions are not met, in order to reduce the packet loss rate, the original message is sent and the redundant message is discarded.
[0151] Through the above message processing method, the following technical effects can be achieved:
[0152] 1. Implemented a universal forward error correction (FEC) encapsulation protocol, which aims to efficiently transmit raw data messages across different network environments. To ensure that the message can pass smoothly through security devices in the network that may have recognition barriers to custom protocols, we use UDP encapsulation technology to wrap FEC messages to avoid the risk of being misjudged and discarded. This solution not only enhances the compatibility and accessibility of messages, but also has a high degree of flexibility. It is not limited to application within the VPP (Vector Packet Processing) software framework, but can also be widely deployed in a variety of network architectures, improving the versatility and practicality of the system.
[0153] 2. Aiming at high-performance network processing environment, we creatively designed and implemented a highly integrated forward error correction (FEC) function expansion system on the VPP (Vector Packet Processing) platform. This system uses advanced data processing technology and optimization strategies to improve the reliability and efficiency of network data transmission. Its core components and innovations are summarized as follows:
[0154] (1) Innovative design of point-to-point FEC tunnel logical interface: A point-to-point FEC tunnel logical interface is innovatively introduced on the VPP platform, which is specifically used to efficiently implement FEC encapsulation and decapsulation operations of data packets. This design aims to enhance the reliable transmission and error tolerance of data across complex network environments, while fully utilizing the VPP platform's excellent packet processing speed and minimizing processing delays, thereby fully pushing the boundaries of network performance.
[0155] (2) Redundant data generation strategy based on the maximum message size of the packet sequence: In view of the unique advantages of the VPP platform in high-performance network processing, this solution has proposed a breakthrough method, that is, to automatically generate the redundant data required for FEC based on the maximum message size in the data stream. This strategy effectively reduces the intensive occupation and frequent access of memory during the encoding and decoding process, greatly improves processing efficiency, ensures the high-speed and low-latency characteristics of data transmission, and optimizes the resource allocation and system response sensitivity when VPP performs FEC tasks.
[0156] (3) Systematic construction of the full-link FEC encoding and decoding business process: A complete FEC business processing flow from encoding to decoding is designed in detail to ensure that each step of the operation is precisely designed and optimized to meet the stringent requirements for lossless data transmission in a high-performance network environment.
[0157] (4) MSS clamp plug-in integrated application: Easily enable the MSS Clamp function on the forward error correction (FEC) interface, thereby intelligently integrating it into the TCP MSS (maximum segment size) adjustment mechanism. When processing TCP traffic, it monitors the MSS negotiation in the handshake phase and intelligently adjusts it to the optimal value to reduce unnecessary packet fragmentation, improve data transmission efficiency from the source, and accelerate network performance, demonstrating a forward-looking perspective on the deep integration and optimization of existing network protocols.
[0158] (5) Innovative enhancement of the timeout processing mechanism: For the FEC timeout processing process, the VPP platform's INPUT node timing execution feature is cleverly utilized to creatively design and implement two dedicated processing nodes, fec-encode-input and fec-decode-input. These two nodes are configured to periodically monitor and poll the message data cache area to ensure immediate response and efficient management of potential timeout situations. Through this mechanism, not only is the processing logic of timeout events in the FEC process optimized, but the timeliness and reliability of the system's processing of network data packets are further improved, demonstrating the refined control and management capabilities in a high-performance network environment.
[0159] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0160] Based on the same inventive concept, the embodiment of the present application also provides a message processing device for implementing the message processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more message processing device embodiments provided below can refer to the limitations on the message processing method above, and will not be repeated here.
[0161] In one embodiment, as shown in FIG. 13 , a message processing device is provided, including: a configuration module 1302 and a forwarding module 1304, wherein:
[0162] Configuration module 1302, used to configure basic parameters of PEC message and configuration parameters of FEC tunnel interface;
[0163] Forwarding module 1304 is used to determine that the data packet is an FEC packet when the received data packet contains an FEC packet header; determine the FEC tunnel interface corresponding to the FEC packet by parsing the FEC packet header; cache the FEC packet to the decoding cache queue corresponding to the FEC tunnel interface; determine the FEC packet group that meets the decoding conditions in the decoding cache queue through timed polling according to the FEC tunnel interface; each FEC packet in the FEC packet group has the same coding group identifier; perform forward error correction based on the redundant packets in the FEC packet group to obtain the original packet lost in the FEC packet group.
[0164] In some embodiments, the forwarding module 1304 includes a decoding module, which is specifically used to determine the index information of the FEC message group to be processed from the decoding buffer matching the FEC tunnel interface through periodic polling; the decoding buffer stores the index information of each FEC message according to the coding group sequence; the number of received messages of the same FEC message group is determined based on the index information; when the number of received messages is less than the number of sent messages of the FEC message group and is greater than the number of original messages in the FEC message group, it is determined that the FEC message group meets the decoding conditions; when the FEC message group meets the decoding conditions, the FEC message group is obtained from the decoding cache queue according to the index information.
[0165] In some embodiments, the decoding module is specifically used to discard redundant messages obtained from the decoding cache queue and send original messages obtained from the decoding cache queue when the number of received messages is equal to the number of sent messages in the FEC message group; when the number of received messages is less than or equal to the number of original messages in the FEC message group, discard redundant messages obtained from the decoding cache queue and send part of the original messages obtained from the decoding cache queue.
[0166] In some embodiments, the forwarding module 1304 includes a coding module, which is specifically used to cache the original message to be sent to a message buffer area; perform redundant encoding on the original message in the message buffer area to generate a redundant message belonging to the same coding group as the original message; the redundant message is used to restore the lost original message when there is partial packet loss in the original message; generate an FEC message header based on the number of original messages and the number of redundant messages in the same coding group; based on the FEC message header, perform UDP encapsulation on the original message and the redundant message respectively, obtain the FEC message belonging to the same coding group and send it.
[0167] In some embodiments, the maximum number of original messages in the same coding group is M, and the maximum number of redundant messages is N, both of which are positive integers. The coding module is specifically used to generate N redundant messages through redundant coding if the number of original messages cached in the message buffer reaches M within a preset time length; if the number of original messages cached in the message buffer after exceeding the preset time length is less than M, a corresponding number of redundant messages are generated according to a preset redundancy ratio.
[0168] In some embodiments, the encoding module is specifically used to determine the maximum message length based on the message lengths of multiple original messages read from the message buffer area; use the maximum message length as the message length of the redundant message, perform redundant encoding based on each original message, and generate a redundant message belonging to the same encoding group as the original message.
[0169] Each module in the above-mentioned message processing device can be implemented in whole or in part by software, hardware and a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0170] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG14. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a message processing method is implemented.
[0171] Those skilled in the art will understand that the structure shown in FIG. 14 is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0172] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0173] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0174] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0175] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0176] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0177] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A message processing method, characterized in that: The method comprises: In the case where the received data message includes an FEC message header, determining that the data message is an FEC message; Determine the FEC tunnel interface corresponding to the FEC message by parsing the FEC message header; Cache the FEC message in a decoding cache queue corresponding to the FEC tunnel interface; According to the FEC tunnel interface, determining the FEC message group that meets the decoding condition in the decoding cache queue through periodic polling; each FEC message in the FEC message group has the same coding group identifier; Forward error correction is performed based on the redundant messages in the FEC message group to obtain the original messages lost in the FEC message group.
2. The method according to claim 1, characterized in that The method of determining the FEC message group that meets the decoding condition in the decoding cache queue by periodic polling according to the FEC tunnel interface includes: Determining index information of a to-be-processed FEC message group from a decoding buffer matched with the FEC tunnel interface by periodic polling; the decoding buffer stores index information of each FEC message according to a coding group sequence; Determine the number of received messages of the same FEC message group based on the index information; When the number of received messages is less than the number of sent messages of the FEC message group and is greater than the number of original messages in the FEC message group, determining that the FEC message group meets the decoding condition; When the FEC message group meets the decoding condition, the FEC message group is obtained from the decoding cache queue according to the index information.
3. The method according to claim 1, characterized in that The method further comprises: When the number of received messages is equal to the number of sent messages of the FEC message group, discarding redundant messages obtained from the decoding cache queue and sending original messages obtained from the decoding cache queue; When the number of received messages is less than or equal to the number of original messages in the FEC message group, redundant messages obtained from the decoding cache queue are discarded, and part of the original messages obtained from the decoding cache queue are sent.
4. The method according to claim 1, characterized in that The method further comprises: Cache the original message to be sent in the message cache area; Redundantly encode the original message in the message buffer area to generate a redundant message belonging to the same encoding group as the original message; the redundant message is used to restore the lost original message when part of the original message is lost; Generate an FEC message header according to the number of original messages and the number of redundant messages of the same coding group; Based on the FEC message header, the original message and the redundant message are respectively encapsulated with UDP to obtain and send FEC messages belonging to the same coding group.
5. The method according to claim 4, characterized in that The maximum number of original messages in the same coding group is M, and the maximum number of redundant messages is N, where both M and N are positive integers. The redundant encoding of the original message in the message buffer area to generate a redundant message belonging to the same encoding group as the original message includes: If the number of original messages cached in the message buffer area within a preset time reaches M, N redundant messages are generated through redundant coding; If the number of original messages cached in the message cache area after exceeding the preset time length is less than M, a corresponding number of redundant messages are generated according to a preset redundancy ratio.
6. The method according to claim 5, characterized in that The generating, based on the original message read from the message buffer area, a redundant message belonging to the same coding group as the original message through redundant coding, comprises: Determining a maximum message length based on the message lengths of the multiple original messages read from the message buffer area; The maximum message length is used as the message length of the redundant message, and redundant coding is performed based on each of the original messages to generate a redundant message belonging to the same coding group as the original message.
7. A message processing device, characterized in that: The device comprises: Configuration module, used to configure basic parameters of PEC message and configuration parameters of FEC tunnel interface; A forwarding module, used for determining that a received data message is an FEC message when the received data message contains an FEC message header; determining the FEC tunnel interface corresponding to the FEC message by parsing the FEC message header; caching the FEC message to a decoding cache queue corresponding to the FEC tunnel interface; determining an FEC message group that meets a decoding condition in the decoding cache queue by periodic polling according to the FEC tunnel interface; each FEC message in the FEC message group has the same coding group identifier; performing forward error correction based on redundant messages in the FEC message group to obtain an original message that is lost in the FEC message group.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Classification processing method and network equipment for multi-protocol label switching service
CN101014008A
Streaming media transmission method capable of dynamically regulating redundancy of FEC (Forward Error Correction)
CN106656422A
Message processing method and device and chip
CN112564855A