Message processing method and device, electronic equipment and nonvolatile storage medium

CN117118779BActive Publication Date: 2026-11-03CHINA TELECOM INTELLIGENT NETWORK TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311250953.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-25
Publication Date
2026-11-03
Estimated Expiration
2043-09-25

AI Technical Summary

Technical Problem

In SRv6 TE tunnel scenarios, due to the insufficient downlink editing capability of ASIC chips, there is a problem of incorrect packet loss of Operation Management and Maintenance (OAM) messages with excessively long package headers.

Method used

In the uplink pipeline stage of the target chip, the tunnel packaging information is determined and the OAM message is parsed. Uplink editing is performed, and then the tunnel packaging header is added in the downlink pipeline stage. By changing the uplink architecture of the ASIC chip's pipeline, the uplink editing capability is increased.

Benefits of technology

It achieves correct forwarding of OAM messages, solves the problem of insufficient downlink editing capability of the chip caused by excessively long package header, and ensures correct message transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117118779B_ABST
    Figure CN117118779B_ABST
Patent Text Reader

Abstract

The application discloses a message processing method and device, electronic equipment and a nonvolatile storage medium. The method comprises the following steps: in the uplink pipeline stage of a target chip, determining tunnel encapsulation information corresponding to a target message; in the case where the type of the target message is an operation management and maintenance message, analyzing the target message to obtain message modification information corresponding to the target message, and modifying the target message according to the message modification information; sending the modified target message to the downlink pipeline of the target chip, and in the downlink pipeline stage, adding a tunnel encapsulation header to the modified target message according to the tunnel encapsulation information, wherein the downlink pipeline is a processing process of the target chip for message sending. The application solves the technical problem of message packet loss caused by the fact that the chip downlink editing capability is insufficient due to the excessively long encapsulation header when editing and processing the operation management and maintenance message in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network communication technology, and more specifically, to a message processing method, apparatus, electronic device, and non-volatile storage medium. Background Technology

[0002] With the widespread application of Segment Routing IPv6 Traffic Engineering (SRv6 TE) technology based on Internet Protocol version 6, higher demands are placed on the packet editing capabilities of Application Specific Integrated Circuit (ASIC) chips. In SRv6 TE tunnel scenarios, when it is necessary to edit certain special packets in the inner layer of the tunnel, such as Operations, Administration, and Maintenance (OAM) packets, the relevant technology involves the downlink pipeline of the ASIC chip to perform OMA packet editing and tunnel header addition operations. Due to the excessive length of the header and the insufficient downlink editing capability of the chip, there is a possibility that the chip may not be able to provide editing capabilities or that additional pipeline detours may be required for editing, which may lead to the problem of OAM packet errors and packet loss.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This application provides a message processing method, apparatus, electronic device, and non-volatile storage medium to at least solve the technical problem in the related art where message errors and packet loss occur due to insufficient downlink editing capability of the chip when editing operation, management, and maintenance messages because the package header is too long.

[0005] According to one aspect of the embodiments of this application, a message processing method is provided, comprising: determining tunnel encapsulation information corresponding to a target message in the uplink pipeline stage of a target chip, wherein the tunnel encapsulation information is used to indicate the path of the virtual private network tunnel required to send the target message to the destination address, and the uplink pipeline is the process of the target chip receiving messages; and, if the type of the target message is an operation, management and maintenance message, parsing the target message to obtain message modification information corresponding to the target message, and modifying the target message according to the message modification information; sending the modified target message to the downlink pipeline of the target chip, and adding a tunnel encapsulation header to the modified target message in the downlink pipeline stage according to the tunnel encapsulation information, wherein the downlink pipeline is the process of the target chip sending messages.

[0006] Optionally, determining the tunnel encapsulation information corresponding to the target packet includes: determining the source address and destination address corresponding to the target packet; performing a table lookup based on the source address and destination address to determine the virtual private network tunnel that matches the source address and destination address; and generating tunnel encapsulation information based on the parameter information of the virtual private network tunnel.

[0007] Optionally, before parsing the target message, the method further includes: obtaining the Ethernet type field in the target message, wherein the Ethernet type field is used to characterize the upper-layer protocol type corresponding to the target message; if the Ethernet type field is consistent with a preset field, the target message is determined to be an operation, management and maintenance message.

[0008] Optionally, parsing the target message to obtain the message modification information corresponding to the target message includes: determining the position and length of each field in the target message according to the protocol specification corresponding to the operation management and maintenance message; extracting the value of each field in the target message according to the position and length of the field; and parsing the meaning of the field and the extracted value to obtain the message modification information corresponding to the target message.

[0009] Optionally, the message modification information includes: the type of modification operation, the modification location, and the modification value; modifying the target message based on the message modification information includes: in the uplink pipeline stage, the uplink editing module in the control target chip performs corresponding modification operations on the fields at the modification location in the target message based on the message modification information to obtain the modified target message. The structure of the modified target message of type operation management and maintenance message is the same as that of the target message of type non-operation management and maintenance message, both of which only include: message content and tunnel encapsulation information.

[0010] Optionally, in the downlink pipeline stage, the processing flow for the modified target message of type operation management and maintenance message is the same as the processing flow for the target message of type non-operation management and maintenance message.

[0011] Optionally, adding a tunnel encapsulation header to the modified target message includes: generating a tunnel encapsulation header corresponding to the tunnel encapsulation information based on the tunnel encapsulation information; encapsulating the tunnel encapsulation header into the modified target message; and sending the encapsulated target message to the corresponding address.

[0012] According to another aspect of the embodiments of this application, a message processing apparatus is also provided, comprising: an encapsulation information determination module, configured to determine tunnel encapsulation information corresponding to a target message during the uplink pipeline stage of a target chip, wherein the tunnel encapsulation information is used to indicate the path of the virtual private network tunnel required to send the target message to the destination address, and the uplink pipeline is the process of the target chip receiving messages; and a message modification module, configured to parse the target message to obtain message modification information corresponding to the target message when the type of the target message is an operation, management and maintenance message, and modify the target message according to the message modification information; and an encapsulation sending module, configured to send the modified target message to the downlink pipeline of the target chip, and add a tunnel encapsulation header to the modified target message during the downlink pipeline stage according to the tunnel encapsulation information, wherein the downlink pipeline is the process of the target chip sending messages.

[0013] According to another aspect of the embodiments of this application, a target chip is also provided, including: an uplink lookup table module, an uplink editing module, and a downlink editing module, wherein the uplink lookup table module is used to determine the tunnel encapsulation information corresponding to the target packet during the uplink pipeline stage of the target chip, wherein the tunnel encapsulation information is used to indicate the path of the virtual private network tunnel required to send the target packet to the destination address, and the uplink pipeline is the packet reception process of the target chip; and, when the type of the target packet is an operation management and maintenance packet, to parse the target packet to obtain the packet modification information corresponding to the target packet; The downlink editing module modifies the target message based on the message modification information corresponding to the target message of type operation management and maintenance, and sends the modified target message to the downlink pipeline of the target chip. The downlink editing module adds a tunnel encapsulation header to the modified target message based on the tunnel encapsulation information during the downlink pipeline stage. The downlink pipeline is the message sending process of the target chip. During the downlink pipeline stage, the processing flow of the downlink editing module for the modified target message of type operation management and maintenance is the same as the processing flow for the target message of type non-operation management and maintenance.

[0014] According to another aspect of the embodiments of this application, a non-volatile storage medium is also provided, the non-volatile storage medium including a stored computer program, wherein the device where the non-volatile storage medium is located executes a message processing method by running the computer program.

[0015] In this embodiment, the tunnel encapsulation information corresponding to the target packet is determined at the uplink pipeline stage of the target chip. The tunnel encapsulation information indicates the path of the virtual private network tunnel required to send the target packet to the destination address. The uplink pipeline is the process of the target chip receiving packets. Furthermore, when the target packet type is an operation, management, or maintenance packet, the target packet is parsed to obtain the corresponding packet modification information, and the target packet is modified based on this information. The modified target packet is then sent to the downlink pipeline of the target chip. At the downlink pipeline stage, a tunnel encapsulation header is added to the modified target packet based on the tunnel encapsulation information. The downlink pipeline is the process of the target chip sending packets. By changing the existing ASIC chip pipeline uplink architecture and increasing the ability to process uplink packets, this method achieves the implementation of virtual private networks (VPNs) carried by SRv6 TE. This technology effectively edits and modifies the inner layer of Network (VPN) messages to achieve correct forwarding of OAM messages. It also solves the problem of packet loss due to excessively long encapsulation headers and insufficient downlink editing capabilities of chips when editing operation, management and maintenance messages. Attached Figure Description

[0016] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0017] Figure 1 This is a hardware structure block diagram of a computer terminal (or electronic device) for implementing a message processing method according to an embodiment of this application;

[0018] Figure 2 This is a schematic diagram of the message processing flow of an ASIC chip pipeline in a related art according to an embodiment of this application;

[0019] Figure 3 This is a schematic diagram of a message processing method according to an embodiment of this application;

[0020] Figure 4 This is a schematic diagram of a method flow for processing OAM messages of an ASIC chip according to an embodiment of this application;

[0021] Figure 5 This is a schematic diagram of a message processing apparatus according to an embodiment of this application;

[0022] Figure 6 This is a schematic diagram of the structure of a target chip according to an embodiment of this application. Detailed Implementation

[0023] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0025] Figure 2 This is a schematic diagram of the message processing flow of an ASIC chip pipeline in a related art according to an embodiment of this application, such as... Figure 2 As shown, in related technologies, the characteristics of ASIC pipelines are manifested as upward table lookup and downward editing.

[0026] However, the editing capabilities of ASIC chips are often limited. In SRv6 TE VPN scenarios, there may be situations where the excessive length of the encapsulation header causes the chip's editing capabilities to approach their limit when editing packets. In such cases, for OAM packets carried in the inner layer of the VPN tunnel, the downlink editing module of the ASIC chip, after modifying the OAM packets, cannot continue to add tunnel encapsulation to the OAM packets because it has reached its editing capability limit, thus preventing the OAM packets from being forwarded correctly.

[0027] To address the aforementioned issues, this application provides relevant solutions, which are detailed below.

[0028] According to an embodiment of this application, a method embodiment for message processing is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0029] The methods and embodiments provided in this application can be executed on mobile terminals, computer terminals, or similar computing devices. Figure 1 A hardware block diagram of a computer terminal (or electronic device) for implementing a message processing method is shown. Figure 1 As shown, the computer terminal 10 (or electronic device) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 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 a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0030] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or electronic device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).

[0031] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the message processing method in the embodiments of this application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby implementing the above-mentioned message processing method. The memory 104 may include high-speed random access memory, and may also include 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 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0032] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0033] The display may be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or electronic device).

[0034] Under the aforementioned operating environment, this application provides a message processing method to address the shortcomings of ASIC chips in SRv6 TE VPN scenarios, which lead to excessively deep inner message editing and consequently, outbound OAM message editing defects. Figure 3 This is a schematic diagram of a message processing method according to an embodiment of this application, such as... Figure 3 As shown, the method includes the following steps:

[0035] Step S302: In the uplink pipeline stage of the target chip, the tunnel encapsulation information corresponding to the target message is determined. The tunnel encapsulation information is used to indicate the path of the virtual private network tunnel that needs to be traversed to send the target message to the destination address. The uplink pipeline is the process of the target chip receiving the message.

[0036] Step S304: If the target message is an operation management and maintenance message, parse the target message to obtain the message modification information corresponding to the target message, and modify the target message according to the message modification information;

[0037] Step S306: The modified target message is sent to the downlink pipeline of the target chip. In the downlink pipeline stage, a tunnel encapsulation header is added to the modified target message according to the tunnel encapsulation information. The downlink pipeline is the process of the target chip sending messages.

[0038] Through the above steps, by modifying the existing ASIC chip pipeline uplink architecture and increasing the uplink editing and processing capabilities of messages, the correct forwarding of OAM messages is achieved. This solves the problem of packet loss due to insufficient downlink editing capabilities caused by excessively long headers when editing operation, management, and maintenance messages in related technologies. It provides a basis for Ethernet link status in SRv6 TE VPN scenarios and offers complete reference indicators for improving the quality of network services for operators.

[0039] The following describes the message processing method in steps S302 to S306 of this application embodiment, taking an ASIC chip as the target chip.

[0040] Figure 4 This is a schematic diagram of a method flow for OAM message processing of an ASIC chip according to an embodiment of this application, as shown below. Figure 4 As shown, in this application, an uplink editing module is added to the uplink pipeline of the ASIC chip (target chip) for uplink editing of special messages (e.g., target messages of type Operation Management and Maintenance (OAM) messages). Compared with the uplink lookup and downlink editing mode of the ASIC pipeline in related technologies, this application solves the problem of insufficient downlink editing capability of ASIC chips in the SRv6 TEVPN scenario by modifying the fields of the OAM message according to the uplink lookup result after the uplink lookup behavior through the added uplink editing module.

