Pre- and post-processing methods and devices, computing equipment and storage media

CN116527608BActive Publication Date: 2026-08-14SUZHOU CENTEC COMM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-20
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0004]本发明的目的在于提供一种前后级处理方法,其用于解决现有技术中集中式处理引擎带宽有限的问题

Benefits of technology

[0037]与现有技术相比,通过对待前级处理报文/待后级处理报文编辑源端口标识/目标端口标识,并通过环回的方式将报文流重定向至芯片的入方向后再执行转发,在前后级处理时无需考虑最终的转发,解除了点到点前后级处理限制;同时,在对海量报文数据进行隧道加解封装的同时,复用了前后级处理 (加解密)的算法逻辑,可以完成隧道级别的前后级处理;并且,相对于环回后需要再次查找外层转发表转发的方式,可以省略掉原始三层VRF以及负载均衡选路信息的携带,简化处理流程。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116527608B_ABST
    Figure CN116527608B_ABST
Patent Text Reader

Abstract

This invention discloses a pre- and post-processing method and apparatus, computing device, and storage medium to solve the problem of limited bandwidth in centralized processing engines in the prior art. The method includes: an inbound processing engine matching incoming packets to be pre-processed at the source port based on packet header information; the inbound processing engine sending the packets to be pre-processed to a loopback channel for pre-processing to obtain pre-processed packets, wherein the packets to be pre-processed pass through an outbound processing engine when sent to the loopback channel, and the outbound processing engine edits the packet header of the packets to be pre-processed based on the source port; the inbound processing engine recovers the source port based on the packet header and outbound port of the pre-processed packets, and forwards the loopback-processed pre-processed packets.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of communication technology, specifically relating to a front-end and back-end processing method and apparatus, computing device and storage medium. Background Technology

[0002] Ethernet, with its flexibility and low cost, has become the mainstream broadband access technology today. In existing technologies, the front-end and back-end processing of Ethernet data is mainly based on the centralized processing engine of the switching chip. This processing method has limited bandwidth and cannot achieve ultra-large bandwidths such as terabit-level bandwidth.

[0003] The information disclosed in this background section is intended only to enhance the understanding of the overall background of the invention and should not be construed as an admission or in any way implying that the information constitutes prior art known to those skilled in the art. Summary of the Invention

[0004] The purpose of this invention is to provide a front-end and back-end processing method that solves the problem of limited bandwidth in centralized processing engines in the prior art.

[0005] To achieve the above objectives, the present invention provides a pre- and post-stage method, comprising:

[0006] The inbound processing engine matches incoming packets from the source port based on packet header information, indicating the packets to be processed by the preceding stage.

[0007] The inbound processing engine sends the message to be processed by the front-end to the loopback channel for front-end processing to obtain the message that has been processed by the front-end. The message to be processed by the front-end passes through the outbound processing engine when it is sent to the loopback channel. The message to be processed by the front-end is edited by the outbound processing engine based on the source port.

[0008] The inbound processing engine recovers the source port based on the packet header and outbound port of the previously processed packet and forwards the looped-back previously processed packet.

[0009] In one embodiment, the message to be processed by the front-end processing engine has its header edited based on the source port, specifically including:

[0010] The outgoing processing engine adds an identifier header to the message to be processed by the preceding stage, the identifier header including the source port or its mapping value; or...

[0011] The outgoing processing engine replaces the source port or its mapping value into a preset position in the header of the message to be processed by the preceding stage; and / or,

[0012] The message to be processed by the pre-processing module in the loopback channel undergoes pre-processing; and / or,

[0013] The inbound processing engine forwards the loopback of previously processed packets, specifically including:

[0014] The inbound processing engine forwards the loopback-looped, previously processed packets based on the source port and the corresponding tunnel decapsulation lookup table; and / or,

[0015] The method further includes:

[0016] The inbound or outbound processing engine performs decapsulation on the previously processed message.

[0017] In one embodiment, the loopback method of the message to be processed in the loopback channel includes at least one of direct loopback, MAC module self-loopback, fiber self-loopback, and network forwarding; and / or,

