Search

CN-116436876-B - Data message processing method and device, electronic equipment and readable storage medium

CN116436876BCN 116436876 BCN116436876 BCN 116436876BCN-116436876-B

Abstract

The application discloses a data message processing method, a device, electronic equipment and a readable storage medium, which are applied to the technical field of communication, wherein the data message processing method comprises the steps of obtaining a data message to be processed, and analyzing the data message to be processed through a data plane to obtain message information; judging whether to process the data message to be processed by adopting a virtual extended local area network (VXLAN) according to the message information through the data plane, if so, packaging the message header of the data message to be processed to obtain a VXLAN message, and processing the VXLAN message. The application solves the technical problem of lower processing efficiency of the data message.

Inventors

  • LIU JIXUAN
  • QU BO
  • FANG BINXING
  • JIA YAN
  • HU NING
  • CHENG YUNCAI
  • XIAO FENG

Assignees

  • 鹏城实验室

Dates

Publication Date
20260505
Application Date
20230420

Claims (7)

  1. 1. The data message processing method is characterized by being applied to a programmable switch, wherein the programmable switch comprises a data plane and a control plane, and the data message processing method comprises the following steps: acquiring a data message to be processed, analyzing the data message to be processed through the data plane to obtain message information, and arranging a data processor in the data plane; Judging whether to process the data message to be processed by adopting a virtual extended local area network (VXLAN) according to the message information through the data plane; if yes, carrying out message header encapsulation on the data message to be processed to obtain a VXLAN message, and processing the VXLAN message; The step of judging whether to process the data message to be processed by adopting the virtual extended local area network VXLAN according to the message information through the data plane includes: Acquiring a VXLAN flow table configured by the control plane, wherein the VXLAN flow table comprises a VXLAN identifier; Judging whether the message information is matched with the VXLAN identifier or not through the data plane, wherein the message information comprises a message identifier and a routing address; if the data messages are matched, judging that VXLAN is adopted to process the data messages to be processed; if not, judging whether the message identifier belongs to the VXLAN identifier type or not through the data plane; If the data message belongs to the data message to be processed, judging that the data message to be processed is processed by using VXLAN; Generating a tunnel endpoint corresponding to the message identifier according to the routing address through the data plane, and generating a group of updated flow table information according to the message identifier and the tunnel endpoint corresponding to the message identifier; And updating the VXLAN flow table according to the updated flow table information through the control plane.
  2. 2. The data message processing method of claim 1, wherein the programmable switch further comprises a control plane, and the step of header encapsulating the data message to be processed to obtain a VXLAN message comprises: Obtaining a VXLAN flow table configured by the control plane, wherein the VXLAN flow table comprises a corresponding relation between a VXLAN identifier and a VXLAN tunnel endpoint; inquiring the VXLAN flow table through the data plane according to the message information to obtain a target VXLAN identifier matched with the message information; And encapsulating the message header of the data message to be processed through a target tunnel endpoint corresponding to the target VXLAN identifier in the VXLAN flow table.
  3. 3. The data message processing method of claim 2, wherein the message information further comprises a routing address, the routing address comprising an internal routing address or an external routing address, the step of processing the VXLAN message comprising: Identifying a source port for acquiring the data message to be processed through the data plane to obtain a port identification result; If the port identification result comprises an ingress port, forwarding the VXLAN message to the internal routing address through the target tunnel endpoint; and if the port identification result comprises an output port, forwarding the VXLAN message to the external routing address through the output port.
  4. 4. The data message processing method of claim 2, further comprising, prior to the step of obtaining the VXLAN flow table configured by the control plane: obtaining preset multiple sets of flow table information, wherein one set of flow table information comprises a corresponding relation between a VXLAN identifier and a VXLAN tunnel endpoint, and the VXLAN identifiers corresponding to different flow table information are different; And configuring and obtaining a VXLAN flow table according to the multi-group flow table information through the control plane.
  5. 5. A data message processing apparatus, for use with a programmable switch, the programmable switch comprising a data plane and a control plane, the data message processing apparatus comprising: The acquisition module is used for acquiring a data message to be processed, analyzing the data message to be processed through the data plane to obtain message information, and arranging a data processor in the data plane; The judging module is used for judging whether the data message to be processed is processed by adopting a virtual extended local area network (VXLAN) according to the message information through the data plane, and the judging module is particularly used for acquiring a VXLAN flow table configured by the control plane, wherein the VXLAN flow table comprises a VXLAN identifier, judging whether the message information is matched with the VXLAN identifier through the data plane, and judging that the message information comprises the message identifier and a routing address; the processing module is used for carrying out message header encapsulation on the data message to be processed to obtain a VXLAN message and processing the VXLAN message if the data message to be processed is the same; The data message processing device further comprises a data plane, if the data plane is not matched with the data plane, judging whether the message identifier belongs to a VXLAN identifier type, if the data plane is not matched with the VXLAN identifier type, judging that the data message to be processed is processed by adopting the VXLAN, generating a tunnel endpoint corresponding to the message identifier according to the routing address through the data plane, generating a group of update flow table information according to the message identifier and the tunnel endpoint corresponding to the message identifier, and updating the VXLAN flow table according to the update flow table information through the control plane.
  6. 6. An electronic device, the electronic device comprising: at least one processor, and A memory communicatively coupled to the at least one processor, wherein, The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the data message processing method of any one of claims 1 to 4.
  7. 7. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a program that implements a data-message processing method, the program implementing the data-message processing method being executed by a processor to implement the steps of the data-message processing method according to any one of claims 1 to 4.

