Data processing method and apparatus, and network device

By parsing data packet characteristics and generating a load-balanced routing table, the problem of low data transmission efficiency in distributed training of large models is solved, achieving efficient data transmission forwarding and improved cluster performance.

WO2026066754A1PCT designated stage Publication Date: 2026-04-02CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD +1

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-08-12
Publication Date
2026-04-02

AI Technical Summary

Technical Problem

In large-scale distributed parallel training of models, data synchronization operations between GPU clusters lead to low data transmission efficiency of network devices, congestion of some links, and reduced computing power and performance of the entire GPU cluster.

Method used

By parsing the characteristics of data packets, a packet forwarding routing table in a load-balanced state is generated to determine the target data transmission port, ensuring load-balanced forwarding of data packets among multiple data transmission ports and avoiding transmission link congestion.

Benefits of technology

It improves data transmission efficiency, avoids transmission link congestion caused by uneven load on data transmission ports, and enhances the data processing performance of the entire cluster.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025114088_02042026_PF_FP_ABST
    Figure CN2025114088_02042026_PF_FP_ABST
Patent Text Reader

Abstract

A data processing method and apparatus, and a network device. The method is applied to a network device comprising a plurality of data transmission ports, and comprises: parsing an initial data packet transmitted by a data transmitting end, and determining a packet feature of the initial data packet; when the initial data packet is determined as a target data packet on the basis of the packet feature, determining a forwarding policy of the target data packet on the basis of the packet feature and a packet forwarding routing table, wherein the packet forwarding routing table is generated by means of load balancing states of the plurality of data transmission ports; and on the basis of the forwarding policy of the target data packet, determining a target data transmission port from among the plurality of data transmission ports, and using the target data transmission port to forward the target data packet to a data receiving end.
Need to check novelty before this filing date? Find Prior Art

Description

Data processing method and device, and network equipment Cross-reference to related applications

[0001] The present disclosure claims priority to Chinese Patent Application No. 202411364247.1, filed on September 27, 2024, the entire contents of which are incorporated herein by reference. TECHNICAL FIELD

[0002] Embodiments of the present disclosure relate to the technical field of computer, and in particular, to a data processing method and device, and network equipment. BACKGROUND

[0003] AI large model capability has become the basis for the future development of artificial intelligence. Large models have a strong demand for large-scale distributed parallel training. On the one hand, the model itself is very large, and is limited by the GPU memory, so it is necessary to split a large model into many GPUs for storage. On the other hand, because the model training of a large model needs to train more parameters, it also needs more computing power, so it needs to use a large-scale GPU cluster for distributed parallel acceleration training.

[0004] In the distributed parallel training of a large model, data synchronization needs to be frequently performed between multiple GPUs of a GPU cluster. The data synchronization operation between GPUs makes the performance of the entire GPU cluster depend on the slower network device that completes each step. Partial link congestion can cause long tail forwarding (fast and slow), reducing data transmission efficiency and thus reducing the computing power and performance of the entire GPU cluster. SUMMARY

[0005] In view of this, the embodiments of the present disclosure provide a data processing method. One or more embodiments of the present disclosure also relate to a network equipment, a data processing device, a computing device, a computer readable storage medium, and a computer program product, to solve the technical defects of low data transmission efficiency caused by unbalanced network load when data transmission is performed through a network equipment in the prior art.

[0006] According to a first aspect of the embodiments of the present disclosure, a data processing method is provided, including: parsing initial data packets sent by a data sending end to determine packet characteristics of the initial data packets; in a case where it is determined according to the packet characteristics that the initial data packets are target data packets, determining a forwarding strategy of the target data packets according to the packet characteristics and a packet forwarding routing table, wherein the packet forwarding routing table is generated by a load balancing state of the multiple data transmission ports; determining a target data transmission port from the multiple data transmission ports according to the forwarding strategy of the target data packets, and forwarding the target data packets to a data receiving end by using the target data transmission port.

[0007] According to a second aspect of the embodiments of the present disclosure, a data processing apparatus is provided, comprising: a parsing module configured to parse an initial data packet sent by a data sending end, and determine a packet feature of the initial data packet; a determining module configured to, in a case where the initial data packet is determined to be a target data packet according to the packet feature, determine a forwarding strategy of the target data packet according to the packet feature and a packet forwarding routing table, wherein the packet forwarding routing table is generated by a load balancing state of the plurality of data transmission ports; and a sending module configured to determine a target data transmission port from the plurality of data transmission ports according to the forwarding strategy of the target data packet, and forward the target data packet to a data receiving end by using the target data transmission port.

[0008] According to a third aspect of the embodiments of the present disclosure, a network device is provided, comprising a routing unit, a configuration unit and a monitoring unit, wherein the routing unit is configured to parse an initial data packet sent by a data sending end, and determine a packet feature of the initial data packet; in a case where the initial data packet is determined to be a target data packet according to the packet feature, determine a forwarding strategy of the target data packet according to the packet feature and a packet forwarding routing table, wherein the packet forwarding routing table is generated by a load balancing state of the plurality of data transmission ports; and determine a target data transmission port from the plurality of data transmission ports according to the forwarding strategy of the target data packet, and forward the target data packet to a data receiving end by using the target data transmission port; the configuration unit is configured to determine whether there is a target routing table entry corresponding to the packet feature in the routing configuration cache, if yes, add the target routing table entry in the routing configuration cache to the packet forwarding routing table in a case where a configuration event is triggered; if not, determine a target data transmission port by a load balancing state of the plurality of data transmission ports, generate the target routing table entry according to the packet feature and the target data transmission port, and cache the target routing table entry to the routing configuration cache, and add the target routing table entry in the routing configuration cache to the packet forwarding routing table in a case where a configuration event is triggered; and the monitoring unit is configured to monitor a load state of the network device and a load balancing state of the plurality of data transmission ports.

[0009] According to a fourth aspect of the embodiments of the present disclosure, a computing device is provided, comprising: a memory and a processor; the memory is configured to store computer programs / instructions, and the processor is configured to execute the computer programs / instructions, the computer programs / instructions, when executed by the processor, implement the steps of the above data processing method.

[0010] According to a fifth aspect of the embodiments of the present disclosure, a computer readable storage medium is provided, which stores computer programs / instructions, and the computer programs / instructions are executed by a processor to implement the steps of the above data processing method.

[0011] According to a sixth aspect of the embodiments of the present disclosure, a computer program product is provided, which comprises computer programs / instructions, and the computer programs / instructions are executed by a processor to implement the steps of the above data processing method.

[0012] The data processing method provided by one embodiment of the present disclosure can ensure that, when the target data packet is forwarded through the target data transmission port in the plurality of data transmission ports, the congestion of the transmission link caused by the unbalanced load of the data transmission port is avoided, and the data transmission efficiency is improved. BRIEF DESCRIPTION OF DRAWINGS

[0013] FIG. 1 is a schematic diagram of a scenario of a data processing method according to one embodiment of the present disclosure;

[0014] FIG. 2 is a flowchart of a data processing method applied to a network device according to one embodiment of the present disclosure;

[0015] FIG. 3 is a framework flowchart of a data processing method applied to a network device according to one embodiment of the present disclosure;

[0016] FIG. 4 is a structural schematic diagram of a data processing apparatus according to one embodiment of the present disclosure;

[0017] FIG. 5 is a structural block diagram of a network device according to one embodiment of the present disclosure;

[0018] FIG. 6 is a structural block diagram of a computing device according to one embodiment of the present disclosure. DETAILED DESCRIPTION

[0019] In the following description, a large number of specific details are set forth in order to facilitate a thorough understanding of the present disclosure. However, the present disclosure can be implemented in many different ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the present disclosure, so the present disclosure is not limited to the specific implementation disclosed below.

[0020] The terminology used in the one or more embodiments of the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the present disclosure. As used in the one or more embodiments of the present disclosure and the accompanying claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "and / or," as used in the one or more embodiments of the present disclosure, signify all possible combinations of one or more of the associated listed items.

[0021] It should be understood that although the terms first, second, etc. can be employed in the one or more embodiments of the present disclosure to describe various information, these information should not be limited to these terms. These terms are only used to differentiate one piece of information from another piece of information. For example, without departing from the scope of the one or more embodiments of the present disclosure, first can also be referred to as second, and similarly, second can also be referred to as first. Depending on the context, the word "if" as used herein can be interpreted to mean "when" or "in response to determining" or "in response to ascertaining".

[0022] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the one or more embodiments of the present disclosure are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of the relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation portal for the user to choose authorization or refusal.

[0023] First, the nomenclature involved in the one or more embodiments of the present disclosure is explained.

[0024] RDMA: Remote Direct Memory Access, remote direct access memory.

[0025] GPU: Graphics Processing Unit, a kind of electronic equipment that can perform mathematical calculation at high speed.

[0026] ECMP: Equal-cost Multi-path, a hop-by-hop flow-based load balancing strategy.

[0027] AI: Artificial Intelligence, artificial intelligence.

[0028] A routing entry, that is, a routing entry, is a record in the routing table of a network device (such as a router, a switch or a network interface on a computer), and the routing table is used to guide the transmission path of a data packet in a network.

[0029] AI training cluster can be divided into single task cluster and multi task cluster according to the number of users and the number of running tasks in the actual deployment of the cluster. The network traffic characteristics of single task cluster are as follows.

[0030] Feature 1: The number of data streams is small. The number of data streams established by the training task during running is very small, about dozens per network card, which is orders of magnitude difference compared with the traditional network with thousands of data streams.