[0018] If the outgoing processing engine adds an identifier header to the message to be processed by the preceding stage, then the method further includes:

[0019] When the inbound processing engine restores the outbound port, it instructs the outbound processing engine to delete the identifier header.

[0020] The present invention also provides another embodiment of the pre- and post-processing method, including:

[0021] The inbound processing engine uses packet header information and / or source port information to find and match the target port and encapsulation identifier of the packet to be processed by the subsequent stage.

[0022] The inbound processing engine searches for the downstream processing channel identifier based on the encapsulation identifier, and sends the message to be processed to the corresponding downstream processing channel for downstream processing to obtain a processed message. The processed message loops back to the inbound processing engine through the loopback channel. The message to be processed passes through the outbound processing engine when it is sent to the downstream processing channel. The message to be processed is encapsulated by the outbound processing engine based on the encapsulation identifier and the message header is edited based on the target port.

[0023] The inbound processing engine recovers the target port based on the packet header and loopback information of the subsequent processed packets, and forwards the loopback subsequent processed packets.

[0024] In one embodiment, the inbound processing engine, based on packet header information and / or source port information, locates the target port and encapsulation identifier of the packet to be processed in one or more merges; and / or,

[0025] The message to be processed by the subsequent stage has its header edited by the outgoing processing engine based on the target port, specifically including:

[0026] The outgoing processing engine adds an identifier header to the message to be processed by the subsequent stage. The identifier header includes the target port or its mapping value; or...

[0027] The outgoing processing engine replaces the target port or its mapping value into a preset position in the header of the message to be processed later; and / or,

[0028] The message to be processed by the subsequent stage is processed in the subsequent stage processing module in the corresponding subsequent stage processing channel; and / or,

[0029] The loopback information includes loopback channels and / or loopback ports.

[0030] In one embodiment, the loopback method of the message to be processed in the loopback channel includes at least one of direct loopback, MAC module self-loopback, fiber self-loopback, and network forwarding; and / or,

[0031] If the outgoing processing engine adds an identifier header to the message to be processed by the subsequent stage, then the method further includes:

[0032] When the inbound processing engine recovers the outbound target port, it instructs the outbound processing engine to delete the identifier header.

[0033] This application also provides a computing device, including:

[0034] At least one processor; and

[0035] A memory that stores instructions that, when executed by the at least one processor, cause the at least one processor to perform the method as described above.

[0036] This application also provides a machine-readable storage medium storing executable instructions that, when executed, cause the machine to perform the method described above.

[0037] Compared with existing technologies, by editing the source port identifier and destination port identifier of the message to be processed by the front-end / back-end, and redirecting the message flow to the inbound direction of the chip through loopback before forwarding, the final forwarding does not need to be considered during front-end and back-end processing, thus removing the point-to-point front-end and back-end processing limitations. At the same time, while performing tunnel encryption and decryption on massive message data, the algorithm logic of front-end and back-end processing (encryption and decryption) is reused, which can complete tunnel-level front-end and back-end processing. Furthermore, compared with the method of needing to look up the outer forwarding table again after loopback, the carrying of the original three-layer VRF and load balancing routing information can be omitted, simplifying the processing flow.

[0038] In another aspect, taking the front-end and back-end processing as encryption and decryption examples, the encryption and decryption algorithm core resources can be used for port-based point-to-point encryption, such as MACSEC, or for encryption and decryption of data streams based on tunnel encapsulation and decapsulation. In this way, the same hardware cost can cover more scenarios and reduce the chip cost.

[0039] Moreover, such an implementation manner and chip architecture can effectively utilize the chips with partially available front-end and back-end processing modules (encryption and decryption modules) during production. Any one-way processing module can be independently allocated for front-end and back-end processing services. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 is the schematic diagram of the front-end and back-end processing chip architecture;

[0041] Figure 2 is the flowchart of the front-end and back-end processing method according to an embodiment of the present application;

[0042] Figure 3 is the flowchart of the front-end and back-end processing method according to another embodiment of the present application;