[0041] The following section details the process steps for handling Operation Management and Maintenance (OAM) messages and ordinary messages (i.e., the aforementioned non-Operation Management and Maintenance messages) in the improved ASIC chip pipeline.

[0042] First, when the target packet passes through the uplink pipeline stage of the ASIC chip, the tunnel encapsulation information corresponding to the target packet is determined. The tunnel encapsulation information is used to indicate the path of the virtual private network tunnel that needs to be traversed to send the target packet to the destination address. The uplink pipeline is the process of the target chip receiving the packet.

[0043] In this embodiment, the tunnel encapsulation information of the target packet's outgoing SRv6TEVPN tunnel can be obtained through the uplink lookup table module in the chip. The specific steps are as follows.

[0044] In some embodiments of this application, determining the tunnel encapsulation information corresponding to the target packet includes the following steps: determining the source address and destination address corresponding to the target packet; performing a table lookup based on the source address and destination address to determine the virtual private network tunnel that matches the source address and destination address; and generating tunnel encapsulation information based on the parameter information of the virtual private network tunnel.

[0045] In the above steps, regardless of whether the target message is a special operation management and maintenance message or a normal non-operation management and maintenance message, the process steps for determining the tunnel encapsulation information are the same. After determining the tunnel encapsulation information, it is necessary to perform uplink editing processing on the target message of type operation management and maintenance message. That is, the target message of type operation management and maintenance message is parsed to obtain the message modification information corresponding to the target message, and the target message is modified according to the message modification information. The uplink editing process will be further explained below.

[0046] Specifically, after determining the tunnel encapsulation information corresponding to the target packet, the type of the target packet is first determined based on the Ethernet type field of the target packet to determine whether the target packet is an Operation, Administration and Maintenance (OAM) packet. The specific steps are as follows.

[0047] In some embodiments of this application, before parsing the target message, the method further includes the following steps: obtaining the Ethernet type field in the target message, wherein the Ethernet type field is used to characterize the upper-layer protocol type corresponding to the target message; if the Ethernet type field is consistent with a preset field, the target message is determined to be an operation, management and maintenance message.

[0048] If the target message is not an operation management and maintenance message type, then no editing operation is required on the message during the uplink editing process. If the target message is an operation management and maintenance message type, then the editing information of the OAM message is obtained by parsing the inner fields of the target message (OAM message). The specific steps are as follows.

[0049] In some embodiments of this application, parsing the target message to obtain the message modification information corresponding to the target message includes the following steps: determining the position and length of each field in the target message according to the protocol specification corresponding to the operation management and maintenance message; extracting the value of each field in the target message according to the position and length of the field; parsing according to the meaning of the field and the extracted value of the field to obtain the message modification information corresponding to the target message, wherein the message modification information includes: the type of modification operation, the modification position, and the modification value.

[0050] After obtaining the message modification information corresponding to the target message, before the target message (OAM message) leaves the uplink pipeline, the uplink editing module of the target chip (ASIC chip) will also edit the target message (OAM message) as needed based on the message modification information. The specific steps are as follows.

[0051] In some embodiments of this application, modifying a target message based on message modification information includes the following steps: In the uplink pipeline stage, the uplink editing module in the target chip controls the corresponding modification operation of the fields at the modification position in the target message based on the message modification information to obtain the modified target message. The structure of the modified target message of type operation management and maintenance message is the same as that of the target message of type non-operation management and maintenance message, both of which only include: message content and tunnel encapsulation information.

[0052] After the uplink editing process described above, for the same SRv6 TE VPN tunnel, the modified target packet (the OAM packet modified by the uplink editing module) and the target packet of type non-operation management and maintenance (ordinary packet) have the same tunnel encapsulation information in the downlink editing module of the downlink pipeline. That is, in the downlink pipeline stage, the processing flow for the modified target packet of type operation management and maintenance is the same as that for the target packet of type non-operation management and maintenance, and the two have completely unified editing behavior in the downlink editing module. Through uplink packet editing, the downlink encapsulation of OAM packets in the SRv6 TE VPN scenario remains consistent with that of ordinary packets, avoiding OAM packet error dropping or additional roundabout editing caused by insufficient downlink editing capabilities.