[0031] Feature 2: The number of data streams is stable. As long as the training task establishes a connection (QP, Queue Pair) at the beginning, the subsequent training task will use the established connection, and there will be no frequent network connection release and new establishment.

[0032] Feature 3: The traffic has periodicity. The training task will perform parameter synchronization at the end of each training period, and continue training calculation after completing parameter synchronization. The cycle is repeated. Therefore, the AI training cluster network will periodically appear traffic peak (corresponding to data synchronization operation) and trough (corresponding to data calculation operation).

[0033] The main difference between multi task cluster and single task cluster is that the cluster will run multiple tasks at the same time, and the network traffic of multiple tasks will be superimposed and interact in the network. The start time and stop time of multiple tasks are also different, but the network traffic characteristics of each task in the cluster are still the same as those of the single task cluster.

[0034] Because of the small number of data streams in the above features, the traditional ECMP scheme is more likely to cause hash conflict. Because the network card does not frequently establish and release connections, the switch allocates data stream routes, and the whole cluster is in a stable state of load balancing for a long time. The routing allocation algorithm provided in the embodiment of the present disclosure considers the periodicity of traffic and allocates routes for data streams only during the trough period of data streams. The advantage of this is that it does not introduce out-of-order data stream packets, so that the load balancing algorithm does not depend on the network card's ordering function.

[0035] In the present disclosure, a data processing method is provided. The present disclosure also relates to a network device, a data processing apparatus, a computing device, a computer readable storage medium and a computer program product, which are described in detail in the following embodiments.

[0036] Referring to FIG. 1, FIG. 1 shows a scene schematic diagram of a data processing method according to an embodiment of the present disclosure.

[0037] Specifically, the data processing method is applied to a network device of a server. For example, when a server uses a GPU cluster to implement distributed parallel acceleration training of a large model, whether the parallel training method is data parallel or model parallel, there is a process of data transmission between GPUs in the GPU cluster. For example, as shown in FIG. 1, the GPU cluster includes eight GPUs, namely, GPU 101 to GPU 108. The GPUs can transmit data through network device 11 and network device 12.

[0038] In the case where GPU 101 sends a data packet to GPU 102 through network device 11, GPU 101 can be regarded as a data sending end, and GPU 102 can be regarded as a data receiving end. Network device 11 parses an initial data packet sent by the data sending end to determine the packet characteristics of the initial data packet. In the case where it is determined according to the packet characteristics that the initial data packet is a target data packet, a forwarding strategy of the target data packet is determined according to the packet characteristics and a packet forwarding routing table, wherein the packet forwarding routing table is generated by the load balancing state of the plurality of data transmission ports. According to the forwarding strategy of the target data packet, a target data transmission port is determined from the plurality of data transmission ports, and the target data packet is forwarded to the data receiving end by using the target data transmission port.

[0039] The server can be understood as a server providing various services, including a physical server, a cloud server, for example, a server providing communication services for multiple clients, for example, a server for background training supporting a model used on a client, for example, a server processing data sent by a client, and the like. It should be noted that the server can be implemented as a distributed server cluster composed of multiple servers, or as a single server. The server can also be a server of a distributed system, or a server combined with a blockchain. The server can also be a cloud server of a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, middleware service, domain name service, security service, content distribution network (CDN, Content Delivery Network), and big data and artificial intelligence platform, etc. basic cloud computing services, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.

[0040] The data processing method provided by one embodiment of the present disclosure can determine whether the initial data message is a target data message by analyzing the message characteristics of the initial data message of the data sending end, and in the case that the initial data message is a target data message, a forwarding strategy for the target data message is determined by using the message characteristics and a message forwarding routing table. In the case that the message forwarding routing table is generated according to the load balancing state of a plurality of data transmission ports, the loads of the plurality of data transmission ports are in a load balancing state. Thus, when the target data message is forwarded through a target data transmission port in the plurality of data transmission ports, the congestion of the transmission link caused by the unbalanced load of the data transmission port can be avoided, the data transmission efficiency can be improved, and in the data synchronization scenario, the plurality of data messages are forwarded according to the plurality of data transmission ports in the load balancing state, which can also effectively avoid the problem that the entire cluster has to wait for the network device with slower data transmission to complete data transmission before data processing, thereby reducing the data processing performance of the entire cluster.

[0041] Referring to FIG. 2, FIG. 2 shows a flowchart of a data processing method applied to a network device according to one embodiment of the present disclosure, which specifically includes the following steps.

[0042] Step 202: Analyze the initial data message sent by the data sending end to determine the message characteristics of the initial data message.

[0043] The data sending end can be understood as the end responsible for sending data in the communication process; the initial data message can be understood as the data message sent by the data sending end; and the message characteristics can be understood as specific attributes that can be identified in the data message, which are used to identify and classify data messages. These message characteristics can include the format of the message, the information type contained in the message, the five-tuple information of the message, and the like.

[0044] Specifically, the message characteristics of the initial data message are determined by analyzing and understanding the initial data message of the data sending end. For example, by analyzing the initial data message, it is determined that the message characteristics of the initial data message include a UDP message, a UDP destination port number of 4791, and an IP DSCP (a value set in the IP packet header, used to specify the quality of service of the data packet) field of 4.

[0045] Step 204: In the case that the initial data message is determined to be a target data message according to the message characteristics, a forwarding strategy for the target data message is determined according to the message characteristics and a message forwarding routing table, wherein the message forwarding routing table is generated according to the load balancing state of a plurality of data transmission ports.

[0046] The target data message can be understood as a specific data message determined according to the message characteristics, which is a message that needs to be specially processed or forwarded. The forwarding strategy can be understood as a set of rules determined to guide the transmission path and processing method of the data message in the network. The message forwarding routing table can be understood as a data structure containing routing information for forwarding data messages, usually including next hop address, port information, etc. The data transmission port can be understood as an interface on the network device for data transmission, which can be a physical port or a virtual port. The load balancing state can be understood as the load distribution of the network device when processing data traffic. The purpose of load balancing is to reasonably distribute traffic and avoid overload.

[0047] Specifically, after identifying the message characteristics of the initial data message, if the initial data message is determined to be a target data message, it is necessary to determine how to forward this data message according to the message characteristics and the message forwarding routing table, and the message forwarding routing table is generated according to the load balancing state of multiple data transmission ports, so that the data forwarding based on the message forwarding routing table considers the traffic distribution of the current network to ensure that the data message can be efficiently and reasonably forwarded.

[0048] In one or more embodiments of the present disclosure, the initial data message is classified according to the matching of the message characteristics of the initial data message and the preset message characteristics, and different processing methods are implemented for different types of initial data messages. The specific implementation is as follows: determining the initial data message as a target data message according to the message characteristics includes: matching the message characteristics of the initial data message with the preset message characteristics, and in the case of successful matching, determining the initial data message as the target data message.

[0049] The preset message characteristics can be configured according to actual conditions, such as the preset message characteristics being the RDMA protocol, i.e. the data message transmitted using the RDMA protocol can be determined through the preset message characteristics.

[0050] Specifically, by matching the characteristics with the preset message characteristics, the classification of the initial data message is realized, and the target data message is determined. In actual application, since the message characteristics of the data messages in a data stream are the same, by matching the characteristics of the initial data messages in the data stream, it can be determined whether the data stream is a target data stream, such as a data stream that needs to use RDMA operation. In network communication, in order to ensure the order and integrity of data, data messages from the same data stream are usually routed to the same forwarding path, which can reduce the transmission delay difference caused by different paths, ensure that data messages arrive at the destination in the order of sending, and avoid the disorder of message arrival order.

[0051] For the data packets that are not matched successfully, the packet forwarding is performed by using a default routing mode, such as using an initial data transmission port of a default routing entry for packet forwarding, or using ECMP as the default routing mode, which is not limited herein.

[0052] The data processing method provided by the embodiments of the present disclosure can quickly and accurately determine whether the initial data packet is the target data packet by using the preset packet feature, and can flexibly determine the target data packet meeting the requirement in the case that the preset packet feature can be set according to the actual situation.

[0053] In one or more embodiments of the present disclosure, the forwarding policy includes a first forwarding policy and a second forwarding policy, in the case that there is a target routing entry corresponding to the packet feature in the packet forwarding routing table, the packet is forwarded by using the first forwarding policy, and in the case that there is no target routing entry corresponding to the packet feature in the packet forwarding routing table, the packet is forwarded by using the second forwarding policy. The specific implementation is as follows: determining the forwarding policy of the target data packet according to the packet feature and the packet forwarding routing table includes: searching whether there is a target routing entry corresponding to the packet feature in the packet forwarding routing table according to the packet feature, if there is, determining the forwarding policy of the target data packet as the first forwarding policy, wherein the first forwarding policy is a policy of forwarding the target data packet according to the target routing entry in the packet forwarding routing table; if there is not, determining the forwarding policy of the target data packet as the second forwarding policy, wherein the second forwarding policy is a policy of forwarding the target data packet by an initial data transmission port determined according to a default forwarding mode, and the target routing entry is obtained from a routing configuration cache, and a policy of forwarding an associated data packet associated with the target data packet according to the target routing entry, the associated data packet is a data packet belonging to a same data flow as the target data packet, and the default forwarding mode is a mode of forwarding data packets by using a default routing entry or a mode of forwarding data packets by using ECMP.

