A message processing method and device, electronic equipment and storage medium

By adding VLAN identifiers to messages at the external ports of the switching nodes and encapsulating VLAN tags, combined with VLAN relay mode and hash operations, the problem of business nodes obtaining switching node port information is solved, and the message sending and receiving efficiency and load balancing of the rack system are improved.

CN116016033BActive Publication Date: 2025-10-10BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310034766.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-10
Publication Date
2025-10-10
Estimated Expiration
2043-01-10

AI Technical Summary

Technical Problem

In a rack system, it is difficult for service nodes to obtain port information of switching nodes in real time, resulting in low efficiency in message sending and receiving.

Method used

By adding VLAN identifiers to messages at the external ports of the switching nodes and encapsulating VLAN tags using QinQ technology, combined with VLAN relay mode and hash operations, service nodes can obtain port information and achieve load balancing.

Benefits of technology

This enables the business node to accurately obtain the port information of the switching node, improves the message sending and receiving performance and load balancing, and avoids message loss and performance bottlenecks caused by inconsistent port information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116016033B_ABST
    Figure CN116016033B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a message processing method and device, electronic equipment and storage medium, which are applied to a rack system. The rack system includes a service node, a switching node and an interface node. An external port of the switching node is connected with the interface node, and an internal port of the switching node is connected with the service node. The method includes: in response to the external port receiving a first message sent by the interface node, adding a VLAN identifier of the external port to the first message; wherein the VLAN identifier is obtained according to a preset mapping relationship between a port identifier of the external port; and sending the first message carrying the VLAN identifier to the service node through the internal port, so that the service node obtains the port identifier of the external port according to the VLAN identifier and a pre-stored mapping relationship. The first message carries the port identifier information of the entering port through the VLAN identifier. The service node can obtain the port identifier of the entering port by using the mapping relationship and the VLAN identifier. Thus, the service node can obtain the port information of the switching node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a message processing method, device, electronic device and storage medium. Background Art

[0002] A rack system consists of multiple nodes that work together to form a unified device. A rack system can include various nodes, such as service nodes, switching nodes, and interface nodes. Service nodes and interface nodes are connected via switching nodes. During this collaborative process, how to enable service nodes to obtain port information from switching nodes for subsequent message transmission and reception processing remains a pressing technical challenge in this field. Summary of the Invention

[0003] The purpose of the embodiments of the present application is to provide a message processing method, device, electronic device and storage medium, so as to achieve the technical effect of enabling a service node to obtain port information of a switching node.

[0004] A first aspect of the present application provides a message processing method, which is applied to a switching node in a rack system, wherein the rack system further includes a service node and an interface node, wherein an external port of the switching node is connected to the interface node, and an internal port of the switching node is connected to the service node; the method includes:

[0005] In response to the external port receiving a first message sent by the interface node, adding a VLAN identifier of the external port to the first message; wherein the VLAN identifier is obtained according to a port identifier of the external port and a preset mapping relationship;

[0006] The first message carrying the VLAN identifier is sent to the service node through the internal port, so that the service node obtains the port identifier of the external port according to the VLAN identifier and the pre-stored mapping relationship.

[0007] In the above implementation, by converting the port ID into a VLAN ID and adding the VLAN ID to the first message, the first message carries the port ID information of the incoming port via the VLAN ID. Since the service node also pre-stores a mapping relationship between port IDs and VLAN IDs, the service node can use this mapping relationship and the VLAN ID carried in the first message to obtain the port ID of the incoming port. This achieves the technical effect of enabling the service node to obtain the port information of the switching node.

[0008] Furthermore, the external port is set to QinQ mode; and the adding of the VLAN identifier of the external port to the first message includes:

[0009] A VLAN tag carrying the VLAN identifier is encapsulated into the first message.

[0010] In the above implementation process, by utilizing QinQ technology, the VLAN identifier of the external port is encapsulated in the first message in the form of a VLAN tag, thereby carrying the port information of the external port in the first message, so that the service node can obtain the port information of the port where the first message enters through the VLAN identifier.

[0011] Furthermore, the internal port of the switching node and the port of the service node are set to VLAN trunk mode; the VLAN whitelist in the VLAN trunk mode records the VLAN identifier of the external port.

[0012] In the above implementation process, by setting the VLAN relay mode for the port that the first message subsequently passes through and adding the VLAN identifier of the external port to the VLAN whitelist, it is avoided that other ports strip off the added VLAN tags, ensuring that the first message encapsulated with the VLAN tag can reach the service node.

[0013] Furthermore, the service node includes a plurality of nodes, and sending the first message carrying the VLAN identifier to the service node through the internal port includes:

[0014] Performing an XOR operation on the source IP address and the destination IP address of the first message to obtain an operation result;

[0015] Performing a hash operation on the operation result to generate a hash value;

[0016] A target service node is determined from the plurality of service nodes according to the hash value, and the first message carrying the VLAN identifier is sent to the target service node through a target internal port corresponding to the target service node.

[0017] In the above implementation, for forward and reverse flow packets, since their source and destination IP addresses are symmetrical, performing an XOR operation on the source and destination IP addresses of the forward and reverse flow packets yields the same result. Subsequently, hashing the result produces the same hash value. Therefore, forward and reverse flow packets are assigned to the same target service node for corresponding service processing. This solves the technical problem of randomly assigning forward and reverse flow packets to different service nodes in related technologies.

[0018] Furthermore, the service nodes include multiple ones, and multiple communication links between the switching node and the multiple service nodes are aggregated into a link aggregation group.

[0019] In the implementation process, the link aggregation of the multiple communication links can widen the link bandwidth, thereby avoiding the port from being a bottleneck of the rack system performance.

[0020] Further, the external port and the internal port of the switching node are configured to disable the MAC address learning function and the query function.

[0021] In the implementation process, the switching node can no longer rely on the MAC address table for message forwarding, but transmits and receives messages through the VLAN flag. Therefore, zero MAC address learning and query are achieved, and the message transmission and reception performance is improved.

[0022] The second aspect embodiment of the present application provides a message processing method applied to a service node in a rack system, wherein the rack system further includes a switching node and an interface node, an external port of the switching node is connected with the interface node, and an internal port of the switching node is connected with the service node. The method includes the following steps:

