CN115086251A - Stack data processing method and device, electronic equipment and storage medium - Google Patents

Stack data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115086251A
CN115086251A CN202210750443.7A CN202210750443A CN115086251A CN 115086251 A CN115086251 A CN 115086251A CN 202210750443 A CN202210750443 A CN 202210750443A CN 115086251 A CN115086251 A CN 115086251A
Authority
CN
China
Prior art keywords
message
processed
stacking
service
output port
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.)
Granted
Application number
CN202210750443.7A
Other languages
Chinese (zh)
Other versions
CN115086251B (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.)
Beijing Armyfly Technology Co Ltd
Original Assignee
Beijing Armyfly Technology Co Ltd
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 Beijing Armyfly Technology Co Ltd filed Critical Beijing Armyfly Technology Co Ltd
Priority to CN202210750443.7A priority Critical patent/CN115086251B/en
Publication of CN115086251A publication Critical patent/CN115086251A/en
Application granted granted Critical
Publication of CN115086251B publication Critical patent/CN115086251B/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/25Routing or path finding in a switch fabric
    • H04L49/251Cut-through or wormhole routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • H04L49/3009Header conversion, routing tables or routing tags
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • H04L49/3054Auto-negotiation, e.g. access control between switch gigabit interface connector [GBIC] and link
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

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

Abstract

The invention discloses a stacked data processing method, a stacked data processing device, electronic equipment and a storage medium, wherein the method comprises the following steps: receiving a message to be processed, and determining an output port according to the message to be processed; if the device corresponding to the output port is a stacking device and the message to be processed contains stacking encapsulation, sending the message to be processed according to the output port; and if the equipment corresponding to the output port is stacking equipment and the message to be processed does not contain stacking encapsulation, stacking and performing service encapsulation on the message to be processed to obtain an encapsulated message, determining the output port corresponding to the encapsulated message according to a predetermined service table, taking the encapsulated message as a new message to be processed, and executing sending of the new message to be processed again according to the output port of the new message to be processed. The problem that the stacking device needs to designate a fixed stacking port when processing stacked messages is solved, the stacking device does not need to designate a stacking port, service encapsulation is carried out on the messages forwarded to the stacking device, forwarding is carried out through a service table, and cross-network stacking is achieved.

Description

Stack data processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for processing stacked data, an electronic device, and a storage medium.
Background
With the rapid development of the network, the deployment of the network is more and more complex, the stacking technology can virtualize a plurality of switches into one switch, so that the purposes of simplifying the network deployment and reducing the workload of network maintenance are achieved, meanwhile, the reliability can be improved, redundant backup can be formed among a plurality of member switches of the stacking system, the number of ports is expanded, and the bandwidth is increased.
The existing stacking system can only use a specified stacking port to stack by using a direct connection line, if the direct connection stacking line is in failure and the stacking device can use other links in the network to be indirectly communicated, the stacking port needs to be modified into a communicable port, and network information stacked across the network is added in front of an original stacking message header, so as to realize the stacking across the network. Because the port through which the stacking device can communicate through the network changes with the change of the network state, it is difficult to implement the forwarding of the stacking message by designating the fixed stacking port.
Disclosure of Invention
The invention provides a method and a device for processing stacked data, electronic equipment and a storage medium, which are used for solving the problem that a stacking port needs to be specified when stacking equipment forwards a stacked message.
According to an aspect of the present invention, there is provided a stack data processing method applied to a stack device, including:
receiving a message to be processed, and determining an output port according to the message to be processed;
if the device corresponding to the output port is a stacking device and the message to be processed contains stacking encapsulation, sending the message to be processed according to the output port;
and if the device corresponding to the output port is a stacking device and the message to be processed does not contain stacking encapsulation, stacking and service encapsulation are carried out on the message to be processed to obtain an encapsulated message, the output port corresponding to the encapsulated message is determined according to a predetermined service table, the encapsulated message is used as a new message to be processed, and the new message to be processed is sent again according to the output port of the new message to be processed.
According to another aspect of the present invention, there is provided a stacked data processing apparatus applied to a stacked device, including:
the message receiving module is used for receiving a message to be processed and determining an output port according to the message to be processed;
a first message sending module, configured to send the message to be processed according to the egress port if the device corresponding to the egress port is a stacking device and the message to be processed includes a stack package;
and the message encapsulation module is used for stacking and service encapsulating the message to be processed to obtain an encapsulated message if the device corresponding to the output port is a stacking device and the message to be processed does not contain stacking encapsulation, determining the output port corresponding to the encapsulated message according to a predetermined service table, using the encapsulated message as a new message to be processed, and sending the new message to be processed according to the output port of the new message to be processed again.
According to another aspect of the present invention, there is provided an electronic apparatus as a stacked apparatus, including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform a stacked data processing method according to any of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the stacked data processing method according to any one of the embodiments of the present invention when the computer instructions are executed.
According to the technical scheme of the embodiment of the invention, the message to be processed is received, and the output port is determined according to the message to be processed; if the device corresponding to the output port is a stacking device and the message to be processed contains stacking encapsulation, sending the message to be processed according to the output port; and if the device corresponding to the output port is a stacking device and the message to be processed does not contain stacking encapsulation, stacking and service encapsulation are carried out on the message to be processed to obtain an encapsulated message, the output port corresponding to the encapsulated message is determined according to a predetermined service table, the encapsulated message is used as a new message to be processed, and the new message to be processed is sent again according to the output port of the new message to be processed. Solves the problem that the stacking equipment must appoint a fixed stacking port when processing the stacked messages, when receiving the message to be processed, determining an output port according to the message to be processed, judging whether the device corresponding to the output port is a stacking device, if so, judging whether the message to be processed contains stacking encapsulation, directly sending the message to be processed containing the stack encapsulation, stacking and performing service encapsulation on the message to be processed without the stack encapsulation to obtain an encapsulated message, wherein the encapsulated message contains a stack head and a service head, the output port of the encapsulated message is searched according to the service table, thereby realizing the forwarding of the message through the service channel, the stacking device in the application does not need to designate a fixed stacking port, and performing service encapsulation on the message forwarded to the stacking equipment, and forwarding the message through a service table to realize cross-network stacking.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a stacked data processing method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a stacked data processing method according to a second embodiment of the present invention;
fig. 3 is a schematic diagram of a device and a link between devices that are reachable according to a second embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a stacked data processing apparatus according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device implementing the stacked data processing method according to the embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a flowchart of a stacked data processing method according to an embodiment of the present invention, where the method is applicable to a case where a stacked device processes a data packet, and the method may be executed by a stacked data processing apparatus, where the stacked data processing apparatus may be implemented in a form of hardware and/or software, and the stacked data processing apparatus may be configured in the stacked device. As shown in fig. 1, the method includes:
s101, receiving a message to be processed, and determining an output port according to the message to be processed.
In this embodiment, the message to be processed may be specifically understood as a message having a data processing requirement; an egress port may be understood in particular as a port for issuing data. And receiving a message to be processed sent by an external network or other stacking equipment. The message to be processed is analyzed and the like, so that the output port corresponding to the message to be processed, namely the port through which the message to be processed is sent out, is determined. The message to be processed may be a stacked message or a non-stacked message, i.e. a service message. Different types of messages have different ways of storing the relevant information of the output port, so the corresponding output port is determined according to the type of the message to be processed.
And S102, if the device corresponding to the output port is a stacking device and the message to be processed contains stacking encapsulation, sending the message to be processed according to the output port.
In a stacking system, the stacking apparatus is predetermined. After the port is determined, correspondingly determining the device corresponding to the output port according to the device connected with the predetermined output port, and judging whether the device corresponding to the output port is the stacking device according to the information whether the predetermined and stored device is the stacking device. When the device corresponding to the output port is a stacking device, judging whether the message to be processed contains the stacking encapsulation or not can be carried out by analyzing the message to be processed and judging whether the message to be processed contains the stacking head or not, and if the message to be processed contains the stacking head, determining that the message to be processed contains the stacking encapsulation. And directly sending the message to be processed containing the stacked package through the output port to complete data processing.
S103, if the device corresponding to the output port is a stacking device and the message to be processed does not contain stacking encapsulation, stacking and service encapsulation are carried out on the message to be processed to obtain an encapsulation message, the output port corresponding to the encapsulation message is determined according to a predetermined service table, the encapsulation message is used as a new message to be processed, and the step of sending the new message to be processed according to the output port of the new message to be processed is executed again.
In this embodiment, the encapsulation packet may be specifically understood as a packet obtained by encapsulating a packet to be processed; the service table may be specifically understood as a data table storing service forwarding logics, and since there may be more than one service type in the actual service processing process, forwarding logics of different types of services may be stored in the service table, or forwarding logics of each type of services may be stored in one table, respectively.
When the device corresponding to the output port is the stacking device, judging whether the message to be processed contains stacking encapsulation or not, if the message to be processed does not contain stacking encapsulation, stacking encapsulation is carried out on the message to be processed, the message to be processed is encapsulated into the stacking message, then service encapsulation is carried out, the encapsulation message of the service type is obtained, the output port corresponding to the encapsulation message is determined by searching a predetermined service table, the encapsulation message is used as a new message to be processed, sending of the new message to be processed is carried out again according to the output port of the new message to be processed, namely, whether the device corresponding to the output port is the stacking device or not is judged again, and corresponding steps are carried out, so that sending of the message to be processed is achieved.
The embodiment of the application provides a stacked data processing method, which comprises the steps of receiving a message to be processed and determining an output port according to the message to be processed; sending the message to be processed according to the output port; wherein, the sending the message to be processed according to the output port includes: if the device corresponding to the output port is a stacking device and the message to be processed contains stacking encapsulation, sending the message to be processed according to the output port; and if the device corresponding to the output port is a stacking device and the message to be processed does not contain stacking encapsulation, stacking and service encapsulation are carried out on the message to be processed to obtain an encapsulated message, the output port corresponding to the encapsulated message is determined according to a predetermined service table, the encapsulated message is used as a new message to be processed, and the new message to be processed is sent again according to the output port of the new message to be processed. Solves the problem that the stacking equipment must appoint a fixed stacking port when processing the stacked messages, when receiving the message to be processed, determining an output port according to the message to be processed, judging whether the device corresponding to the output port is a stacking device, if so, judging whether the message to be processed contains stacking encapsulation, directly sending the message to be processed containing the stack encapsulation, stacking and performing service encapsulation on the message to be processed without the stack encapsulation to obtain an encapsulated message, wherein the encapsulated message contains a stack head and a service head, the output port of the encapsulated message is searched according to the service table, thereby realizing the forwarding of the message of the stacking type through the service channel, the stacking device in the application does not need to designate a fixed stacking port, and performing service encapsulation on the message forwarded to the stacking equipment, and forwarding the message through a service table to realize cross-network stacking.
Example two
Fig. 2 is a flowchart of a stacked data processing method according to a second embodiment of the present invention, which is further detailed based on the second embodiment. As shown in fig. 2, the method includes:
s201, receiving a message to be processed.
After receiving the message to be processed, analyzing the message to be processed to judge whether the message to be processed contains a stack head, if so, determining that the message to be processed is a stack message, and executing S202-S203; if the packet stack header is not contained, the message to be processed is determined to be a non-stack message, and S204-S205 are executed.
S202, if the message type of the message to be processed is a stack message, performing service header and stack header decapsulation on the message to be processed.
When the message type of the message to be processed is a stack message, firstly decapsulating the message to be processed by a service header, removing the service header to obtain the message to be processed which does not contain the service header, then decapsulating the stack header of the message to be processed which does not contain the service header, removing the stack header to obtain the message to be processed which does not contain the service header and the stack header.
S203, determining a port according to stacking information in a stacking head of the message to be processed.
In this embodiment, the stacking information may be specifically understood as information related to a stacking device, a stacking system, and the like, and the stacking information at least includes information related to a destination or an egress port of a message. Analyzing the message to be processed, determining the stacking information stored in the stacking head, determining the destination of message transmission according to the stacking information, determining the corresponding output port according to the destination, or directly analyzing the stacking information to obtain the output port.
And S204, if the message type of the message to be processed is a non-stack message, determining the service message information according to the message to be processed.
In this embodiment, the service packet information may be specifically understood as information related to service forwarding in the message to be processed. When the message type of the message to be processed is a non-stack message, analyzing the message to be processed, determining a service message header of the message to be processed, and determining service message information according to information stored in the service message header.
And S205, determining an output port according to the service message information and a predetermined service table.
The service table in the embodiment of the application stores the service message information and the information of the corresponding output port, and the service forwarding is realized through the service table. After the service message information is determined, the service table is inquired through the service message information, and an output port corresponding to the service message information is determined.
S206, judging whether the equipment corresponding to the output port is stacking equipment or not, if so, executing S207; otherwise, S208 is performed.
S207, judging whether the message to be processed contains stack packaging, if so, executing S208; otherwise, S209 is executed.
And S208, sending the message to be processed according to the output port.
When the device corresponding to the output port is the non-stack device, the message to be processed is directly sent according to the output port, data processing is completed, and transmission of the non-stack message on the stack device is not affected. And when the equipment corresponding to the output port is non-stacking equipment and the message to be processed does not contain stacking encapsulation, directly sending the message to be processed according to the output port to finish data processing.
S209, determining the stacking head information and the service channel according to the output port, and performing stacking head encapsulation on the message to be processed according to the stacking head information to obtain an encapsulated target message.
In this embodiment, the service channel may be understood as a channel for performing network communication between devices, and the service channel for communication between devices is predetermined. The target message may be specifically understood as a message obtained by stacking and packaging messages to be processed.
Specifically, when the device corresponding to the output port is a stacking device and the packet to be processed does not include stacking encapsulation, the packet to be processed is encapsulated in the following manner. Determining destination equipment to which the message is to be sent according to the egress port, and when the equipment corresponding to the egress port is stacking equipment and the destination equipment to which the message is to be sent is stacking equipment, determining corresponding stacking header information according to the stacking equipment, for example, using an identifier of the stacking equipment as the stacking header information. And performing stack head packaging on the message to be processed according to the stack head information to obtain a packaged target message, and finishing the stack packaging. And determining destination equipment to be sent according to the output port, and determining a service channel between the equipment and equipment corresponding to the output port according to a predetermined service channel between the equipment and the equipment.
S210, determining service header information according to the service channel, and performing service header encapsulation on the target message according to the service header information to obtain an encapsulated message.
Different traffic channels may differ in forming the traffic header information. After the service channel is determined, the information of the local equipment or the target equipment is obtained according to the type of the service channel to form service header information. And performing service header encapsulation on the target message, writing the service header information into the service header to form an encapsulated message, and completing service encapsulation. The function of forwarding the stacked message according to the service is further realized by performing service encapsulation on the stacked message.
Different types of service channels encapsulate different service headers when performing service encapsulation. A common two-layer L2 network may encapsulate an L2 header, an internet protocol IP network may encapsulate an IP header, a multiprotocol label switching MPLS network may encapsulate an MPLS header, and the like, and may be encapsulated and decapsulated by a switch chip, or may be encapsulated and decapsulated by an FPGA, and the like, if the switch chip does not support the MPLS header.
As an optional embodiment of this embodiment, this optional embodiment further optimizes determining the service header information according to the service channel as follows: when the service channel is an internet protocol network or a multi-protocol label switching network, the source physical address and the destination physical address in the service header information are determined according to the physical address of the local machine.
When the service channel is an internet protocol network (i.e. an IP network) or a multi-protocol label switching network (i.e. an MPLS network), the physical address of the local machine is determined, and the physical address of the local machine is used as a source physical address and a destination physical address in service header information and written into a service header to complete service encapsulation. Other types of information may also be included in the service header information.
Exemplarily, the service channel is taken as an internet protocol network as an example, and the determination process of the service header information is described. The MAC address described below is a physical address, the routing MAC address of the device R1 is MAC1, the routing MAC address of the device R2 is MAC2, the device R1 and the device R2 are connected via an IP network, and the IP address IP1 on the device R1 and the IP address IP2 on the device R2 are reachable via a route. When the device R1 is used as a local device and the device R2 is used as a device corresponding to an egress end, an IP header may be added outside the stack header of the device R1 to the device R2, the IP header information (service header information) added outside the stack packet header of the device R1 to the device R2 is that the source IP address is IP1, the destination IP address is IP2, and both the source MAC and the destination MAC are MAC 1. When the device R2 is used as a local device and the device R1 is used as a device corresponding to the egress side, the source IP address is IP2, the destination IP address is IP1, and the source MAC and the destination MAC are both MAC2 in the information of the IP header added from the device R2 to the device R1. And after the service header is packaged according to the service header information, obtaining a packaged message, re-entering the service processing in the incoming direction, namely determining an output port of the packaged message according to the service table, and sending the message according to the output port. Because the destination MAC in the service header information of the service header is the routing MAC of the local device, the service header enters an IP routing table (namely the service table) for searching and is forwarded according to the IP routing table. Therefore, the stacked message is sent through the service table, and the cross-network stacking is realized by multiplexing the service channels.
The service channel is taken as an example of a multi-protocol label switching network, and the determination process of the service header information is described. The routing physical address (MAC address) of the device R1 is MAC1, and the routing MAC address of the device R2 is MAC 2. Fig. 3 is a schematic diagram illustrating that a link between devices may be reached when the device R1 and the device R2 are connected through an MPLS network, where when the device 31 communicates with the device 32, a message is sent from the device 31 to the device 34, sent to the device 33 by the device 34, and forwarded to the device 32 through the device 34, and links between devices are as shown in fig. 3. When the device 31 is used as a local device and the device 32 is used as a device corresponding to an egress end, an MPLS header may be added outside a stack header from the device 31 to the device 32, where a source MAC and a target MAC in MPLS header information (i.e., service header information) are both MAC1 and MPLS link is 100; when the device 32 is used as a local device and the device 31 is used as a device corresponding to an egress port, the source MAC and the destination MAC in the MPLS header information added from the device 31 to the device 32 are both MAC2, and MPLS link is 600. And after completing service header encapsulation according to the service header information, obtaining an encapsulated message, reentering service processing in the incoming direction, namely determining an outgoing port of the encapsulated message according to a service table, and sending the message according to the outgoing port. Because the destination MAC in the service header information of the service header is the routing MAC of the local machine, the service header enters an MPLS (multiple protocol Label switching) table (namely a service table) to be searched, and the forwarding is carried out according to the MPLS routing table.
When the service channel is a two-layer network, determining a virtual local area network port between the local machine and the device corresponding to the output port, and determining service header information according to the virtual local area network port. And writing the service header information into the service header. The service header information may also include information of physical addresses.
For example, taking a service channel as a two-layer network as an example, a process of determining service header information is described. A bridge MAC address of the device R1 is MAC1, a bridge MAC address of the device R2 is MAC2, the device R1 and the device R2 are connected in the VLAN100 through an L2 network for forwarding, a two-layer header may be added outside a stack header of the device R1 to the device R2, the device R1 is used as a local device, and when the device R2 is used as a device corresponding to an egress end, a source MAC is MAC1, a destination MAC is MAC2, and a VLAN is 100 in L2 header information (service header information) added outside a stack packet header of the device R1 to the device R2; when the device R1 is a local device and the device R2 is a device corresponding to an egress port, the source MAC, the destination MAC, and the VLAN of the L2 header added from the device R2 to the device R1 are MAC1, MAC2, and 100, respectively. And after the service header is packaged according to the service header information, obtaining a packaged message, re-entering the service processing in the incoming direction, namely determining an output port of the packaged message according to the service table, and sending the message according to the output port. Forwarding is performed by looking up the MAC table (traffic table) within VLAN 100.
S211, determining the information of the target service message according to the encapsulation message.
In this embodiment, the target service packet information may be specifically understood as related information for service forwarding in the encapsulation packet. And determining target service message information stored in a service header of the encapsulated message by analyzing the encapsulated message.
S212, determining an output port according to the target service message information and a predetermined service table.
And searching a service table according to the target service message information, determining an output port corresponding to the target service message information, and further sending the message according to the output port.
And S213, taking the encapsulated message as a new message to be processed, and returning to execute S206.
The embodiment of the application provides a method for processing stacked data, which solves the problem that a fixed stacking port is required to be appointed when stacked messages are processed by a stacking device, determines an output port according to the messages to be processed when the messages to be processed are received, judges whether the device corresponding to the output port is the stacking device or not, judges whether the messages to be processed contain stacking encapsulation or not if the devices are stacked data, directly sends the messages to be processed containing the stacking encapsulation, stacks and packages the messages to be processed without the stacking encapsulation to obtain the encapsulated messages, wherein the encapsulated messages contain a stacking head and a service head, and searches the output port of the encapsulated messages according to a service table, thereby realizing the forwarding of the messages of the stacking type through a service channel, the stacking device does not need to appoint the fixed stacking port in the application, and packages the messages forwarded to the stacking device, and forwarding is carried out through the service table, and cross-network stacking is realized through multiplexing the service channels. The stacking device can process the non-stacking message at the same time, and the transmission of the non-stacking message on the port of the stacking device is not influenced.
EXAMPLE III
Fig. 4 is a schematic structural diagram of a stacked data processing apparatus according to a third embodiment of the present invention. As shown in fig. 4, the apparatus includes: a message receiving module 41, a first message sending module 42 and a message packaging module 43.
The message receiving module 41 is configured to receive a message to be processed, and determine an output port according to the message to be processed;
a first message sending module 42, configured to send the to-be-processed message according to the egress port if the device corresponding to the egress port is a stacking device and the to-be-processed message includes a stack package;
a message encapsulation module 43, configured to stack and service encapsulate the to-be-processed message to obtain an encapsulated message, determine an egress port corresponding to the encapsulated message according to a predetermined service table, use the encapsulated message as a new to-be-processed message, and execute sending of the new to-be-processed message again according to the egress port of the new to-be-processed message if the device corresponding to the egress port is a stacking device and the to-be-processed message does not include a stacking encapsulation.
The embodiment of the application provides a stacked data processing device, which solves the problem that a fixed stacked port is required to be appointed when stacked messages are processed by stacked equipment, determines an output port according to the messages to be processed when the messages to be processed are received, judges whether the equipment corresponding to the output port is stacked equipment or not, judges whether the messages to be processed contain stacked packages or not if the messages to be processed contain the stacked packages or not, directly sends the messages to be processed containing the stacked packages, stacks and packages the messages to be processed without the stacked packages to obtain packaged messages, the packaged messages contain stacked headers and service headers, and searches the output port of the packaged messages according to a service table, so that the messages of the stacked type are forwarded through a service channel, the stacked equipment does not need to appoint the fixed stacked port in the application, and packages the messages forwarded to the stacked equipment, and forwarding is carried out through the service table, so that cross-network stacking is realized.
Optionally, the message receiving module 41 includes:
a decapsulation unit, configured to decapsulate, if the packet type of the to-be-processed packet is a stacked packet, a service header and a stacked header of the to-be-processed packet;
and the first output port determining unit is used for determining a port according to the stacking information in the stacking head of the message to be processed.
Optionally, the message receiving module 41 includes:
a service message determining unit, configured to determine service message information according to the to-be-processed message if the message type of the to-be-processed message is a non-stacked message;
and the second output port determining unit is used for determining an output port according to the service message information and a predetermined service table.
Optionally, the packet encapsulation module 43 includes:
the stack encapsulation unit is used for determining stack head information and a service channel according to an output port, and performing stack head encapsulation on the message to be processed according to the stack head information to obtain an encapsulated target message;
and the service packaging unit is used for determining service header information according to the service channel and packaging the service header of the target message according to the service header information to obtain a packaged message.
Optionally, the service encapsulation unit is specifically configured to determine, when the service channel is an internet protocol network or a multi-protocol label switching network, a source physical address and a destination physical address in the service header information according to a local physical address.
Optionally, the packet encapsulation module 43 includes:
a target message determining unit, configured to determine target service message information according to the encapsulation message;
and the service table query unit is used for determining an output port according to the target service message information and a predetermined service table.
Optionally, the apparatus further comprises:
and the second message sending module is used for sending the message to be processed according to the output port if the device corresponding to the output port is a non-stacking device.
The stacked data processing device provided by the embodiment of the invention can execute the stacked data processing method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Example four
FIG. 5 illustrates a schematic diagram of an electronic device 50 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein. The electronic device in this embodiment can be a stacked device.
As shown in fig. 5, the electronic device 50 includes at least one processor 51, and a memory communicatively connected to the at least one processor 51, such as a Read Only Memory (ROM)52, a Random Access Memory (RAM)53, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 51 may perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM)52 or the computer program loaded from a storage unit 58 into the Random Access Memory (RAM) 53. In the RAM 53, various programs and data necessary for the operation of the electronic apparatus 50 can also be stored. The processor 51, the ROM 52, and the RAM 53 are connected to each other via a bus 54. An input/output (I/O) interface 55 is also connected to bus 54.
A plurality of components in the electronic apparatus 50 are connected to the I/O interface 55, including: an input unit 56 such as a keyboard, a mouse, or the like; an output unit 57 such as various types of displays, speakers, and the like; a storage unit 58 such as a magnetic disk, an optical disk, or the like; and a communication unit 59 such as a network card, modem, wireless communication transceiver, etc. The communication unit 59 allows the electronic device 50 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processor 51 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the processor 51 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The processor 51 performs the various methods and processes described above, such as a stacked data processing method.
In some embodiments, the stacked data processing method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 58. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 50 via the ROM 52 and/or the communication unit 59. When the computer program is loaded into the RAM 53 and executed by the processor 51, one or more steps of the stacked data processing method described above may be performed. Alternatively, in other embodiments, the processor 51 may be configured to perform the stacked data processing method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A stacked data processing method is applied to a stacked device and comprises the following steps:
receiving a message to be processed, and determining an output port according to the message to be processed;
if the device corresponding to the output port is a stacking device and the message to be processed contains stacking encapsulation, sending the message to be processed according to the output port;
and if the device corresponding to the output port is a stacking device and the message to be processed does not contain stacking encapsulation, stacking and service encapsulation are carried out on the message to be processed to obtain an encapsulated message, the output port corresponding to the encapsulated message is determined according to a predetermined service table, the encapsulated message is used as a new message to be processed, and the new message to be processed is sent again according to the output port of the new message to be processed.
2. The method according to claim 1, wherein the determining an egress port according to the message to be processed comprises:
if the message type of the message to be processed is a stack message, decapsulating a service header and a stack header of the message to be processed;
and determining a port according to the stacking information in the stacking head of the message to be processed.
3. The method according to claim 1, wherein the determining an egress port according to the message to be processed comprises:
if the message type of the message to be processed is a non-stack message, determining service message information according to the message to be processed;
and determining an output port according to the service message information and a predetermined service table.
4. The method according to claim 1, wherein said stacking and service encapsulation of the packets to be processed to obtain encapsulated packets comprises:
determining stacking head information and a service channel according to an output port, and performing stacking head packaging on the message to be processed according to the stacking head information to obtain a packaged target message;
and determining service header information according to the service channel, and performing service header encapsulation on the target message according to the service header information to obtain an encapsulated message.
5. The method of claim 4, wherein the determining the traffic header information according to the traffic channel comprises:
and when the service channel is an internet protocol network or a multi-protocol label switching network, determining a source physical address and a destination physical address in the service header information according to a physical address of the local device.
6. The method according to claim 1, wherein the determining an egress port corresponding to the encapsulation packet according to a predetermined service table comprises:
determining target service message information according to the encapsulation message;
and determining an output port according to the target service message information and a predetermined service table.
7. The method of any of claims 1-6, further comprising:
and if the equipment corresponding to the output port is non-stacking equipment, sending the message to be processed according to the output port.
8. A stacked data processing apparatus applied to a stacked device, comprising:
the message receiving module is used for receiving a message to be processed and determining an output port according to the message to be processed;
a first message sending module, configured to send the message to be processed according to the egress port if the device corresponding to the egress port is a stacking device and the message to be processed includes a stack package;
and the message encapsulation module is used for stacking and service encapsulating the message to be processed to obtain an encapsulated message if the device corresponding to the output port is a stacking device and the message to be processed does not contain stacking encapsulation, determining the output port corresponding to the encapsulated message according to a predetermined service table, using the encapsulated message as a new message to be processed, and sending the new message to be processed according to the output port of the new message to be processed again.
9. An electronic device characterized in that, as a stacked device, the electronic device includes:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the method of processing stacked data according to any one of claims 1-7.
10. A computer-readable storage medium, having stored thereon computer instructions for causing a processor to execute a method of processing stacked data according to any one of claims 1-7.
CN202210750443.7A 2022-06-28 2022-06-28 Stacked data processing method and device, electronic equipment and storage medium Active CN115086251B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210750443.7A CN115086251B (en) 2022-06-28 2022-06-28 Stacked data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210750443.7A CN115086251B (en) 2022-06-28 2022-06-28 Stacked data processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115086251A true CN115086251A (en) 2022-09-20
CN115086251B CN115086251B (en) 2023-10-03

Family

ID=83256557

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210750443.7A Active CN115086251B (en) 2022-06-28 2022-06-28 Stacked data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115086251B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101699789A (en) * 2009-09-25 2010-04-28 江苏华丽网络工程有限公司 Design method of Ethernet device stack system
WO2015106680A1 (en) * 2014-01-14 2015-07-23 华为技术有限公司 Stacking implementation method and stackable device
CN105141538A (en) * 2015-09-21 2015-12-09 盛科网络(苏州)有限公司 Cross-network stacking system and message processing method thereof
WO2016106969A1 (en) * 2014-12-29 2016-07-07 中兴通讯股份有限公司 Switching device stacking method and apparatus
CN106330704A (en) * 2015-06-26 2017-01-11 杭州华三通信技术有限公司 Message forwarding method and apparatus
CN112019459A (en) * 2020-09-09 2020-12-01 盛科网络(苏州)有限公司 Message processing method and system based on dynamic online and offline of equipment in stacking system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101699789A (en) * 2009-09-25 2010-04-28 江苏华丽网络工程有限公司 Design method of Ethernet device stack system
WO2015106680A1 (en) * 2014-01-14 2015-07-23 华为技术有限公司 Stacking implementation method and stackable device
WO2016106969A1 (en) * 2014-12-29 2016-07-07 中兴通讯股份有限公司 Switching device stacking method and apparatus
CN106330704A (en) * 2015-06-26 2017-01-11 杭州华三通信技术有限公司 Message forwarding method and apparatus
CN105141538A (en) * 2015-09-21 2015-12-09 盛科网络(苏州)有限公司 Cross-network stacking system and message processing method thereof
CN112019459A (en) * 2020-09-09 2020-12-01 盛科网络(苏州)有限公司 Message processing method and system based on dynamic online and offline of equipment in stacking system

Also Published As

Publication number Publication date
CN115086251B (en) 2023-10-03

Similar Documents

Publication Publication Date Title
JP5610247B2 (en) Network system and policy route setting method
US8867363B2 (en) Resilient forwarding of packets with a per-customer edge (per-CE) label
CN112787913B (en) Intelligent network card assembly, physical machine, cloud service system and message sending method
WO2020119644A1 (en) Forwarding entry generation method, apparatus, and device
WO2014166385A1 (en) Fabric multipathing based on dynamic latency-based calculations
CN114301868B (en) Method for quickly generating virtual container floating IP and method and device for network direct connection
CN110519079B (en) Data forwarding method and device, network board, network equipment and storage medium
WO2022068744A1 (en) Method for obtaining message header information and generating message, device, and storage medium
CN110768911B (en) Method, device, equipment, system and storage medium for efficient flow drainage
CN113489640A (en) Message forwarding method, device and gateway system
CN114615179A (en) Message transmission method, device and system
CN115086251B (en) Stacked data processing method and device, electronic equipment and storage medium
CN116303171A (en) Data interaction method and device between servers, electronic equipment and medium
WO2016173196A1 (en) Method and apparatus for learning address mapping relationship
CN115190087A (en) Data transmission method, device, equipment and medium based on two-layer intermediate equipment
CN112866107B (en) IP address notification method, traffic guidance method and network equipment
CN114978808A (en) Data forwarding method and device, electronic equipment and storage medium
CN111010344B (en) Message forwarding method and device, electronic equipment and machine-readable storage medium
CN113497755A (en) Data forwarding method, system and equipment
CN112887201A (en) VRRP (virtual router redundancy protocol) -based interface updating method and device and storage medium
CN114938331B (en) Single-physical-port multi-network access method and device under container scene, storage medium and electronic equipment
CN115225634B (en) Data forwarding method, device and computer program product under virtual network
CN117499295A (en) Message forwarding method, device, equipment and storage medium
WO2023169364A1 (en) Routing generation method and apparatus, and data message forwarding method and apparatus
Roy et al. Design and Performance Analysis of Electro Optic ToR (EO-ToR) for Low Latency Data Center Network

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