[0054] Specifically, in the case that there is a packet forwarding routing table in the routing module, a target routing entry corresponding to a packet feature is searched in the packet forwarding routing table, if the target routing entry is found, the packet is directly forwarded by using port information in the target routing entry based on a first forwarding policy, if the target routing entry is not found, the packet is first forwarded according to a default routing mode (i.e. a default forwarding mode) based on a second forwarding policy, and a new flow notification event is sent to the configuration module, a target routing entry corresponding to the packet feature is obtained from a routing configuration cache of the configuration module, and an associated data packet associated with the target data packet is forwarded according to the target routing entry, wherein the associated data packet belongs to a same data flow as the target data packet.

[0055] Step 206: determining a target data transmission port from the plurality of data transmission ports according to the forwarding policy of the target data message, and forwarding the target data message to a data receiving end by using the target data transmission port.

[0056] Wherein, the target data transmission port can be understood as a port for sending the target data message according to the forwarding policy; the data receiving end can be understood as the destination of the data message, i.e. the device or system receiving the data.

[0057] Specifically, after determining the forwarding policy of the target data message, a target data transmission port needs to be selected from a plurality of available data transmission ports, and then the target data message is sent to the data receiving end through the target data transmission port.

[0058] In one or more embodiments of the present disclosure, in the case that the forwarding policy of the target data message is the first forwarding policy, the target data transmission port is determined from the plurality of data transmission ports according to the target routing table entry in the message forwarding routing table. The specific implementation is as follows: the target data transmission port is determined from the plurality of data transmission ports according to the forwarding policy of the target data message, including: determining a target routing table entry corresponding to the message feature from the message forwarding routing table, wherein the target routing table entry includes the correspondence between the message feature and the target data transmission port; determining the target data transmission port corresponding to the message feature from the plurality of data transmission ports according to the target routing table entry.

[0059] Specifically, the message forwarding routing table is composed of routing table entries, and each routing table entry includes the correspondence between the message feature and the data transmission port, so that the data transmission port corresponding to the message feature can be determined according to the routing table entry and the message feature.

[0060] In specific implementation, the message feature in the routing table entry can be understood as the five-tuple information (or part of the five-tuple information) of the data message, and the message forwarding routing table is searched based on the five-tuple information (or part of the five-tuple information) of the data message. If it can be found, it means that there is a target routing table entry corresponding to the data message in the message forwarding routing table, and the data transmission port for forwarding the data message is determined based on the target routing table entry.

[0061] In actual application, if there is a target routing table entry, a specific routing label can be added to the target data message, so that the target data message is forwarded according to the target data transmission port specified by the target routing table entry.

[0062] The data processing method provided by the embodiments of the present disclosure can accurately use the target data transmission port of the target routing table entry corresponding to the message feature in the message forwarding routing table to forward the target data message.

[0063] In the one or more embodiments of the present disclosure, in the case that the forwarding policy of the target data message is the second forwarding policy, the target routing table entry is obtained from the routing configuration cache or is regenerated. The specific implementation is described as follows: the target data transmission port is determined from the plurality of data transmission ports according to the forwarding policy of the target data message, including: an initial data transmission port is determined from the plurality of data transmission ports according to a default forwarding mode, the initial data transmission port is determined as the target data transmission port, and the state of the network device is determined as a configuration state; after the initial data transmission port is determined as the target data transmission port and the state of the network device is determined as the configuration state, the method further includes: judging whether the target routing table entry corresponding to the message feature exists in the routing configuration cache, if yes, the target routing table entry in the routing configuration cache is added to the message forwarding routing table in the case that a configuration event is triggered, if not, the target data transmission port corresponding to the message feature is determined through the load balancing state of the plurality of data transmission ports, the target routing table entry is generated according to the message feature and the target data transmission port corresponding to the message feature, the target routing table entry is cached to the routing configuration cache, and the target routing table entry in the routing configuration cache is added to the message forwarding routing table in the case that a configuration event is triggered.

[0064] The initial data transmission port can be understood as a default data transmission port selected from the plurality of data transmission ports, and the initial data transmission port is determined by using the default forwarding mode. The state of the network device includes a configuration state and a configuration solidification state. The configuration state means that the configuration operation such as routing configuration and routing table entry issuing can be performed, and in the configuration solidification state, no routing table entry is issued. The routing configuration cache can be understood as a cache area for storing routing configuration information, which is used for quickly accessing and applying routing configuration. The configuration event can be understood as an event for triggering the network device to perform configuration update.

[0065] Specifically, in the case that the target routing table entry does not exist in the message forwarding routing table, an initial data transmission port is selected from the plurality of data transmission ports according to the default forwarding mode, the initial data transmission port is determined as the target data transmission port, and the state of the network device is set as the configuration state. At this time, the target data message is forwarded to the data receiving end through the target data transmission port.

[0066] For the associated data packet belonging to the same data stream as the target data packet, the packet forwarding is performed according to the target routing entry obtained from the routing configuration cache. Specifically, it is checked whether the target routing entry matching the packet feature exists in the routing configuration cache. If yes, when the configuration event is triggered, the target routing entry is added from the routing configuration cache to the packet forwarding routing table. Since the data packets belonging to the same data stream have the same packet feature, the associated data packet can be forwarded by the target routing entry in the packet forwarding routing table. If no, the target data transmission port corresponding to the packet feature is determined by analyzing the load balancing states of the multiple data transmission ports. Then, a new target routing entry is generated according to the packet feature and the target data transmission port corresponding to the packet feature, and the newly generated target routing entry is cached in the routing configuration cache. When the configuration event is triggered, the newly cached target routing entry is added to the packet forwarding routing table.

[0067] The data processing method provided by the embodiments of the present disclosure determines whether the target routing entry exists from the routing configuration cache, and generates the target routing entry only when the target routing entry does not exist, thereby saving the computing resources of the configuration module.

[0068] In the embodiments of the present disclosure, in the case of regenerating the target routing entry, the target data transmission port is first determined by the load balancing states of the multiple data transmission ports, so as to generate the target routing entry according to the packet feature and the target data transmission port. The specific implementation is as follows: the target data transmission port corresponding to the associated data packet is determined by the load balancing states of the multiple data transmission ports, including: the target data transmission port corresponding to the associated data packet is determined according to the load of the multiple data transmission ports; or the data transmission port corresponding to the current round is determined as the target data transmission port according to a preset round-robin sequence; or the target data transmission port corresponding to the associated data packet is determined according to the number of data streams of the multiple data transmission ports.

[0069] Specifically, the multiple data transmission ports are sorted according to the order of the load of the multiple data transmission ports from small to large, and the data transmission port at the first position in the multiple data transmission ports is determined as the target data transmission port according to the sorting result; or the data transmission port corresponding to the current round is determined as the target data transmission port according to a preset round-robin sequence; or the multiple data transmission ports are sorted according to the order of the number of data streams of the multiple data transmission ports from small to large, and the data transmission port at the first position in the multiple data transmission ports is determined as the target data transmission port according to the sorting result.

[0070] The number of data streams can be understood as the number of data streams allocated to each data transmission port, and also the number of routing table entries established by each data transmission port.

[0071] In actual applications, in the case that there is no target routing table entry matching the message characteristics in the routing configuration cache, the target routing table entry needs to be generated, and in the case that the target routing table entry includes the message characteristics and the correspondence between the target data transmission port, the target data transmission port needs to be allocated to the target routing table entry. The target data transmission port allocation supports multiple strategies, including but not limited to: selecting an available port of the switch with lighter current load to allocate to the new data stream; the switch specifies a number of available egress ports for each ingress port (the range of egress ports corresponding to the ingress port is configurable), and selects a port of the switch with lighter current load within the specified range of available egress ports to allocate to the new data stream; the available ports are sequentially allocated to the new data stream in a preset round-robin order; the switch specifies a number of available egress ports for each ingress port (the range of egress ports corresponding to the ingress port is configurable), and sequentially allocates the new data stream in a preset round-robin order within the specified range of available egress ports; selecting an available port of the switch with fewer currently allocated data streams to allocate to the new data stream; the switch specifies a number of available egress ports for each ingress port (the range of egress ports corresponding to the ingress port is configurable), and selects a port of the switch with fewer currently allocated data streams within the specified range of available egress ports to allocate to the new data stream.

[0072] The data processing method provided by the embodiments of the present disclosure allocates the forwarding port of the new data stream according to the load state of each port and the number of allocated streams and the like in the above manner, determines the routing port of the data stream through the load balancing state of the multiple data transmission ports, and can ensure the network load balancing capability of the switch, and can ensure that the data message can be effectively routed according to the latest network status and configuration to a large extent.

[0073] In one or more embodiments of the present disclosure, the configuration event is triggered in a case that a load state of the network device changes, or in a case that a difference between a lookup time and a current time is greater than a preset waiting time. The adding the target route entry in the route configuration cache to the packet forwarding route table in the case that the configuration event is triggered includes: triggering the configuration event in a case that the load state of the network device changes from a first state to a second state, adding the target route entry in the route configuration cache to the packet forwarding route table, wherein the first state is a load state, and the second state is an idle state; or determining an entering time at which the target route entry is cached to the route configuration cache, replacing the entering time with a lookup time at which the target route entry is looked up from the route configuration cache, triggering the configuration event in a case that a difference between the lookup time and a current time is greater than a preset waiting time, and adding the target route entry in the route configuration cache to the packet forwarding route table.

[0074] The network device can be understood as a hardware device for establishing, managing and maintaining a computer network, and performs functions of data transmission, connection and management in the network. The network device includes, but is not limited to, a switch, a router and the like. The embodiments of the present disclosure take the switch as an example to describe the data processing method in detail.