[0023] receiving a first message sent by the switching node through the internal port; wherein the first message is sent by the interface node to the switching node through the external port, the first message carries a VLAN identifier of the external port, and the VLAN identifier is obtained according to a preset mapping relationship between a port identifier of the external port and the mapping relationship;

[0024] determining the port identifier of the external port according to the VLAN identifier and the pre-stored mapping relationship.

[0025] The third aspect embodiment of the present application provides a message processing method applied to a service node in a rack system, wherein the rack system further includes a switching node and multiple interface nodes; the switching node includes multiple external ports, the multiple external ports are connected with the multiple interface nodes, and an internal port of the switching node is connected with the service node. The method includes the following steps:

[0026] determining a target VLAN identifier of a target external port according to a target port identifier of the target external port and a pre-stored mapping relationship between the port identifier and the VLAN identifier;

[0027] adding the target VLAN identifier to a second message, and sending the second message carrying the target VLAN identifier to the switching node through the internal port, so that the switching node strips the target VLAN identifier of the second message and sends the stripped second message to a target interface node through a target external port indicated by the VLAN identifier.

[0028] In the above implementation, when a service node needs to send a second message to a designated interface node, it determines the target VLAN identifier based on the target external port's target port identifier and the mapping relationship, and then encapsulates the target VLAN identifier into the second message. This allows the switching node to determine, based on the target VLAN identifier, which external port the second message should be sent to the corresponding interface node. This enables the service node to send the second message from the designated target external port to the target interface node.

[0029] A fourth aspect of the present application provides a message processing method, which is applied to a switching node in a rack system, wherein the rack system further includes a service node and a plurality of interface nodes; the switching node includes a plurality of external ports, the plurality of external ports are connected to the plurality of interface nodes, and an internal port of the switching node is connected to the service node; the method includes:

[0030] Receiving a second message sent by the service node through the internal port; wherein the second message carries a target VLAN identifier, and the target VLAN identifier is determined by the service node according to the target port identifier of the target external port and a pre-stored mapping relationship between the port identifier and the VLAN identifier;

[0031] The target VLAN identifier in the second message is stripped, and the stripped second message is sent to the target interface node through the target external port indicated by the VLAN identifier.

[0032] A fifth aspect of the present application provides a message processing device, which is applied to a switching node in a rack system, wherein the rack system further includes a service node and an interface node, wherein an external port of the switching node is connected to the interface node, and an internal port of the switching node is connected to the service node; the device includes:

[0033] an adding module, configured to, in response to the external port receiving a first message sent by the interface node, add the VLAN identifier of the external port to the first message; wherein the VLAN identifier is obtained according to a mapping relationship between the port identifier of the external port and a preset mapping relationship;

[0034] The first sending module is configured to send the first message carrying the VLAN identifier to the service node through the internal port, so that the service node obtains the port identifier of the external port according to the VLAN identifier and the pre-stored mapping relationship.

[0035] In a sixth aspect, an embodiment of the present application provides a message processing device, which is applied to a service node in a rack system, wherein the rack system further includes a switching node and an interface node, wherein an external port of the switching node is connected to the interface node, and an internal port of the switching node is connected to the service node; the device includes:

[0036] a first receiving module, configured to receive a first message sent by the switching node through the internal port; wherein the first message is sent by the interface node to the switching node through the external port, and the first message carries a VLAN identifier of the external port, and the VLAN identifier is obtained based on a port identifier of the external port and a preset mapping relationship;

[0037] The first determining module is configured to determine the port identifier of the external port according to the VLAN identifier and the pre-stored mapping relationship.

[0038] A seventh aspect of the present application provides a message processing device, applied to a service node in a rack system, wherein the rack system further includes a switching node and a plurality of interface nodes; the switching node includes a plurality of external ports, the plurality of external ports are connected to the plurality of interface nodes, and an internal port of the switching node is connected to the service node; the device includes:

[0039] A second determining module is configured to determine a target VLAN identifier of the target external port according to the target port identifier of the target external port and a pre-stored mapping relationship between the port identifier and the VLAN identifier;

[0040] The second sending module is used to add the target VLAN identifier to the second message, and send the second message carrying the VLAN identifier to the switching node through the internal port, so that the switching node strips the VLAN identifier of the second message and sends the stripped second message to the target interface node through the target external port indicated by the VLAN identifier.

[0041] In an eighth aspect, an embodiment of the present application provides a message processing device, applied to a switching node in a rack system, wherein the rack system further includes a service node and a plurality of interface nodes; the switching node includes a plurality of external ports, the plurality of external ports are connected to the plurality of interface nodes, and an internal port of the switching node is connected to the service node; the device includes:

[0042] A second receiving module is configured to receive, through the internal port, a second message sent by the service node; wherein the second message carries a target VLAN identifier, and the target VLAN identifier is determined by the service node according to a target port identifier of a target external port and a pre-stored mapping relationship between a port identifier and a VLAN identifier;

[0043] a stripping module configured to strip the VLAN identifier in the second packet and send the stripped second packet to a target interface node via a target external port indicated by the VLAN identifier.

[0044] A ninth aspect of the present application provides an electronic device, which comprises:

[0045] a processor;

[0046] a memory for storing processor-executable instructions;

[0047] When the processor invokes the executable instructions, the operations of the method in any one of the first aspect to the fourth aspect are implemented.

[0048] A tenth aspect of the present application provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are executed by a processor to implement the steps of the method in any one of the first aspect to the fourth aspect. BRIEF DESCRIPTION OF DRAWINGS

[0049] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments of the present application. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0050] Figure 1 An application scenario of a packet processing method provided by the embodiments of the present application;

[0051] Figure 2 A flowchart of a packet processing method provided by the embodiments of the present application;

[0052] Figure 3 A flowchart of another packet processing method provided by the embodiments of the present application;

[0053] Figure 4 A flowchart of another packet processing method provided by the embodiments of the present application;

[0054] Figure 5 A flowchart of another packet processing method provided by the embodiments of the present application;

[0055] Figure 6 A flowchart of another packet processing method provided by the embodiments of the present application;

[0056] Figure 7A structural block diagram of a message processing device provided in an embodiment of the present application;