[0053] Specifically, both the modified target message (the OAM message modified by the uplink editing module) and the target message of type non-operation management and maintenance message (ordinary message) need to be encapsulated with an SRv6 TEVPN tunnel header in the downlink pipeline stage of the target chip. That is, for the same SRv6 TE VPN tunnel, both the modified target message of type operation management and maintenance message and the target message of type non-operation management and maintenance message are uniformly encapsulated in the downlink editing module according to the SRv6 TE VPN tunnel encapsulation information obtained from the uplink lookup table. The specific steps are as follows.

[0054] In some embodiments of this application, adding a tunnel encapsulation header to the modified target message includes the following steps: generating a tunnel encapsulation header corresponding to the tunnel encapsulation information based on the tunnel encapsulation information; encapsulating the tunnel encapsulation header into the modified target message; and sending the encapsulated target message to the corresponding address.

[0055] This application adds an uplink editing module to the ASIC chip pipeline. By editing special service messages such as OAM uplink, the editing capability of the ASIC chip is improved, making the downlink outgoing chip packaging in the SRv6 TE VPN scenario consistent with the ordinary message packaging. This solves the problem that the existing solution cannot properly edit the inner OAM and other special messages in the SRv6 TE VPN tunnel encapsulation scenario.

[0056] According to an embodiment of this application, an embodiment of a message processing apparatus is also provided. Figure 5 This is a schematic diagram of a message processing apparatus according to an embodiment of this application. Figure 5 As shown, the device includes:

[0057] The encapsulation information determination module 50 is used to determine the tunnel encapsulation information corresponding to the target message during the uplink pipeline stage of the target chip. The tunnel encapsulation information is used to indicate the path of the virtual private network tunnel that needs to be traversed to send the target message to the destination address. The uplink pipeline is the process of the target chip receiving the message.

[0058] In some embodiments of this application, determining the tunnel encapsulation information corresponding to the target packet includes: determining the source address and destination address corresponding to the target packet; performing a table lookup based on the source address and destination address to determine the virtual private network tunnel that matches the source address and destination address; and generating tunnel encapsulation information based on the parameter information of the virtual private network tunnel.

[0059] The message modification module 52 is used to parse the target message when the target message type is an operation management and maintenance message, obtain the message modification information corresponding to the target message, and modify the target message according to the message modification information;

[0060] In some embodiments of this application, before parsing the target message, the message modification module 52 is further configured to: obtain the Ethernet type field in the target message, wherein the Ethernet type field is used to characterize the upper-layer protocol type corresponding to the target message; and determine that the target message is an operation management and maintenance message if the Ethernet type field is consistent with the preset field.

[0061] In some embodiments of this application, parsing the target message to obtain the message modification information corresponding to the target message includes: determining the position and length of each field in the target message according to the protocol specification corresponding to the operation management and maintenance message; extracting the value of each field in the target message according to the position and length of the field; and parsing the meaning of the field and the extracted value of the field to obtain the message modification information corresponding to the target message.

[0062] In some embodiments of this application, the message modification information includes: the type of modification operation, the modification location, and the modification value; modifying the target message according to the message modification information includes: in the uplink pipeline stage, controlling the uplink editing module in the target chip to perform corresponding modification operations on the fields at the modification location in the target message according to the message modification information to obtain the modified target message. The structure of the modified target message of type operation management and maintenance message is the same as that of the target message of type non-operation management and maintenance message, both including only: message content and tunnel encapsulation information.

[0063] In some embodiments of this application, during the downlink pipeline stage, the processing flow for the modified target message of type operation management and maintenance message is the same as the processing flow for the target message of type non-operation management and maintenance message.

[0064] The encapsulation and transmission module 54 is used to send the modified target message to the downlink pipeline of the target chip. In the downlink pipeline stage, a tunnel encapsulation header is added to the modified target message according to the tunnel encapsulation information. The downlink pipeline is the process of the target chip sending messages.

[0065] In some embodiments of this application, adding a tunnel encapsulation header to the modified target message includes: generating a tunnel encapsulation header corresponding to the tunnel encapsulation information based on the tunnel encapsulation information; encapsulating the tunnel encapsulation header into the modified target message; and sending the encapsulated target message to the corresponding address.

[0066] It should be noted that each module in the above message processing device can be a program module (e.g., a set of program instructions to implement a certain function) or a hardware module. For the latter, it can be manifested in the following forms, but is not limited to them: each of the above modules is manifested as a processor, or the functions of each of the above modules are implemented by a processor.

