Message processing method and device, electronic equipment and readable storage medium
By receiving and identifying congestion signal tags in network switches and performing replacement processing, the application problem of CSIG protocol in switches is solved, the simple and low-cost implementation of functions and the independence of business logic is achieved, and network status monitoring and adjustment are improved. efficiency.
Patent Information
- Application Number
- CN202411446090.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-01-14
AI Technical Summary
As a newly emerging network protocol, the CSIG protocol has not been widely used and specifically implemented, and it is difficult to effectively utilize its functions in network switches without affecting other business logic.
By receiving and recognizing the congested signal tag, it is determined whether the tag needs to be deleted, and replace it based on the signal information and network switch device information to realize the CSIG protocol's functions are simple and low-cost, and does not affect other business logic.
It realizes the simple and low-cost implementation of the functions of the CSIG protocol on network switches, makes full use of the switch’s existing functional modules to avoid the impact on other business logic, and improves the efficiency of network status monitoring and adjustment.
Smart Images

Figure CN119316355A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of message processing, and in particular to a message processing method, device, electronic device and readable storage medium. Background Art
[0002] CSIG (Congestion Signaling) technology is designed to locate bottleneck devices with low bandwidth or high latency in the network topology and quantify bandwidth or latency with a unified granularity, helping network administrators understand the bottleneck of the entire network.
[0003] Google CSIG (Congestion Signaling) is an in-band network telemetry protocol for network congestion control, traffic management, and network debugging. Compared with traditional end-to-end signals, CSIG's end-to-end mechanism can deliver signals through a fixed-size message header, similar to explicit congestion notification (ECN), which is simple, practical, and easy to deploy. The protocol provides an efficient management mechanism for applications in data centers that are sensitive to network latency and bandwidth (such as AI / ML / HPC workloads and RDMA-based applications) under highly dynamic network traffic patterns.
[0004] Google CSIG is simple, low-overhead, and scalable: CSIG uses a packet header mechanism to obtain fixed-length summary information from bottleneck devices on the network path in a low-overhead manner. In-band network telemetry: CSIG is located at the L2 layer and collects information between network devices on the path by comparison and replacement through the CSIG-TAG congestion signal tag field. Real-time feedback: The receiver can feed back this information to the sender through the CSIG reflection message header above the L4 layer to achieve real-time network status monitoring and adjustment. Scalability: CSIG has been expanded on the basis of previous work (such as switch in-band network telemetry INT), incorporating multi-bit signals into multiple data packets, improving its breadth and flexibility of application.
[0005] Currently, CSIG, as a newly emerged network protocol, has not been widely used or implemented. Summary of the invention
[0006] The object of the present invention is to provide a message processing method, device, electronic device and readable storage medium, which can realize the functions of the CSIG protocol simply and at a low cost, can make full use of the existing functional modules of the switch, and will not affect other business logics.
[0007] In order to achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0008] In a first aspect, an embodiment of the present application provides a message processing method, which is applied to a network switch, and the method includes:
[0009] Receiving a forwarded message and identifying a congestion signal label of the forwarded message;
[0010] Determining whether it is necessary to delete the congestion signal label based on the forwarded message;
[0011] determining signal information in the congestion signal label without deleting the congestion signal label;
[0012] Replacing the label information of the congestion signal label based on the signal information and the device information of the network switch;
[0013] The replaced forwarding message is forwarded.
[0014] In an optional embodiment, the method further comprises:
[0015] Determine the tpid value in the congestion signal label;
[0016] Determining a preset tpid value of the network switch;
[0017] Compare the tpid value with the preset tpid value;
[0018] When the tpid value is inconsistent with the preset tpid value, determining that the congestion signal label is illegal;
[0019] When the tpid value is consistent with the preset tpid value, it is determined that the congestion signal label is legal.
[0020] In an optional embodiment, the method further comprises:
[0021] When the congestion signal label is illegal, the congestion signal label is deleted from the forwarding message.
[0022] In an optional implementation manner, the step of determining whether it is necessary to delete the congestion signal label based on the forwarded message includes:
[0023] Determining an egress port for forwarding the message;
[0024] Determining whether the opposite end device corresponding to the egress port supports a congestion signal label;
[0025] When the egress port does not support the congestion signal label, the congestion signal label is deleted from the forwarding message.
[0026] In an optional implementation, the signal information includes a first available bandwidth or a first available bandwidth rate, the device information of the network switch includes a second available bandwidth or a second available bandwidth rate, and the step of replacing the label information of the congestion signal label based on the signal information and the device information of the network switch includes:
[0027] comparing the first available bandwidth information with the second available bandwidth information;
[0028] When the second available bandwidth information is less than the first available bandwidth information, replacing the congestion signal tag with the device information of the network switch;
[0029] or;
[0030] comparing the first available bandwidth rate information with the second available bandwidth rate information;
[0031] When the second available bandwidth rate information is less than the first available bandwidth rate information, the congestion signal tag is replaced with the device information of the network switch.
[0032] In an optional implementation, the signal information includes first per-hop delay information, the device information of the network switch includes second per-hop delay information, and the step of replacing the label information of the congestion signal label based on the signal information and the device information of the network switch includes:
[0033] comparing the first per-hop delay information with the second per-hop delay information;
[0034] When the second per-hop delay information is greater than the first per-hop delay information, the congestion signal label is replaced with the device information of the network switch.
[0035] In an optional embodiment, the method further comprises:
[0036] Determine the resource occupancy value of the channel corresponding to the outlet of the network switch;
[0037] Determine parameter information of a configuration file for port configuration of the network switch;
[0038] Based on the resource occupancy value of the port and the parameter information of the configuration file, the second available bandwidth information or the second available bandwidth rate information of the network switch is calculated by using an exponentially weighted moving average algorithm.
[0039] In a second aspect, an embodiment of the present application provides a message processing device, which is applied to a network switch, and the device includes:
[0040] A receiving module, used for receiving a forwarding message and identifying a congestion signal label of the forwarding message;
[0041] A determination module, configured to determine whether the congestion signal label needs to be deleted based on the forwarded message; if the congestion signal label does not need to be deleted, determine the signal information in the congestion signal label;
[0042] A replacement module, configured to replace the label information of the congestion signal label based on the signal information and the device information of the network switch;
[0043] The forwarding module is used to forward the replaced forwarding message.
[0044] In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the message processing method when executing the computer program.
[0045] In a fourth aspect, an embodiment of the present application provides a readable storage medium having a computer program stored thereon, which implements the steps of the message processing method when executed by a processor.
[0046] This application has the following beneficial effects:
[0047] The present application receives a forwarded message and identifies a congestion signal label of the forwarded message, determines whether the congestion signal label needs to be deleted based on the forwarded message, determines the signal information in the congestion signal label when there is no need to delete the congestion signal label, replaces the label information of the congestion signal label based on the signal information and the device information of the network switch, and forwards the replaced forwarded message. The implementation of the CSIG protocol function is simple and low-cost, and the existing functional modules of the switch can be fully utilized without affecting other business logics. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0049] Figure 1 A block diagram of an electronic device provided by an embodiment of the present invention;
[0050] Figure 2 A schematic diagram of a business model provided by an embodiment of the present invention;
[0051] Figure 3 One of the flow charts of a message processing method provided by an embodiment of the present invention;
[0052] Figure 4 A second flow chart of a message processing method provided by an embodiment of the present invention;
[0053] Figure 5 A third flow chart of a message processing method provided by an embodiment of the present invention;
[0054] Figure 6 A fourth flowchart of a message processing method provided by an embodiment of the present invention;
[0055] Figure 7 A fifth flow chart of a message processing method provided by an embodiment of the present invention;
[0056] Figure 8 A sixth flow chart of a message processing method provided by an embodiment of the present invention;
[0057] Fig. 9 A seventh flowchart of a message processing method provided by an embodiment of the present invention;
[0058] Fig.10 A schematic diagram of the structure of a network switch provided by an embodiment of the present invention;
[0059] Fig.11 A schematic diagram of a bandwidth evaluation process provided by an embodiment of the present invention;
[0060] Fig.12 A structural block diagram of a message processing device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0062] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0063] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0064] In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. appear to indicate an orientation or position relationship, they are based on the orientation or position relationship shown in the accompanying drawings, or are the orientation or position relationship in which the product of the invention is usually placed when used. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0065] In addition, the terms “first”, “second”, etc., if used, are merely used to distinguish between the descriptions and should not be understood as indicating or implying relative importance.
[0066] In the description of this application, it should also be noted that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0067] After extensive research, the inventors found that CSIG, as a newly emerged network protocol, has not yet been widely used and implemented.
[0068] In view of the discovery of the above problems, the present embodiment provides a message processing method, device, electronic device and readable storage medium, which can receive a forwarded message and identify the congestion signal label of the forwarded message, determine whether the congestion signal label needs to be deleted based on the forwarded message, and determine the signal information in the congestion signal label without deleting the congestion signal label, replace the label information of the congestion signal label based on the signal information and the device information of the network switch, and forward the replaced forwarded message. The implementation of the CSIG protocol function is simple and low-cost, and the existing functional modules of the switch can be fully utilized without affecting other business logics. The solution provided by the present embodiment is described in detail below.
[0069] It should be noted that CSIG TAG, or congestion signal tag, represents a L2 protocol in which end nodes and transit devices participate. The congestion signal tag CSIG TAG is a fixed-size tag in the Layer 2 header of the network protocol.
[0070] The following shows the location of the congestion signal label CSIG TAG in various packet encapsulations. It is always the last label in the layer 2 header.
[0071] ARPA: dstmac / srcmac / csig-tag / ethertype / payload
[0072] 802.1q: dstmac / srcmac / vlan-tag / csig-tag / ethertype / payload
[0073] 802.1ad: dstmac / srcmac / vlan-tag / vlan-tag / csig-tag / ethertype / payload
[0074] 802.1ad tunnel: dstmac / srcmac / vlan-tag / vlan-tag / vlan-tag / vlan-tag / csig-tag / ethertype / payload
[0075] 802.1ae: dstmac / srcmac / security-tag / vlan-tag / csig-tag / ethertype / payload.
[0076] Therefore, the placement / offset of the congestion signal label CSIG-TAG is independent of the headers and payloads at layer 3 and above. Layer 2.5 headers, such as MPLS, are also placed after the congestion signal label CSIG-TAG and do not affect its offset.
[0077] This embodiment provides an electronic device that can process messages. In a possible implementation, the electronic device can be a user terminal, for example, the electronic device can be, but is not limited to, a network switch, a server, a smart phone, a personal computer (PC), a tablet computer, a personal digital assistant (PDA), a mobile Internet device (MID), and an image acquisition device.
[0078] Please refer to Figure 1 , Figure 1 1 is a schematic diagram of the structure of the electronic device 100 provided in the embodiment of the present application. The electronic device 100 may also include Figure 1 More or fewer components as shown, or with Figure 1The electronic device 100 comprises a message processing device 110 , a memory 120 and a processor 130 .
[0079] The memory 120 and the processor 130 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines. The message processing device 110 includes at least one software function module that can be stored in the memory 120 in the form of software or firmware or solidified in the operating system (OS) of the electronic device 100. The processor 130 is used to execute the executable modules stored in the memory 120, such as the software function modules and computer programs included in the message processing device 110.
[0080] The memory 120 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc. The memory 120 is used to store a program, and the processor 130 executes the program after receiving an execution instruction.
[0081] It is worth mentioning that Figure 1 The components shown can be implemented by hardware, software or a combination thereof. That is, the implementation of the processing flow in the above embodiments is not limited to the processor reading and running pure computer-readable program code from the memory, but can also be implemented by hardware or logic devices.
[0082] It should be understood here that improvements to a technology can be divided into hardware improvements (for example, improvements to circuit structures such as diodes, transistors, switches, etc.) and software improvements (improvements to method flows). However, with the development of technology, many improvements to method flows today can be regarded as direct improvements to hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement to a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user programming the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and make a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. Among them, VHDL (Very High Speed Integrated Circuit Hardware Description Language) and Verilog are currently the most commonly used. Those skilled in the art should also be aware that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0083] like Figure 2As shown, it is a schematic diagram of the business model of the present invention, which includes host A, host B, switch 1, switch 2...switch N.
[0084] Host A is used to send data traffic, add a congestion signal tag to the data message, and define the initial value. It runs the algorithm based on the received CSIG congestion signal and adjusts the sending strategy.
[0085] The switch is used to forward data traffic, and adopts the message processing method provided by the present invention, a "compare + replace" method to update the congestion signal information in the congestion signal label, and can select to strip the CSIG-TAG header based on the egress port or ALC.
[0086] Host B sends back the ACK message, converts the congestion signal label into CSIG-REFLECTION, and adds CSIG-REFLECTION to the ACK message.
[0087] The data message sent by host A includes ETH, CSIG-TAG, IP, TCP / UDP, and Payload. The data message sent by host B includes ETH, IP, TCP / UDP, CSIG-Reflection, and Payload.
[0088] Please refer to Figure 3 , Figure 3 For application Figure 1 A flowchart of a message processing method of an electronic device 100 is shown, and the method including each step is described in detail below.
[0089] S201: Receive a forwarded message and identify a congestion signal label of the forwarded message.
[0090] The network switch receives the forwarded message, parses the forwarded message, and identifies CSIG-TAG, i.e., the congestion signal tag, from the parsed forwarded message. The congestion signal tag CSIG-TAG is an L2 protocol in which end nodes and transit devices participate. The transit device is the network switch. CSIG-TAG is a fixed-size label in the Layer 2 message header of the network protocol. Therefore, the network switch can identify the congestion signal information in the received forwarded message.
[0091] S202: Determine whether it is necessary to delete the congestion signal label based on the forwarded message.
[0092] After identifying the congestion signal label in the forwarded message, the flow feature is matched and the unauthorized congestion signal label CSIG-TAG message is marked for header stripping. If it is detected that the congestion signal label CSIG-TAG of the forwarded message is in the authorized state, the congestion signal label CSIG-TAG is not marked for header stripping.
[0093] If the unauthorized congestion signal label CSIG-TAG message is marked as stripping, it means that the congestion signal label CSIG-TAG in the forwarded message needs to be deleted. If the congestion signal label CSIG-TAG is not marked as stripping, it means that the congestion signal label CSIG-TAG in the forwarded message does not need to be deleted.
[0094] S203: Determine the signal information in the congestion signal label without deleting the congestion signal label.
[0095] S204: Replace the label information of the congestion signal label based on the signal information and the device information of the network switch.
[0096] The device information in the current network switch is compared with the signal information in the parsed congestion signal tag CSIG-TAG. If the device information in the current network switch is closer to the congestion bottleneck, the signal information in the congestion signal tag CSIG-TAG is replaced with the device information in the current network switch.
[0097] S205: Forward the replaced forwarding message.
[0098] This application also needs to detect the legitimacy of the congestion signal label of the forwarded message, such as Figure 4 As shown, the following steps are included:
[0099] S301: Determine the tpid value in the congestion signal label.
[0100] S302: Determine a preset tpid value of the network switch.
[0101] S303: Compare the tpid value with a preset tpid value.
[0102] S304: When the tpid value is inconsistent with the preset tpid value, it is determined that the congestion signal label is illegal.
[0103] S305: When the tpid value is consistent with the preset tpid value, it is determined that the congestion signal label is legal.
[0104] It should be noted that step 304 and step 305 are parallel steps and are executed in no particular order.
[0105] Exemplarily, different network switches are set with different preset tpid values, and the preset tpid value of the network switch is compared with the tpid value in the congestion signal label of the forwarded message. When the preset tpid value set by the current network switch is value A and the tpid value in the congestion signal label is value B, it is determined that the preset tpid value in the current network switch is inconsistent with the tpid value in the congestion signal label, and then the congestion signal label of the forwarded message is determined to be illegal. When the congestion signal label of the forwarded message is illegal, it is necessary to mark the congestion signal label of the forwarded message with a deletion mark. In the subsequent message processing process, when it is detected that the congestion signal label of the forwarded message has a deletion mark, the congestion signal label in the forwarded message needs to be deleted.
[0106] When the preset tpid value set in the current network switch is A value, and the tpid value in the congestion signal label is A value, it is determined that the preset tpid value in the current network switch is consistent with the tpid value in the congestion signal label, then the congestion signal label of the forwarded message is determined to be legal, and there is no need to mark the congestion signal label of the forwarded message for deletion.
[0107] There are multiple implementations for determining whether to delete the congestion signal label based on the forwarded message. In one implementation, for example Figure 5 As shown, the following steps are included:
[0108] S401: Determine an egress port for forwarding a message.
[0109] S402: Determine whether the opposite end device corresponding to the outbound port supports a congestion signal label.
[0110] S403: When the egress port does not support the congestion signal label, the congestion signal label is deleted from the forwarded message.
[0111] In another implementation method based on whether the congestion signal label needs to be deleted for the forwarded message, the tpid value in the congestion signal label is determined, the preset tpid value of the network switch is determined, and the tpid value is compared with the preset tpid value. When the tpid value is inconsistent with the preset tpid value, the congestion signal label is determined to be illegal. When the tpid value is consistent with the preset tpid value, the congestion signal label is determined to be legal. When the congestion signal label is illegal, the congestion signal label is marked for deletion. In the subsequent message processing process, if it is detected that the congestion signal label of the forwarded message has a deletion mark, the congestion signal label in the forwarded message needs to be deleted. When the congestion signal label is legal, there is no need to mark the congestion signal label for deletion.
[0112] There are many implementations for replacing the label information of the congestion signal label based on the signal information and the device information of the network switch. In one implementation, Figure 6As shown, the following steps are included:
[0113] The signal information includes first available bandwidth information or first available bandwidth rate information, and the device information of the network switch includes second available bandwidth information or second available bandwidth rate information.
[0114] When the signal information includes the first available bandwidth information and the device information of the network switch includes the second available bandwidth information, the label information of the congestion signal label is replaced in the following manner.
[0115] S501: Compare the first available bandwidth information with the second available bandwidth information.
[0116] S502: When the second available bandwidth information is less than the first available bandwidth information, replace the congestion signal tag with the device information of the network switch.
[0117] When the signal information includes the first available bandwidth rate information and the device information of the network switch includes the second available bandwidth rate information, such as Figure 7 As shown, the label information of the congestion signal label is replaced in the following manner.
[0118] S503: Compare the first available bandwidth ratio information with the second available bandwidth ratio information.
[0119] S504: When the second available bandwidth rate information is less than the first available bandwidth rate information, replace the congestion signal label with the device information of the network switch.
[0120] The Congestion Signal Label CSIG-TAG has two variants: compact and extended. Each variant has a dedicated TPID code point that enables devices to infer which variant is being used. Each variant supports different requirements relevant to production deployments and identifies contrasting trade-offs in the solution space.
[0121] The calculated available bandwidth or available bandwidth rate values must be compressed to fit into the available signal value bits on the congestion signal tag CSIG-TAG. Network switches must support 32 fully configurable available bandwidth buckets and available bandwidth rate buckets for compact CSIG and configurable quantization factors for uniform quantization in extended CSIG. All devices on the packet path must use the same bucket / quantization factor to correctly calculate the available bandwidth or available bandwidth rate along the path.
[0122] In another implementation method of replacing the label information of the congestion signal label based on the signal information and the device information of the network switch, such as Figure 8 As shown, the following steps are included:
[0123] The signal information includes first per-hop delay information, and the device information of the network switch includes second per-hop delay information.
[0124] S601: Compare the first per-hop delay information with the second per-hop delay information.
[0125] S602: When the second per-hop delay information is greater than the first per-hop delay information, the congestion signal label is replaced with the device information of the network switch.
[0126] Per-hop latency is the time a packet spends in a device's pipeline. It may include link layer latency, or just latency observed in the forwarding pipeline.
[0127] Unlike available bandwidth and available bandwidth rate per port, per-hop latency is packet-granular. It includes the PHY, MAC, and switch pipeline delays experienced by the packet. Pipeline latency is the most relevant component as it captures the queuing delays associated with congestion. Network switch implementations may explicitly track inbound and outbound timestamps for each packet and perform differencing at the last stage of the pipeline. The exact definition of these stages depends on the architecture of the device. For example, some devices may leverage existing tail timestamp support for this purpose.
[0128] The network switch identifies the CSIG-TAG of the forwarding message in two formats at different stages and processes it accordingly. After all other business logics are processed, the hardware bandwidth is evaluated and compared with the signal information in the CSIG-TAG in the forwarding message to decide whether to replace the signal information in the CSIG-TAG in the forwarding message. When necessary, edit and replace, and finally send the replaced message. There is no impact on other business logic. Only a little logic needs to be added to the chip of the ordinary network switch, which greatly simplifies the implementation complexity of the CSIG function.
[0129] When the signal information is the second available bandwidth information or the second available bandwidth rate information of the network switch, before replacing the label information of the congestion signal label based on the signal information and the device information of the network switch, it is necessary to calculate the second available bandwidth information or the second available bandwidth rate information of the network switch, such as Fig. 9 As shown, the following steps are included:
[0130] S701: Determine a resource occupancy value of a channel corresponding to an egress of the network switch.
[0131] S702: Determine parameter information of a configuration file for port configuration of the network switch.
[0132] S703: Calculate the second available bandwidth information or the second available bandwidth rate information of the network switch based on the resource occupancy value of the channel and the parameter information of the configuration file by using an exponentially weighted moving average algorithm.
[0133] Based on the export resource management module of the EPE in the network switch, the channel occupancy and resource occupancy of the channel corresponding to the export are regularly updated to the status table item. It is read by the subsequent modules. The bandwidth evaluation module reads the status of the channel occupancy and resource occupancy as the input of the exponentially weighted moving average algorithm. According to the configuration file of the network switch port configuration (which configures different rate port evaluation parameters, such as configuring 15 thresholds and dividing into multiple levels), as another input of the exponentially weighted moving average algorithm, the second available bandwidth information or the second available bandwidth rate information of the network switch is calculated according to the exponentially weighted moving average algorithm.
[0134] The specific method for calculating the second available bandwidth information or the second available bandwidth rate information of the network switch may be: combining multiple historical second available bandwidth information by weighted summation to obtain the final second available bandwidth information, or combining multiple historical second available bandwidth rate information by weighted summation to obtain the final second available bandwidth rate information.
[0135] When calculating the second per-hop delay information of the network switch, the channel occupancy and resource occupancy corresponding to the outlet can be updated to the status table item based on the outlet resource management module of the EPE in the network switch. For subsequent modules to read. The bandwidth evaluation module reads the channel occupancy and resource occupancy status as the input of the exponentially weighted moving average algorithm. Based on the configuration file of the network switch port configuration (which configures different rate port evaluation parameters, such as configuring 15 thresholds and dividing them into multiple levels), as another input of the exponentially weighted moving average algorithm, the second per-hop delay information of the network switch is calculated according to the exponentially weighted moving average algorithm.
[0136] A specific method for calculating the second per-hop delay information of the network switch may be: a weighted sum may be performed on a plurality of historical second per-hop delay information to obtain the final second per-hop delay information.
[0137] like Fig.10 FIG. 1 is a schematic diagram of the structure of a network switch. In the figure, an IPE and an EPE are included. The IPE includes an IPM and a message parsing module, and the EPE includes a delay evaluation module, a bandwidth evaluation module, and a CSIG-TAG processing module.
[0138] The message parsing module is used to identify the congestion signal label of the forwarded message. The message parsing module sends the congestion signal label to the IPM, which matches the flow characteristics, determines the tpid value in the congestion signal label, determines the preset tpid value of the network switch, compares the tpid value with the preset tpid value, and when the tpid value is inconsistent with the preset tpid value, determines that the congestion signal label is illegal, and marks the congestion signal label of the message for deletion; when the tpid value is consistent with the preset tpid value, determines that the congestion signal label is legal. The forwarded message with the processing mark is stored in the buffer memory; determines whether the opposite end device corresponding to the output port supports the congestion signal label; when the output port does not support the congestion signal label, deletes the congestion signal label from the forwarded message.
[0139] The delay evaluation module is used to calculate the first per-hop delay information in the signal information in the congestion signal label and the second per-hop delay information of the network switch. The bandwidth evaluation module is used to determine the resource occupancy value of the channel corresponding to the outlet of the network switch; determine the parameter information of the configuration file of the port configuration of the network switch; based on the resource occupancy value of the port and the parameter information of the configuration file, calculate the second available bandwidth information or the second available bandwidth rate information of the network switch through the exponentially weighted moving average algorithm. The CSIG-TAG processing module is used to replace the label information of the congestion signal label based on the signal information and the device information of the network switch, and update the LM information at the same time.
[0140] like Fig.11 As shown in the figure, it is a schematic diagram of the bandwidth evaluation process. In the figure, the timing update module writes the current channel occupancy into the current channel resource occupancy table item according to the preset period for EWMA to read. The first table item is used to store the profileid and metricProfileid corresponding to the port. The first quantization module quantizes based on the profileid to obtain the channelsize quantization value. The second quantization module is used to calculate the channelsize historical quantization value within the preset time period, and the channelsize quantization value and the channelsize historical quantization value are subjected to the EWMA algorithm to obtain the quantization value. The load module is used to obtain the channelsize quantization value from the profileid. Fig.10 The EPE in obtains the average load, performs a comprehensive evaluation based on the average load, the quantized value, and the metricProfileid corresponding to the port, and obtains the final bandwidth evaluation quantized value, that is, the second available bandwidth information or the second available bandwidth rate information.
[0141] Please refer to Fig.12 The present application embodiment also provides a method for applying Figure 1 The message processing device 110 of the electronic device 100 includes:
[0142] The receiving module 111 is used to receive a forwarding message and identify a congestion signal label of the forwarding message;
[0143] A determination module 112, configured to determine whether the congestion signal label needs to be deleted based on the forwarded message; if the congestion signal label does not need to be deleted, determine the signal information in the congestion signal label;
[0144] A replacement module 113, configured to replace the label information of the congestion signal label based on the signal information and the device information of the network switch;
[0145] The forwarding module 114 is used to forward the replaced forwarding message.
[0146] The present application also provides an electronic device 100, which includes a processor 130 and a memory 120. The memory 120 stores computer executable instructions, and when the computer executable instructions are executed by the processor 130, the message processing method is implemented.
[0147] The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by the processor 130, the message processing method is implemented.
[0148] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0149] In addition, each functional module in each embodiment of the present application can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part. If the function is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk.
[0150] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0151] The above are only various implementations of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A message processing method, characterized in that: Applied to a network switch, the method comprises: Receiving a forwarded message and identifying a congestion signal label of the forwarded message; Determining whether it is necessary to delete the congestion signal label based on the forwarded message; determining signal information in the congestion signal label without deleting the congestion signal label; Replacing the label information of the congestion signal label based on the signal information and the device information of the network switch; The replaced forwarding message is forwarded.
2. The method according to claim 1, characterized in that The method further comprises: Determine the tpid value in the congestion signal label; Determining a preset tpid value of the network switch; Compare the tpid value with the preset tpid value; When the tpid value is inconsistent with the preset tpid value, determining that the congestion signal label is illegal; When the tpid value is consistent with the preset tpid value, it is determined that the congestion signal label is legal.
3. The method according to claim 2, characterized in that The method further comprises: When the congestion signal label is illegal, the congestion signal label is deleted from the forwarding message.
4. The method according to claim 1, characterized in that: The step of determining whether the congestion signal label needs to be deleted based on the forwarded message includes: Determining an egress port for forwarding the message; Determining whether the opposite end device corresponding to the egress port supports a congestion signal label; When the egress port does not support the congestion signal label, the congestion signal label is deleted from the forwarding message.
5. The method according to claim 1, characterized in that The signal information includes a first available bandwidth or a first available bandwidth rate, the device information of the network switch includes a second available bandwidth or a second available bandwidth rate, and the step of replacing the label information of the congestion signal label based on the signal information and the device information of the network switch includes: comparing the first available bandwidth information with the second available bandwidth information; When the second available bandwidth information is less than the first available bandwidth information, replacing the congestion signal tag with the device information of the network switch; or; comparing the first available bandwidth rate information with the second available bandwidth rate information; When the second available bandwidth rate information is less than the first available bandwidth rate information, the congestion signal tag is replaced with the device information of the network switch.
6. The method according to claim 1, characterized in that The signal information includes first per-hop delay information, the device information of the network switch includes second per-hop delay information, and the step of replacing the label information of the congestion signal label based on the signal information and the device information of the network switch includes: comparing the first per-hop delay information with the second per-hop delay information; When the second per-hop delay information is greater than the first per-hop delay information, the congestion signal label is replaced with the device information of the network switch.
7. The method according to claim 5, characterized in that The method further comprises: Determine the resource occupancy value of the channel corresponding to the outlet of the network switch; Determine parameter information of a configuration file for port configuration of the network switch; Based on the resource occupancy value of the port and the parameter information of the configuration file, the second available bandwidth information or the second available bandwidth rate information of the network switch is calculated by using an exponentially weighted moving average algorithm.
8. A message processing device, characterized in that: Applied to a network switch, the device comprises: A receiving module, used for receiving a forwarding message and identifying a congestion signal label of the forwarding message; A determination module, configured to determine whether the congestion signal label needs to be deleted based on the forwarded message; if the congestion signal label does not need to be deleted, determine the signal information in the congestion signal label; A replacement module, configured to replace the label information of the congestion signal label based on the signal information and the device information of the network switch; The forwarding module is used to forward the replaced forwarding message.
9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method according to any one of claims 1 to 7 when executing the computer program.
10. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.