[0057] Figure 8 A structural block diagram of another message processing device provided in an embodiment of the present application;

[0058] Figure 9 A structural block diagram of another message processing device provided in an embodiment of the present application;

[0059] Figure 10 A structural block diagram of another message processing device provided in an embodiment of the present application;

[0060] Figure 11 A hardware structure diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0061] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0062] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and should not be understood as indicating or implying relative importance.

[0063] A rack system, like a cluster, consists of multiple independent, interconnected computing nodes. The nodes in a rack system work together to function as a single, integrated device.

[0064] A rack system may include various types of nodes, including, but not limited to, service nodes, switching nodes, and interface nodes. The number of nodes of each type may be one or more. Service nodes and interface nodes are connected via switching nodes. Interface nodes provide physical network interfaces for receiving messages from external networks. Received messages are sent to service nodes, which then perform corresponding service processing. Since service nodes and interface nodes are not directly connected in communication but rather connected through switching nodes, messages between them must be transmitted across switching nodes.

[0065] When transmitting messages across nodes, service nodes need to obtain the port information of the switching node. For example, for a message received by a service node, the service node needs to know which port the message entered the switching node from, that is, which port the interface node sent the message to the switching node through. This port is also called the entry port. Typically, the port information of a switching node can be obtained from the switching node. In related art, switching nodes typically forward messages based on a MAC (Media Access Control) address table. The MAC address table records the correspondence between MAC addresses and switching node ports and is stored in the switching node. The service node can obtain the MAC address table from the switching node and then, based on the MAC address information carried in the received message, query the MAC address table to determine the entry port of the message on the switching node. However, because the MAC address table in the switching node is constantly learning and changing, it is difficult for the service node to obtain the latest MAC address table in real time, which may result in the inability to obtain the port information of the switching node.

[0066] To this end, the present application proposes a message processing method to enable a service node to obtain port information of a switching node. Figure 1 The application scenario of this application is shown in FIG. Figure 1 As shown, the rack system 100 includes a service node 110, a switching node 120, and an interface node 130. The number of each node can be one or more. Figure 1 4 service nodes 110, 1 switch node 120, and 4 interface nodes 130 are shown as an example. The 4 service nodes 110 and the 4 interface nodes 130 are connected via the switch node 120. The switch node 120 includes an external port 121 and an internal port 122. The number of external ports 121 and internal ports 122 can be one or more. The external port 121 is connected to the interface node 130, and the internal port 122 is connected to the service node 110. The external port 121 can be connected to a port of the interface node 130, and the internal port 122 can be connected to a port of the service node 110.

[0067] For example, Figure 1 As shown, the number of external ports 121 is the same as the number of interface nodes 130. Thus, the external ports 121 correspond to the interface nodes 130 one-to-one. The number of internal ports 122 is the same as the number of service nodes 110. Thus, the internal ports 122 correspond to the service nodes 110 one-to-one.

[0068] Of course, except for Figure 1In addition to the illustrated embodiment, each external port 121 may be connected to more than one interface node 130 ; and each internal port 122 may be connected to more than one service node 110 .

[0069] The first aspect of the present application provides a message processing method, which is applied to Figure 1 The switching node 120 shown includes the following Figure 2 Steps shown:

[0070] Step S11: In response to the external port receiving a first message sent by the interface node, adding a VLAN identifier of the external port to the first message;

[0071] The VLAN identifier is obtained according to a mapping relationship between the port identifier of the external port and a preset mapping relationship;

[0072] Step S12: Sending the first message carrying the VLAN identifier to the service node through the internal port, so that the service node obtains the port identifier of the external port according to the VLAN identifier and the pre-stored mapping relationship.

[0073] like Figure 1 As shown, after one of the interface nodes 130 receives a first message from the external network, it is sent to one of the service nodes 110 via the switch node 120 for corresponding service processing. During the transmission process, the interface node 130 first sends the first message to the switch node 120 via the corresponding external port 121 in the switch node 120. The external port 121 is the ingress port through which the first message enters the switch node and is also the port from which the service node 110 needs to obtain corresponding port information.

[0074] Each port of the switching node 120, including the external port 121 and the internal port 122, has a corresponding port identifier. The port identifier of a particular port can uniquely identify the port. For example, the port identifier can be a port number (Port ID). The switching node 120 can store a preset mapping relationship, which is a mapping relationship between the port identifier and a VLAN (Virtual Local Area Network) identifier. Exemplarily, the VLAN identifier can be a VLAN ID. Exemplarily, the mapping relationship can be a mapping relationship between the Port ID and the VLAN ID.

[0075] Preferably, the switch node 120 can determine the VLAN identifier corresponding to each external port 121 in advance. For example, the port identifier can be converted into the VLAN identifier by using a specific algorithm. Each VLAN identifier obtained by the specific algorithm is valid and unique. That is, the VLAN identifiers corresponding to different external ports 121 are different. For example, the VLAN identifier can be in the range of [2, 4094].

[0076] In some embodiments, the mapping relationship can refer to the specific algorithm. Thus, the service node 110 can store the inverse algorithm of the specific algorithm.

[0077] In some embodiments, the mapping relationship records the one-to-one correspondence between the port identifier and the VLAN identifier. The mapping relationship can be stored in the switch node 120 in the form of a table item. Thus, the service node 110 also stores the mapping relationship.

[0078] In response to the external port 121 receiving the first packet, the switch node can add the VLAN identifier corresponding to the entering port of the first packet. Then, the first packet carrying the VLAN identifier is sent to the service node 110 through the internal port 121.

[0079] The service node 110 pre-stores the mapping relationship described above. Thus, the service node can obtain the port identifier of the entering port of the first packet according to the VLAN identifier carried by the first packet and the pre-stored mapping relationship.

[0080] It can be seen that the present application provides a packet processing method. By converting the port identifier into the VLAN identifier and adding the VLAN identifier to the first packet, the first packet carries the port identifier information of the entering port through the VLAN identifier. Meanwhile, the service node also pre-stores the mapping relationship between the port identifier and the VLAN identifier. Thus, the service node can obtain the port identifier of the entering port by using the mapping relationship and the VLAN identifier carried by the first packet. Thus, the technical effect of obtaining the port information of the switch node by the service node is achieved.