[0067] It should be noted that the message processing device provided in this embodiment can be used to perform... Figure 3 The message processing method shown above is also applicable to the embodiments of this application, and will not be repeated here.

[0068] According to an embodiment of this application, an embodiment of a target chip is also provided. Figure 6 This is a schematic diagram of the structure of a target chip according to an embodiment of this application. Figure 6 As shown, it includes: an upward lookup module 60, an upward editing module 62, and a downward editing module 64, wherein,

[0069] The uplink lookup module 60 is used to determine the tunnel encapsulation information corresponding to the target packet during the uplink pipeline stage of the target chip. The tunnel encapsulation information is used to indicate the path of the virtual private network tunnel that needs to be traversed to send the target packet to the destination address. The uplink pipeline is the packet reception process of the target chip. In addition, when the type of the target packet is an operation, management and maintenance packet, the module parses the target packet to obtain the packet modification information corresponding to the target packet.

[0070] The uplink editing module 62 is used to modify the target message based on the message modification information corresponding to the target message of type operation management and maintenance message, and send the modified target message to the downlink pipeline of the target chip;

[0071] The downlink editing module 64 is used to add a tunnel encapsulation header to the modified target message based on the tunnel encapsulation information during the downlink pipeline stage. The downlink pipeline is the process of the target chip sending messages. During the downlink pipeline stage, the processing flow of the downlink editing module for the modified target message of type operation management and maintenance message is the same as the processing flow for the target message of type non-operation management and maintenance message.

[0072] It should be noted that each module in the above message processing device can be a program module (e.g., a set of program instructions to implement a certain function) or a hardware module. For the latter, it can be manifested in the following forms, but is not limited to them: each of the above modules is manifested as a processor, or the functions of each of the above modules are implemented by a processor.

[0073] It should be noted that the target chip provided in this embodiment can be used to execute... Figure 3 The message processing method shown above is also applicable to the embodiments of this application, and will not be repeated here.

[0074] This application embodiment also provides a non-volatile storage medium, which includes a stored computer program. The device containing the non-volatile storage medium executes the following message processing method by running the computer program: In the uplink pipeline stage of the target chip, determining the tunnel encapsulation information corresponding to the target message, wherein the tunnel encapsulation information indicates the path of the virtual private network tunnel required to send the target message to the destination address, and the uplink pipeline is the message reception process of the target chip; and, if the target message type is an operation, management, and maintenance message, parsing the target message to obtain the message modification information corresponding to the target message, and modifying the target message according to the message modification information; sending the modified target message to the downlink pipeline of the target chip, and in the downlink pipeline stage, adding a tunnel encapsulation header to the modified target message according to the tunnel encapsulation information, wherein the downlink pipeline is the message transmission process of the target chip.

[0075] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0076] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0077] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0078] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0079] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0080] If the integrated unit is implemented as 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 this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0081] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A message processing method, characterized in that, include: In the uplink pipeline stage of the target chip, the tunnel encapsulation information corresponding to the target packet is determined. This tunnel encapsulation information indicates the virtual private network tunnel path required to send the target packet to its destination address. The uplink pipeline is the packet reception process performed by the target chip. If the target message is an operation, management, or maintenance message, the target message is parsed to obtain the message modification information corresponding to the target message, and the target message is modified based on the message modification information. The target chip includes an application-specific integrated circuit (ASIC) chip; the message modification information includes the type of modification operation, the modification location, and the modification value; modifying the target message according to the message modification information includes: in the uplink pipeline stage, controlling the uplink editing module in the target chip to perform the corresponding modification operation on the field at the modification location in the target message according to the message modification information, to obtain the modified target message, wherein the structure of the modified target message of type operation management and maintenance message is the same as the structure of the target message of type non-operation management and maintenance message, both including only: message content and tunnel encapsulation information; The modified target message is sent to the downlink pipeline of the target chip, and a tunnel encapsulation header is added to the modified target message according to the tunnel encapsulation information during the downlink pipeline stage. The downlink pipeline is the process by which the target chip sends messages.

2. The message processing method according to claim 1, characterized in that, Determining the tunnel encapsulation information corresponding to the target message includes: Determine the source address and destination address corresponding to the target message; A lookup table is performed based on the source address and destination address to determine the virtual private network tunnel that matches the source address and destination address; Based on the parameter information of the virtual private network tunnel, the tunnel encapsulation information is generated.