[0075] Specifically, in a case that the load state of the switch changes from the load state to the idle state, a configuration event is triggered when the state changes, and the configuration event causes the configuration module to issue the cached configuration route entry to the routing module. Alternatively, the target route entry has time information attribute. In a case that the target route entry enters the route configuration cache, the time information can be determined as an entering time at which the target route entry is cached to the route configuration cache. If a new flow notification event corresponding to the target route entry is received again, and the target route entry is looked up from the route configuration cache, the time information of the target route entry is modified as a time at which the new flow notification is received again (i.e., the lookup time). A difference between the time at which the new flow notification is received again and a current time is determined. In a case that the difference is greater than a preset waiting time (a parameter configured to define a time for which a configuration entry waits in the cache), it is considered that the load state of the switch is in the idle state, the configuration event is triggered, the target route entry is taken out from the cache and issued to the routing module.

[0076] The data processing method provided by the embodiments of the present disclosure can be configured in an idle state, and the configuration configured in the idle state is still effective when the cluster is converted to a load state next time, without creating and releasing the cluster flow at any time. However, when the configuration event is triggered in the load state, the action of the configuration will affect the running flow, and the configuration event triggered in the idle state has no effect on the flow. In the idle state, changing the routing port of the flow will not cause packet disorder.

[0077] In one or more embodiments of the present disclosure, the load state of the network device is determined by bandwidth data and a load threshold. In a case where the bandwidth data is counted by a preset counting period, the load state of the network device can be accurately determined. The specific implementation is described as follows.

[0078] The load state of the network device changes from a first state to a second state, comprising: counting bandwidth data of a data incoming port of the network device according to a preset counting period; determining the load state of the network device changes from the first state to the second state according to the bandwidth data and a load threshold.

[0079] Specifically, the preset counting period can be set according to actual conditions. For example, the preset counting period is one hour, that is, the bandwidth data of the data incoming port in each hour is counted. The bandwidth data obtained by counting is compared with the preset load threshold, so as to determine the load state of the network device according to the comparison result.

[0080] In actual application, the determination of the load state of the network device changing from the first state to the second state according to the bandwidth data and the load threshold comprises: in a case where the bandwidth data exceeds a first load threshold in each of n preset counting periods continuously, determining that the load state of the network device is the first state, wherein n is a positive integer and n is greater than 1; in a case where the bandwidth data is lower than a second load threshold in each of m preset counting periods continuously, determining that the load state of the network device is the second state, wherein m is a positive integer and m is greater than 1; in a case where the bandwidth data exceeds the first load threshold in each of the first n preset counting periods and the bandwidth data is lower than the second load threshold in each of the n+1 to n+1+m preset counting periods, determining that the load state of the network device changes from the first state to the second state.

[0081] Specifically, the monitoring module is responsible for monitoring the load state and the load balancing state of the network device in real time, and notifying the configuration module of the monitoring result in real time. The monitoring module counts the average bandwidth of the current input port of the switch according to a fixed period (i.e., a preset counting period). When the average input bandwidth of the switch exceeds a first load threshold for consecutive n counting periods, the load state of the switch is set to a first state. The first load threshold can be configured according to actual conditions. When the average input bandwidth of the switch is lower than a second load threshold for consecutive m counting periods, the load state of the switch is set to a second state. The second load threshold can be configured according to actual conditions. The monitoring module synchronously transmits the load state of the network device to the load balancing monitoring module and the configuration module in real time.

[0082] The data processing method provided by the embodiments of the present disclosure can monitor the load state of the network device in real time, and synchronously transmit the load state of the network device to the configuration module in real time, so that the configuration module can timely issue the routing table entry in the routing configuration cache according to the load state of the network device.

[0083] In one or more embodiments of the present disclosure, in a case where the state of the routing configuration cache is the empty state and lasts for a preset time, the state of the network device is determined to be a configuration solidification state. In a case where the load balancing state of the plurality of data transmission ports is the unbalanced state, the configuration solidification state is adjusted to the configuration state, and a load rebalancing operation is performed on the network device.

[0084] Specifically, in a case where the network device is in the configuration solidification state, the configuration event cannot be triggered, so that the target routing table entry in the routing configuration cache cannot be added to the packet forwarding routing table. However, since the data processing method provided by the embodiments of the present disclosure uses the data transmission port in the load balancing state to perform packet forwarding to ensure data transmission efficiency, in a case where the load balancing state of the plurality of data transmission ports is the unbalanced state, the unbalanced state of the plurality of data transmission ports needs to be changed. Therefore, the configuration solidification state of the network device is adjusted to the configuration state. In the configuration state of the network device, the load rebalancing operation is performed, so that the load balancing state of the plurality of data transmission ports is the balanced state.

[0085] In actual application, the load rebalancing operation on the network device comprises: deleting a routing table entry in the message forwarding routing table; or determining a plurality of first data transmission ports in the plurality of data transmission ports whose load exceeds a first preset load threshold, and determining a plurality of second data transmission ports in the plurality of data transmission ports whose load is lower than a second preset load threshold, and assigning a plurality of data streams corresponding to the plurality of first data transmission ports to the plurality of second data transmission ports.

[0086] Specifically, when the routing configuration cache of the configuration module is in an empty state and for a period of time (configurable), that is, the configuration module does not issue any routing configuration table entry in the period of time, the configuration module will enter a routing configuration solidification state. After the configuration module enters the routing configuration solidification state, if it is detected that the load balancing state is unbalanced, the switch configuration module will return to the routing configuration state again and perform a load rebalancing operation. The load rebalancing operation supports multiple strategies, including but not limited to: emptying the routing configuration table entry in the routing module, re-executing the routing table entry configuration, or ranking the data transmission ports according to the load, reassigning the data streams of the ports with higher load to the ports with lower load, dynamically fine-tuning the load of the entire cluster, and continuously optimizing the performance of the cluster.

[0087] The data processing method provided by the embodiments of the present disclosure improves the forwarding efficiency of message forwarding by performing a load rebalancing operation when the load balancing state is unbalanced, so that the data transmission port balanced in load is used for forwarding the message.

[0088] In one or more embodiments of the present disclosure, in the case of aging of a routing table entry, an aging event is triggered, so that the aged routing table entry is deleted from the message forwarding routing table. The specific implementation is as follows: in the case of determining a target data transmission port from the plurality of data transmission ports according to a routing table entry in the message forwarding routing table, modifying time information of the routing table entry to a called time; in the case that a difference between the called time and a current time is greater than a preset deletion time, triggering a deletion event, and deleting the routing table entry from the message forwarding routing table.

[0089] Specifically, each routing table entry in the message forwarding routing table maintains a time information attribute. When a routing table entry is created, the time information is set to the current time when the table entry is created. If the routing table entry is called, the time information of the routing table entry is modified to the called time. When the difference between the called time of the routing table entry and the current time is greater than the aging time (that is, the preset deletion time, a user-configured parameter), an aging event (that is, a deletion event) is triggered, and the routing table entry is deleted from the message forwarding routing table of the routing module.

[0090] The data processing method provided by the embodiment of the present disclosure can delete the aged routing table item (a routing table item that has not been called for a long time) from the packet forwarding routing table by triggering the aging event, ensure that the routing table item for forwarding the data packet is the routing table item determined based on the newer network state, and thus ensure that each data transmission port of the network device is in a load-balanced state at all times.

[0091] The data processing method provided by the embodiment of the present disclosure can determine whether the initial data packet is the target data packet by analyzing the packet characteristics of the initial data packet of the data sending end, determine the forwarding strategy for the target data packet by using the packet characteristics and the packet forwarding routing table in the case where the initial data packet is the target data packet, and in the case where the packet forwarding routing table is generated according to the load balancing state of the plurality of data transmission ports, the loads of the plurality of data transmission ports are in a load-balanced state, thereby ensuring that the target data packet is forwarded through the target data transmission port in the plurality of data transmission ports, avoiding congestion of the transmission link caused by unbalanced loads of the data transmission ports, and improving the data transmission efficiency.

[0092] Referring to FIG. 3, FIG. 3 shows a framework flowchart of a data processing method applied to a network device according to an embodiment of the present disclosure.

[0093] Specifically, the network device is used for a GPU cluster, and distributed parallel training of a large model is implemented on the GPU cluster. The network device includes a routing module, a configuration module, and a monitoring module. Taking a network device as a switch as an example, the switch includes a switch routing module 302, a switch configuration module 304, and a switch monitoring module 306.

[0094] The switch routing module 302 is configured to extract features of a received data packet. The features can be understood as attribute information of the data packet. Different routing strategies can be used to forward and process data packets with different features, so that the data packet is routed and forwarded according to the specified out-port of the corresponding routing strategy.

[0095] Specifically, the switch routing module 302 includes a packet feature matching unit. A user matches features of data packets in a data stream, and determines data packets with successful feature matching as target data packets. The packet feature matching unit can store preset packet features, which can be set according to actual conditions. The packet features can be understood as attribute information of the data packet, including but not limited to transmission protocol, destination port number, and other information of the data packet. For example, a target data packet with an RDMA protocol is determined through feature matching.

[0096] In actual applications, in the case of using a GPU cluster for distributed parallel training of a large model, the data flow between GPUs in the GPU cluster for data interaction is not limited to the training data flow of the training data, but also includes some control signal flow (commands such as starting training, pausing, resuming, and ending training), metadata flow (information about the training process, such as the number of iterations and the loss function value), and the like. Various types of data flow can be classified through feature matching. The elephant flow (network traffic that occupies a large amount of bandwidth and transmits data for a long time) of the training data flow is determined as the target data flow, and the following routing and forwarding configuration is performed for the target data flow.