[0081] Regarding the process of adding VLAN tags, in some embodiments, the external ports of the switching node can be set to QinQ (802.1Q-in-802.1Q) mode. QinQ technology is also known as Stacked VLAN or Double VLAN. QinQ technology uses two layers of IEEE 802.1Q standard tag encapsulation technology (i.e., encapsulating a public network VLAN tag on top of the existing private network VLAN tag) to enable transparent transmission of private network VLAN tags from the public network to other private networks that need to be connected. When the external ports are set to QinQ mode, the switching node can support receiving packets without VLAN tags, with one VLAN tag, and with multiple VLAN tags.

[0082] In this embodiment, when the external port is set to QinQ mode, the VLAN tag encapsulated in the first message is not the VLAN tag of the public network, but a VLAN tag carrying the VLAN identifier of the external port. That is, the VLAN identifier is encapsulated in the first message in the form of a VLAN tag.

[0083] If the first message is not originally encapsulated with a VLAN tag, a VLAN tag carrying a VLAN identifier can be directly encapsulated in the Ethernet frame header of the first message. If the first message is originally encapsulated with a VLAN tag, a VLAN tag carrying a VLAN identifier can be encapsulated on the outer layer of the VLAN tag.

[0084] It can be seen that in this embodiment, by utilizing the QinQ technology, the VLAN identifier of the external port is encapsulated in the first message in the form of a VLAN tag, thereby implementing the implementation of carrying the port information of the external port in the first message.

[0085] After adding a VLAN tag carrying a VLAN identifier to the first message, in order to prevent the added VLAN tag from being stripped off when the first message passes through subsequent ports, in some embodiments, the internal port of the switching node and the port of the service node are both set to VLAN relay mode. In this way, when the first message passes through the internal port and the port of the service node in sequence, the VLAN tag will not be added or stripped off by these two ports.

[0086] Furthermore, in some embodiments, the VLAN whitelist in VLAN trunk mode records the VLAN identifier of the external port. That is, in VLAN trunk mode for the internal port of the switching node and the port of the service node, the VLAN whitelist both records the VLAN identifier of the external port, so that the first message carrying the VLAN identifier of the external port can pass through the internal port of the switching node and the port of the service node.

[0087] In this embodiment, by setting the VLAN relay mode for the port that the first message subsequently passes through and adding the VLAN identifier of the external port to the VLAN whitelist, it is avoided that other ports strip off the added VLAN tags, ensuring that the first message encapsulated with the VLAN tag can reach the service node.

[0088] In some embodiments, the service node includes multiple nodes. In order to increase the bandwidth of the communication link, multiple communication links between the switching node and the multiple service nodes are aggregated into a link aggregation group.

[0089] Exemplarily, the internal port of the switching node is connected to multiple service nodes to form multiple communication links, which are aggregated into a link aggregation group.

[0090] Exemplarily, there is a one-to-one correspondence between the internal ports and the service nodes, and each internal port forms a communication link with the corresponding service node. Multiple communication links between multiple internal ports and multiple service nodes are aggregated into a link aggregation group.

[0091] A link aggregation group includes a first aggregation port and a second aggregation port. Multiple internal ports are aggregated into the first aggregation port, meaning that the multiple internal ports are member ports of the first aggregation port. Ports of multiple service nodes are aggregated into the second aggregation port, meaning that the ports of the multiple service nodes are member ports of the second aggregation port.

[0092] In some embodiments, the first and second aggregation ports are configured in VLAN trunk mode, and the VLAN whitelist in the VLAN trunk mode contains the VLAN ID of the external port. This prevents the first and second aggregation ports from stripping the added VLAN tag, ensuring that the first packet encapsulated with the VLAN tag can reach the service node.

[0093] In some embodiments, when a faulty service node exists among the multiple service nodes, the faulty service node may proactively exit the link aggregation group. For example, the faulty service node may exit the link aggregation group by modifying the link aggregation parameters of its own port.

[0094] In some scenarios, when there are multiple service nodes, the received first message can be sent to any of the multiple service nodes for corresponding service processing. However, in related technologies, because switching nodes only forward messages based on MAC address tables, load scheduling is impossible. This can lead to uneven loads between service nodes, with some service nodes being overloaded while others are lightly loaded. This prevents the rack system from taking advantage of collaborative processing.

[0095] In addition, in other scenarios, due to business needs, forward and reverse flow messages need to be sent to the same business node for corresponding business processing. Forward and reverse flow messages include forward flow messages and reverse flow messages. Forward and reverse flow messages are messages in the same session. The source IP address of the forward flow message is the destination IP address of the reverse flow message, and the destination IP address of the forward flow message is the source IP address of the reverse flow message. In other words, the source IP address and destination IP address of the two messages are symmetrical. Two or more messages with symmetrical source IP addresses and destination IP addresses are called forward and reverse flow messages. However, in related technologies, since the switching node connects multiple business nodes, the forward and reverse flow messages may be assigned to different business nodes by the switching node. If the reverse flow message is not assigned to the same business node as the forward flow message, the reverse flow message will be discarded because it cannot find the corresponding session, thereby affecting business processing.

[0096] To this end, in some embodiments, when there are multiple service nodes, the sending process of the first message in step S12 may include the following steps: Figure 3 Steps shown:

[0097] Step S121: performing an XOR operation on the source IP address and the target IP address of the first message to obtain an operation result;

[0098] Step S122: performing a hash operation on the operation result to generate a hash value;

[0099] Step S123: determining a target service node from the plurality of service nodes according to the hash value, and sending the first message carrying the VLAN identifier to the target service node through a target internal port corresponding to the target service node.

[0100] For forward and reverse flow packets, since their source IP addresses are symmetrical with their destination IP addresses, performing an XOR operation on the source and destination IP addresses of the forward and reverse flow packets yields the same result. Subsequently, hashing the result produces the same hash value. This means that the hash values ​​of the forward and reverse flow packets are consistent. When assigning target service nodes based on the hash values, since the hash values ​​of the forward and reverse flow packets are consistent, the forward and reverse flow packets are assigned to the same target service node for corresponding service processing. This solves the technical problem of randomly assigning forward and reverse flow packets to different service nodes in related technologies.

[0101] Furthermore, for all first messages, the switching node assigns a target service node based on the hash value of the first message. Instead of forwarding messages based on the MAC address table, the switching node can now load-balance service nodes, adding a new load balancing feature. This ensures load balancing across service nodes, preventing some service nodes from being overloaded while others are underloaded, and fully leveraging the collaborative processing capabilities of the rack system.

[0102] As mentioned above, in related technologies, switching nodes typically forward packets based on MAC address tables. However, when the external network has a large number of network devices, the switching nodes need to learn a large number of MAC address-port mappings. Furthermore, when forwarding packets, they must perform numerous MAC address table lookups, which can affect performance and increase latency.

[0103] In a message processing method provided in the present application, since the received first message is added with the VLAN identifier of the external port, the service node can infer the entry port of the first message based on the VLAN identifier and the mapping relationship. At the same time, in the case of multiple service nodes, the target service node can also be determined based on the hash value of the XOR operation result of the source IP address and the target IP address of the first message. Therefore, the switching node can no longer rely on the MAC address table for message forwarding, but can send and receive messages through the VLAN tag. In this way, in some embodiments, the external port and internal port of the switching node can also be set to disable the MAC address learning function and query function.

[0104] In addition, the second aspect of the present application provides a message processing method, which is applied to Figure 1 The service node 110 shown includes the following Figure 4 Steps shown:

[0105] Step S21: receiving a first message sent by the switching node through the internal port;

[0106] The first message is sent by the interface node to the switching node through the external port, and the first message carries the VLAN identifier of the external port, where the VLAN identifier is obtained based on a mapping relationship between the port identifier of the external port and a preset mapping relationship;

[0107] Step S22: Determine the port identifier of the external port according to the VLAN identifier and the pre-stored mapping relationship.

[0108] After receiving the first message from the external network, one of the interface nodes 130 sends the first message to the switching node 120 through the corresponding external port 121 of the switching node 120. The switching node 120 then adds the VLAN identifier of the external port 121, i.e., the ingress port of the first message, to the first message, and sends the first message carrying the VLAN identifier to the service node 110 through the internal port 121. The process of adding the VLAN identifier to the first message by the switching node 120 and the process of sending the first message to the service node 110 may refer to any of the above embodiments.

[0109] Since the service node 110 pre-stores a mapping relationship between the port identifier and the VLAN identifier, when the service node 110 receives the first message, for example, when the first message is received through a port of the service node 110, the external port 121, that is, the port identifier of the ingress port of the first message on the switching node 120, can be determined based on the VLAN identifier carried by the first message and the mapping relationship.

[0110] As can be seen, this application provides a message processing method that converts a port identifier into a VLAN identifier and adds the VLAN identifier to a first message, so that the first message carries the port identifier information of the incoming port via the VLAN identifier. At the same time, since the service node also pre-stores a mapping relationship between port identifiers and VLAN identifiers, the service node can use this mapping relationship and the VLAN identifier carried by the first message to obtain the port identifier of the incoming port. This achieves the technical effect of enabling the service node to obtain the port information of the switching node.

[0111] In addition, the third aspect of the present application provides a message processing method for enabling a service node to send a message to an interface node across a switching node. The method is applied to Figure 1 In the service node 110 shown in FIG. Among them, the interface node 130 includes multiple, such as Figure 1 Four interface nodes 130 are shown as an example. Accordingly, the switch node 120 also includes a plurality of external ports 121. The plurality of external ports 121 are connected to the plurality of interface nodes 130.

[0112] Exemplarily, the number of the external ports 121 is smaller than the number of the interface nodes 130 , and thus, the external port 121 can be connected to a plurality of interface nodes 130 .

[0113] For example, Figure 1 As shown, the number of the external ports 121 is equal to the number of the interface nodes 130 , and thus, the external ports 121 are connected to the interface nodes 130 in a one-to-one correspondence.

[0114] The above methods include Figure 5 Steps shown:

[0115] Step S31: determining a target VLAN identifier of the target external port according to the target port identifier of the target external port and a pre-stored mapping relationship between the port identifier and the VLAN identifier;

[0116] Step S32: Add the target VLAN identifier to the second message, and send the second message carrying the target VLAN identifier to the switching node through the internal port, so that the switching node strips the target VLAN identifier of the second message and sends the stripped second message to the target interface node through the target external port indicated by the VLAN identifier.

[0117] There are multiple interface nodes 130. When the service node 110 needs to send a second message to a target interface node among the multiple interface nodes 130, first, the service node 110 needs to determine a target external port connected to the target interface node.

[0118] Subsequently, in order to send the second message to the target interface node through the target external port, the service node 110 needs to obtain the VLAN ID of the target external port. As described above, the service node 110 pre-stores a mapping relationship between port IDs and VLAN IDs. Therefore, the target VLAN ID of the target external port can be determined based on the target port ID of the target external port and the pre-stored mapping relationship between port IDs and VLANs.

[0119] Subsequently, service node 110 may add a target VLAN identifier to the second message. The target VLAN identifier may be encapsulated in the second message in the form of a VLAN tag. If the second message does not originally include a VLAN tag, the VLAN tag carrying the target VLAN identifier may be directly encapsulated in the Ethernet frame header of the second message. If the second message originally includes a VLAN tag, a VLAN tag carrying the target VLAN identifier may be encapsulated outside the VLAN tag.

[0120] Subsequently, the service node 110 may send the second message carrying the target VLAN identifier to the switch node 120 through the internal port of the switch node 120 .

[0121] In some embodiments, to prevent the second message from having the added VLAN tag stripped off when passing through subsequent ports, in some embodiments, the internal port 122 of the switching node 120 and the port of the service node 110 are both set to VLAN relay mode. In this way, when the second message passes through the port of the service node 110 and the internal port 122 in sequence, the VLAN tag will not be added or stripped off by these two ports.

[0122] Furthermore, in some embodiments, the VLAN whitelist in VLAN trunk mode records the VLAN identifier of the external port. That is, in VLAN trunk mode between the internal port 122 of the switch node 120 and the port of the service node 110, the VLAN whitelist both records the VLAN identifier of the external port 121, allowing the second packet carrying the target VLAN identifier of the target external port to pass through the internal port 122 of the switch node 120 and the port of the service node 110.