[0043] Figure 4 is the schematic diagram of the chip architecture corresponding to the front-end and back-end processing method according to an embodiment of the present application;

[0044] [[ID=2)]] Figure 5 is the block diagram of the front-end and back-end processing device according to an embodiment of the present application;

[0045] Figure 6 is the block diagram of the front-end and back-end processing device according to another embodiment of the present application;

[0046] Figure 7 is the hardware structure diagram of the computing device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0047] The following will describe the specific embodiments of the present invention in detail with reference to the accompanying drawings. It should be understood that the protection scope of the present invention is not limited by the specific embodiments.

[0048] Unless otherwise clearly stated, in the whole specification and claims, the term "comprise" or its variations such as "comprises" or "including" etc. will be understood to include the stated elements or components, without excluding other elements or other components. <{

[0049] Refer to Figure 1 to introduce the distributed front-end and back-end processing method and architecture based on the switching chip. Here, taking the front-end processing as decrypting the message and the back-end processing as encrypting the message as an example for explanation.

[0050] The peer - encrypted message enters the chip in the MAC0 RX direction, is decrypted in the DP0 RX (decryption module), and the decrypted plaintext enters the ingress - direction processing engine for message forwarding processing. Assuming that after looking up the forwarding table, it is determined that the forwarded message is sent out from the egress - direction processing engine. Before the message enters the MACm, the local encryption operation is completed in the DPn TX (encryption module), and then the ciphertext is sent out from the MACm TX.

[0051] From the encryption and decryption process of the message, it can be seen that a straight - through point - to - point encryption and decryption scenario can be achieved, but more improvements are needed to implement encryption and decryption based on service flows for sessions.

[0052] Refer to Figure 2 , to introduce a specific implementation of the front - end and back - end processing methods of the present invention. In this embodiment, the front - end processing method of the present invention will be mainly described. This method specifically includes the following steps:

[0053] S101. The ingress - direction processing engine matches the message to be pre - processed entering from the source port based on the message - header information.

[0054] With reference to Figure 4 , the ingress - direction processing engine includes a parsing module that can parse the message - header information and a first lookup table. Specifically, this first lookup table is constructed based on the message - header information in combination with the port and port attributes. After the ingress - direction processing engine parses the message - header information, it combines the incoming source port and port attributes and performs a lookup in the first lookup table to match the message to be pre - processed.

[0055] In one embodiment, taking the pre - processing of decrypting the message as an example, the pre - processing module at this time is the corresponding decryption module (DP RX). When the message to be decrypted is sent to the decryption module, it can directly carry the parameters required for the encryption and decryption algorithm, or indirectly carry the parameters required for the encryption and decryption algorithm by obtaining the corresponding table in the decryption module through the session session id.

[0056] Exemplarily, the parameters required for the encryption and decryption algorithm mentioned here can include keys, encryption algorithms, modes, starting offsets, etc.

[0057] S102. The ingress - direction processing engine sends the message to be pre - processed to the loop - back channel for pre - processing to obtain the pre - processed message.

[0058] The erection of the loop - back channel can be schematically referred to Figure 4 as shown by the dashed part in. Specifically, when the ingress - direction processing engine sends the message to be pre - processed to the loop - back channel, it will first pass through the egress - direction processing engine, and the egress - direction processing engine will edit the message - header for these messages to be pre - processed, and the editing of the message - header is based on the source port.

[0059] In one embodiment, the outgoing processing engine can add an identifier header to the message to be processed by the preceding stage, the identifier header including the source port or its mapping value.

[0060] In another embodiment, the outgoing processing engine can replace the source port or its mapping value into a preset position in the header of the message to be processed by the preceding stage. This preset position is set to a specific location in the message that does not affect forwarding; for example, in a pure Layer 3 environment, it can be replaced with a Secure Ethernet MACSA.

[0061] For example, the source port mapping value here can be a VLAN tag.

[0062] A loopback channel can be a data channel established based on the outgoing channel or outgoing port of a message. Through the loopback channel, the data can loop back to the incoming direction of the chip. Specific loopback methods include directly looping the message to be processed back to the source port, looping back via the MAC module, looping back via fiber optic cable, or looping back via network forwarding, etc.

[0063] After the message is looped back to the chip's inbound direction via the loopback channel, the pre-processing module in the inbound direction performs pre-processing on the message. Exemplarily, the pre-processing module may be located within this loopback channel.

[0064] In one embodiment, taking the decryption of the message as an example of front-end processing, the decryption module (front-end processing module) can obtain the parameters required for the encryption and decryption algorithm directly from the message or by indexing the corresponding table through the session ID, and then decrypt the message.

[0065] S103. The inbound processing engine recovers the source port based on the packet header and outbound port of the previously processed packet and forwards the looped-back previously processed packet.

[0066] The message header includes the source port to be edited or its mapping value. Based on the message header and the output port, the inbound processing engine can map the source port. Here, if the outbound processing engine edited the message to be processed by adding an identifier header in step S102, it can also instruct the outbound processing engine to delete the identifier header at this time.

[0067] During the forwarding process, the inbound processing engine obtains information from the source port and, in conjunction with the corresponding tunnel decapsulation lookup table, forwards the previously processed packets. Packet forwarding can be unicast or multicast replication, and statistics and flow control can be performed in the same way as packets entering from the source port. Optionally, the inbound processing engine can also synchronously decapsulate the previously processed packets at this time.

[0068] In some optional embodiments, during forwarding, in combination with the requirements of inner-layer editing, when the pre-processed packet enters the egress processing engine, inner-layer forwarding editing can be performed. Meanwhile, the egress processing engine can also delete the identification header of the pre-processed packet according to the instructions of the ingress processing engine. And if the pre-processed packet is not decapsulated in the ingress processing engine, the egress processing engine can perform normal decapsulation on it at this time.

[0069] Refer to Figure 3 , a specific implementation manner of the front and rear stage processing method of the present invention will be introduced. In this implementation manner, the rear stage processing method part of the present invention will be mainly described, and this method specifically includes the following steps:

[0070] S201. The ingress processing engine searches and matches based on the packet header information and / or source port information to obtain the target port and encapsulation addition identifier of the packet to be post-processed.

[0071] Continue to refer to Figure 4 , similarly, the ingress processing engine includes a parsing module that can parse the packet header information and a second lookup table. Specifically, the second lookup table can use at least one of ① the packet header information, ② the configuration table information indexed by the packet header information, ③ the port information, and ④ the configuration table information indexed by the port information as the search keyword. In this way, the ingress processing engine can directly search based on the packet header information and source port information, or indirectly search by further indexing the corresponding configuration table information with the packet header information and source port information.

[0072] Based on the second lookup table, the packets to be post-processed can be matched, and the target ports and encapsulation addition identifiers of these packets to be post-processed can be determined. Meanwhile, in some cases, based on the second lookup table, the inner-layer editing identifier for the inner-layer editing actions required above the encapsulation addition can also be determined.

[0073] It should be noted that searching and determining the target port, encapsulation addition identifier, and inner-layer editing identifier based on the second lookup table can be obtained by the ingress processing engine through single or multiple combined searches.

[0074] S202. The ingress processing engine searches for the post-processing channel identifier based on the encapsulation addition identifier to send the packet to be post-processed to the corresponding post-processing channel for post-processing, and obtains the post-processed packet.

[0075] Continue to refer to Figure 4The inbound processing engine also includes a third lookup table, which can use at least one of the following as search keywords: ① encapsulation identifier, ② configuration table information indexed by the encapsulation identifier. Similarly, the inbound processing engine can perform a direct search based on the encapsulation identifier, or it can further perform an indirect search using the configuration table information indexed by the encapsulation identifier.

[0076] The third lookup table can be used to determine the downstream processing channel identifier corresponding to the message to be processed. The downstream processing channel identifier can be an independent channel identifier, or it can be other fields that directly or indirectly identify the downstream processing channel, such as the port number.

[0077] When a message awaiting further processing is sent to the subsequent processing channel, it passes through the outbound processing engine. The outbound processing engine performs encapsulation on the message based on the encapsulation identifier and edits the message header based on the destination port. Similarly:

[0078] In one embodiment, the outgoing processing engine can add an identification header to the message to be processed by the subsequent stage, the identification header including the target port or its mapping value.

[0079] In another embodiment, the outgoing processing engine can replace the target port or its mapping value into a preset position in the header of the message to be processed by the subsequent stage. This preset position is also set to a specific location in the message that does not affect forwarding; for example, in a pure Layer 3 environment, it can be replaced with a Secure Ethernet MACSA.

[0080] As an example, the target port mapping value here can also be a VLAN tag.

[0081] Here, if an inner layer editing identifier is determined during the lookup based on the second lookup table, the corresponding inner layer editing action will be performed before the message to be processed by the subsequent stage is encapsulated. Furthermore, other possible editing actions below the tunnel layer will be performed, such as editing the outer second-layer header when the tunnel is a three-layer tunnel, and editing the outer second-layer and third-layer headers when the tunnel is a four-layer tunnel.

[0082] The post-processing channel is equipped with a post-processing module, and messages to be processed can be processed in the post-processing module of the corresponding post-processing channel.

[0083] In one embodiment, taking the encryption of messages as an example of post-processing, the post-processing module is also the corresponding encryption module (DP TX). When the message to be encrypted is sent to the encryption module, it can either directly carry the parameters required by the encryption and decryption algorithms, or obtain the corresponding table in the decryption engine through the session ID, thereby indirectly carrying the parameters required by the encryption and decryption algorithms.

[0084] As an example, the parameters required for the encryption and decryption algorithms mentioned here may include a key, encryption algorithm, mode, starting offset, etc.

[0085] Subsequent processed messages are looped back to the inbound processing engine via a loopback channel. The setup of the loopback channel can be found in [reference needed]. Figure 4 The section shown by the dashed line indicates the specific loopback method. This can include direct loopback of the message to the source port, loopback via a MAC module, loopback via fiber optic cable, or loopback via network forwarding.

[0086] S203. The inbound processing engine recovers the target port based on the packet header and loopback information of the subsequent processed packets, and forwards the loopback of the subsequent processed packets.

[0087] The message header includes the target port or its mapping value. The inbound processing engine can identify the target port or its mapping value in the message header and, together with the loopback information of subsequent processed messages, recover the target port. This loopback information can be the loopback channel and / or loopback port of the subsequent processed messages.

[0088] In the specific method of restoring the target port, the inbound processing engine can either directly use the target port in the subsequent processed message, or use the mapping value of the target port in the subsequent processed message to look up the mapping table.

[0089] Here, if the outbound processing engine edited the packet to be processed by adding an identifier header in step S202, it can also instruct the outbound processing engine to delete the identifier header at this time. Otherwise, neither the inbound nor outbound processing engines need to perform any further lookups or edits during the forwarding of the processed packet to the target port.

[0090] It should be noted that in the above implementation methods / executives, if the subsequent processing channels (corresponding to the encryption tunnel during encryption processing) for the message entering the chip and leaving the chip are inconsistent, the message can be decapsulated according to the previous processing first, and then encapsulated according to the subsequent processing.

[0091] It can be seen that in the pre-stage and post-stage processing methods of the above two embodiments, by editing the source port identifier / destination port identifier for the pre-stage processing message / post-stage processing message to be processed, and redirecting the message flow to the input direction of the chip through the loopback method and then performing forwarding, there is no need to consider the final forwarding during pre-stage and post-stage processing, which解除了点到点前后级处理限制;同时,在对海量报文数据进行隧道加解封装的同时,复用了前后级处理(加解密)的算法逻辑,可以完成隧道级别的前后级处理。并且,相对于环回后需要再次查找外层转发表转发的方式,可以省略掉原始三层VRF以及负载均衡选路信息的携带,简化处理流程。

[0092] On the other hand, taking encryption and decryption as an example, the encryption and decryption algorithm core resources can be used for point-to-point encryption based on ports, such as MACSEC, or for encryption and decryption of data streams based on tunnel encapsulation and decapsulation. In this way, the same hardware cost can cover more scenarios and reduce the chip cost.

[0093] Moreover, such an embodiment and chip architecture can effectively utilize the chips with partially available pre-stage and post-stage processing modules (encryption and decryption modules) during production, and any one-way processing module can be independently allocated for pre-stage and post-stage processing services.

[0094] Refer Figure 5 , a specific embodiment of the pre-stage and post-stage processing device provided by the present application is introduced. In this embodiment, the pre-stage and post-stage processing device includes a first matching module, a first processing module, and a first forwarding module.

[0095] Still taking the pre-stage processing of the pre-stage and post-stage processing device as an example, in this embodiment, the first matching module is used for the input direction processing engine to match the pre-stage processing message entering from the source port based on the message header information; the first processing module is used for the input direction processing engine to send the pre-stage processing message to the loopback channel for pre-stage processing to obtain the pre-stage processed message. Among them, when the pre-stage processing message is sent to the loopback channel, it passes through the output direction processing engine, and the pre-stage processing message is edited by the output direction processing engine based on the source port; the first forwarding module is used for the input direction processing engine to restore the source port based on the message header and output port of the pre-stage processed message, and perform forwarding on the looped-back pre-stage processed message.

[0096] Refer Figure 6 , a specific embodiment of the pre-stage and post-stage processing device provided by the present application is introduced. In this embodiment, the pre-stage and post-stage processing device includes a second matching module, a second processing module, and a second forwarding module.

[0097] It should be noted that there is an unclear part in the original text "解除了点到点前后级处理限制", and the translation here is a rough attempt. It may need to be adjusted according to the specific meaning.Taking the post-processing of the front-end and back-end processing devices as an example, in this embodiment, the second matching module is used to provide the inbound processing engine with the target port and encapsulation identifier of the matched post-processing message based on the packet header information and / or source port information; the second processing module is used to provide the inbound processing engine with the encapsulation identifier to find the post-processing channel identifier, so as to send the post-processing message to the corresponding post-processing channel for post-processing to obtain the post-processed message, wherein the post-processed message loops back to the inbound processing engine through the loopback channel, and the post-processing message passes through the outbound processing engine when it is sent to the post-processing channel. The post-processing message is encapsulated by the outbound processing engine based on the encapsulation identifier and the packet header is edited based on the target port; the second forwarding module is used to provide the inbound processing engine with the packet header and loopback information of the post-processed message to recover the outbound target port and forward the looped post-processed message.

[0098] As mentioned above Figures 2-4 The preceding and following processing methods according to embodiments of this specification have been described. The details mentioned in the above description of the method embodiments also apply to the preceding and following processing apparatuses of the embodiments of this specification, and will not be repeated here.

[0099] Figure 7 Hardware structure diagrams of pre- and post-processing apparatuses according to embodiments of this specification are shown. Figure 7 As shown, the computing device 30 may include at least one processor 301, a memory 302 (e.g., non-volatile memory), a main memory 303, and a communication interface 304, and the at least one processor 301, memory 302, main memory 303, and communication interface 304 are connected together via a bus 305. The at least one processor 301 executes at least one computer-readable instruction stored or encoded in the memory 302.

[0100] It should be understood that the computer-executable instructions stored in memory 302, when executed, cause at least one processor 301 to perform the above-described combinations in the various embodiments of this specification. Figures 2-4 The description includes various operations and functions.

[0101] In the embodiments of this specification, the computing device 30 may include, but is not limited to: personal computer, server computer, workstation, desktop computer, laptop computer, notebook computer, mobile computing device, smartphone, tablet computer, cellular phone, personal digital assistant (PDA), handheld device, messaging device, wearable computing device, consumer electronic device, etc.

[0102] According to one embodiment, a program product, such as a machine-readable medium, is provided. The machine-readable medium may have instructions (i.e., the elements implemented in software as described above), which, when executed by a machine, cause the machine to perform the above-described combinations of the various embodiments of this specification. Figures 2-4 The various operations and functions described. Specifically, a system or apparatus equipped with a readable storage medium storing software program code that implements the functions of any of the embodiments described above, and enabling the computer or processor of the system or apparatus to read and execute the instructions stored in the readable storage medium.

[0103] In this case, the program code read from the readable medium itself can perform the functions of any of the above embodiments, and therefore the machine-readable code and the readable storage medium storing the machine-readable code constitute a part of this specification.

[0104] Examples of readable storage media include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD-RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer or the cloud via a communication network.

[0105] Those skilled in the art will understand that the various embodiments disclosed above can be modified and varied without departing from the spirit of the invention. Therefore, the scope of protection of this specification should be defined by the appended claims.

[0106] It should be noted that not all steps and units in the above process and system structure diagrams are mandatory; some steps or units can be omitted according to actual needs. The execution order of each step is not fixed and can be determined as needed. The device structure described in the above embodiments can be a physical structure or a logical structure. That is, some units may be implemented by the same physical client, or some units may be implemented by multiple physical clients, or they may be jointly implemented by certain components in multiple independent devices.

[0107] In the above embodiments, the hardware units or modules can be implemented mechanically or electrically. For example, a hardware unit, module, or processor may include permanent dedicated circuitry or logic (such as a dedicated processor, FPGA, or ASIC) to perform the corresponding operation. The hardware unit or processor may also include programmable logic or circuitry (such as a general-purpose processor or other programmable processor), which can be temporarily configured by software to perform the corresponding operation. The specific implementation method (mechanical, dedicated permanent circuitry, or temporarily configured circuitry) can be determined based on cost and time considerations.

[0108] The specific embodiments described above with reference to the accompanying drawings are exemplary embodiments, but do not represent all embodiments that can be implemented or fall within the scope of the claims. The term "exemplary" as used throughout this specification means "serving as an example, instance, or illustration" and does not imply that it is "preferred" or "advantageous" compared to other embodiments. Specific details are included to provide an understanding of the described techniques. However, these techniques can be practiced without these specific details. In some instances, well-known structures and apparatuses are shown in block diagram form to avoid obscuring the concepts of the described embodiments.

[0109] The foregoing description of this disclosure is provided to enable any person skilled in the art to implement or use this disclosure. Various modifications to this disclosure will be apparent to those skilled in the art, and the general principles applicable herein can be applied to other variations without departing from the scope of this disclosure. Therefore, this disclosure is not limited to the examples and designs described herein, but is consistent with the widest scope of the principles and novel features disclosed herein.

Claims

1. A pre- and post-processing method, characterized in that, include: The inbound processing engine matches incoming packets from the source port based on packet header information, indicating the packets to be processed by the preceding stage. The inbound processing engine sends the message to be processed by the front-end to the loopback channel for front-end processing to obtain the message that has been processed by the front-end. The message to be processed by the front-end passes through the outbound processing engine when it is sent to the loopback channel. The message to be processed by the front-end is edited by the outbound processing engine based on the source port. The inbound processing engine recovers the source port based on the packet header and outbound port of the previously processed packet and forwards the looped-back previously processed packet.

2. The pre- and post-processing method according to claim 1, characterized in that, The message to be processed by the preceding stage is edited by the outgoing processing engine based on the source port in the message header, specifically including: The outgoing processing engine adds an identifier header to the message to be processed by the preceding stage, the identifier header including the source port or its mapping value; or... The outgoing processing engine replaces the source port or its mapping value into a preset position in the header of the message to be processed by the preceding stage; and / or, The message to be processed by the pre-processing module in the loopback channel undergoes pre-processing; and / or... The inbound processing engine forwards the loopback of previously processed packets, specifically including: The inbound processing engine forwards the loopback-looped, previously processed packets based on the source port and the corresponding tunnel decapsulation lookup table; and / or, The method further includes: The inbound or outbound processing engine performs decapsulation on the previously processed message.

3. The pre- and post-processing method according to claim 2, characterized in that, The loopback method for the message to be processed in the loopback channel includes at least one of the following: direct loopback, MAC module self-loopback, fiber self-loopback, and network forwarding; and / or, If the outgoing processing engine adds an identifier header to the message to be processed by the preceding stage, then the method further includes: When the inbound processing engine restores the outbound port, it instructs the outbound processing engine to delete the identifier header.

4. A pre- and post-processing method, characterized in that, include: The inbound processing engine uses packet header information and / or source port information to find and match the target port and encapsulation identifier of the packet to be processed by the subsequent stage. The inbound processing engine searches for the downstream processing channel identifier based on the encapsulation identifier, and sends the message to be processed to the corresponding downstream processing channel for downstream processing to obtain a processed message. The processed message loops back to the inbound processing engine through the loopback channel. The message to be processed passes through the outbound processing engine when it is sent to the downstream processing channel. The message to be processed is encapsulated by the outbound processing engine based on the encapsulation identifier and the message header is edited based on the target port. The inbound processing engine recovers the target port based on the packet header and loopback information of the subsequent processed packets, and forwards the loopback subsequent processed packets.

5. The pre- and post-processing method according to claim 4, characterized in that, The inbound processing engine uses packet header information and / or source port information to find the target port and encapsulation identifier of the packet to be processed by the subsequent stage in one or more merges. And / or, The message to be processed by the subsequent stage has its header edited by the outgoing processing engine based on the target port, specifically including: The outgoing processing engine adds an identifier header to the message to be processed by the subsequent stage. The identifier header includes the target port or its mapping value; or... The outgoing processing engine replaces the target port or its mapping value into a preset position in the header of the message to be processed later; and / or, The message to be processed by the subsequent stage is processed in the subsequent stage processing module in the corresponding subsequent stage processing channel; and / or, The loopback information includes loopback channels and / or loopback ports.

6. The pre- and post-processing method according to claim 5, characterized in that, The loopback method for the subsequent processed messages in the loopback channel includes at least one of direct loopback, MAC module self-loopback, fiber self-loopback, and network forwarding; and / or, If the outgoing processing engine adds an identifier header to the message to be processed by the subsequent stage, then the method further includes: When the inbound processing engine recovers the outbound target port, it instructs the outbound processing engine to delete the identifier header.

7. A pre- and post-processing apparatus, characterized in that, include: The first matching module is used by the input direction processing engine to match the incoming packets to be processed by the previous stage based on the packet header information; The first processing module is used to allow the inbound processing engine to send the message to be processed by the previous stage to the loopback channel for previous stage processing in order to obtain the message that has been processed by the previous stage. The message to be processed by the previous stage passes through the outbound processing engine when it is sent to the loopback channel. The message to be processed by the previous stage is edited by the outbound processing engine based on the source port. The first forwarding module is used to allow the inbound processing engine to recover the source port based on the packet header and outbound port of the previously processed packet and to forward the looped-back previously processed packet.

8. A pre- and post-processing apparatus, characterized in that, include: The second matching module is used by the inbound direction processing engine to find the target port and encapsulation identifier of the matched message to be processed by the subsequent stage based on the message header information and / or source port information. The second processing module is used for the inbound processing engine to look up the downstream processing channel identifier based on the encapsulation identifier, so as to send the message to be processed to the corresponding downstream processing channel for downstream processing to obtain the processed message. The processed message is looped back to the inbound processing engine through the loopback channel. The message to be processed passes through the outbound processing engine when it is sent to the downstream processing channel. The message to be processed is encapsulated by the outbound processing engine based on the encapsulation identifier and the message header is edited based on the target port. The second forwarding module is used to allow the inbound processing engine to recover the target port based on the packet header and loopback information of the subsequent processed packets, and to forward the loopback of the subsequent processed packets.

9. A computing device, comprising: At least one processor; as well as A memory that stores instructions, which, when executed by the at least one processor, cause the at least one processor to perform the method as described in any one of claims 1 to 6.

10. A machine-readable storage medium storing executable instructions that, when executed, cause the machine to perform the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and device for achieving multistage message editing service control on the basis of logic port

    CN105337884A

  • Method for achieving 802.11 QoS priority value flexible mapping in chip

    CN105516022A