Description

Data message processing method and device, electronic equipment and readable storage medium Technical Field The present application relates to the field of communications technologies, and in particular, to a data packet processing method, apparatus, electronic device, and readable storage medium. Background Along with the high-speed development of technology, the demand of communication interconnection is also higher and higher, in order to meet the communication interconnection of high demand, the VXLAN (Virtual eXtensible Local Area Network, virtual expansion local area network) is used as a communication forwarding tunnel to realize the multi-range interconnection of mass data packets, at present, when the VXLAN message processing is realized by adopting software logic, as a plurality of ports are required to be constructed, and the number of the processed messages is more, the processing flow of a CPU is larger, so that the occupancy rate of the CPU is higher, the single processing amount of the messages is required to be reduced, and therefore, the processing efficiency of the data messages is lower. Disclosure of Invention The application mainly aims to provide a data message processing method, a device, electronic equipment and a readable storage medium, and aims to solve the technical problem of low processing efficiency of data messages in the prior art. In order to achieve the above object, the present application provides a data message processing method, which is applied to a programmable switch, wherein the programmable switch includes a data plane, and the data message processing method includes: acquiring a data message to be processed, and analyzing the data message to be processed through the data plane to obtain message information; Judging whether to process the data message to be processed by adopting a virtual extended local area network (VXLAN) according to the message information through the data plane; If yes, the data message to be processed is subjected to message header encapsulation to obtain a VXLAN message, and the VXLAN message is processed. Optionally, the programmable switch further includes a control plane, and the step of determining, by the data plane, whether to process the data packet to be processed by using a virtual extended local area network VXLAN according to the packet information includes: Acquiring a VXLAN flow table configured by the control plane, wherein the VXLAN flow table comprises a VXLAN identifier; judging whether the message information is matched with the VXLAN identifier or not through the data plane; and if so, judging that the VXLAN is adopted to process the data message to be processed. Optionally, the programmable switch further includes a control plane, and the step of encapsulating the header of the data packet to be processed to obtain a VXLAN packet includes: Obtaining a VXLAN flow table configured by the control plane, wherein the VXLAN flow table comprises a corresponding relation between a VXLAN identifier and a VXLAN tunnel endpoint; inquiring the VXLAN flow table through the data plane according to the message information to obtain a target VXLAN identifier matched with the message information; And encapsulating the message header of the data message to be processed through a target tunnel endpoint corresponding to the target VXLAN identifier in the VXLAN flow table. Optionally, the message information further includes a routing address, where the routing address includes an internal routing address or an external routing address, and the step of processing the VXLAN message includes: Identifying a source port for acquiring the data message to be processed through the data plane to obtain a port identification result; If the port identification result comprises an ingress port, forwarding the VXLAN message to the internal routing address through the target tunnel endpoint; and if the port identification result comprises an output port, forwarding the VXLAN message to the external routing address through the output port. Optionally, the message information includes a message identifier, and after the step of determining whether the message information matches the VXLAN identifier, the method further includes: if not, judging whether the message identifier belongs to the VXLAN identifier type or not through the data plane; And if the data message belongs to the data message, judging that the VXLAN is adopted to process the data message to be processed. Optionally, the message information further includes a routing address, and after the step of determining that the VXLAN is adopted to process the data message to be processed if the message information belongs to the routing address, the method further includes: Generating a tunnel endpoint corresponding to the message identifier according to the routing address through the data plane, and generating a group of updated flow table information according to the message identifier and the tun