[0123] In some embodiments, to increase the bandwidth of communication links, multiple communication links between a switch node 120 and multiple service nodes 110 are aggregated into a link aggregation group. The link aggregation group includes a first aggregation port and a second aggregation port. Multiple internal ports 122 are aggregated into the first aggregation port, meaning that the multiple internal ports 122 are member ports of the first aggregation port. Ports of multiple service nodes 110 are aggregated into a second aggregation port, meaning that the multiple ports of multiple service nodes 110 are member ports of the second aggregation port.

[0124] In some embodiments, the first and second aggregation ports are configured in VLAN trunk mode, and the VLAN whitelist in the VLAN trunk mode contains the VLAN identifier of the external port 121. This prevents the first and second aggregation ports from stripping the added VLAN tag, ensuring that the second packet encapsulated with the VLAN tag can reach the interface node 130.

[0125] After receiving the second message, the switch node 120 may strip the target VLAN identifier from the second message, and send the stripped second message to the target interface node through the target external port indicated by the VLAN identifier.

[0126] In some embodiments, the external port 121 of the switching node 120 can be set to QinQ mode. The target VLAN identifier is encapsulated in the second message in the form of a VLAN tag. In this way, the target external port in QinQ mode can remove the VLAN tag to obtain the second message that actually needs to be sent to the external network, and then send the second message to the connected target interface node.

[0127] As can be seen, the message processing method provided by this application determines the target VLAN ID using the target port ID of the target external port and a mapping relationship when a service node needs to send a second message to a designated interface node, and then encapsulates the target VLAN ID into the second message. This allows the switching node to determine, based on the target VLAN ID, which external port the second message should be sent through to the corresponding interface node. This enables the service node to send the second message from the designated target external port to the target interface node.

[0128] In addition, the fourth aspect of the present application provides a message processing method for enabling a service node to send a message to an interface node across a switching node. Figure 1 In the switching node 120 shown in FIG. , the interface nodes 130 include multiple ones. Accordingly, the switching node 120 also includes multiple external ports 121 . The multiple external ports 121 are connected to the multiple interface nodes 130 .

[0129] The above methods include Figure 6 Steps shown:

[0130] Step S41: receiving a second message sent by the service node through the internal port;

[0131] The second message carries a target VLAN identifier, and the target VLAN identifier is determined by the service node according to a target port identifier of a target external port and a pre-stored mapping relationship between a port identifier and a VLAN identifier;

[0132] Step S42: stripping the target VLAN identifier from the second message, and sending the stripped second message to the target interface node through the target external port indicated by the VLAN identifier.

[0133] The second message received by internal port 122 of switch node 120 is a message sent across nodes by service node 110 to interface node 130. Since there are multiple interface nodes 130, service node 110 needs to specify a target interface node from among the multiple interface nodes 130 to receive the second message. Therefore, service node 110 needs to specify that the second message be sent to the target interface node via the corresponding target external port. Therefore, before sending the second message, service node 110 first determines the target VLAN identifier of the target external port based on the target port identifier of the target external port and a pre-stored mapping relationship between port identifiers and VLAN identifiers. Service node 110 then sends the second message carrying the target VLAN identifier to switch node 120. The process of adding the target VLAN identifier and sending the second message can refer to any of the above-described embodiments.

[0134] The target VLAN ID in the second message indicates the target external port in switch node 120. Therefore, after determining the target external port based on the target VLAN ID, switch node 120 can strip the target VLAN ID from the second message to obtain the second message that actually needs to be sent to the external network. The second message is then sent to the connected target interface node via the target external port.

[0135] It can be seen that the packet processing method provided in the application, when the service node needs to send a second packet to a specified interface node, the target VLAN identifier is determined through the target port identifier of the target external port and the mapping relationship, and the target VLAN identifier is encapsulated into the second packet. The exchange node can know which external port the second packet needs to pass through to send to the corresponding interface node according to the target VLAN identifier. Thus, the second packet of the service node is sent to the target interface node from the specified target external port.

[0136] In addition, according to the packet processing method provided in the above various embodiments, for the process of packet transmission and reception between the service node and the interface node across the exchange node, when the interface node needs to send a first packet to the service node, the interface node sends the first packet to the exchange node through the corresponding external port. Then, the exchange node adds the VLAN identifier corresponding to the external port in the first packet, and determines which service node to send the first packet to according to the hash value of the first packet. When the service node needs to send a second packet to the interface node, the target VLAN identifier of the target external port is added in the second packet, and then the second packet is sent to the exchange node through the corresponding internal port. The exchange node can know which external port the second packet needs to pass through to send to the corresponding interface node according to the target VLAN identifier. In this way, in the whole process of packet transmission and reception, the first packet and the second packet can be transmitted and received across nodes through the VLAN identifier, and the exchange node can no longer rely on the MAC address table for packet forwarding, thus realizing zero MAC address learning and query and improving the packet transmission and reception performance.

[0137] Based on any of the embodiments of the first aspect, the application further provides a packet processing device applied to the exchange node 120 in the rack system 100 as shown in Figure 1 The rack system 100 further includes a service node 110 and an interface node 130. The external port 121 of the exchange node 120 is connected with the interface node 130, and the internal port 122 of the exchange node 120 is connected with the service node 110. As shown in Figure 7 The packet processing device 700 includes:

[0138] The adding module 710 is configured to add the VLAN identifier of the external port for the first packet in response to the external port receiving the first packet sent by the interface node; wherein the VLAN identifier is obtained according to the port identifier of the external port and a preset mapping relationship;

[0139] The first sending module 720 is configured to send the first packet carrying the VLAN identifier to the service node through the internal port, so that the service node obtains the port identifier of the external port according to the VLAN identifier and the pre-stored mapping relationship.

[0140] In some embodiments, the external port is set to QinQ mode; the adding module 710 is specifically used to:

[0141] A VLAN tag carrying the VLAN identifier is encapsulated into the first message.

[0142] In some embodiments, the internal port of the switching node and the port of the service node are set to VLAN trunk mode; the VLAN whitelist in the VLAN trunk mode records the VLAN identifier of the external port.

