CN110392002B - Message processing method, device, equipment and readable storage medium - Google Patents

Message processing method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN110392002B
CN110392002B CN201910660074.0A CN201910660074A CN110392002B CN 110392002 B CN110392002 B CN 110392002B CN 201910660074 A CN201910660074 A CN 201910660074A CN 110392002 B CN110392002 B CN 110392002B
Authority
CN
China
Prior art keywords
message
target
control message
container
assembly line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910660074.0A
Other languages
Chinese (zh)
Other versions
CN110392002A (en
Inventor
丁瑞
卢华
朱伏生
张继栋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Communications and Networks Institute
Original Assignee
Guangdong Communications and Networks Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Communications and Networks Institute filed Critical Guangdong Communications and Networks Institute
Priority to CN201910660074.0A priority Critical patent/CN110392002B/en
Publication of CN110392002A publication Critical patent/CN110392002A/en
Priority to PCT/CN2019/126996 priority patent/WO2021012601A1/en
Application granted granted Critical
Publication of CN110392002B publication Critical patent/CN110392002B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/70Virtual switches

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a message processing method, a device, equipment and a readable storage medium, wherein the method comprises the following steps: mapping physical ports of each pre-planned assembly line into virtual interfaces, and adding the virtual interfaces into containers corresponding to the virtual interfaces; determining a target assembly line for receiving a message in each assembly line, and detecting whether the message in each target assembly line is a control message, wherein the message comprises a control message and a service message; and if the message is a control message, sending the control message to a target container from a target pipeline where the control message is located so that the target container can perform protocol processing on the control message, wherein the target container is a container where the virtual interface corresponding to the target pipeline where the control message is located. The invention improves the utilization rate of the programmable switch.

Description

Message processing method, device, equipment and readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, and a readable storage medium for processing a packet.
Background
With the increasing attention of the concept of network programmability, the programmable switch is applied to cloud data centers, network slices and the like, and has the characteristics of flexibly defining the data processing flow of forwarding equipment, protocol-independent forwarding of the forwarding equipment, equipment independence and the like. In contrast, in the conventional network device change process, when a user finds that the service deployment of the network cannot be supported by the current device, the requirement is fed back to the device manufacturer, the device manufacturer may consider factors such as the purchase scale of the user, whether the hardware supports the function, and the like, and may need months or even years before issuing a solution, which cannot meet the requirement of rapid service iteration in the internet era. However, the interfaces in the existing switch are often not fully utilized for various reasons, and a great waste phenomenon exists. Therefore, how to improve the utilization rate of the programmable switch becomes a technical problem to be solved urgently at present.
Disclosure of Invention
The invention mainly aims to provide a message processing method, a message processing device, message processing equipment and a readable storage medium, and aims to solve the technical problem of how to improve the utilization rate of a programmable switch.
In order to achieve the above object, the present invention provides a message processing method, where the message processing method includes:
mapping physical ports of each pre-planned assembly line into virtual interfaces, and adding the virtual interfaces into containers corresponding to the virtual interfaces;
determining a target assembly line for receiving a message in each assembly line, and detecting whether the message in each target assembly line is a control message, wherein the message comprises a control message and a service message;
and if the message is a control message, sending the control message to a target container from a target pipeline where the control message is located so that the target container can perform protocol processing on the control message, wherein the target container is a container where the virtual interface corresponding to the target pipeline where the control message is located.
Optionally, after the step of sequentially detecting whether the packet in each target pipeline is a control packet, the method includes:
if the message in the target assembly line is a service message, acquiring a forwarding table on the target assembly line where the service message is located, and sending the service message in the target assembly line where the service message is located based on the forwarding table.
Optionally, the step of sending the service packet in a target pipeline where the service packet is located based on the forwarding table includes:
and acquiring routing information corresponding to the service message in the forwarding table, and sending the service message from a target pipeline where the service message is located according to the routing information.
Optionally, the step of sending the control packet from the target pipeline where the control packet is located to the target container includes:
acquiring a physical port connected with a CPU (central processing unit) of a processor in each physical port, and taking the physical port connected with the CPU as a CPU interface;
and sending the control message to the CPU interface from the target pipeline where the control message is positioned, and transmitting the control message to a target container through the CPU interface.
Optionally, the step of sending the control packet from the target pipeline where the control packet is located to the CPU interface, and transmitting the control packet to a target container through the CPU interface includes:
acquiring a target physical port corresponding to a target pipeline where the control message is located, determining a preset number corresponding to the target physical port, and determining a virtual interface corresponding to the target physical port in each virtual interface based on the preset number;
and sending the control message from the target physical port to the CPU interface, transmitting the control message to a virtual interface corresponding to the target physical port through the CPU interface, and transmitting the control message to the target container through the virtual interface corresponding to the target physical port.
In addition, to achieve the above object, the present invention further provides a message processing apparatus, including:
the mapping module is used for mapping physical ports of each pre-planned assembly line into virtual interfaces and adding the virtual interfaces into containers corresponding to the virtual interfaces;
the detection module is used for determining a target assembly line receiving the message in each assembly line and detecting whether the message in each target assembly line is a control message or not, wherein the message comprises a control message and a service message;
and the sending module is used for sending the control message to a target container from a target pipeline where the control message is located if the message is a control message, so that the target container can perform protocol processing on the control message, wherein the target container is a container where the virtual interface corresponding to the target pipeline where the control message is located.
Optionally, the packet processing apparatus further includes:
and the obtaining module is used for obtaining a forwarding table on the target assembly line where the service message is located if the message in the target assembly line is the service message, and sending the service message in the target assembly line where the service message is located based on the forwarding table.
Optionally, the packet processing apparatus further includes:
and the sending module is used for acquiring the routing information corresponding to the service message in the forwarding table and sending the service message from a target production line where the service message is located according to the routing information.
In addition, in order to achieve the above object, the present invention also provides a message processing device;
the message processing device comprises: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein:
the computer program, when executed by the processor, implements the steps of the message processing method as described above.
In addition, to achieve the above object, the present invention also provides a computer storage medium;
the computer storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the message processing method as described above.
Mapping physical ports of each pre-planned assembly line into virtual interfaces, and adding the virtual interfaces into containers corresponding to the virtual interfaces; determining a target assembly line for receiving a message in each assembly line, and detecting whether the message in each target assembly line is a control message, wherein the message comprises a control message and a service message; and if the message is a control message, sending the control message to a target container from a target pipeline where the control message is located so that the target container can perform protocol processing on the control message, wherein the target container is a container where the virtual interface corresponding to the target pipeline where the control message is located. When receiving the message, the physical ports on each pipeline are mapped into virtual interfaces, and when the message is received by the target pipeline and determined to be a control message, the control message is sent to the target container. Therefore, one programmable switch can be virtualized into a plurality of logic switches, a user does not need to additionally purchase any additional service or product, the utilization rate of the switch is greatly improved, convenience is brought to networking design, a plurality of network functions can be fused and deployed, capital expenditure and operation cost of the user are greatly reduced, and the technical problem that the utilization rate of the programmable switch is low in the prior art is solved.
Drawings
FIG. 1 is a schematic diagram of a terminal \ device structure of a hardware operating environment according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a first embodiment of the message processing method according to the present invention;
FIG. 3 is a functional block diagram of the message processing apparatus according to the present invention;
FIG. 4 is a physical block diagram of a programmable switch for the message processing method of the present invention;
FIG. 5 is an internal schematic diagram of a programmable switch for the message processing method of the present invention;
FIG. 6 is a flow chart illustrating a message processing method according to the present invention;
FIG. 7 is a diagram of an application scenario of the message processing method of the present invention;
fig. 8 is a scene schematic diagram of the message processing method of the present invention.
The objects, features and advantages of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention.
The terminal provided by the embodiment of the invention is electronic equipment.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the terminal may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. Such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that turns off the display screen and/or the backlight when the terminal device is moved to the ear. Of course, the terminal device may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a message processing program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; the processor 1001 may be configured to call the message handler stored in the memory 1005, and perform the following operations:
mapping physical ports of each pre-planned assembly line into virtual interfaces, and adding the virtual interfaces into containers corresponding to the virtual interfaces;
determining a target assembly line for receiving a message in each assembly line, and detecting whether the message in each target assembly line is a control message, wherein the message comprises a control message and a service message;
and if the message is a control message, sending the control message to a target container from a target pipeline where the control message is located so that the target container can perform protocol processing on the control message, wherein the target container is a container where the virtual interface corresponding to the target pipeline where the control message is located.
Referring to fig. 2, the present invention provides a message processing method, and in an embodiment of the message processing method, the message processing method includes the following steps:
step S10, mapping the physical ports of each pre-planned assembly line into virtual interfaces, and adding the virtual interfaces into containers corresponding to the virtual interfaces;
the virtual interface may be a virtual interface after the physical port is mapped. Before the programmable switch works, networking is needed, a pipeline to be applied is planned, which message is input and output from the programmable switch is determined, physical ports on the pipelines are mapped into virtual interfaces after each pipeline to be applied is planned, and the virtual interfaces are placed in containers corresponding to the pipelines. It should be noted that one pipeline only corresponds to one container, but one container may correspond to multiple pipelines, that is, all virtual interfaces of one pipeline may be placed in only one container, and one container may be placed with all virtual interfaces of multiple pipelines, and an interface in one container is fixedly corresponding to an interface on that pipeline. And the role of the container is logical isolation and the role of the pipeline is physical isolation.
In this embodiment, the programmable switch may be further divided into two planes, i.e., a control plane and a forwarding plane, and if one virtual switch is to be implemented, one physical switch implements multiple logically isolated virtual switches, which mainly needs to implement virtualization of the control plane and the forwarding plane. Each pipeline of the programmable chip in the programmable switch can be used as an independent forwarding plane. The containers are running protocol stacks, each container is an independent network name space, and each container can be a control plane of a complete protocol stack.
In addition, to assist in understanding the programmable switch in this embodiment, the following description is made.
For example, as shown in fig. 4, the physical fabric of the programmable switch includes a control plane and a forwarding plane. And the control plane includes an operating system, a virtual interface, a CPU, a container, and the like. The forwarding plane comprises a programmable chip, a flow manager, pipelines 1 to N and physical ports on each pipeline, and each physical port is divided into an incoming direction and an outgoing direction. The programmable chip completes forwarding of a data packet by executing a 'matching-action', and generally comprises a plurality of pipelines, each pipeline is divided into an Ingress (Ingress) pipeline and an Egress (Egress) pipeline, a flow management unit shared among the pipelines is arranged between the Ingress and the Egress, and is responsible for completing copying of a message and flow scheduling, each pipeline can independently load different forwarding logics, the forwarding logics can be realized by a specific programming language, a certain port of the switch is fixedly assigned to a certain specific pipeline, wherein the first pipeline is relatively special, a port on the pipeline is connected with a CPU (central processing unit) of a local control surface of the switch and is used for realizing uploading of a control message, and the port is a system visible interface and is similar to a common 'network card', namely a CPU port.
In the embodiment, the virtual interface is added to the container, and the home relationship between the physical port and each pipeline is determined, so that the physical port and the virtual interface are in a one-to-one correspondence relationship, and each container can correspond to a specific physical port. For example, as shown in fig. 5, the system includes a programmable chip, a device driver, a kernel, a chip manager, a protocol proxy, a control plane 1 through a control plane N, a protocol stack, a protocol plug-in, a virtual interface X, and the like exist in a container 1, a protocol plug-in, a protocol stack, a virtual interface Y, and the like exist in a container N, and each control plane includes one container. The virtualization of the control plane does lightweight isolation through containers. That is, a plurality of containers are created in the control plane, the number of the containers is consistent with the number of pipelines, and each container is an independent network name space. The required virtual interface is added into the container, so that the control message received from a certain physical port can be received in the container. And running a protocol stack in the container, and establishing a neighbor between the protocol stack and the protocol peer through a virtual interface so as to realize the learning and transmission of the route. And reading the routing information from the kernel through a protocol plug-in module, and informing a protocol agent module outside the container to write a forwarding table of a corresponding pipeline outside the container when the routing information changes.
For another example, as shown in fig. 8, after the physical ports on the pipelines are mapped to virtual interfaces and the virtual interfaces are placed in containers, each virtual machine is obtained, and each pipeline in the programmable chip corresponds to a respective virtual switch, that is, pipeline 1 corresponds to virtual switch 1 (i.e., control plane 1) through pipeline N corresponds to virtual switch N (i.e., control plane N), and control plane 1 (i.e., container 1) includes a protocol stack, a protocol plug, and each virtual interface X; the control plane N (i.e., container N) includes protocol plug-ins, protocol stacks, and respective virtual interfaces Y, etc.
Step S20, determining a target pipeline receiving a message in each pipeline, and detecting whether the message in each target pipeline is a control message, wherein the message comprises a control message and a service message;
the target pipeline may be the pipeline that receives the packet. When detecting that a flow line receives a message in each flow line, whether the message received by the flow line is a control message needs to be checked, if so, the message needs to be sent to a container corresponding to the flow line where the message is located, so that the container can carry out protocol processing, and if so, the message can be directly sent out from the flow line to an external network.
Step S30, if the message is a control message, sending the control message from the target pipeline where the control message is located to a target container, so that the target container performs protocol processing on the control message, where the target container is a container where the virtual interface corresponding to the target pipeline where the control message is located.
The target container is a container corresponding to the target pipeline. If the message is found to be a control message in each target pipeline through judgment, the control message is transmitted to the target container corresponding to the target pipeline from the target pipeline where the control message is located, so that the target container performs protocol processing on the control message, namely, a protocol stack in the target container performs protocol processing on the control message. It should be noted that each container may correspond to a separate virtual switch to implement different protocol processing. In practical application, according to a specific service scenario, the service arrangement module can implement the procedures of port mapping, forwarding plane initialization, container creation and the like. For example, as shown in fig. 6. According to the service configuration and the networking situation, port mapping is carried out, namely, physical ports from a pipeline 1 to a pipeline N in the programmable chip are mapped into virtual interfaces, namely, operation of the first step in the figure. And sequentially placing each virtual interface in the containers 1 to N, wherein each container runs a protocol stack and a protocol plug-in. And then initializing the forwarding plane where the programmable chip is located. And respectively loading corresponding forwarding logic to the pipeline from the service arrangement, namely loading the forwarding logic 1 to the pipeline 1 and loading the forwarding logic N to the pipeline N, namely the operation of the second step in the figure. And then the forwarding logic is transmitted to the container through the pipeline, namely the operation of the third in the figure, and the forwarding logic is output through the pipeline after the processing in the container is finished.
In addition, to assist understanding of an application scenario of a programmable switch with one virtual switch in this embodiment, an example is described below.
For example, as shown in fig. 7, it is assumed that two network services run simultaneously on one programmable switch, and one pipeline (i.e., pipeline) is responsible for access functions, speed limiting, charging, tunnel encapsulation, and other operations; the other pipeline is responsible for the selection of the stream-by-stream consistent hash for the back-end server, similar to a load balancer. The control surface of the access assembly line establishes a neighbor relation with the external network entrance device through a virtual interface, and simultaneously declares routing information for guiding. The back-end service clusters establish a neighbor relationship with the consistent hash pipeline and simultaneously announce VIP (i.e., virtual IP) information, one VIP is assigned to each cluster, and all cluster VIPs are in the same network segment, such as 192.168.1.0/25. After receiving the route announcement, the consistent Hash assembly line can form the condition that the same VIP has a plurality of next hops in a local routing table, and each next hop represents a physical server; taking the protocol neighbor relation as keep-alive information; if a certain server at the back end is abnormal, the neighbor relation is lost, at the moment, one hop is omitted in the routing table, and the protocol plug-in can update the forwarding table of the corresponding pipeline. And the access assembly line and the consistent Hash assembly line establish a neighbor relation through an intranet physical network to declare a specific VIP, wherein the VIP is one of the cluster VIP sections and is used for returning messages. The consistent hash pipeline announces the routing information of the VIP segment to the intranet physical network for drainage.
And for the incoming flow, after the flow enters an access flow line from an external network entrance, the address information of the next hop is inquired through the corresponding logic of the control surface, namely the specific cluster needs to be sent to, after the functions of speed limiting, charging and the like are executed, the message is packaged in a tunnel, the IP address of the outer layer of the tunnel is the VIP of a certain cluster, and finally the VIP is sent to the intranet physical network. The routing information of the VIP section is announced by the consistent Hash assembly line, the routing information of the VIP section is announced by introducing the flow into the consistent Hash assembly line by the intranet physical network, the flow is introduced into the consistent Hash assembly line by the intranet physical network, the consistent Hash assembly line carries out consistent Hash according to the information of the physical server below the VIP, so that a certain server is selected, and meanwhile, the outer layer IP of the tunnel is modified into the address information of the physical server and is sent to the intranet physical network. And finally forwarding the message to a corresponding server by the intranet physical network. Due to the existence of the consistent Hash algorithm, only 1/N connection is influenced (N is the number of servers in the back-end cluster) under the condition that the back-end server is abnormal, and meanwhile, the method can be well suitable for stateful and stateless application through the selection of the consistent Hash algorithm.
For outgoing flow and flow coming out of the physical server, a fixed IP address is encapsulated on the outer layer of the tunnel, the address is a VIP (very important person) accessing the assembly line and then is sent to the intranet physical network, and the intranet physical network can transfer the flow to the consistent Hash assembly line in the same way. And the consistent Hash assembly line finds the next hop according to the VIP information announced by the access assembly line, thereby modifying the outer layer IP of the tunnel into the next hop information and then sending the next hop information to the intranet physical network. And after receiving the outgoing message in the receiving pipeline, executing decapsulation and sending to the external network.
In this embodiment, a physical port of each pipeline planned in advance is mapped into a virtual interface, and the virtual interface is added to a container corresponding to the virtual interface; determining a target assembly line for receiving a message in each assembly line, and detecting whether the message in each target assembly line is a control message, wherein the message comprises a control message and a service message; and if the message is a control message, sending the control message to a target container from a target pipeline where the control message is located so that the target container can perform protocol processing on the control message, wherein the target container is a container where the virtual interface corresponding to the target pipeline where the control message is located. When receiving the message, the physical ports on each pipeline are mapped into virtual interfaces, and when the message is received by the target pipeline and determined to be a control message, the control message is sent to the target container. Therefore, one programmable switch can be virtualized into a plurality of logic switches, a user does not need to additionally purchase any additional service or product, the utilization rate of the switch is greatly improved, convenience is brought to networking design, a plurality of network functions can be fused and deployed, capital expenditure and operation cost of the user are greatly reduced, and the technical problem that the utilization rate of the programmable switch is low in the prior art is solved.
Further, on the basis of the first embodiment of the present invention, a second embodiment of the message processing method of the present invention is provided, where this embodiment is step S20 of the first embodiment of the present invention, and after the step of detecting whether the message in each target pipeline is a control message, the method includes:
step a, if the message in the target production line is a service message, acquiring a forwarding table on the target production line where the service message is located, and sending the service message in the target production line where the service message is located based on the forwarding table.
When the message in each target pipeline is found to be not a control message by judgment, the message which is not the control message can be used as a service message, a forwarding table on the target pipeline where the service message is located is obtained, an outlet port on the target pipeline is determined according to the routing information in the forwarding table, and the service message is sent out from the target pipeline. The forwarding table includes routing information. In this embodiment, each pipeline is provided with a forwarding table corresponding to each pipeline, and a message is received in which pipeline, and the message is sent from which pipeline.
In this embodiment, when it is determined that the message is not the control message, the service message is directly sent out, so that the message sending efficiency of the programmable switch is ensured.
Specifically, the step of sending the service packet in the target pipeline where the service packet is located based on the forwarding table includes:
step a1, obtaining the routing information corresponding to the service message in the forwarding table, and sending the service message from the target pipeline where the service message is located according to the routing information.
And determining routing information corresponding to the service message according to the routing information stored in the message table, determining an outlet port in the target assembly line according to the routing information, and sending the service message from the outlet port in the target assembly line.
In this embodiment, the routing information corresponding to the service packet is acquired in the forwarding table, and the service packet is sent according to the routing information, so that the efficiency of sending the packet by the programmable switch is ensured.
Further, the step of sending the control packet from the target pipeline where the control packet is located to the target container includes:
b, acquiring a physical port connected with a CPU (central processing unit) of a processor in each physical port in a target production line where the control message is positioned, and taking the physical port connected with the CPU as a CPU interface;
although there are several physical ports in the target pipeline where the control message is located, there is a physical port in the target pipeline where the control message is located, which is connected to the CPU of the local control plane of the switch and uses this port as a CPU interface for implementing the uploading of the control message, and the physical port is a system visible interface, similar to a common "network card".
And c, sending the message to the CPU interface from the target pipeline where the control message is positioned, and transmitting the control message to a target container through the CPU interface.
After the CPU interface is determined, the control packet may be sent to the CPU interface from the target pipeline where the control packet is located, and forwarded to the corresponding virtual interface through the kernel in the CPU, and then the packet is transmitted to the target container through the virtual interface.
In this embodiment, the accuracy of sending the message to the virtual interface is ensured by determining the CPU interface, sending the control message from the target pipeline where the control message is located to the CPU interface, and then sending the control message from the CPU interface to the virtual interface.
Specifically, the step of sending the control packet from the target pipeline where the control packet is located to the CPU interface, and transmitting the control packet to a target container through the CPU interface includes:
step c1, acquiring a target physical port corresponding to a target pipeline where the control message is located, determining a preset number corresponding to the target physical port, and determining a virtual interface corresponding to the target physical port in each virtual interface based on the preset number;
after the physical ports in the pipeline are mapped into the virtual interfaces, each physical interface has a preset number, and therefore the virtual interfaces also have corresponding numbers. If the number is x, a subinterface is established on an interface connected with the CPU, and the id of the subinterface is x; a part of logic needs to be fixedly realized on each pipeline, for a control message needing to be uploaded, if the message comes from a port x, a mark id can be considered to be equal to the port number x, the port can be set as a CPU interface, and after the message is received from the CPU interface, an inner core transfers the message to a corresponding sub-interface according to the mark id, so that mapping between a physical port and a virtual interface is realized. That is, after the target pipeline acquires the message, it is determined whether the message is a control message, and when the message is a control message, a physical port (i.e., a target physical port) of the target pipeline where the control message is located is determined, and a preset number corresponding to the entry port is determined, and a virtual interface corresponding to the target physical port is determined in each virtual interface according to the preset number.
Step c2, sending the control packet from the target physical port to the CPU interface, transferring the control packet to the virtual interface corresponding to the target physical port through the CPU interface, and transferring the control packet to the target container through the virtual interface corresponding to the target physical port.
And sending the control message to a CPU interface from a target physical port of a target assembly line where the control message is positioned, transmitting the control message to a virtual interface corresponding to the target physical port through an inner core corresponding to the CPU interface, and transmitting the control message to a target container through the virtual interface so that the target container processes the control message.
In this embodiment, the virtual interface is determined by determining the preset number of the target physical port of the target pipeline, and the packet is sent to the virtual interface, so that the accuracy of sending the packet to the virtual interface is improved.
In addition, referring to fig. 3, an embodiment of the present invention further provides a packet processing apparatus, where the packet processing apparatus includes:
the mapping module is used for mapping physical ports of each pre-planned assembly line into virtual interfaces and adding the virtual interfaces into containers corresponding to the virtual interfaces;
the detection module is used for determining a target assembly line receiving the message in each assembly line and detecting whether the message in each target assembly line is a control message or not, wherein the message comprises a control message and a service message;
and the sending module is used for sending the control message to a target container from a target pipeline where the control message is located if the message is a control message, so that the target container can perform protocol processing on the control message, wherein the target container is a container where the virtual interface corresponding to the target pipeline where the control message is located.
Optionally, the packet processing apparatus further includes:
and the obtaining module is used for obtaining a forwarding table on the target assembly line where the service message is located if the message in the target assembly line is the service message, and sending the service message in the target assembly line where the service message is located based on the forwarding table.
Optionally, the packet processing apparatus further includes:
and the sending module is used for acquiring the routing information corresponding to the service message in the forwarding table and sending the service message from a target production line where the service message is located according to the routing information.
Optionally, the transfer module is further configured to:
acquiring a physical port connected with a CPU (central processing unit) of a processor in each physical port in a target pipeline where the control message is positioned, and taking the physical port connected with the CPU as a CPU interface;
and sending the control message to the CPU interface from the target pipeline where the control message is positioned, and transmitting the control message to a target container through the CPU interface.
Optionally, the transfer module is further configured to:
acquiring a target physical port corresponding to a target pipeline where the control message is located, determining a preset number corresponding to the target physical port, and determining a virtual interface corresponding to the target physical port in each virtual interface based on the preset number;
and sending the control message from the target physical port to the CPU interface, transmitting the control message to a virtual interface corresponding to the target physical port through the CPU interface, and transmitting the control message to the target container through the virtual interface corresponding to the target physical port.
The steps implemented by each functional module of the message processing apparatus may refer to each embodiment of the message processing method of the present invention, and are not described herein again.
The present invention also provides a message processing apparatus, including: a memory, a processor, a communication bus, and a message handling program stored on the memory:
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute the message processing program to implement the steps of the embodiments of the message processing method.
The present invention also provides a computer-readable storage medium storing one or more programs, which are further executable by one or more processors for implementing the steps of the embodiments of the message processing method described above.
The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the embodiments of the message processing method described above, and is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A message processing method is characterized by comprising the following steps:
mapping physical ports of each pre-planned assembly line into virtual interfaces, and adding the virtual interfaces into containers corresponding to the virtual interfaces, wherein all the virtual interfaces of one assembly line can be placed in only one container, and one container can receive all the virtual interfaces of a plurality of assembly lines;
determining a target assembly line for receiving a message in each assembly line, and detecting whether the message in each target assembly line is a control message, wherein the message comprises a control message and a service message;
and if the message is a control message, sending the control message to a target container from a target pipeline where the control message is located so that the target container can perform protocol processing on the control message, wherein the target container is a container where the virtual interface corresponding to the target pipeline where the control message is located.
2. The message processing method according to claim 1, wherein the step of detecting whether the message in each of the target pipelines is a control message comprises:
if the message in the target assembly line is a service message, acquiring a forwarding table on the target assembly line where the service message is located, and sending the service message in the target assembly line where the service message is located based on the forwarding table.
3. The message processing method according to claim 2, wherein the step of sending the service message in the destination pipeline where the service message is located based on the forwarding table comprises:
and acquiring routing information corresponding to the service message in the forwarding table, and sending the service message from a target pipeline where the service message is located according to the routing information.
4. The message processing method of claim 1, wherein the step of sending the control message from the target pipeline in which the control message is located to the target container comprises:
acquiring a physical port connected with a CPU (central processing unit) of a processor in each physical port in a target pipeline where the control message is positioned, and taking the physical port connected with the CPU as a CPU interface;
and sending the control message to the CPU interface from the target pipeline where the control message is positioned, and transmitting the control message to a target container through the CPU interface.
5. The message processing method according to claim 4, wherein the step of sending the control message from the target pipeline where the control message is located to the CPU interface and transferring the control message to the target container through the CPU interface comprises:
acquiring a target physical port corresponding to a target pipeline where the control message is located, determining a preset number corresponding to the target physical port, and determining a virtual interface corresponding to the target physical port in each virtual interface based on the preset number;
and sending the control message from the target physical port to the CPU interface, transmitting the control message to a virtual interface corresponding to the target physical port through the CPU interface, and transmitting the control message to the target container through the virtual interface corresponding to the target physical port.
6. A message processing apparatus, characterized in that the message processing apparatus comprises:
the mapping module is used for mapping physical ports of each pre-planned assembly line into virtual interfaces and adding the virtual interfaces into containers corresponding to the virtual interfaces, wherein all the virtual interfaces of one assembly line can be placed in only one container, and one container can receive all the virtual interfaces of a plurality of assembly lines;
the detection module is used for determining a target assembly line receiving the message in each assembly line and detecting whether the message in each target assembly line is a control message or not, wherein the message comprises a control message and a service message;
and the sending module is used for sending the control message to a target container from a target pipeline where the control message is located if the message is a control message, so that the target container can perform protocol processing on the control message, wherein the target container is a container where the virtual interface corresponding to the target pipeline where the control message is located.
7. The message processing device according to claim 6, wherein the message processing device further comprises:
and the obtaining module is used for obtaining a forwarding table on the target assembly line where the service message is located if the message in the target assembly line is the service message, and sending the service message in the target assembly line where the service message is located based on the forwarding table.
8. The message processing device according to claim 7, wherein the message processing device further comprises:
and the sending module is used for acquiring the routing information corresponding to the service message in the forwarding table and sending the service message from a target production line where the service message is located according to the routing information.
9. A message processing apparatus, characterized in that the message processing apparatus comprises: memory, processor and message processing program stored on the memory and executable on the processor, the message processing program when executed by the processor implementing the steps of the message processing method according to any of claims 1 to 5.
10. A readable storage medium having stored thereon a message processing program which, when executed by a processor, implements the steps of the message processing method according to any one of claims 1 to 5.
CN201910660074.0A 2019-07-19 2019-07-19 Message processing method, device, equipment and readable storage medium Active CN110392002B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910660074.0A CN110392002B (en) 2019-07-19 2019-07-19 Message processing method, device, equipment and readable storage medium
PCT/CN2019/126996 WO2021012601A1 (en) 2019-07-19 2019-12-20 Message processing method and device, apparatus, and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910660074.0A CN110392002B (en) 2019-07-19 2019-07-19 Message processing method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN110392002A CN110392002A (en) 2019-10-29
CN110392002B true CN110392002B (en) 2020-10-23

Family

ID=68286974

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910660074.0A Active CN110392002B (en) 2019-07-19 2019-07-19 Message processing method, device, equipment and readable storage medium

Country Status (2)

Country Link
CN (1) CN110392002B (en)
WO (1) WO2021012601A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110392002B (en) * 2019-07-19 2020-10-23 广东省新一代通信与网络创新研究院 Message processing method, device, equipment and readable storage medium
CN111030944A (en) * 2019-11-25 2020-04-17 杭州迪普科技股份有限公司 Message sending method and equipment
CN111935148B (en) * 2020-08-11 2021-06-18 北京卓讯科信技术有限公司 Control method and device for data plane signaling message
CN112616153B (en) * 2020-12-08 2023-07-25 京信网络系统股份有限公司 Container processing method, device, computer equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105207873A (en) * 2015-08-31 2015-12-30 华为技术有限公司 Message processing method and apparatus
CN108199982A (en) * 2018-01-03 2018-06-22 腾讯科技(深圳)有限公司 Message processing method, device, storage medium and computer equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100477650C (en) * 2005-09-30 2009-04-08 华为技术有限公司 IP interconnected gateway in next-generation of Internet and method for interconnecting IP domain
US9025434B2 (en) * 2012-09-14 2015-05-05 Microsoft Technology Licensing, Llc Automated datacenter network failure mitigation
CN110392002B (en) * 2019-07-19 2020-10-23 广东省新一代通信与网络创新研究院 Message processing method, device, equipment and readable storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105207873A (en) * 2015-08-31 2015-12-30 华为技术有限公司 Message processing method and apparatus
CN108199982A (en) * 2018-01-03 2018-06-22 腾讯科技(深圳)有限公司 Message processing method, device, storage medium and computer equipment

Also Published As

Publication number Publication date
CN110392002A (en) 2019-10-29
WO2021012601A1 (en) 2021-01-28

Similar Documents

Publication Publication Date Title
CN110392002B (en) Message processing method, device, equipment and readable storage medium
CN106789667B (en) Data forwarding method, related equipment and system
US11374899B2 (en) Managing network connectivity between cloud computing service endpoints and virtual machines
CN109245984B (en) Message transmission method, information processing method and related equipment thereof
CN111885075A (en) Container communication method, device, network equipment and storage medium
CN107579900B (en) Method, device and system for accessing VX L AN network from V L AN network
CN111565142B (en) Message processing method and device and computer readable storage medium
WO2020213989A1 (en) Electronic device and method for controlling data transmission
CN111901177B (en) Bare metal server network configuration method, system and related equipment
US11296978B2 (en) Enablement of multi-path routing in virtual edge systems
CN112769794B (en) Data conversion method and device
CN111770035B (en) MAC address table updating method and device, message sending method and electronic equipment
US11153169B2 (en) Distributed storage system with overlay network
CN102999345B (en) The method, apparatus and system that a kind of operating system loads
CN111010346B (en) Message processing method, device, storage medium and device based on dynamic routing
CN103986660A (en) Device and method for loading microcodes
CN113783914A (en) Data processing method, device and equipment
CN110602143A (en) Method, system and readable storage medium for realizing communication between PC (personal computer) end and remote equipment
CN107800628B (en) Data forwarding device and data forwarding method for software defined network
US11889593B2 (en) Wireless communication service over an edge data network (EDN) between a user equipment (UE) and an application server (AS)
CN113612643B (en) Network configuration method, device and equipment of cloud mobile phone and storage medium
US9747144B2 (en) Function processing apparatus and function processing method dynamically process network function using commands
CN114157455A (en) Data transmission method, device, equipment and storage medium
CN114301989A (en) Information transmission method, device and system
CN113059569A (en) Multi-terminal interaction method, device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant