CN115086251B - Stacked data processing method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN115086251B
CN115086251B CN202210750443.7A CN202210750443A CN115086251B CN 115086251 B CN115086251 B CN 115086251B CN 202210750443 A CN202210750443 A CN 202210750443A CN 115086251 B CN115086251 B CN 115086251B
Authority
CN
China
Prior art keywords
message
processed
stacking
service
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210750443.7A
Other languages
Chinese (zh)
Other versions
CN115086251A (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

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

Abstract

The application discloses a stacked data processing method, a stacked data processing device, electronic equipment and a storage medium, wherein the stacked data processing method comprises the following steps: receiving a message to be processed, and determining a port according to the message to be processed; if the equipment corresponding to the output port is stacking equipment and the message to be processed contains stacking encapsulation, sending the message to be processed according to the output port; if the equipment corresponding to the output port is stacking equipment 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, 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 sending the new message to be processed again according to the output port of the new message to be processed. The method solves the problem that the stacking device needs to designate a fixed stacking port when processing the stacked message, the stacking device does not need to designate the stacking port, the message forwarded to the stacking device is subjected to service encapsulation, and the message is forwarded through a service table, so that cross-network stacking is realized.

Description

Stacked data processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a stacked data processing method, a stacked data processing device, 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, the purposes of simplifying the network deployment and reducing the network maintenance workload are achieved, meanwhile, the reliability can be improved, redundant backup can be formed among a plurality of member switches of the stacking system, the port number is expanded, and the bandwidth is increased.
Existing stacking systems are typically capable of stacking using only a specified stacking port with a direct connection, and if the direct connection stacking line fails and the stacking device is capable of indirectly communicating using other links in the network, then the stacking port needs to be modified to a communicable port and network information across the network stack is added in front of the original stacking header to achieve the cross network stacking. Because the port through which the stacking device can communicate with the network changes with the state of the network, the forwarding of the stacking message by designating the fixed stacking port has a certain difficulty.
Disclosure of Invention
The application provides a stacking data processing method, a device, electronic equipment and a storage medium, which are used for solving the problem that stacking equipment must specify a stacking port when forwarding a stacking message.
According to an aspect of the present application, there is provided a stacked data processing method applied to a stacking apparatus, including:
receiving a message to be processed, and determining a port according to the message to be processed;
if the equipment corresponding to the output port is stacking equipment and the message to be processed contains stacking packaging, sending the message to be processed according to the output port;
if the equipment corresponding to the output port is stacking equipment 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, determining the output port corresponding to the encapsulation message according to a predetermined service table, taking the encapsulation message as a new message to be processed, and sending the new message to be processed again according to the output port of the new message to be processed.
According to another aspect of the present application, there is provided a stacked data processing apparatus applied to a stacking device, including:
the message receiving module is used for receiving a message to be processed and determining a port according to the message to be processed;
the first message sending module is used for sending the message to be processed according to the output port if the equipment corresponding to the output port is stacking equipment and the message to be processed contains stacking packaging;
and the message packaging module is used for carrying out stacking and service packaging on the message to be processed to obtain a packaged message if the equipment corresponding to the output port is stacking equipment and the message to be processed does not contain stacking packaging, determining the output port corresponding to the packaged message according to a predetermined service table, taking the packaged message as a new message to be processed, and carrying out sending on the new message to be processed again according to the output port of the new message to be processed.
According to another aspect of the present application, there is provided an electronic apparatus as a stacking apparatus, the electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the stacked data processing method of any one of the embodiments of the present application.
According to another aspect of the present application, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute a stacked data processing method according to any one of the embodiments of the present application.
According to the technical scheme, the port is determined according to the message to be processed by receiving the message to be processed; if the equipment corresponding to the output port is stacking equipment and the message to be processed contains stacking packaging, sending the message to be processed according to the output port; if the equipment corresponding to the output port is stacking equipment 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, determining the output port corresponding to the encapsulation message according to a predetermined service table, taking the encapsulation message as a new message to be processed, and sending the new message to be processed again according to the output port of the new message to be processed. The method and the device solve the problem that a fixed stacking port must be designated when stacking equipment processes stacked messages, determine a port according to the to-be-processed messages when receiving the to-be-processed messages, judge whether the equipment corresponding to the port is the stacking equipment, if so, judge whether the to-be-processed messages contain stacking packages, directly send the to-be-processed messages containing the stacking packages, stack and service package the to-be-processed messages without the stacking packages to obtain packaged messages, wherein the packaged messages contain stacking heads and service heads, and find out the outlet port of the packaged messages according to a service table, thereby realizing the forwarding of the messages through a service channel.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the application or to delineate the scope of the application. Other features of the present application will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a stacked data processing method according to a first embodiment of the present application;
FIG. 2 is a flow chart of a stacked data processing method according to a second embodiment of the present application;
fig. 3 is a schematic diagram of a link reachability between devices according to a second embodiment of the present application;
FIG. 4 is a schematic diagram of a stacked data processing apparatus according to a third embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device implementing a stacked data processing method according to an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, 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 1
Fig. 1 is a flowchart of a method for processing stacked data according to an embodiment of the present application, where the method may be performed by a stacked data processing apparatus, and the stacked data processing apparatus may be implemented in 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 a port according to the message to be processed.
In this embodiment, the message to be processed may be specifically understood as a message with a data processing requirement; an egress port is specifically understood to be a port for issuing data. And receiving a message to be processed sent by an external network or other stacking equipment. And determining an output port corresponding to the message to be processed through analyzing the message to be processed and the like, namely, through which port the message to be processed is sent outwards. The message to be processed can be a stacked message or a non-stacked message, namely a service message. The manner in which the information about the output ports of the messages of different types is stored is different, so that the corresponding output port is determined according to the type of the message to be processed.
S102, if the equipment corresponding to the output port is stacking equipment and the message to be processed comprises stacking packaging, sending the message to be processed according to the output port.
In the stacking system, the stacking apparatus is predetermined. After the ports are determined, the equipment corresponding to the ports is correspondingly determined according to the equipment connected with the predetermined outlet ports, and whether the equipment corresponding to the ports is stacking equipment is judged according to the information of whether the equipment which is predetermined and stored is stacking equipment. When the equipment corresponding to the output port is stacking equipment, judging whether the message to be processed contains stacking encapsulation or not can be performed by analyzing the message to be processed and judging whether the message to be processed contains stacking heads or not, and if the message to be processed contains the stacking heads, determining that the message to be processed contains the stacking encapsulation. And for the message to be processed comprising the stack package, the message to be processed is directly sent through the output port, and the data processing is completed.
S103, if the equipment corresponding to the output port is stacking equipment 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, 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 re-executing the step of sending the new message to be processed according to the output port of the new message to be processed.
In this embodiment, the encapsulated packet may be specifically understood as a packet obtained after the packet to be processed is encapsulated; the service table can be understood as a data table storing service forwarding logic, and because in the actual service processing process, service types can be more than one, forwarding logic of different types of services can be stored in the service table, and each type of service forwarding logic can also be stored in one table respectively.
When the equipment corresponding to the output port is stacking equipment, judging whether the to-be-processed message contains stacking encapsulation, if the to-be-processed message does not contain the stacking encapsulation, stacking and encapsulating the to-be-processed message, encapsulating the to-be-processed message into stacking message, then carrying out service encapsulation to obtain an encapsulated message of a service type, determining the output port corresponding to the encapsulated message by searching a predetermined service table, taking the encapsulated message as a new to-be-processed message, and executing the transmission of the new to-be-processed message according to the output port of the new to-be-processed message again, namely judging whether the equipment corresponding to the port is stacking equipment again, and executing corresponding steps to realize the transmission of the to-be-processed message.
The embodiment of the application provides a stacked data processing method, which comprises the steps of receiving a message to be processed and determining a port according to the message to be processed; sending the message to be processed according to the output port; the sending the message to be processed according to the output port includes: if the equipment corresponding to the output port is stacking equipment and the message to be processed contains stacking packaging, sending the message to be processed according to the output port; if the equipment corresponding to the output port is stacking equipment 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, determining the output port corresponding to the encapsulation message according to a predetermined service table, taking the encapsulation message as a new message to be processed, and sending the new message to be processed again according to the output port of the new message to be processed. The method and the device solve the problem that a fixed stacking port is required to be designated when stacking equipment processes stacked messages, determine the port according to the to-be-processed messages when the to-be-processed messages are received, judge whether the equipment corresponding to the port is the stacking equipment or not, if so, judge whether the to-be-processed messages contain stacking packages, directly send the to-be-processed messages containing the stacking packages, stack and service package the to-be-processed messages without the stacking packages to obtain packaged messages, the packaged messages contain stacking heads and service heads, and find out the outlet port of the packaged messages according to a service table, so that the message of a stacking type is forwarded through the service channel.
Example two
Fig. 2 is a flowchart of a stacked data processing method according to a second embodiment of the present application, where the stacked data processing method is refined based on the foregoing 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, judging whether the message to be processed contains a stacking head, if so, determining that the message to be processed is the stacking message, and executing S202-S203; if the packet stacking header is not included, it is determined that the message to be processed is a non-stacked message, and S204-S205 are performed.
S202, if the message type of the message to be processed is the stack message, the business header and the stack header are unpacked for the message to be processed.
When the message type of the message to be processed is a stacked message, firstly, de-packaging the service header of the message to be processed, removing the service header to obtain the message to be processed without the service header, then de-packaging the message to be processed without the service header, and removing the stacked header to obtain the message to be processed without the service header and the stacked header.
S203, determining the port according to the stacking information in the stacking head of the message to be processed.
In this embodiment, the stacking information may be specifically understood as information related to stacking equipment, stacking system, and the like, where the stacking information at least includes information related to a destination or an egress port of the packet. Analyzing the message to be processed, determining the stacking information stored in the stacking head, determining the destination of the message transmission according to the stacking information, and determining the corresponding outlet port according to the destination, or directly analyzing the stacking information to obtain the outlet port.
S204, 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.
In this embodiment, service message information may be specifically understood as information related to service forwarding in a 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 the information stored in the service message header.
S205, determining the port according to the service message information and combining with a predetermined service table.
The service table in the embodiment of the application stores the service message information and the information of the corresponding outlet port, and realizes service forwarding through the service table. After the service message information is determined, the service table is inquired through the service message information, and the outlet port corresponding to the service message information is determined.
S206, judging whether the equipment corresponding to the port is stacking equipment, if so, executing S207; otherwise, S208 is performed.
S207, judging whether the message to be processed contains stacked packages, if so, executing S208; otherwise, S209 is performed.
S208, sending the message to be processed according to the output port.
When the equipment corresponding to the output port is non-stacking equipment, the message to be processed is directly sent according to the output port, so that data processing is completed, and transmission of the non-stacking message on the stacking equipment is not affected. When the equipment corresponding to the output port is non-stacked equipment and the message to be processed does not contain stacked package, the message to be processed is directly sent according to the output port, and data processing is completed.
S209, determining stacking head information and a 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, a service channel may be understood as a channel for performing network communication between devices, where the service channel for communication between devices is predetermined. The target message may be specifically understood as a message obtained after stacking and packaging the message to be processed.
Specifically, when the device corresponding to the output port is a stacking device and the message to be processed does not include stacking encapsulation, the message to be processed is encapsulated in the following manner. And determining the destination device to which the message is to be sent according to the output port, and determining corresponding stacking head information according to the stacking device when the device corresponding to the output port is the stacking device and the destination device to which the message is to be sent is the stacking device, for example, taking the identifier of the stacking device as the stacking head information. And carrying out stack head encapsulation on the message to be processed according to the stack head information to obtain an encapsulated target message, and completing stack encapsulation. And determining the destination equipment to which the message is transmitted according to the output port, and determining the service channel between the equipment and the equipment corresponding to the output port according to the predetermined service channel between the equipment.
S210, determining service header information according to the service channel, and carrying out service header encapsulation on the target message according to the service header information to obtain an encapsulated message after encapsulation.
Different traffic channels may exist differently when forming the traffic header information. After the service channel is determined, information of the local equipment or the target equipment is acquired according to the type of the service channel, so as to form service header information. And carrying out service header encapsulation on the target message, writing the service header information into the service header to form an encapsulated message after encapsulation, and completing service encapsulation. And the service encapsulation is carried out on the stacked messages, so that the function of forwarding the stacked messages according to the service is realized.
Different types of service channels encapsulate different service heads when service encapsulation is performed. The common two-layer L2 network can encapsulate the L2 header, the Internet protocol IP network can encapsulate the IP header, the multiprotocol label switching MPLS network can encapsulate the MPLS header, etc., the IP header can be encapsulated and decapsulated by the switching chip, and if the switching chip is not supported, the IP header can also be encapsulated and decapsulated by the FPGA, etc.
As an optional embodiment of the present embodiment, the present optional embodiment further optimizes determining the service header information according to the service channel as: when the service channel is an internet protocol network or a multiprotocol 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. IP network) or a multiprotocol label switching network (i.e. MPLS network), the physical address of the local machine is determined, the physical address of the local machine is used as a source physical address and a destination physical address in the service header information, and the source physical address and the destination physical address are written into the service header to complete service encapsulation. Other types of information may also be included in the traffic header information.
Illustratively, the process of determining the service header information is described using the service channel as an internet protocol network. The following MAC address 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 is connected to the device R2 through an IP network, and the IP address IP1 on the device R1 and the IP address IP2 on the device R2 are reachable through routing. When the device R1 is used as a local device and the device R2 is used as a device corresponding to the outlet end, an IP header can be added outside the stacking header of the devices R1 and R2, the IP header information (service header information) added outside the stacking header of the devices R1 and R2 is the source IP address IP1, the destination IP address IP2, and both the source MAC and the destination MAC are MAC1. When the device R2 is used as a local device and the device R1 is used as a device corresponding to the outlet end, the source IP address in the added IP header information from the device R2 to the device R1 is IP2, the destination IP address is IP1, and both the source MAC and the destination MAC are MAC2. And after the service header encapsulation is finished according to the service header information, obtaining an encapsulated message, re-entering the service processing in the entering direction, namely determining an outlet port of the encapsulated message according to the service table, and sending the message according to the outlet port. Because the destination MAC in the service header information of the service header is the local route MAC, the service header information enters an IP route table (namely a service table) to be searched, and is forwarded according to the IP route table. Therefore, the stacked message is sent through the service table, and the multiplexing service channel realizes the cross-network stacking.
By way of example, the procedure for determining the header information will be described using a service channel as an example of a multiprotocol label switching network. The routing physical address (MAC address) of the device R1 is MAC1, and the routing MAC address of the device R2 is MAC2. The device R1 and the device R2 are connected to a link through an MPLS network, fig. 3 is a schematic diagram of link reachability between devices provided in an embodiment of the present application, when the device 31 communicates with the device 32, a message is sent from the device 31 to the device 34, sent from the device 34 to the device 33, and forwarded to the device 32 through the device 34, where the link between the devices is 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 outlet end, an MPLS header can be added outside a stacking header of the device 31 to the device 32, and both a source MAC and a target MAC in MPLS header information (namely service header information) are MAC1 and MPLS LABLE is 100; when the device 32 is used as a local device and the device 31 is used as a device corresponding to an outlet end, both a source MAC and a destination MAC in MPLS header information added from the device 31 to the device 32 are MAC2, and MPLS LABLE is 600. And after the service header encapsulation is finished according to the service header information, obtaining an encapsulated message, re-entering the service processing in the entering direction, namely determining an outlet port of the encapsulated message according to the service table, and sending the message according to the outlet port. Because the destination MAC in the service header information of the service header is the local route MAC, the service header information enters an MPLS table (namely a service table) to search and is forwarded according to the MPLS route table.
When the service channel is a two-layer network, determining a virtual local area network port between the local and the equipment corresponding to the outlet 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 a physical address.
Illustratively, the process of determining the service header information is described using a service channel as a two-layer network. The bridge MAC address of the device R1 is MAC1, the 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 communication forwarding, a two-layer header can be added outside a stacking header of the device R1 to the device R2, the device R1 is taken as a local device, when the device R2 is taken as a device corresponding to an outlet end, the source MAC is MAC1, the destination MAC is MAC2 and the VLAN is 100 in L2 header information (service header information) added outside a stacking message header of the device R1 to the device R2; when the device R1 is used as a local device and the device R2 is used as a device corresponding to the outlet end, the source MAC in the L2 header added from the device R2 to the device R1 is MAC1, the destination MAC is MAC2, and the VLAN is 100. And after the service header encapsulation is finished according to the service header information, obtaining an encapsulated message, re-entering the service processing in the entering direction, namely determining an outlet port of the encapsulated message according to the service table, and sending the message according to the outlet port. Forwarding is performed by looking up a MAC table (traffic table) within VLAN 100.
S211, determining target service message information according to the encapsulation message.
In this embodiment, the target service packet information may be specifically understood as related information used for forwarding the service in the encapsulation packet. And analyzing the encapsulation message to determine target service message information stored in a service header of the encapsulation message.
S212, determining the port according to the target service message information and combining with a predetermined service table.
And searching the service table according to the target service message information, determining an output port corresponding to the target service message information, and further executing the message sending according to the output port.
S213, taking the encapsulated message as a new message to be processed, and returning to execute S206.
The embodiment of the application provides a stacked data processing method, which solves the problem that a stacking device needs to designate a fixed stacking port when processing stacked messages, determines a port according to the to-be-processed messages when receiving the to-be-processed messages, judges whether the device corresponding to the port is the stacking device or not, if so, judges whether the to-be-processed messages contain stacked packages, directly sends the to-be-processed messages containing the stacked packages, stacks and packages the to-be-processed messages without the stacked packages to obtain packaged messages, wherein the packaged messages contain stacking heads and business heads, and searches an outlet port of the packaged messages according to a business table, thereby realizing forwarding of the stacked type messages through the business channel. 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 affected.
Example III
Fig. 4 is a schematic structural diagram of a stacked data processing apparatus according to a third embodiment of the present application. As shown in fig. 4, the apparatus includes: a message receiving module 41, a first message sending module 42 and a message encapsulating module 43.
The message receiving module 41 is configured to receive a message to be processed, and determine a 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 output port if the device corresponding to the output port is a stacking device and the to-be-processed message includes a stacking package;
and the message packaging module 43 is configured to, if the device corresponding to the output port is a stacking device and the message to be processed does not include stacking packaging, stack and service package the message to be processed to obtain a packaged message, determine the output port corresponding to the packaged message according to a predetermined service table, and use the packaged message as a new message to be processed, and execute sending of the new message to be processed again according to the output port of the new message to be processed.
The embodiment of the application provides a stacked data processing device, which solves the problem that a stacking device needs to designate a fixed stacking port when processing stacked messages, determines a port according to the to-be-processed messages when receiving the to-be-processed messages, judges whether the device corresponding to the port is the stacking device or not, if so, judges whether the to-be-processed messages contain stacked packages, directly sends the to-be-processed messages containing the stacked packages, stacks and packages the to-be-processed messages without the stacked packages to obtain packaged messages, wherein the packaged messages contain stacking heads and business heads, and searches the outlet port of the packaged messages according to a business table, thereby realizing the forwarding of the stacked type messages through a business channel.
Optionally, the message receiving module 41 includes:
the decapsulation unit is used for decapsulating the service header and the stacking header of the message to be processed if the message type of the message to be processed is a stacking message;
and the first outlet port determining unit is used for determining the port according to the stacking information in the stacking head of the message to be processed.
Optionally, the message receiving module 41 includes:
the service message determining unit is used for determining service message information according to the message to be processed if the message type of the message to be processed is a non-stack message;
and the second outlet port determining unit is used for determining the port according to the service message information and combining a predetermined service table.
Optionally, the packet encapsulation module 43 includes:
the stacking and packaging unit is used for determining stacking head information and a service channel according to the 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 the service encapsulation unit is used for determining service header information according to the service channel, and encapsulating the service header of the target message according to the service header information to obtain an encapsulated message after encapsulation.
Optionally, the service encapsulation unit is specifically configured to determine, when the service channel is an internet protocol network or a multiprotocol 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:
the target message determining unit is used for determining target service message information according to the encapsulation message;
and the service table query unit is used for determining a port according to the target service message information and combining 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 equipment corresponding to the output port is non-stacked equipment.
The stacked data processing device provided by the embodiment of the application can execute the stacked data processing method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 5 shows a schematic diagram of an electronic device 50 that may be used to implement an embodiment of the application. 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. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, 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 applications described and/or claimed herein. The electronic device in this embodiment may be used as a stacking device.
As shown in fig. 5, the electronic device 50 includes at least one processor 51, and a memory, such as a Read Only Memory (ROM) 52, a Random Access Memory (RAM) 53, etc., communicatively connected to the at least one processor 51, in which the memory stores a computer program executable by the at least one processor, and the processor 51 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 52 or the computer program loaded from the storage unit 58 into the Random Access Memory (RAM) 53. In the RAM 53, various programs and data required for the operation of the electronic device 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.
Various components in the electronic device 50 are connected to the I/O interface 55, including: an input unit 56 such as a keyboard, a mouse, etc.; 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 telecommunications networks.
The processor 51 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 51 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 51 performs the various methods and processes described above, such as the stacked data processing method.
In some embodiments, the stacked data processing method may be implemented as a computer program tangibly embodied on 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 a computer program is loaded into RAM 53 and executed by 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 in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On 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, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present application 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 implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present application, 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. The 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) through 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 may 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 input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background 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 background, 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. The client and server are typically 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 hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present application are achieved, and the present application is not limited herein.
The above embodiments do not limit the scope of the present application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of the present application.

Claims (8)

1. A stacked data processing method, applied to a stacking apparatus, comprising:
receiving a message to be processed, and determining a port according to the message to be processed;
the determining the port according to the message to be processed comprises the following steps:
if the message type of the message to be processed is a stack message, the message to be processed is unpacked by a service header and a stack header;
determining a port according to the stacking information in the stacking head of the message to be processed;
the determining the port according to the message to be processed comprises the following steps:
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;
determining a port according to the service message information and a predetermined service table;
the service table is a data table for storing service forwarding logic;
if the equipment corresponding to the output port is stacking equipment and the message to be processed contains stacking packaging, sending the message to be processed according to the output port;
if the equipment corresponding to the output port is stacking equipment 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, determining the output port corresponding to the encapsulation message according to a predetermined service table, taking the encapsulation message as a new message to be processed, and sending the new message to be processed again according to the output port of the new message to be processed;
and the step of sending the new message to be processed again according to the output port of the new message to be processed comprises the following steps: and judging whether the device corresponding to the port is a stacking device or not again.
2. The method of claim 1, wherein the stacking and service encapsulation of the message to be processed to obtain an encapsulated message includes:
determining stacking head information and a service channel according to an 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;
and determining service header information according to the service channel, and carrying out service header encapsulation on the target message according to the service header information to obtain an encapsulated message after encapsulation.
3. The method of claim 2, wherein said determining service header information from said service channel comprises:
when the service channel is an internet protocol network or a multiprotocol 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.
4. The method of claim 1, wherein the determining, according to a predetermined service table, the egress port corresponding to the encapsulated packet includes:
determining target service message information according to the encapsulation message;
the target service message information is related information used for forwarding the service in the encapsulation message;
and determining a port according to the target service message information and combining a predetermined service table.
5. The method of any one of claims 1-4, further comprising:
and if the equipment corresponding to the output port is non-stacked equipment, sending the message to be processed according to the output port.
6. A stacked data processing apparatus, characterized by being applied to a stacking device, comprising:
the message receiving module is used for receiving a message to be processed and determining a port according to the message to be processed;
the message receiving module comprises:
the decapsulation unit is used for decapsulating the service header and the stacking header of the message to be processed if the message type of the message to be processed is a stacking message;
the first outlet port determining unit is used for determining a port according to the stacking information in the stacking head of the message to be processed;
the message receiving module comprises:
the service message determining unit is used for determining service message information according to the message to be processed if the message type of the message to be processed is a non-stack message;
the second outlet port determining unit is used for determining a port according to the service message information and combining a predetermined service table;
the service table is a data table for storing service forwarding logic;
the first message sending module is used for sending the message to be processed according to the output port if the equipment corresponding to the output port is stacking equipment and the message to be processed contains stacking packaging;
the message packaging module is used for carrying out stacking and service packaging on the message to be processed to obtain a packaged message if the equipment corresponding to the output port is stacking equipment and the message to be processed does not contain stacking packaging, determining the output port corresponding to the packaged message according to a predetermined service table, taking the packaged message as a new message to be processed, and carrying out sending on the new message to be processed again according to the output port of the new message to be processed;
and the step of sending the new message to be processed again according to the output port of the new message to be processed comprises the following steps: and judging whether the device corresponding to the port is a stacking device or not again.
7. An electronic device, characterized by, as a stacked device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the stacked data processing method of any one of claims 1-5.
8. A computer readable storage medium storing computer instructions for causing a processor to perform the stacked data processing method of any one of claims 1-5.
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 CN115086251A (en) 2022-09-20
CN115086251B true 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
CN115086251A (en) 2022-09-20

Similar Documents

Publication Publication Date Title
US10541913B2 (en) Table entry in software defined network
CN106998286B (en) VX L AN message forwarding method and device
CN113746717B (en) Network equipment communication method and network equipment communication device
CN112787913B (en) Intelligent network card assembly, physical machine, cloud service system and message sending method
CN102857414A (en) Forwarding table writing method and device and message forwarding method and device
CN113746749A (en) Network connection device
CN109617803A (en) A kind of forwarding-table item generation method, device and equipment
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
CN114615179A (en) Message transmission method, device and system
CN108512737B (en) Data center IP layer interconnection method and SDN controller
CN115086251B (en) Stacked data processing method and device, electronic equipment and storage medium
CN112019492B (en) Access control method, device and storage medium
CN116303171A (en) Data interaction method and device between servers, electronic equipment and medium
CN115190087B (en) Data transmission method, device, equipment and medium based on two-layer intermediate equipment
CN114978808B (en) Data forwarding method and device, electronic equipment and storage medium
CN112866107B (en) IP address notification method, traffic guidance method and network equipment
CN111010344B (en) Message forwarding method and device, electronic equipment and machine-readable storage medium
CN112543142B (en) Method and device for realizing RSTP ring network protocol based on FPGA
CN109005120B (en) Message processing method and network equipment
CN114938331B (en) Single-physical-port multi-network access method and device under container scene, storage medium and electronic equipment
CN113497755A (en) Data forwarding method, system and equipment
CN112887201A (en) VRRP (virtual router redundancy protocol) -based interface updating method and device and storage medium

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