[0097] For the target data packet for which the feature matching is successful, the routing table entry of the packet routing management unit is used to implement forwarding of the target data packet. In the packet routing management unit, the routing table entry corresponding to the target data packet is first searched in the routing table. If the target routing table entry corresponding to the target data packet exists (the target routing table entry includes the target out port of the target data packet), a routing label is added to the target data packet to indicate that the packet forwarding unit has the target routing table entry corresponding to the target data packet, and the target data packet is forwarded based on the target out port of the target data packet in the target routing table entry. That is, the packet forwarding unit identifies whether the data packet carries a routing label. If yes, the target data packet is forwarded according to the target out port in the target routing table entry. If no, the data packet is forwarded according to a default routing mode (using the default out port corresponding to the default routing table entry or using the ECMP mode).

[0098] In the packet routing management unit, if the target routing table entry corresponding to the target data packet is not found, the target data packet is first forwarded according to the default routing mode, and the sending of a new flow notification event is triggered, that is, the new flow notification event is sent to the switch configuration module 304. In the case where the switch configuration module 304 receives the new flow notification event, it is determined whether the configuration routing table entry of the target data flow in which the target data packet is located exists in the routing configuration cache. If yes, the configuration routing table entry is downloaded to the packet routing management unit of the switch routing module 302 in the case where the configuration event is triggered, so as to add the configuration routing table entry to the routing table of the packet routing management unit and determine the configuration routing table entry as the routing table entry of the routing table. If no, it is indicated that the target data flow in which the target data packet is located is a new data flow (hereinafter referred to as “new flow”), a configuration routing table entry of the new flow is generated, the newly generated configuration routing table entry is cached in the routing configuration cache, and the configuration routing table entry is downloaded to the packet routing management unit of the switch routing module 302 in the case where the configuration event is triggered.

[0099] In a case that the configuration routing table item in the configuration routing table cache is added to the routing table and the routing table item of the routing table is determined, a subsequent associated data packet belonging to a same data flow as the target data packet is forwarded by using the routing table item.

[0100] In actual application, in a case that the configuration routing table item is generated, the egress port in the configuration routing table item is determined based on a plurality of port allocation strategies, and the egress port in the configuration routing table item is actually the egress port of each data packet in the new flow, wherein the port allocation strategies include but are not limited to: selecting an available port with a lighter current load of the switch to allocate to the new flow; the switch can specify a plurality of available egress ports for each ingress port (the range of egress ports corresponding to the ingress port is configurable), and select a port with a lighter current load of the switch to allocate to the new flow in the specified range of available egress ports; the available ports are sequentially allocated to the new flow in a round robin manner; the switch can specify a plurality of available egress ports for each ingress port (the range of egress ports corresponding to the ingress port is configurable), and sequentially allocate to the new flow in a round robin manner in the specified range of available egress ports; selecting an available port with a smaller number of currently allocated data flows of the switch to allocate to the new flow; the switch can specify a plurality of available egress ports for each ingress port (the range of egress ports corresponding to the ingress port is configurable), and select a port with a smaller number of currently allocated data flows of the switch to allocate to the new flow in the specified range of available egress ports.

[0101] In actual application, in a case that the configuration routing table item is generated, the "timestamp" attribute (i.e., the "time information attribute" in the above embodiment) of the configuration routing table item is set as the time when the configuration routing table item is created, and the "timestamp" attribute of the routing table item is continuously updated. As long as the switch configuration module 304 receives a new flow notification event, the "timestamp" attribute of the routing table item is updated as the time when the new flow notification event is received (i.e., the search time in the above embodiment). Specifically, the purpose of setting the "timestamp" attribute is to facilitate triggering a configuration event or a routing table item aging event based on the time in the "timestamp" attribute. The routing table item aging event is an event of deleting the routing table item from the switch routing module 302.

[0102] In actual application, when the configured routing table item is delivered to the message routing management unit of the switch routing module 302, the message routing management unit adds the configured routing table item in the routing table of the message routing management unit, and determines the routing table item of the routing table. When the routing table item is called (the routing table item is called according to the routing table item), the "timestamp" attribute of the routing table item is modified to the calling time. When the difference between the calling time of the routing table item and the current time is greater than the aging event (a parameter configured by a user), the routing table item aging event is triggered. When the interval between the calling time and the current time is greater than the aging event, it is considered that the routing information in the routing table item is expired, and the routing table item needs to be deleted and a new routing table item needs to be generated, so that the data message in the data flow can be routed according to the newly generated routing table item.

[0103] For example, when a routing table item is generated, the outgoing port of the routing table item is determined to be an available port with a lighter load of the switch according to the port allocation strategy. If the data messages of multiple data flows are all routed through the routing table item and the corresponding outgoing port, after a period of time, the load of the outgoing port of the routing table item may become large. Therefore, to avoid the unbalanced load of the outgoing port, the routing table item aging event needs to be triggered regularly to generate a new routing table item, so that the new routing table item can be allocated to an available port with a lighter load of the switch according to the port allocation strategy.

[0104] The above-mentioned configured routing table item is delivered to the message routing management unit of the switch routing module 302 when the configuration event is triggered. Specifically, the triggering mode of the configuration event includes but is not limited to: detecting that the load state of the switch enters a low load state from a high load state (the load state of the switch is monitored by the switch load monitoring unit), that is, the configuration event is triggered when the state changes. The configuration event makes the switch configuration module 304 deliver the buffered configured routing table item to the switch routing module 302. Alternatively, because the configured routing table item has a "timestamp" attribute, when the configured routing table item enters the buffer, if the new flow notification corresponding to the configured routing table item is received again, the timestamp of the configured table item is modified to the time when the new flow notification is received again. When the difference between the time when the new flow notification is received again and the entering time of the configured routing table item into the buffer is greater than the waiting time (a parameter configured by a user and used to define the waiting time of the configured table item in the buffer), the configuration event is triggered, and the configured routing table item is taken out from the buffer and delivered to the switch routing module 302.

[0105] When the routing configuration cache of the switch configuration module 304 is empty, and for a period of time (configurable), i.e. the switch configuration module 304 does not issue any routing configuration table item in this period of time, the switch configuration module 304 will enter the routing configuration solidification state; after the switch configuration module 304 enters the routing configuration solidification state, if it is detected that the load balancing state is unbalanced (in the case that the load state of the switch is in the high load state, the load balancing state of each port is monitored by the switch load balancing monitoring unit), the switch configuration module 304 will return to the routing configuration state again, and perform the switch load rebalancing operation. The load rebalancing operation supports multiple strategies, including but not limited to: emptying all the configuration routing table items in the switch routing module 302, and re-executing the routing table item configuration, for re-performing the load balancing operation when a new task enters or an old task is completed; or modifying the routing configuration of a specified number (configurable) of data streams of a number (configurable) of ports with more load, and sequentially distributing these data streams to a number (configurable) of ports with less load, so as to dynamically fine-tune the load of the entire cluster and continuously optimize the performance of the cluster.

[0106] In addition, after the switch configuration module 304 enters the routing configuration solidification state, if a new flow notification event is received, it will return to the routing configuration state again, and re-complete the routing table item configuration of the new data flow according to the above flow.

[0107] Specifically, the switch monitoring module 306 is responsible for real-time monitoring of the load state and the load balancing state of the switch, and real-time notification of the monitoring results to the switch configuration module 304. In actual application, the switch load monitoring unit of the switch monitoring module 306 monitors the load state of the switch in real time by the following way: according to a statistical period (such as a statistical period of 2 hours), the average bandwidth of the current input port of the switch is counted; when the average input bandwidth of the switch exceeds the high load threshold (i.e. the first load threshold in the above embodiment) for a number of consecutive statistical periods (such as 8 hours), the load state of the switch is set to the high load state (i.e. the first state in the above embodiment), and the high load threshold is configurable; when the average input bandwidth of the switch is lower than the low load threshold (i.e. the second load threshold in the above embodiment) for a number of consecutive statistical periods, the load state of the switch is set to the low load state (i.e. the second state in the above embodiment), and the low load threshold is configurable; the switch load monitoring function synchronously transmits the load state of the switch to the switch load balancing monitoring unit and the switch configuration module 304 in real time.

[0108] The switch load balancing monitoring unit of the switch monitoring module 306 monitors the load balancing state of each port of the switch in real time in the case that the switch enters a high load state. If the switch load balancing monitoring function detects that the load of each port of the switch is not balanced, the switch load balancing state is set to unbalanced. When the switch enters a low load state, the switch load balancing monitoring function stops monitoring the load balancing state of each port of the switch, and sets the switch load balancing state to balanced. The switch load balancing monitoring function synchronously transmits the load balancing state of the switch to the switch configuration module 304 in real time. There are various detection methods for the load balancing state of the switch, including but not limited to (the unit time and threshold in the following detection methods can be configured): judging whether the difference between the larger value and the smaller value of the average queue depth of each port of the switch per unit time exceeds the threshold; judging whether the difference between the larger value and the smaller value of the larger queue depth of each port of the switch per unit time exceeds the threshold; judging whether the difference between the larger value and the smaller value of the average sending bandwidth of each port of the switch per unit time exceeds the threshold; judging whether the difference between the larger value and the smaller value of the number of messages marked with ECN (Explicit Congestion Notification) of each port of the switch per unit time exceeds the threshold.