[0143] In some embodiments, the service node includes multiple nodes, and the first sending module 720 is specifically configured to:

[0144] Performing an XOR operation on the source IP address and the destination IP address of the first message to obtain an operation result;

[0145] Performing a hash operation on the operation result to generate a hash value;

[0146] A target service node is determined from the plurality of service nodes according to the hash value, and the first message carrying the VLAN identifier is sent to the target service node through a target internal port corresponding to the target service node.

[0147] In some embodiments, the service node includes multiple nodes, and multiple communication links between the switching node and the multiple service nodes are aggregated into a link aggregation group.

[0148] In some embodiments, the external port and the internal port of the switching node are configured to disable the learning function and the query function of the MAC address.

[0149] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0150] Based on any embodiment provided in the second aspect above, the present application also provides a message processing device, which is applied to Figure 1 The service node 110 in the rack system 100 shown in FIG. 1 further includes a switching node 120 and an interface node 130. The external port 121 of the switching node 120 is connected to the interface node 130, and the internal port 122 of the switching node 120 is connected to the service node 110. Figure 8 As shown, the message processing device 800 includes:

[0151] a first receiving module 810 configured to receive a first message sent by the switching node through the internal port; wherein the first message is sent by the interface node to the switching node through the external port, and the first message carries a VLAN identifier of the external port, where the VLAN identifier is obtained based on a mapping relationship between the port identifier of the external port and a preset mapping relationship;

[0152] The first determining module 820 is configured to determine the port identifier of the external port according to the VLAN identifier and the pre-stored mapping relationship.

[0153] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0154] Based on any embodiment provided in the third aspect above, the present application also provides a message processing device, which is applied to Figure 1 The service node 110 in the rack system 100 shown in FIG. 1 further includes a switching node 120 and multiple interface nodes 130. The switching node 120 includes multiple external ports 121, which are connected to multiple interface nodes 130. The internal port 122 of the switching node 120 is connected to the service node 110. Figure 9 As shown, the message processing device 900 includes:

[0155] A second determining module 910 is configured to determine a target VLAN identifier of the target external port according to the target port identifier of the target external port and a pre-stored mapping relationship between the port identifier and the VLAN identifier;

[0156] The second sending module 920 is used to add the target VLAN identifier to the second message, and send the second message carrying the VLAN identifier to the switching node through the internal port, so that the switching node strips the VLAN identifier of the second message and sends the stripped second message to the target interface node through the target external port indicated by the VLAN identifier.

[0157] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0158] Based on any embodiment provided in the fourth aspect above, the present application further provides a message processing device, which is applied to Figure 1The switching node 120 in the rack system 100 shown in the figure further includes a service node 110 and a plurality of interface nodes 130. The switching node 120 includes a plurality of external ports 121, which are connected to the plurality of interface nodes 130. The internal port 122 of the switching node 120 is connected to the service node 110. Figure 10 As shown, the message processing device 1000 includes:

[0159] A second receiving module 1010 is configured to receive, through the internal port, a second message sent by the service node; wherein the second message carries a target VLAN identifier, and the target VLAN identifier is determined by the service node based on a target port identifier of a target external port and a pre-stored mapping relationship between a port identifier and a VLAN identifier;

[0160] The stripping module 1020 is configured to strip the VLAN identifier from the second message, and send the stripped second message to a target interface node via a target external port indicated by the VLAN identifier.

[0161] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0162] Based on a message processing method described in any of the above embodiments, this application also provides Figure 11 A schematic diagram of the structure of an electronic device is shown in FIG. Figure 11 At the hardware level, the electronic device includes a processor, an internal bus, a network interface, memory, and non-volatile storage, and may also include other hardware required for its services. The processor reads the corresponding computer program from the non-volatile storage into the internal memory and then runs it to implement a message processing method described in any of the above embodiments.

[0163] In some embodiments, the electronic device may be Figure 1 The service node 110 or the switching node 120 in the rack system 200 is shown.

[0164] The present application also provides a computer storage medium, which stores a computer program. When the computer program is executed by a processor, it can be used to execute a message processing method described in any of the above embodiments.

[0165] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions.

[0166] In addition, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0167] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0168] The foregoing is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included within the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined or explained in subsequent figures.

[0169] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

[0170] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

Claims

1. A message processing method, characterized in that: A switching node used in a rack system, the rack system further comprising a service node and an interface node, wherein an external port of the switching node is connected to the interface node, and an internal port of the switching node is connected to the service node; the interface node is configured to provide a physical network interface to the outside world and to receive messages from an external network; The service node is used to perform service processing on the message received by the interface node; the method includes: In response to the external port receiving a first message sent by the interface node, adding the VLAN identifier of the external port to the first message; wherein the VLAN identifier is obtained according to a port identifier of the external port and a preset mapping relationship; the mapping relationship records a one-to-one correspondence between the port identifier and the VLAN identifier; The first message carrying the VLAN identifier is sent to the service node through the internal port, so that the service node obtains the port identifier of the external port according to the VLAN identifier and the pre-stored mapping relationship.

2. The method according to claim 1, characterized in that The external port is set to QinQ mode; and adding the VLAN identifier of the external port to the first message includes: A VLAN tag carrying the VLAN identifier is encapsulated into the first message.

3. The method according to claim 2, characterized in that The internal port of the switching node and the port of the service node are set to VLAN trunk mode; the VLAN whitelist in the VLAN trunk mode records the VLAN identifier of the external port.

4. The method according to claim 1, wherein The service nodes include a plurality of nodes, and sending the first message carrying the VLAN identifier to the service node through the internal port includes: Performing an XOR operation on the source IP address and the destination IP address of the first message to obtain an operation result; Performing a hash operation on the operation result to generate a hash value; A target service node is determined from the plurality of service nodes according to the hash value, and the first message carrying the VLAN identifier is sent to the target service node through a target internal port corresponding to the target service node.

5. The method according to claim 1, wherein The service nodes include a plurality of nodes, and a plurality of communication links between the switching node and the plurality of service nodes are aggregated into a link aggregation group.

6. The method according to claim 1, characterized in that The external port and the internal port of the switching node are configured to disable the learning function and the query function of the MAC address.