3. The message processing method according to claim 1, characterized in that, Before parsing the target message, the method further includes: Obtain the Ethernet type field from the target packet, wherein the Ethernet type field is used to characterize the upper-layer protocol type corresponding to the target packet; If the Ethernet type field matches the preset field, the target message is determined to be the operation management and maintenance message.

4. The message processing method according to claim 3, characterized in that, Parsing the target message yields the message modification information corresponding to the target message, including: Based on the protocol specifications corresponding to the operation management and maintenance message, determine the position and length of each field in the target message; Based on the position and length of the field, extract the value of each field in the target message; Based on the meaning of the fields and the values ​​extracted from the fields, the message modification information corresponding to the target message is obtained through parsing.

5. The message processing method according to claim 1, characterized in that, In the downlink pipeline stage, the processing flow for the target message of the modified type, which is the operation management and maintenance message, is the same as the processing flow for the target message of the non-operation management and maintenance message type.

6. The message processing method according to claim 5, characterized in that, Adding a tunneling header to the modified target message includes: Based on the tunnel encapsulation information, a tunnel encapsulation header corresponding to the tunnel encapsulation information is generated; The tunnel encapsulation header is encapsulated into the modified target message, and the encapsulated target message is sent to the corresponding address.

7. A message processing apparatus, characterized in that, include: An encapsulation information determination module is used to determine the tunnel encapsulation information corresponding to a target packet during the uplink pipeline stage of the target chip. The tunnel encapsulation information indicates the path of the virtual private network tunnel required to send the target packet to its destination address. The uplink pipeline is the packet reception process performed by the target chip. The message modification module is used to parse the target message when the type of the target message is an operation management and maintenance message, obtain the message modification information corresponding to the target message, and modify the target message according to the message modification information; The target chip includes an application-specific integrated circuit (ASIC) chip; the message modification information includes the type of modification operation, the modification location, and the modification value; modifying the target message according to the message modification information includes: in the uplink pipeline stage, controlling the uplink editing module in the target chip to perform the corresponding modification operation on the field at the modification location in the target message according to the message modification information, to obtain the modified target message, wherein the structure of the modified target message of type operation management and maintenance message is the same as the structure of the target message of type non-operation management and maintenance message, both including only: message content and tunnel encapsulation information; The encapsulation and transmission module is used to send the modified target message to the downlink pipeline of the target chip, and in the downlink pipeline stage, add a tunnel encapsulation header to the modified target message according to the tunnel encapsulation information, wherein the downlink pipeline is the message transmission process of the target chip.

8. A target chip, characterized in that, include: The module includes an upward table lookup module, an upward editing module, and a downward editing module. The uplink lookup module is used to determine the tunnel encapsulation information corresponding to the target packet during the uplink pipeline stage of the target chip. The tunnel encapsulation information is used to indicate the path of the virtual private network tunnel that needs to be traversed to send the target packet to the destination address. The uplink pipeline is the packet reception process of the target chip. In addition, when the type of the target packet is an operation, management and maintenance packet, the module parses the target packet to obtain the packet modification information corresponding to the target packet. The target chip includes an application-specific integrated circuit (ASIC) chip; the message modification information includes the type of modification operation, the modification location, and the modification value; modifying the target message according to the message modification information includes: in the uplink pipeline stage, controlling the uplink editing module in the target chip to perform the corresponding modification operation on the field at the modification location in the target message according to the message modification information, to obtain the modified target message, wherein the structure of the modified target message of type operation management and maintenance message is the same as the structure of the target message of type non-operation management and maintenance message, both including only: message content and tunnel encapsulation information; The uplink editing module is used to modify the target message according to the message modification information corresponding to the target message of the type being the operation management and maintenance message, and send the modified target message to the downlink pipeline of the target chip; The downlink editing module is used to add a tunnel encapsulation header to the modified target message based on the tunnel encapsulation information during the downlink pipeline stage. The downlink pipeline is the process by which the target chip sends messages. During the downlink pipeline stage, the processing flow of the modified target message of type operation management and maintenance message by the downlink editing module is the same as the processing flow of the target message of type non-operation management and maintenance message.

9. A non-volatile storage medium, characterized in that, The non-volatile storage medium includes a stored computer program, wherein the device containing the non-volatile storage medium executes the message processing method of any one of claims 1 to 6 by running the computer program.

Citation Information

Patent Citations

  • Message processing method, message forwarding method, device and equipment

    CN115914142A

  • OAM detection method, device, and system

    WO2022033034A1