[0109] The switch load monitoring unit based on the switch monitoring module 306 monitors the load state of the switch, and synchronously transmits the load state of the switch to the switch configuration module 304, so that the switch configuration module 304 triggers a configuration event in the case that the load state of the switch changes from a high load state to a low load state. The switch load balancing monitoring unit based on the switch monitoring module 306 monitors the load balancing state of each port of the switch in the case that the switch enters a high load state, and synchronously transmits the load balancing state of the switch to the switch configuration module 304, so that the switch configuration module 304 can enter the route configuration state from the route configuration solidification state in the case that the load balancing state is unbalanced.

[0110] The data processing method provided by the embodiments of the present disclosure can allocate a forwarding port of a new data flow according to the load state of each port and the number of allocated flows, and the like, can ensure the network load balancing capability of the switch by dynamically adjusting the routing port of the data flow, and can not frequently adjust the routing configuration of the data flow. Even if the routing configuration needs to be adjusted, the operation is performed when the switch is in a low load state or a specific data flow is in a low load state, which greatly reduces the probability of message disordering, so that the overall solution does not need to rely on the ordering function of the end-side network card, can lock an elephant flow through message feature matching, and performs routing and forwarding configuration for each elephant flow to ensure that the elephant flow is evenly distributed to the data transmission port. The solution is particularly suitable for AI cluster network scenarios, is a distributed traffic scheduling load balancing solution, each switch of the AI training cluster independently completes traffic scheduling to ensure the load balancing of the cluster, the solution is not limited by the size of the cluster, and is particularly suitable for large-scale AI cluster networks.

[0111] Corresponding to the method embodiments, the present disclosure also provides data processing device embodiments. FIG. 4 shows a structural schematic diagram of a data processing device according to an embodiment of the present disclosure. As shown in FIG. 4, the device includes an analysis module 402, a determination module 404, and a sending module 406.

[0112] The analysis module 402 is configured to analyze an initial data message sent by a data sending end, and determine a message feature of the initial data message.

[0113] The determination module 404 is configured to, in a case where it is determined according to the message feature that the initial data message is a target data message, determine a forwarding strategy of the target data message according to the message feature and a message forwarding routing table, wherein the message forwarding routing table is generated by a load balancing state of the plurality of data transmission ports.

[0114] The sending module 406 is configured to determine a target data transmission port from the plurality of data transmission ports according to the forwarding strategy of the target data message, and forward the target data message to a data receiving end by using the target data transmission port.

[0115] Optionally, the determination module 404 is further configured to: match the message feature of the initial data message with a preset message feature, and in a case where the matching is successful, determine that the initial data message is the target data message.

[0116] Optionally, the determining module 404 is further configured to: according to the packet feature, search the packet forwarding routing table to determine whether there is a target routing table item corresponding to the packet feature; if there is, determine the forwarding strategy of the target data packet as a first forwarding strategy, wherein the first forwarding strategy is a strategy of forwarding the target data packet according to the target routing table item in the packet forwarding routing table; if there is not, determine the forwarding strategy of the target data packet as a second forwarding strategy, wherein the second forwarding strategy is a strategy of forwarding the target data packet through an initial data transmission port determined according to a default forwarding mode, and a strategy of forwarding an associated data packet of the target data packet according to the target routing table item obtained from the routing configuration cache, the associated data packet being a data packet belonging to a same data flow as the target data packet, and the default forwarding mode being a mode of forwarding data packets by using a default routing table item or a mode of forwarding data packets by using ECMP.

[0117] Optionally, the determining module 404 is further configured to: determine a target routing table item corresponding to the packet feature from the packet forwarding routing table, wherein the target routing table item includes a correspondence between the packet feature and a target data transmission port; and determine the target data transmission port corresponding to the packet feature from the plurality of data transmission ports according to the target routing table item.

[0118] Optionally, the determining module 404 is further configured to: determine an initial data transmission port from the plurality of data transmission ports according to a default forwarding mode, determine the initial data transmission port as the target data transmission port, and determine a state of the network device as a configuration state.

[0119] The apparatus further includes a configuration module configured to: determine whether there is a target routing table item corresponding to the packet feature in the routing configuration cache; if there is, add the target routing table item in the routing configuration cache to the packet forwarding routing table in a case where a configuration event is triggered; and if there is not, determine a target data transmission port corresponding to the packet feature through a load balancing state of the plurality of data transmission ports, generate the target routing table item according to the packet feature and the target data transmission port corresponding to the packet feature, cache the target routing table item to the routing configuration cache, and add the target routing table item in the routing configuration cache to the packet forwarding routing table in a case where a configuration event is triggered.

[0120] Optionally, the determining module 404 is further configured to: determine the target data transmission port corresponding to the packet feature according to the load amount of the plurality of data transmission ports; or determine the target data transmission port corresponding to the current round according to a preset round order; or determine the target data transmission port corresponding to the packet feature according to the data flow quantity of the plurality of data transmission ports.

[0121] Optionally, the determining module 404 is further configured to: in a case where the load state of the network device changes from a first state to a second state, trigger the configuration event, add the target routing entry in the routing configuration cache to the packet forwarding routing table, wherein the first state is a loaded state and the second state is an idle state; or determine an entering time at which the target routing entry is cached to the routing configuration cache, replace the entering time with a search time of searching the target routing entry from the routing configuration cache, in a case where a difference between the search time and the current time is greater than a preset waiting time, trigger the configuration event, and add the target routing entry in the routing configuration cache to the packet forwarding routing table.

[0122] Optionally, the determining module 404 is further configured to: according to a preset statistical period, statistically determine bandwidth data of a data transmission port of the network device; and according to the bandwidth data and a load threshold, determine that the load state of the network device changes from a first state to a second state.

[0123] Optionally, the determining module 404 is further configured to: in a case where the bandwidth data continuously exceeds a first load threshold for n preset statistical periods, determine that the load state of the network device is the first state, wherein n is a positive integer and n is greater than 1; in a case where the bandwidth data continuously is lower than a second load threshold for m preset statistical periods, determine that the load state of the network device is the second state, wherein m is a positive integer and m is greater than 1; and in a case where it is determined that the bandwidth data exceeds the first load threshold for the first to n preset statistical periods and the bandwidth data is lower than the second load threshold for the n+1 to n+1+m preset statistical periods, determine that the load state of the network device changes from the first state to the second state.

[0124] The device further comprises an adjusting module configured to determine that the state of the network device is a configuration solidification state in a case where the state of the routing configuration cache is an empty state and a preset time period has lasted, wherein the configuration event is not triggered in a case where the network device is in the configuration solidification state; and adjust the configuration solidification state to a configuration state and perform a load rebalancing operation on the network device in a case where the load balancing state of the plurality of data transmission ports is an unbalanced state.

[0125] Optionally, the adjusting module is further configured to delete the routing table entry in the packet forwarding routing table, or determine at least one first data transmission port in the plurality of data transmission ports whose load exceeds a first preset load threshold and at least one second data transmission port in the plurality of data transmission ports whose load is lower than a second preset load threshold, and allocate a plurality of data streams corresponding to the plurality of first data transmission ports to the at least one second data transmission port.

[0126] The device further comprises a deleting module configured to modify time information of the routing table entry to a called time in a case where the target data transmission port is determined from the plurality of data transmission ports according to the routing table entry in the packet forwarding routing table, trigger a deleting event in a case where a difference between the called time and a current time is greater than a preset deleting time, and delete the routing table entry from the packet forwarding routing table.

[0127] One embodiment of the present disclosure provides a data processing device. The data processing device determines whether an initial data packet of a data sending end is a target data packet by analyzing a packet feature of the initial data packet, determines a forwarding strategy for the target data packet by using the packet feature and a packet forwarding routing table in a case where the initial data packet is the target data packet, and generates the packet forwarding routing table according to a load balancing state of a plurality of data transmission ports in a case where the load balancing state of the plurality of data transmission ports is in a load balanced state. Thus, the data processing device can ensure that the target data packet is forwarded through a target data transmission port in the plurality of data transmission ports without causing congestion of a transmission link due to unbalanced load of the data transmission ports, and can improve data transmission efficiency.

[0128] The above is a schematic scheme of the data processing device of the present embodiment. It should be noted that the technical scheme of the data processing device and the technical scheme of the data processing method described above belong to the same concept, and the details of the technical scheme of the data processing device that are not described in detail can be referred to the description of the technical scheme of the data processing method.

[0129] Corresponding to the method embodiments, the disclosure also provides network device embodiments. FIG. 5 shows a structural schematic diagram of a network device 500 according to an embodiment of the disclosure. As shown in FIG. 5, the network device 500 includes a routing unit 502, a configuration unit 504, and a monitoring unit 506.

[0130] The routing unit 502 is configured to parse an initial data packet sent by a data sending end, determine a packet feature of the initial data packet, determine, in a case where it is determined according to the packet feature that the initial data packet is a target data packet, a forwarding strategy of the target data packet according to the packet feature and a packet forwarding routing table, wherein the packet forwarding routing table is generated according to load balancing states of the plurality of data transmission ports, and determine, according to the forwarding strategy of the target data packet, a target data transmission port from the plurality of data transmission ports and forward the target data packet to a data receiving end by using the target data transmission port.

[0131] The configuration unit 504 is configured to determine whether there is a target routing table item corresponding to the packet feature in the routing configuration cache, if yes, add the target routing table item in the routing configuration cache to the packet forwarding routing table in a case where a configuration event is triggered, and if not, determine a target data transmission port corresponding to the packet feature according to the load balancing states of the plurality of data transmission ports, generate the target routing table item according to the packet feature and the target data transmission port corresponding to the packet feature, cache the target routing table item to the routing configuration cache, and add the target routing table item in the routing configuration cache to the packet forwarding routing table in a case where a configuration event is triggered.