7. A message processing method, characterized in that: A service node applied to a rack system, the rack system further comprising a switching node and an interface node, wherein an external port of the switching node is connected to the interface node, and an internal port of the switching node is connected to the service node; the interface node is configured to provide a physical network interface to the outside world and to receive messages from an external network; The service node is used to perform service processing on the message received by the interface node; the method includes: receiving a first message sent by the switching node through the internal port; wherein the first message is sent by the interface node to the switching node through the external port, the first message carries the VLAN identifier of the external port, and the VLAN identifier is obtained based on the port identifier of the external port and a preset mapping relationship; the mapping relationship records a one-to-one correspondence between the port identifier and the VLAN identifier; The port identifier of the external port is determined according to the VLAN identifier and the pre-stored mapping relationship.

8. A message processing method, characterized in that: A service node applied to a rack system, the rack system further comprising a switching node and a plurality of interface nodes; the switching node comprising a plurality of external ports connected to a plurality of the interface nodes, and an internal port of the switching node connected to the service node; the interface node being configured to provide a physical network interface to the outside world and to receive messages from an external network; The service node is used to perform service processing on the message received by the interface node; the method includes: Determine the target VLAN identifier of the target external port according to the target port identifier of the target external port and a pre-stored mapping relationship between the port identifier and the VLAN identifier; the mapping relationship records a one-to-one correspondence between the port identifier and the VLAN identifier; Add the target VLAN identifier to the second message, and send the second message carrying the target VLAN identifier to the switching node through the internal port, so that the switching node strips the target VLAN identifier of the second message, and sends the stripped second message to the target interface node through the target external port indicated by the VLAN identifier.

9. A message processing method, characterized in that: A switching node used in a rack system, the rack system further comprising a service node and a plurality of interface nodes; the switching node comprising a plurality of external ports connected to the plurality of interface nodes, and an internal port of the switching node connected to the service node; the interface node being configured to provide a physical network interface to the outside world and to receive messages from an external network; The service node is used to perform service processing on the message received by the interface node; the method includes: receiving, through the internal port, a second message sent by the service node; wherein the second message carries a target VLAN identifier, the target VLAN identifier being determined by the service node based on a target port identifier of a target external port and a pre-stored mapping relationship between a port identifier and a VLAN identifier; the mapping relationship recording a one-to-one correspondence between the port identifier and the VLAN identifier; The target VLAN identifier in the second message is stripped, and the stripped second message is sent to the target interface node through the target external port indicated by the VLAN identifier.

10. A message processing device, characterized in that: A switching node used in a rack system, the rack system further comprising a service node and an interface node, wherein an external port of the switching node is connected to the interface node, and an internal port of the switching node is connected to the service node; the interface node is configured to provide a physical network interface to the outside world and to receive messages from an external network; The service node is used to perform service processing on the message received by the interface node; the device includes: an adding module, configured to, in response to the external port receiving a first message sent by the interface node, add the VLAN identifier of the external port to the first message; wherein the VLAN identifier is obtained based on a port identifier of the external port and a preset mapping relationship; the mapping relationship records a one-to-one correspondence between the port identifier and the VLAN identifier; The first sending module is configured to send the first message carrying the VLAN identifier to the service node through the internal port, so that the service node obtains the port identifier of the external port according to the VLAN identifier and the pre-stored mapping relationship.

11. A message processing device, characterized in that: A service node applied to a rack system, the rack system further comprising a switching node and an interface node, wherein an external port of the switching node is connected to the interface node, and an internal port of the switching node is connected to the service node; the interface node is configured to provide a physical network interface to the outside world and to receive messages from an external network; The service node is used to perform service processing on the message received by the interface node; the device includes: a first receiving module, configured to receive a first message sent by the switching node through the internal port; wherein the first message is sent by the interface node to the switching node through the external port, and the first message carries a VLAN identifier of the external port, and the VLAN identifier is obtained based on a port identifier of the external port and a preset mapping relationship; the mapping relationship records a one-to-one correspondence between the port identifier and the VLAN identifier; The first determining module is configured to determine the port identifier of the external port according to the VLAN identifier and the pre-stored mapping relationship.

12. A message processing device, characterized in that: A service node applied to a rack system, the rack system further comprising a switching node and a plurality of interface nodes; the switching node comprising a plurality of external ports connected to a plurality of the interface nodes, and an internal port of the switching node connected to the service node; the interface node being configured to provide a physical network interface to the outside world and to receive messages from an external network; The service node is used to perform service processing on the message received by the interface node; the device includes: A second determining module is configured to determine a target VLAN identifier of the target external port according to the target port identifier of the target external port and a pre-stored mapping relationship between the port identifier and the VLAN identifier; the mapping relationship records a one-to-one correspondence between the port identifier and the VLAN identifier; The second sending module is used to add the target VLAN identifier to the second message, and send the second message carrying the VLAN identifier to the switching node through the internal port, so that the switching node strips the VLAN identifier of the second message and sends the stripped second message to the target interface node through the target external port indicated by the VLAN identifier.

13. A message processing device, characterized in that: A switching node used in a rack system, the rack system further comprising a service node and a plurality of interface nodes; the switching node comprising a plurality of external ports, the plurality of external ports being connected to a plurality of interface nodes, the interface nodes being configured to provide a physical network interface to the outside world and to receive messages from an external network; The service node is used to perform service processing on the message received by the interface node; The internal port of the switching node is connected to the service node; the device includes: a second receiving module, configured to receive, through the internal port, a second message sent by the service node; wherein the second message carries a target VLAN identifier, the target VLAN identifier being determined by the service node based on a target port identifier of a target external port and a pre-stored mapping relationship between a port identifier and a VLAN identifier; the mapping relationship recording a one-to-one correspondence between a port identifier and a VLAN identifier; The stripping module is configured to strip the VLAN identifier from the second message, and send the stripped second message to a target interface node via a target external port indicated by the VLAN identifier.

14. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing processor-executable instructions; Wherein, when the processor calls the executable instruction, the operation of the method according to any one of claims 1 to 9 is implemented.

15. A computer-readable storage medium, characterized in that Computer instructions are stored thereon, and when the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Message transmission method and device, processing node and storage medium

    CN111800326A