[0132] The monitoring unit 506 is configured to monitor a load state of the network device and load balancing states of the plurality of data transmission ports.

[0133] Optionally, the routing unit 502 is further configured to match the packet feature of the initial data packet with a preset packet feature, and determine, in a case where the matching is successful, that the initial data packet is the target data packet.

[0134] Optionally, the routing unit 502 is further configured to: according to the message feature, search the message forwarding routing table to determine whether a target routing table item corresponding to the message feature exists; if the target routing table item exists, determine a first forwarding strategy as the forwarding strategy of the target data message, wherein the first forwarding strategy is a strategy of forwarding the target data message according to the target routing table item in the message forwarding routing table; if the target routing table item does not exist, determine a second forwarding strategy as the forwarding strategy of the target data message, wherein the second forwarding strategy is a strategy of forwarding the target data message through an initial data transmission port determined according to a default forwarding mode, and a strategy of forwarding an associated data message of the target data message according to the target routing table item obtained from a routing configuration cache, the associated data message being a data message belonging to a same data flow as the target data message, and the default forwarding mode being a mode of forwarding data messages by using a default routing table item or a mode of forwarding data messages by using ECMP.

[0135] Optionally, the routing unit 502 is further configured to: determine, from the message forwarding routing table, a target routing table item corresponding to the message feature, wherein the target routing table item includes a correspondence between the message feature and a target data transmission port; and determine, according to the target routing table item, the target data transmission port corresponding to the message feature from the plurality of data transmission ports.

[0136] Optionally, the routing unit 502 is further configured to: determine, according to a default forwarding mode, an initial data transmission port from the plurality of data transmission ports, and determine the initial data transmission port as the target data transmission port.

[0137] Optionally, the configuration unit 504 is further configured to: determine that the state of the network device is a configuration state.

[0138] Optionally, the configuration unit 504 is further configured to: determine the target data transmission port corresponding to the message feature according to a load amount of the plurality of data transmission ports; or determine the target data transmission port corresponding to the message feature according to a preset rotation sequence; or determine the target data transmission port corresponding to the message feature according to a data flow quantity of the plurality of data transmission ports.

[0139] Optionally, the configuration unit 504 is further configured to: trigger the configuration event in a case where a load state of the network device changes from a first state to a second state, wherein the first state is a loaded state and the second state is an idle state; add the target routing entry in the routing configuration cache to the packet forwarding routing table; or determine an entering time at which the target routing entry is cached to the routing configuration cache, replace the entering time with a search time of searching for the target routing entry from the routing configuration cache, and trigger the configuration event in a case where a difference between the search time and a current time is greater than a preset waiting time, and add the target routing entry in the routing configuration cache to the packet forwarding routing table.

[0140] Optionally, the monitoring unit 506 is further configured to: statistically determine bandwidth data of a data incoming port of the network device according to a preset statistical period; and determine that the load state of the network device changes from a first state to a second state according to the bandwidth data and a load threshold.

[0141] Optionally, the monitoring unit 506 is further configured to: determine that the load state of the network device is the first state in a case where the bandwidth data continuously exceeds a first load threshold for n preset statistical periods, wherein n is a positive integer and n is greater than 1; determine that the load state of the network device is the second state in a case where the bandwidth data continuously is lower than a second load threshold for m preset statistical periods, wherein m is a positive integer and m is greater than 1; and determine that the load state of the network device changes from the first state to the second state in a case where the bandwidth data exceeds the first load threshold for the first n preset statistical periods and the bandwidth data is lower than the second load threshold for the n+1 to n+1+m preset statistical periods.

[0142] Optionally, the configuration unit 504 is further configured to: determine that the state of the network device is a configuration solidification state in a case where the state of the routing configuration cache is an empty state and a preset time has elapsed; adjust the configuration solidification state to a configuration state and perform a load rebalancing operation on the network device in a case where a load balancing state of the plurality of data transmission ports is an unbalanced state.

[0143] Optionally, the configuration unit 504 is further configured to: delete the routing entry in the packet forwarding routing table; or determine at least one first data transmission port in the plurality of data transmission ports whose load exceeds a first preset load threshold, and determine at least one second data transmission port in the plurality of data transmission ports whose load is lower than a second preset load threshold, and assign the plurality of data streams corresponding to the plurality of first data transmission ports to the at least one second data transmission port.

[0144] Optionally, the routing unit 502 is further configured to: in a case where the target data transmission port is determined from the plurality of data transmission ports according to the routing entry in the packet forwarding routing table, modify time information of the routing entry as a calling time; in a case where a difference between the calling time and a creation time is greater than a preset aging event, trigger the aging event, and delete the routing entry from the packet forwarding routing table.

[0145] The network device provided by the embodiments of the present disclosure can be optimized and enhanced based on the existing load balancing scheme. The network device can assign a new data stream forwarding port according to the load state of each port and the number of allocated streams, and the like, and dynamically adjust the routing port of the data stream to ensure the network load balancing capability of the switch. The network device does not frequently adjust the routing configuration of the data stream. Even if the routing configuration needs to be adjusted, the network device waits until the switch is in a low load state or a specific data stream is in a low load state to perform the operation, thereby minimizing the probability of packet disorder. Therefore, the overall solution does not need to rely on the ordering function of the end-side network card. The solution can lock an elephant flow through packet feature matching, and perform routing and forwarding configuration for each elephant flow to ensure that the elephant flow is evenly distributed to the data transmission port. The solution is particularly suitable for AI cluster network scenarios, and is a distributed traffic scheduling load balancing scheme. Each switch of the AI training cluster independently completes traffic scheduling to ensure the load balancing of the cluster. The solution is not limited by the size of the cluster, and is particularly suitable for large-scale AI cluster networks.

[0146] The above is a schematic scheme of a network device according to an embodiment of the present disclosure. It should be noted that the technical scheme of the network device and the technical scheme of the above-mentioned data processing method belong to the same concept. The details of the technical scheme of the network device that are not described in detail can be referred to the description of the technical scheme of the data processing method.

[0147] FIG. 6 shows a structural block diagram of a computing device 600 according to an embodiment of the present disclosure. The components of the computing device 600 include, but are not limited to, a memory 610 and a processor 620. The processor 620 is connected to the memory 610 through a bus 630, and a database 650 is used to save data.

[0148] The computing device 600 also includes an access device 640 that enables the computing device 600 to communicate via one or more networks 660. Examples of such networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or combinations of such networks, such as the Internet. The access device 640 can include one or more of any type of network interface (for example, a network interface card (NIC)) such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC).

[0149] In one embodiment of the present disclosure, the above-mentioned components of the computing device 600 and other components not shown in FIG. 6 can also be connected to each other, for example, through a bus. It should be understood that the computing device structure block diagram shown in FIG. 6 is only for the purpose of example, and is not a limitation on the scope of the present disclosure. Those skilled in the art can add or replace other components as needed.

[0150] The computing device 600 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (for example, a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, and the like), a mobile phone (for example, a smartphone), a wearable computing device (for example, a smartwatch, smart glasses, and the like), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 600 can also be a mobile or stationary server.

[0151] The processor 620 is configured to execute instructions of a computer program to implement the steps of the above-mentioned data processing method.

[0152] The various embodiments in the present disclosure are described in a progressive manner, and the same or similar parts among the various embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. In particular, the computing device embodiment is described simply because it is basically similar to the data processing method embodiment, and the relevant part can be referred to the description of the data processing method embodiment.

[0153] An embodiment of the present disclosure further provides a computer readable storage medium storing computer programs / instructions, which are executed by a processor to implement the steps of the above data processing method.

[0154] The various embodiments in the present disclosure are described in a progressive manner, and the same or similar parts among the various embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. In particular, the computer readable storage medium embodiment is described simply because it is basically similar to the data processing method embodiment, and the relevant part can be referred to the description of the data processing method embodiment.

[0155] An embodiment of the present disclosure further provides a computer program product comprising computer programs / instructions, which are executed by a processor to implement the steps of the above data processing method.

[0156] The above is a schematic scheme of the computer program product of the embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the above data processing method belong to the same concept, and the details of the technical scheme of the computer program product which are not described in detail can be referred to the description of the technical scheme of the data processing method.

[0157] The above describes a specific embodiment of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps recited in the claims can be performed in a different order than the order in which they are recited and still accomplish desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.

[0158] The computer readable medium can include any entity or apparatus capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, software distribution medium, etc. It should be noted that the computer readable medium can include appropriate additions or subtractions according to the requirements of patent practice. For example, according to the patent practice in some regions, the computer readable medium does not include electrical carrier signals and telecommunication signals.

[0159] It should be noted that, for the foregoing method embodiments, in order to facilitate description, they are all described as a combination of a series of actions, but those skilled in the art should know that the disclosed embodiments are not limited to the order of the actions described, because according to the disclosed embodiments, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the disclosed embodiments.

[0160] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0161] The preferred embodiments of the disclosure disclosed above are only used to help explain the disclosure. The alternative embodiments do not describe all the details and do not limit the invention to the specific embodiments described. Obviously, according to the content of the disclosed embodiments, many modifications and changes can be made. The disclosure selects and describes these embodiments in order to better explain the principles and practical applications of the disclosed embodiments, so that those skilled in the art can well understand and utilize the disclosure. The disclosure is limited only by the claims and their full scope and equivalents.

Claims

1. A data processing method applied to a network device comprising a plurality of data transmission ports, comprising: parsing an initial data packet sent by a data sending end to determine a packet characteristic of the initial data packet; in a case where it is determined according to the packet characteristic that the initial data packet is a target data packet, determining a forwarding strategy of the target data packet according to the packet characteristic and a packet forwarding routing table, wherein the packet forwarding routing table is generated by load balancing states of the plurality of data transmission ports; and determining a target data transmission port from the plurality of data transmission ports according to the forwarding strategy of the target data packet, and forwarding the target data packet to a data receiving end by using the target data transmission port. 2.The data processing method of claim 1, wherein the determining the initial data packet as the target data packet according to the packet characteristic comprises: matching the packet characteristic of the initial data packet with a preset packet characteristic, and in a case where the matching is successful, determining the initial data packet as the target data packet. 3.The data processing method of claim 1, wherein the determining the forwarding strategy of the target data packet according to the packet characteristic and the packet forwarding routing table comprises: searching, according to the packet characteristic, the packet forwarding routing table for whether there is a target routing table entry corresponding to the packet characteristic, if there is, determining the forwarding strategy of the target data packet as a first forwarding strategy, wherein the first forwarding strategy is a strategy of forwarding the target data packet according to the target routing table entry in the packet forwarding routing table, and if there is not, determining the forwarding strategy of the target data packet as a second forwarding strategy, wherein the second forwarding strategy is a strategy of forwarding the target data packet by an initial data transmission port determined according to a default forwarding mode, and a strategy of forwarding associated data packets of the target data packet according to the target routing table entry obtained from a routing configuration cache, the associated data packets being data packets belonging to a same data flow as the target data packet, and the default forwarding mode being a mode of forwarding data packets by using a default routing table entry or a mode of forwarding data packets by using ECMP. 4.The data processing method of claim 3, wherein in a case where the forwarding strategy of the target data packet is the first forwarding strategy, the determining the target data transmission port from the plurality of data transmission ports according to the forwarding strategy of the target data packet comprises: determining, from the packet forwarding routing table, the target routing table entry corresponding to the packet characteristic, wherein the target routing table entry comprises a correspondence between the packet characteristic and a target data transmission port; and determining the target data transmission port corresponding to the packet characteristic from the plurality of data transmission ports according to the target routing table entry. 5.The data processing method of claim 3, wherein in a case where the forwarding strategy of the target data packet is the second forwarding strategy, the determining the target data transmission port from the plurality of data transmission ports according to the forwarding strategy of the target data packet comprises: determining, from the routing configuration cache, the target routing table entry corresponding to the packet characteristic, wherein the target routing table entry comprises a correspondence between the packet characteristic and a target data transmission port; and determining the target data transmission port corresponding to the packet characteristic from the plurality of data transmission ports according to the target routing table entry. ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ The determining a target data transmission port from the plurality of data transmission ports according to the forwarding policy of the target data message comprises: determining an initial data transmission port from the plurality of data transmission ports according to a default forwarding mode, determining the initial data transmission port as the target data transmission port, and determining a state of the network device as a configuration state; after the determining the initial data transmission port as the target data transmission port and determining the state of the network device as the configuration state, the method further comprises: determining whether a target routing table item corresponding to the message feature exists in the routing configuration cache, if yes, adding the target routing table item in the routing configuration cache to the message forwarding routing table in a case that a configuration event is triggered; if no, determining a target data transmission port corresponding to the message feature according to a load balancing state of the plurality of data transmission ports, generating the target routing table item according to the message feature and the target data transmission port corresponding to the message feature, and caching the target routing table item to the routing configuration cache, and adding the target routing table item in the routing configuration cache to the message forwarding routing table in a case that a configuration event is triggered. 6.The data processing method of claim 5, wherein the determining the target data transmission port corresponding to the message feature according to the load balancing state of the plurality of data transmission ports comprises: determining the target data transmission port corresponding to the message feature according to a load amount of the plurality of data transmission ports; or determining the target data transmission port corresponding to the message feature according to a preset rotation sequence; or determining the target data transmission port corresponding to the message feature according to a data flow number of the plurality of data transmission ports. 7.The data processing method of claim 5, wherein the adding the target routing table item in the routing configuration cache to the message forwarding routing table in a case that a configuration event is triggered comprises: triggering the configuration event and adding the target routing table item in the routing configuration cache to the message forwarding routing table in a case that a load state of the network device changes from a first state to a second state, wherein the first state is a load state and the second state is an idle state; or determining an entry time of the target routing table item cached to the routing configuration cache, replacing the entry time with a search time of searching the target routing table item from the routing configuration cache, and triggering the configuration event and adding the target routing table item in the routing configuration cache to the message forwarding routing table in a case that a difference between the search time and a current time is greater than a preset waiting time. 8.The data processing method of claim 7, wherein the load state of the network device changes from the first state to the second state comprises: statistically determining bandwidth data of a data transmission port of the network device according to a preset statistical period; and determining the load state of the network device changes from the first state to the second state according to the bandwidth data and a load threshold.

9. The data processing method of claim 8, wherein determining that the load state of the network device changes from a first state to a second state according to the bandwidth data and load thresholds comprises: determining that the load state of the network device is the first state when the bandwidth data exceeds a first load threshold for n consecutive preset statistical periods, wherein n is a positive integer and n is greater than 1; determining that the load state of the network device is the second state when the bandwidth data is lower than a second load threshold for m consecutive preset statistical periods, wherein m is a positive integer and m is greater than 1; and determining that the load state of the network device changes from the first state to the second state when the bandwidth data exceeds the first load threshold for the first n preset statistical periods and the bandwidth data is lower than the second load threshold for the n+1 to n+1+m preset statistical periods.

10. The data processing method of any one of claims 5-9, further comprising: determining that the state of the network device is a configuration solidification state when the state of the routing configuration cache is empty and lasts for a preset time period, wherein the configuration event is not triggered when the network device is in the configuration solidification state; and adjusting the configuration solidification state to a configuration state and performing a load rebalancing operation on the network device when the load balancing state of the plurality of data transmission ports is an unbalanced state.

11. The data processing method of claim 10, wherein performing the load rebalancing operation on the network device comprises: deleting a routing table entry in the packet forwarding routing table; or determining at least one first data transmission port in the plurality of data transmission ports whose load exceeds a first preset load threshold and determining at least one second data transmission port in the plurality of data transmission ports whose load is lower than a second preset load threshold, and assigning a plurality of data streams corresponding to the plurality of first data transmission ports to the at least one second data transmission port.

12. The data processing method of any one of claims 1-9, further comprising: modifying time information of a routing table entry in the packet forwarding routing table to a calling time when the target data transmission port is determined from the plurality of data transmission ports according to the routing table entry; and triggering a deletion event to delete the routing table entry from the packet forwarding routing table when a difference between the calling time and a current time is greater than a preset deletion time.

13. A data processing apparatus applied to a network device comprising a plurality of data transmission ports, the apparatus comprising: a parsing module configured to parse an initial data packet sent by a data sending end to determine a packet feature of the initial data packet; and a processing module configured to determine a load state of the network device according to the packet feature and a load threshold. The determining module is configured to, in a case where it is determined according to the message feature that the initial data message is a target data message, determine a forwarding strategy of the target data message according to the message feature and a message forwarding routing table, wherein the message forwarding routing table is generated according to the load balancing state of the plurality of data transmission ports. The sending module is configured to determine a target data transmission port from the plurality of data transmission ports according to the forwarding strategy of the target data message, and forward the target data message to a data receiving end by using the target data transmission port.

14. A network device comprising a routing unit, a configuration unit and a monitoring unit, wherein, The routing unit is configured to parse an initial data message sent by a data sending end, determine a message feature of the initial data message, and in a case where it is determined according to the message feature that the initial data message is a target data message, determine a forwarding strategy of the target data message according to the message feature and a message forwarding routing table, wherein the message forwarding routing table is generated according to the load balancing state of a plurality of data transmission ports, and determine a target data transmission port from the plurality of data transmission ports according to the forwarding strategy of the target data message, and forward the target data message to a data receiving end by using the target data transmission port. The configuration unit is configured to determine whether there is a target routing table item corresponding to the message feature in the routing configuration cache, and if yes, add the target routing table item in the routing configuration cache to the message forwarding routing table in a case where a configuration event is triggered, and if not, determine a target data transmission port corresponding to the message feature according to the load balancing state of the plurality of data transmission ports, generate the target routing table item according to the message feature and the target data transmission port corresponding to the message feature, cache the target routing table item to the routing configuration cache, and add the target routing table item in the routing configuration cache to the message forwarding routing table in a case where a configuration event is triggered. The monitoring unit is configured to monitor the load state of the network device and the load balancing state of the plurality of data transmission ports.

15. A computing device comprising: a memory and a processor; the memory is configured to store computer programs / instructions, and the processor is configured to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the data processing method of any one of claims 1 to 12.

16. A computer readable storage medium storing computer programs / instructions, which, when executed by a processor, implement the steps of the data processing method of any one of claims 1 to 12.

17. A computer program product comprising computer programs / instructions, which, when executed by a processor, implement the steps of the data processing method of any one of claims 1 to 12.

Citation Information

Patent Citations

  • Message scheduling method, scheduler, network device and network system

    CN113366805A

  • Load balancing method and device, electronic equipment and storage medium

    CN116915709A

  • Message forwarding method and device

    CN118540273A

  • A system and method for processing message

    WO2007073620A1

Cited By

  • A uvm-based on-chip network switch verification method and platform

    CN122332236A