Data transmission method, device, equipment, system, medium and program product

The controller obtains the status information of each service in the communication system, determines the services on the chip in the subsequent time and optimizes the routing, solving the problem of low data transmission efficiency in the existing technology, improving bandwidth utilization and throughput, and ensuring data transmission reliability.

CN119071230APending Publication Date: 2024-12-03HUAWEI TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310637237.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-31
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The data transmission efficiency in existing communication systems is low, resulting in low bandwidth utilization and throughput, and the scheduling method is lagging, which can easily lead to data packet loss and retransmission.

Method used

The controller obtains the status information of each service, determines the services that need to be transmitted in the subsequent time, and reasonably determines the routing information to avoid conflicts and optimizes the data transmission process.

Benefits of technology

It improves the efficiency of data transmission, enhances bandwidth utilization and throughput, and ensures the reliability and robustness of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071230A_ABST
    Figure CN119071230A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission method, device, equipment, system, medium and program product, and belongs to the technical field of communication. In a communication system comprising a controller and at least two network devices, at least two first services exist, and first state information of one first service is used for indicating a transmission condition of the first service after a first time slice ends. The controller determines at least one second service from the at least two first services according to the first state information of each first service, then determines the routing information corresponding to each second service, and sends the routing information corresponding to the second service to the source network device of the second service. And enabling the source network equipment of the second service to transmit the service data of the second service to the target network equipment of the second service according to the routing information corresponding to the second service in a second time slice after the first time slice. The effective bandwidth utilization rate in the data transmission process can be improved, and then the data transmission efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method, device, equipment, system, medium and program product for transmitting data. Background Art

[0002] In a communication system, data transmission is often required between different network devices, wherein a network device used as a data sending end is a source network device, and a network device used as a data receiving end is a destination network device.

[0003] In the related art, after the source network device sends data of a service to the destination network device, the destination network device will send feedback information to the source network device, and the source network device adjusts the sending rate of the data of the service according to the feedback information, and continues to send the data of the service to the destination network device at the adjusted sending rate. Alternatively, the destination network device first sends a token to the source network device, and the source network device consumes the token it holds to send data of a service to the destination network device.

[0004] However, the data transmission method of the related technology is relatively limited, resulting in low efficiency of data transmission. Summary of the invention

[0005] The present application provides a method, device, equipment, system, medium and program product for transmitting data to solve the problem that the data transmission of related technologies is relatively limited and the efficiency of data transmission is low. The technical solutions provided by the present application include but are not limited to the following aspects.

[0006] In a first aspect, a method for transmitting data is provided, and the method is applied to a controller included in a communication system, and the communication system also includes at least two network devices. In the method, the controller obtains first status information of each first service in at least two first services, and the first status information of a first service is used to indicate the transmission status of the first service after the end of the first time slice. Afterwards, the controller determines at least one second service from the at least two first services based on the first status information of each first service. Then, the controller determines the routing information corresponding to each second service in at least one second service. For any second service in at least one second service, the controller sends the routing information corresponding to the second service to the source network device of the second service, and the routing information corresponding to the second service is used to control the source network device of the second service to transmit the service data of the second service to the destination network device of the second service in a second time slice later than the first time slice.

[0007] In this application, the controller performs global scheduling in units of time slices, and accurately determines the second services that need to be transmitted in the subsequent second time slice from each first service based on the first state information of each first service after the first time slice ends, and reasonably determines the routing information corresponding to the second service. The service data of the second service is transmitted between the source network device and the destination network device according to the routing information of the second service, avoiding conflicts between different second services during data transmission. Therefore, the service data of different second services will not cause packet loss due to congestion, which improves the effective bandwidth utilization and effective throughput, and ensures the efficiency of data transmission.

[0008] In one possible implementation, at least one second service is determined from at least two first services based on first status information of each first service, including: for any one of the at least two first services, cost information of the first service is determined based on the first status information of the first service, wherein the cost information of a first service is used to indicate the cost of a source network device of the first service transmitting service data of the first service to a destination network device of the first service; at least two candidate service groups are determined, wherein a candidate service group includes at least one first service of the at least two first services; and a reference service group is determined from the at least two candidate service groups based on the cost information of the first services included in each of the at least two candidate service groups, and at least one first service included in the reference service group is used as at least one second service.

[0009] By determining the cost information of the first service and determining the second service to be transmitted based on the cost information, the service data of the second service can be transmitted at a relatively low cost. The relatively low cost can be flexibly set according to actual needs, so that the transmission process of the service data of the second service can meet various different needs.

[0010] In one possible implementation, a reference business group is determined from at least two candidate business groups based on the cost information of the first business included in each of the at least two candidate business groups, including: for any one of the at least two candidate business groups, determining the cost information corresponding to the candidate business group based on the cost information of the first business included in the candidate business group; and from at least two candidate business groups, taking the candidate business group with the smallest corresponding cost information and satisfying the constraint conditions as the reference business group.

[0011] In this implementation, not only can the service data of the second service be transmitted at a relatively low cost, but the transmission process can also meet the constraint condition. This application does not limit the constraint condition, which is, for example, that within a time slice, a network device only sends service data of one type of second service and only receives service data of one type of second service. This constraint condition can avoid blocking the transmission of service data of different second services at the network device.

[0012] In one possible implementation, first status information of a first service includes a first length, where the first length is the length of service data of the first service transmitted by a source network device that does not control the first service after the end of a first time slice; determining cost information of the first service based on the first status information of the first service includes: obtaining a second length, where the second length is the length of service data of the first service allowed to be transmitted by the source network device of the first service within a second time slice; determining the cost information of the first service based on a ratio of the first length to the second length.

[0013] Among them, the ratio of the first length to the second length represents the number of time slices required to complete the transmission of business data of a second business. Since the cost information is determined based on the ratio of the first length to the second length, the second business determined based on this cost information can make the number of time slices required to complete the transmission smaller, or give priority to completing the second business with less remaining traffic, thereby shortening the average business completion time (also called average flow completion time).

[0014] In one possible implementation, the cost information of the first service is determined based on the ratio of the first length to the second length, including: determining a third service from at least two first services, service data of the third service being transmitted within a third time slice, and the third time slice being earlier than the second time slice; determining a reference value based on the relationship between the first service and the third service, and the relationship between the first service and the third service is used to indicate whether the first service and the third service are the same; determining the cost information of the first service based on the ratio of the first length to the second length and the reference value.

[0015] The reference value represents the consistency of scheduling. The same services scheduled in different time slices will result in good scheduling consistency, while different services scheduled in different time slices will result in poor scheduling consistency. Since the cost information is determined based on the ratio of the first length to the second length and the reference value, the second service determined based on this cost information not only has a shorter average service completion time, but also has better consistency.

[0016] In one possible implementation, for any one of at least one second service, after sending routing information corresponding to the second service to a source network device of the second service, the method also includes: for any one of the at least one second service, when it is detected that the service data transmission failure of the second service within the second time slice is detected, controlling the source network device of the second service to transmit the service data of the second service to the destination network device of the second service within a fourth time slice, the fourth time slice being later than the second time slice.

[0017] Retransmission is performed when a business data transmission failure is found, which can ensure the success rate of business data transmission and improve the reliability and robustness of the method for transmitting data.

[0018] In one possible implementation, the method also includes: for any one of at least one second service, a third length sent by the destination network device receiving the second service after the end of the second time slice, the third length being the length of the service data of the second service received by the destination network device of the second service within the second time slice; when the third length is less than a length threshold, it is determined that the service data transmission of the second service within the second time slice has failed, and the length threshold is less than or equal to the length of the service data of the second service sent by the source network device of the second service to the destination network device of the second service.

[0019] In one possible implementation, the method also includes: for any one of the at least one second services, after sending the routing information corresponding to the second service to the source network device of the second service, if the length information sent by the destination network device of the second service is not received within a reference time period, determining that the service data transmission of the second service within the second time slice has failed; the reference time period is greater than or equal to the sum of the time period of the second time slice, the first time period, and the second time period, the first time period being the time period for the controller to send the routing information corresponding to the second service to the source network device of the second service, and the second time period being the time period for the destination network device of the second service to send the length information to the controller.

[0020] The above two implementation methods can be selected according to actual needs, and can also be switched, so that the controller detects data transmission failure in a more flexible manner.

[0021] In a possible implementation, the communication system also includes at least two switching devices, each of the at least two switching devices corresponds to a level respectively; determining the routing information corresponding to each second service in at least one second service includes: determining at least one first switching device with the highest corresponding level from the at least two switching devices; for any second service in the at least one second service, determining the second switching device corresponding to the second service from the at least one first switching device, determining the routing information corresponding to the second service based on the second switching device, and the routing information corresponding to the second service includes information of the second switching device.

[0022] Since the routing information corresponding to the second service includes the information of the second switching device, the service data of each second service will first reach the second switching device from the source network device, and then reach the destination network device from the second switching device. The service data of each second service can have routing information of the same length, or be transmitted to the destination network device through the same number of switching devices, thereby realizing an equal-length routing solution.

[0023] In one possible implementation, for any one of at least one second service, after sending the routing information corresponding to the second service to the source network device of the second service, the method also includes: updating the first status information of each first service to obtain the second status information of each first service, the second status information of a first service being used to indicate the transmission status of the first service after the end of the second time slice; and controlling the transmission process of the service data of each first service according to the second status information of each first service.

[0024] This implementation method can update the status information of each first service in real time, ensuring the continuous and accurate operation of the method provided in the present application.

[0025] In a second aspect, a method for transmitting data is provided, and the method is applied to any one of at least two network devices included in a communication system, and the communication system also includes a controller. In this method, when the network device is a source network device of a second service, the network device first receives routing information corresponding to the second service sent by the controller, and the second service is determined by the controller from at least two first services based on the first status information of each first service, and the first status information of a first service is used to indicate the transmission status of the first service after the end of the first time slice. Afterwards, the network device transmits the service data of the second service to the destination network device of the second service within the second time slice according to the routing information corresponding to the second service, and the second time slice is later than the first time slice.

[0026] In a possible implementation, the method further includes: when the network device is a destination network device for the second service, the network device sends a third length to the controller after the second time slice ends, and the third length is the length of the service data of the second service sent by the source network device of the second service received in the second time slice. Thus, the controller can determine how much service data of the second service is received by the destination network device of the second service in the second time slice, which is conducive to the controller to accurately perform subsequent service scheduling.

[0027] In a third aspect, a device for transmitting data is provided, the device is applied to a controller included in a communication system, the communication system also includes at least two network devices, and the device includes:

[0028] An acquisition module, used to acquire first status information of each first service of at least two first services, wherein the first status information of one first service is used to indicate a transmission status of the first service after the first time slice ends;

[0029] A determination module, configured to determine at least one second service from at least two first services according to first status information of each first service;

[0030] The determination module is further used to determine routing information corresponding to each second service in at least one second service;

[0031] A sending module is used to send routing information corresponding to a second service to a source network device of the second service for any one of the at least one second services, wherein the routing information corresponding to a second service is used to control the source network device of the second service to transmit service data of the second service to the destination network device of the second service within a second time slice, and the second time slice is later than the first time slice.

[0032] In one possible implementation, a determination module is used to determine, for any one of at least two first services, cost information of the first service based on first status information of the first service, wherein cost information of a first service is used to indicate a cost of a source network device of the first service transmitting service data of the first service to a destination network device of the first service; determine at least two candidate service groups, wherein a candidate service group includes at least one first service of at least two first services; determine a reference service group from the at least two candidate service groups based on the cost information of the first services included in each of the at least two candidate service groups, and use at least one first service included in the reference service group as at least one second service.

[0033] In one possible implementation, a determination module is used to determine, for any one of at least two candidate business groups, cost information corresponding to the candidate business group based on cost information of the first business included in the candidate business group; and from at least two candidate business groups, the candidate business group with the smallest corresponding cost information and satisfying the constraint conditions is used as a reference business group.

[0034] In a possible implementation, the first status information of a first service includes a first length, where the first length is the length of service data of the first service transmitted by the source network device that does not control the first service after the first time slice ends;

[0035] The determination module is used to obtain a second length, where the second length is the length of service data of the first service that the source network device of the first service is allowed to transmit within the second time slice; and determine the cost information of the first service according to the ratio of the first length to the second length.

[0036] In one possible implementation, a determination module is used to determine a third service from at least two first services, service data of the third service is transmitted within a third time slice, and the third time slice is earlier than the second time slice; a reference value is determined based on a relationship between the first service and the third service, and the relationship between the first service and the third service is used to indicate whether the first service is the same as the third service; and cost information of the first service is determined based on a ratio of the first length to the second length and the reference value.

[0037] In one possible implementation, the device also includes: a control module, which is used to control the source network device of the second service to transmit the service data of the second service to the destination network device of the second service within a fourth time slice for any one of the at least one second services, when it is detected that the service data transmission of the second service within the second time slice fails, and the fourth time slice is later than the second time slice.

[0038] In one possible implementation, the control module is also used to, for any one of at least one second service, receive a third length sent by a destination network device of the second service after the end of a second time slice, where the third length is the length of service data of the second service received by the destination network device of the second service within the second time slice; when the third length is less than a length threshold, determine that service data transmission of the second service within the second time slice has failed, and the length threshold is less than or equal to the length of service data of the second service sent by the source network device of the second service to the destination network device of the second service.

[0039] In one possible implementation, the control module is also used to determine, for any one of the at least one second services, that after sending routing information corresponding to the second service to the source network device of the second service, if the length information sent by the destination network device of the second service is not received within a reference time period, that the service data transmission of the second service within the second time slice has failed; the reference time period is greater than or equal to the sum of the time period of the second time slice, the first time period, and the second time period, the first time period being the time period for the controller to send the routing information corresponding to the second service to the source network device of the second service, and the second time period being the time period for the destination network device of the second service to send the length information to the controller.

[0040] In a possible implementation, the communication system also includes at least two switching devices, each of the at least two switching devices corresponds to a level; a determination module is used to determine at least one first switching device with the highest corresponding level from the at least two switching devices; for any one of the at least one second service, a second switching device corresponding to the second service is determined from the at least one first switching device, and routing information corresponding to the second service is determined based on the second switching device, and the routing information corresponding to the second service includes information of the second switching device.

[0041] In a possible implementation, the device also includes: an update module, used to update the first status information of each first service, obtain the second status information of each first service, the second status information of a first service is used to indicate the transmission status of the first service after the end of the second time slice; according to the second status information of each first service, the transmission process of the service data of each first service is controlled.

[0042] In a fourth aspect, a device for transmitting data is provided, the device being applied to any one of at least two network devices included in a communication system, the communication system further including a controller, the device including:

[0043] A receiving module, used for receiving routing information corresponding to a second service sent by a controller, where the second service is determined by the controller from at least two first services according to first status information of each first service, where the first status information of a first service is used to indicate a transmission status of the first service after the first time slice ends;

[0044] The transmission module is used to transmit the service data of the second service to the destination network device of the second service within a second time slice according to the routing information corresponding to the second service, and the second time slice is later than the first time slice.

[0045] In a possible implementation, the transmission module is further configured to send a third length to the controller after the second time slice ends, where the third length is the length of service data of the second service sent by the source network device of the second service received within the second time slice.

[0046] In a fifth aspect, a device for transmitting data is provided, the device comprising a memory and a processor; at least one computer instruction is stored in the memory, and the at least one computer instruction is loaded and executed by the processor so that the device implements the method for transmitting data provided in the first aspect or the second aspect and any possible implementation method.

[0047] Optionally, there are one or more processors and one or more memories.

[0048] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0049] In a sixth aspect, a system for transmitting data is provided, the system comprising a controller and at least two network devices, the controller being used to execute the method for transmitting data provided in the first aspect and any possible implementation, and any one of the at least two network devices being used to execute the method for transmitting data provided in the second aspect and any possible implementation.

[0050] In the seventh aspect, a computer-readable storage medium is provided, in which at least one computer instruction is stored. The computer instruction is loaded and executed by a processor to enable a computer (i.e., a device for transmitting data) to implement the method for transmitting data provided in the first aspect or the second aspect and any possible implementation method.

[0051] In an eighth aspect, a computer program or a computer program product is provided, wherein the computer program or the computer program product comprises computer instructions, and the computer instructions are executed by a processor so that a computer implements the method for transmitting data provided in the first aspect or the second aspect and any possible implementation method.

[0052] In the ninth aspect, a chip is provided, comprising a processor for calling and executing instructions stored in a memory from the memory, so that a computer equipped with the chip implements the method for transmitting data provided in the first aspect or the second aspect and any possible implementation method.

[0053] In the tenth aspect, another chip is provided, comprising: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, a computer equipped with the chip implements the method for transmitting data provided in the first aspect or the second aspect and any possible implementation method.

[0054] It should be understood that the beneficial effects achieved by the technical solutions of the third to tenth aspects of the present application and the corresponding possible implementation methods can be referred to the technical effects of the first and second aspects and their corresponding possible implementation methods, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 A schematic diagram of data transmission in a related technology provided in an embodiment of the present application;

[0056] Figure 2 A schematic diagram of transmitting data in another related technology provided in an embodiment of the present application;

[0057] Figure 3 A schematic diagram of an implementation environment provided for an embodiment of the present application;

[0058] Figure 4 A schematic diagram of the structure of a controller provided in an embodiment of the present application;

[0059] Figure 5 A flowchart of a method for transmitting data provided in an embodiment of the present application;

[0060] Figure 6 A schematic diagram of global scheduling of multiple services provided in an embodiment of the present application;

[0061] Figure 7 A schematic diagram of multiple scheduling of a single service provided in an embodiment of the present application;

[0062] Figure 8 A schematic diagram of multiple first services provided in an embodiment of the present application;

[0063] Fig. 9 A matching bipartite graph corresponding to a plurality of first services provided in an embodiment of the present application;

[0064] Fig.10 A schematic diagram of multiple second services provided in an embodiment of the present application;

[0065] Fig.11 A matching bipartite graph corresponding to a plurality of second services provided in an embodiment of the present application;

[0066] Fig.12 A schematic diagram of an equal-length routing solution provided in an embodiment of the present application;

[0067] Fig.13 A schematic diagram of a graph coloring algorithm provided in an embodiment of the present application;

[0068] Fig.14A schematic diagram of an effective bandwidth utilization provided by an embodiment of the present application;

[0069] Fig.15 A schematic diagram of an average flow completion time provided in an embodiment of the present application;

[0070] Fig.16 A comparison diagram of the effect of transmitting data provided by an embodiment of the present application;

[0071] Fig.17 Another comparison diagram of data transmission effects provided in an embodiment of the present application;

[0072] Fig.18 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application;

[0073] Fig.19 A schematic diagram of the structure of another device for transmitting data provided in an embodiment of the present application;

[0074] Fig. 20 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0075] The terms used in the implementation section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application.

[0076] The communication system includes multiple network devices. Different network devices need to use switching devices to transmit data of various services. Since the data of services are often transmitted in the form of streams, the data of services can also be considered as the traffic of services. Determining which data each service needs to transmit is also called scheduling the traffic of services.

[0077] How to transmit data, or how to schedule traffic, affects indicators such as effective bandwidth utilization and effective throughput of the communication system. The reason is that if the data is transmitted unreasonably, the amount of data that the switching device needs to transmit will be greater than the amount of data that the switching device can transmit, so the switching device will discard the data, resulting in packet loss. Among them, when packet loss occurs, data retransmission is often required. Since data retransmission requires bandwidth, data retransmission will result in a decrease in effective bandwidth utilization. Effective bandwidth utilization refers to the ratio of bandwidth occupied by successfully transmitted data to the total bandwidth that the communication system can provide. Since data retransmission also takes time, data retransmission will also result in a decrease in effective throughput. Effective throughput refers to the number of services that can be completed per unit time. A service has been completed means that the data of the service has been successfully transmitted. On this basis, indicators such as effective bandwidth utilization and effective throughput of the communication system may also affect the service level agreement (SLA) of the communication system for the service.

[0078] It can be seen from this that it is necessary to reasonably transmit data in the communication system (that is, reasonably schedule the traffic) to avoid packet loss, improve the efficiency of data transmission, and enable the communication system to operate stably and efficiently with good indicators to ensure that the communication system meets the SLA requirements for the business.

[0079] Next, the method of transmitting data in the related art is described.

[0080] In the related art 1, data transmission is performed based on the transmission control protocol (TCP). For example, the data transmission methods include the following congestion control and flow scheduling algorithms: TCP Reno, TCP New Reno, TCP Selective Acknowledgement (SACK), TCP Binary Increase (BIC), TCP Cubic, and Data Center TCP (DCTCP), etc.

[0081] Among them, see Figure 1A TCP connection is established between a source network device for sending data packets and a destination network device for receiving data packets. The source network device maintains a sending window and transmits a data packet of a service within the sending window to the destination network device through a TCP connection. After receiving the data packet, the destination network device returns an acknowledgment (ACK) packet to the source network device through a TCP connection. The source network device adjusts the size of the sending window according to the ACK packet, that is, adjusts the sending rate of the data packet of the service. If the source network device receives non-repeated ACK packets continuously, the size of the sending window is increased. If the source network device receives repeated ACK packets continuously or fails to receive ACK packets for more than a certain period of time (indicating that packet loss has occurred), the size of the sending window is reduced and the data packet is discarded accordingly.

[0082] The DCTCP algorithm also carries an explicit congestion notification (ECN) mark in the ACK packet. If a data packet passes through a congested switching device during transmission, that is, a switching device whose forwarding queue length exceeds the congestion threshold (the congestion threshold needs to be adaptively adjusted according to the scenario, and the adjustment method is relatively complex), the switching device will carry the ECN mark in the ACK packet and send the ACK packet carrying the ECN mark to the source network device. The source network device will further adjust the size of the sending window based on the proportion of ACK packets carrying the ECN mark received within a certain period of time, in addition to adjusting the size of the sending window based on the ACK packet.

[0083] The problems of the first related technology include: the source network device schedules the traffic of each service separately, which is very limited. When a large number of source network devices transmit data to the same destination network device (i.e., when TCP incast occurs, incast refers to a many-to-one communication mode), it still leads to low data transmission efficiency and affects various indicators of the communication system. In addition, the scheduling method provided by the first related technology is lagging, that is, the size of the sending window is adjusted only after packet loss has occurred, and the scheduling effect is poor.

[0084] In the related technology 2, data transmission is performed based on a token packet.

[0085] After a communication connection is established between a source network device for sending a data packet and a destination network device for receiving a data packet, see Figure 2, the destination network device sends a token packet of a service to the source network device. The switching device needs to reserve bandwidth for the token packet and the data packet respectively according to the size of the token packet and the size of the data packet. The token packets corresponding to different services (that is, the token packets sent by different destination network devices) will compete for the bandwidth reserved by the switching device for the token packets. The token packets exceeding the reserved bandwidth will be discarded by the switching device, and the remaining token packets will be successfully sent to the source network device by the switching device. The source network device then consumes the successfully received token packets to transmit the data packet to the destination network device. Each data packet needs to correspond to a token packet.

[0086] The problems of the related technology 2 include: the destination network device sends the corresponding token packet for each service, the competition between the token packets occurs on a single switching device, and the source network device relies on the token packet corresponding to each service for scheduling, which is very limited and leads to low data transmission efficiency. In addition, the switching device in the related technology 2 also needs to reserve bandwidth for the token packet, which further reduces the data transmission efficiency and affects various indicators of the communication system.

[0087] The present invention provides a method for transmitting data. Figure 3 In the implementation environment shown, the implementation environment belongs to a communication system, such as a data center network. The implementation environment includes a controller, a switching device, and at least two network devices, wherein the switching device is used to connect different network devices in the at least two network devices and is also used to connect the controller and each network device in the at least two network devices.

[0088] The controller is used to control the network device, and the network device is used to realize data transmission through the switching device according to the control of the controller. In the process of data transmission, the network device used to send data is the source network device, and the network device used to receive data is the destination network device. It should be understood that a network device can be both a source network device and a destination network device, because network devices usually have two functions of receiving and sending.

[0089] The embodiments of the present application do not limit the form of the controller, network device and switching device. Exemplarily, the controller can be software or hardware. When the controller is software, the controller can be deployed on one or more hardware devices, which can be network devices or switching devices, or other devices other than network devices and switching devices. The network device includes but is not limited to a server, a host or other terminal device. The switching device includes but is not limited to a switch or a router, and the switch is, for example, a top of rack (ToR) switch. A rack can have multiple switches, and the multiple switches include ToR switches and other switches. The ToR switch is used to manage other switches, or the ToR switch is a switch of a higher level than other switches. In addition, various topologies can be formed between the controller, the switching device and the network device according to actual needs. The formed topologies include but are not limited to CLOS (name) network topology, etc., and the CLOS topology is, for example, a fat tree topology. Among them, the CLOS network topology has the property of completely bisection bandwidth. Each device (such as each network device) included in the CLOS network topology is equally divided into two parts so that the connection bandwidth between the two parts is minimized. The minimum connection bandwidth is the completely bisection bandwidth, which is used to indicate the communication capability between each device.

[0090] In an exemplary embodiment, see Figure 4 , the controller includes a storage module, a first calculation module and a second calculation module. The storage module is used to store the status information of each first service among at least two first services, and the status information of a first service is used to indicate the transmission status of the first service. The status information of each first service can be updated according to the actual transmission status. The first calculation module is used to determine at least one second service that needs to be transmitted within a time slice from at least two first services based on the status information of each first service stored in the storage module. The second calculation module is used to determine the routing information of each second service, so that the source network device of the second service sends the data of the second service to the destination network device of the second service according to the routing information. For example, the second calculation module can obtain topology information to determine the routing information of each second service according to the topology information. The topology information is used to describe the topology formed between the controller, the switching device and the network device.

[0091] The controller needs to be connected to the switching device through a communication port so that the switching device can be used to connect the controller and each of the at least two network devices. When the controller is hardware, the controller may include the communication port. When the controller is software, the communication port may be a communication port on a hardware device deployed by the controller. Thus, the storage module may receive the status information of each first service through the communication port so as to store the status information of each first service. The second computing module may obtain topology information through the communication port, and may also send the routing information of the second service to the source network device of the second service through the communication port after determining the routing information of each second service. Exemplarily, the communication port includes but is not limited to a network card, and the network card is, for example, an Ethernet card, which is not limited here.

[0092] The present application embodiment provides a method for transmitting data. Figure 3 The interaction between the controller and the network device in the implementation environment shown is implemented. Figure 5 As shown, the method includes the following steps 501 to 506.

[0093] Step 501: The controller obtains first status information of each first service of at least two first services, where the first status information of one first service is used to indicate the transmission status of the first service after the first time slice ends.

[0094] In this embodiment of the present application, continuous time is divided into multiple time slices, so that the controller controls the network device to transmit data in units of time slices. It should be understood that clock synchronization is required between the controller, the network device and the switching device to ensure that the time slices used by the controller, the network device and the switching device are synchronized and aligned, thereby ensuring the accuracy of the transmitted data. The first time slice involved in step 501 can be any time slice among the multiple time slices obtained by division.

[0095] The embodiment of the present application does not limit the duration of the time slice, and the duration of the time slice can be in microseconds, or it can be set to other durations based on experience or actual needs. Exemplarily, in the embodiment of the present application, the duration of each time slice is greater than the maximum round trip time (RTT). Wherein, the communication system includes at least two network devices, each network device corresponds to a first delay and a second delay, and the first delay is the time required for the controller to send the routing information corresponding to the first service to the network device when the network device is used as the source network device of the first service. The second delay is the time required for the network device to send the length information to the controller when the network device is used as the destination network device of the first service. The length information is the length of the service data of the first service received by the destination network device within a time slice. The embodiment of the present application takes the maximum value of all the first delays and the maximum value of all the second delays as the maximum RTT.

[0096] In an exemplary embodiment, for any one of the at least two first services, the controller receives the initial status information of the first service sent by the source network device of the first service, and performs real-time maintenance (or updates) on the initial status information of the first service. Then, after the end of the first time slice (for example, at the end moment of the first time slice), the maintained status information (or the updated status information) can be used to indicate the transmission status of the first service after the end of the first time slice, that is, it can be used as the first status information of the first service.

[0097] Among them, the process in which the source network device of the first service sends the initial state information of the first service to the controller is also called the registration process of the first service. The source network device of the first service can perform the registration process of the first service when it is determined that the service data of the first service needs to be transmitted to the destination network device of the first service. Exemplarily, the initial state information includes a service identifier and an initial length. The service identifier may include: the device address of the source network device of the first service itself, and the device address of the destination network device of the first service itself. Alternatively, the service identifier may also include: the port address of the source port corresponding to the first service on the source network device of the first service, and the port address of the destination port corresponding to the first service on the destination network device of the first service. In addition, the initial length is the total length of the service data of the first service that needs to be transmitted. In other words, when the controller has not yet controlled the source network device of the first service to transmit the service data of the first service to the destination network device of the first service, the length of the service data of the first service is the initial length.

[0098] For example, see Figure 6, the source network devices of service 1 and service 3 have respectively performed the registration process before time slice 1, so the controller continuously schedules the traffic of service 1 and service 3 in time slice 1 to time slice 5, and correspondingly maintains the initial state information of service 1 and service 3. The source network device of service 2 performs the registration process of service 2 in time slice 1, and the controller schedules the traffic of service 2 in time slice 2, and correspondingly maintains the initial state information of service 2. The source network device of service 4 performs the registration process of service 4 in time slice 3, and the controller schedules the traffic of service 4 in time slice 4, and maintains the initial state information of service 4.

[0099] As mentioned above, the initial state information of a first service includes a service identifier and an initial length. The initial length is the total length of the service data of the first service to be transmitted. The maintenance of the initial state information by the controller may refer to the maintenance of the initial length. For example, the maintenance of the initial length includes: dividing the initial length into Figure 7 The sum of the three lengths of the scheduled length (L_sche), the acknowledged length (L_ack) and the unscheduled length (L_rem) is the initial length. The following takes a first service as an example to illustrate the process of the controller maintaining the initial state information of the first service.

[0100] After the controller obtains the initial state information of the first service at a moment in a time slice, the controller performs scheduling calculations based on the current state information of all first services to determine the length of the service data of the first service that needs to be transmitted in the subsequent time slice. If the length is zero, it means that the service data of the first service does not need to be transmitted in the subsequent time slice, and the service data of other first services may need to be transmitted first. If the length is not zero, it means that a certain length of service data of the first service needs to be transmitted in the subsequent time slice. Exemplarily, the certain length may be a fixed length that is defaulted by both the controller and the network device. For example, the fixed length is the maximum length of service data that can be transmitted in a time slice according to the bandwidth of the network device. Alternatively, the certain length may also be a length determined by the controller, which is not limited here.

[0101] Then, in the case where a certain length of service data of the first service needs to be transmitted in a subsequent time slice, the controller controls the source network device of the first service to send the certain length of service data of the first service to the destination network device of the first service in the subsequent time slice, and records the certain length as the scheduled length. Accordingly, the controller records the length of the initial length other than the scheduled length, that is, the difference between the initial length and the scheduled length, as the unscheduled length.

[0102] For example, see Figure 7, the controller obtains result 1 through scheduling calculation 1 in time 1 and time slice 2, the source network device of the first service sends the result 1 in time slice 2, the source network device of the first service receives the result 1 before the start of time slice 3, and sends the service data of the first service of a certain length to the destination network device of the first service according to the result 1 in time slice 3 (corresponding to the subsequent time slice above). The result 1 can be the routing information corresponding to the first service, and the routing information will be described in detail later, and will not be repeated here.

[0103] Since the controller controls the source network device of the first service, the source network device of the first service will send the service data of the first service of a certain length to the destination network device of the first service in the subsequent time slice according to the control of the controller. Correspondingly, after the subsequent time slice ends, the destination network device will send the length of the service data of the first service received by itself in the subsequent time slice to the controller. As a result, the controller records the length sent by the destination network device as the confirmed length from the scheduled length. As for the length other than the confirmed length in the scheduled length, that is, the difference between the scheduled length and the confirmed length, it will still remain as the scheduled length.

[0104] For example, see Figure 7 , the destination network device of the first service receives the service data of the first service in time slice 1, and sends the length of the service data of the first service received to the controller after the end of time slice 1. Then, the controller receives the length sent by the destination network device of the first service in time slice 2, so that the confirmed length when performing scheduling calculation 2 in time slice 2 is greater than the confirmed length when performing scheduling calculation 1 before. Similarly, the controller will also receive the length sent by the destination network device of the first service after the end of time slice 2 in time slice 3, which is the length of the service data of the first service received by the destination network device of the first service in time slice 2. The controller will also receive the length sent by the destination network device of the first service after the end of time slice 3 in time slice 4, which is the length of the service data of the first service received by the destination network device of the first service in time slice 3.

[0105] Exemplarily, the confirmed length is zero, indicating that the destination network device has not received any service data of the first service in the subsequent time slice. Alternatively, the confirmed length is not zero, but is less than the length of the service data of the first service sent by the source network device of the first service in the subsequent time slice, indicating that the destination network device has only received part of the service data of the first service sent in the subsequent time slice. Alternatively, the confirmed length is not zero, and is equal to the length of the service data of the first service sent by the source network device of the first service in the subsequent time slice, indicating that the destination network device has received all the service data of the first service sent in the subsequent time slice.

[0106] According to the above description, the controller can divide the initial length into three lengths through the maintenance process: scheduled length, confirmed length and unscheduled length. Among them, the scheduled length is the length of the service data of the first service that the controller needs to control the source network device of the first service to send, but the destination network device of the first service has not yet confirmed that it has been received. That is, the scheduled length is the length of the service data of the first service that has been confirmed to be required to be transmitted but has not yet confirmed whether it has been successfully transmitted. The confirmed length is the length of the service data of the first service that the controller needs to control the source network device of the first service to send, and the destination network device of the first service also confirms that it has been received. That is, the confirmed length is the length of the service data of the first service that has been confirmed to need to be transmitted and confirmed to be successfully transmitted. The unscheduled length is the length of the service data of the first service that the controller has not yet determined to control the source network device of the first service to send. That is, the unscheduled length is the length of the data that has not yet been transmitted.

[0107] Since the controller can divide the initial length into three lengths through a real-time maintenance process, the controller can determine at least one of the three lengths obtained through real-time maintenance as the first state information of the first service after the first time slice ends. For example, the controller determines the unscheduled length of the three lengths as the first state information of the first service, which is not limited in the embodiments of the present application.

[0108] Step 502: The controller determines at least one second service from at least two first services according to first status information of each first service.

[0109] Since the controller has obtained the first status information of each first service, and the first status information can indicate the real-time transmission status of the first service after the end of the first time slice, the controller can perform global comprehensive scheduling based on the first status information of each first service to determine at least one second service that needs to be transmitted in the second time slice after the first time slice from at least two first services.

[0110] In some embodiments, the second time slice is a time slice after the first time slice. That is, the controller determines only the second service that needs to be transmitted in a subsequent time slice based on the first state information of each first service after the first time slice ends. This implementation has high accuracy, and the embodiment of the present application can adopt this implementation when the efficiency of data transmission is required to be high.

[0111] In other embodiments, the second time slice is a plurality of time slices after the first time slice. That is, the controller determines in batches the second services to be transmitted in the subsequent plurality of time slices according to the first status information of each first service after the first time slice ends, and the second services to be transmitted in different second time slices may be the same or different. The embodiment of the present application may adopt this implementation mode when the efficiency of data transmission is not required to be high.

[0112] Of course, these two implementations can also be flexibly switched by the controller, which is not limited here. For example, after the time slice A ends, the controller determines the second service that needs to be transmitted in a subsequent time slice B according to the first state information of the first service. After the time slice B ends, the controller determines the second service that needs to be transmitted in the subsequent two time slices C respectively according to the first state information of the first service.

[0113] In an exemplary embodiment, the controller determines at least one second service from at least two first services according to the first status information of each first service, including the following steps 5021 to 5023.

[0114] Step 5021, for any one of the at least two first services, determine the cost information of the first service according to the first status information of the first service, and the cost information of the first service is used to indicate the cost of the source network device of the first service transmitting the service data of the first service to the destination network device of the first service.

[0115] Among them, according to different actual needs, multiple methods can be used to determine the cost information of the first service according to the first state information of the first service. The embodiment of the present application does not limit this, and the following examples are used to illustrate.

[0116] Exemplarily, the first state information of a first service includes a first length, which is the length of service data of the first service transmitted by the source network device that does not control the first service after the end of the first time slice, that is, the unscheduled length mentioned above. Accordingly, determining the cost information of the first service according to the first state information of the first service includes: obtaining a second length, which is the length of service data of the first service that the source network device of the first service is allowed to transmit within the second time slice; and determining the cost information of the first service according to the ratio of the first length to the second length.

[0117] Among them, since the first length is the unscheduled length of the service data of the first service, and the second length is the length of the service data allowed to be scheduled within the time slice, the ratio of the first length to the second length represents the number of time slices required to transmit the service data of the first service that has not been transmitted. By determining the cost information of the first service according to the ratio of the first length to the second length, the number of time slices required to complete the transmission can be used as the cost of the first service, so as to control the number of time slices required to complete the transmission, for example, making the number of time slices required to complete the transmission smaller.

[0118] In some embodiments, considering that the ratio of the first length to the second length may be a non-integer, the cost information of the first service is determined according to the ratio of the first length to the second length, including: rounding up the ratio of the first length to the second length, and determining the obtained integer value as the cost information of the first service. When the ratio of the first length to the second length is an integer, the integer value obtained by rounding up is the ratio of the first length to the second length. When the ratio of the first length to the second length is a non-integer, the integer value obtained by rounding up is the smallest integer greater than the ratio of the first length to the second length. This method is conducive to ensuring the accuracy of the determined cost information.

[0119] In other embodiments, the cost information of the first service is determined based on the ratio of the first length to the second length, including: determining a third service from at least two first services, service data of the third service being transmitted within a third time slice, and the third time slice being earlier than the second time slice; determining a reference value based on the relationship between the first service and the third service, and the relationship between the first service and the third service is used to indicate whether the first service and the third service are the same; determining the cost information of the first service based on the ratio of the first length to the second length and the reference value.

[0120] In this implementation, not only the number of time slices required to complete the transmission (i.e., the ratio of the first length to the second length) is used as the cost of the first service, but also the scheduling consistency is used as the cost of the first service through a reference value. The consistency of scheduling is related to the frequency of changing the scheduled services. The more frequently the scheduled services are changed, the worse the consistency of scheduling is. In other words, if the services scheduled in two different time slices are different, that is, the service data of different services are transmitted, then the consistency of scheduling will be affected. Based on this, an embodiment of the present application determines the third service transmitted by each network device in the third time slice before the second time slice, and determines the relationship between the first service and the third service. If the relationship indicates that the first service and the third service are the same service, the reference value is smaller due to the higher consistency of scheduling. If the relationship indicates that the first service and the third service are different services, the reference value is larger due to the lower consistency of scheduling.

[0121] After determining the reference value, the cost information of the first service can be determined based on the ratio of the first length to the second length and the reference value. For example, the ratio of the first length to the second length is rounded up to obtain an integer value, and the cost information of the first service is determined based on the integer value and the reference value. Exemplarily, the embodiment of the present application can use a certain calculation method to calculate the integer value and the reference value to obtain the cost information of the first service. The calculation method includes but is not limited to weighted summation, multiplication, etc., which is not limited here.

[0122] Step 5022: Determine at least two candidate service groups, where one candidate service group includes at least one first service among the at least two first services.

[0123] The number of first services included in different candidate service groups can be the same to avoid the number of first services affecting the subsequent calculation process, and the embodiment of the present application does not limit the number of first services. Each candidate service group can be randomly selected by the controller or selected by the controller according to a certain algorithm, and the embodiment of the present application does not limit the method of determining two candidate service groups.

[0124] Step 5023: determine a reference service group from at least two candidate service groups according to cost information of first services included in each of the at least two candidate service groups, and use at least one first service included in the reference service group as at least one second service.

[0125] In an exemplary embodiment, a reference business group is determined from at least two candidate business groups based on the cost information of the first business included in each of the at least two candidate business groups, including: for any one of the at least two candidate business groups, determining the cost information corresponding to the candidate business group based on the cost information of the first business included in the candidate business group; and from at least two candidate business groups, taking the candidate business group with the smallest corresponding cost information and satisfying the constraint conditions as the reference business group.

[0126] If a candidate service group includes only one first service, the cost information of the first service can be directly used as the cost information corresponding to the candidate service group. If a candidate service group includes at least two first services, the sum of the cost information of at least two first services can be used as the cost information corresponding to the candidate service group. Afterwards, from among the at least two candidate service groups, the candidate service group corresponding to the minimum cost information and satisfying the constraint condition is used as the reference service group, so that at least one first service included in the reference service group is determined as the second service.

[0127] The embodiment of the present application does not limit the constraint condition, and the constraint condition can be set according to experience or actual needs. For example, the constraint condition may be: a network device only receives service data of one service in a time slice, and a network device only sends service data of one service. For another example, the constraint condition may be: an input port of a network device only receives service data of one service in a time slice, and an output port of a network device only sends service data of one service. Through such a constraint condition, it is possible to avoid conflicts between different second services on each network device after the second service is determined from the first service, thereby avoiding congestion on each network device when transmitting service data of various second services.

[0128] Through this process of determining the second service, it can be ensured that the determined second service is the second service that minimizes the cost of the data transmission process. For example, when the number of time slices required to complete the transmission is used as the cost of the first service, the determined second service can reduce the number of time slices required to complete the transmission, thereby improving the average completion time of the service and increasing the effective throughput. For another example, when the consistency of scheduling is also used as the cost of the first service, the determined second service can also achieve better consistency in scheduling, thereby eliminating the need to frequently switch scheduled services during the scheduling process. In addition, it can also be ensured that the determined second service meets the constraints, thereby avoiding congestion of service data, and further avoiding the occurrence of packet loss, which is conducive to improving the effective throughput and effective bandwidth utilization.

[0129] In an exemplary embodiment, the embodiment of the present application constructs a matching bipartite graph based on the cost information of the first service, and solves it through the minimum cost maximum flow algorithm to obtain a reference service group. Among them, the minimum cost corresponds to the minimum cost information above, and the maximum flow refers to the maximum flow of the transmitted service data under the condition of satisfying the constraint conditions.

[0130] Taking the network device as a server as an example, the first service that needs to be transmitted between different servers can be expressed as Figure 8 The curved arrow in the figure points from the source network device of the first service to the destination network device of the first service. On this basis, each server is split into a source address A_S and a destination address A_T. Figure 8 Each curved arrow in represents a one-way edge corresponding to the first business. A one-way edge is Fig. 9 A straight arrow is shown.

[0131] Among them, a unidirectional edge corresponding to a first service points from the source network device address of the first service to the destination network device address of the first service (or from the source port address to the destination port address, which can match the adopted constraints), and the unidirectional edge corresponds to the cost information of the first service.

[0132] For example, if there is an unscheduled first service of length L_rem between source address A_S and destination address B_T (destination address B_t is different from destination address A_T, i.e., source address and destination address do not belong to the same server), the cost information of the first service is (L_rem / C), where C is the second length mentioned above. Then, there is a unidirectional edge corresponding to the first service, the unidirectional edge points from A_S to B_T, and the cost information corresponding to the unidirectional edge is (L_rem / C), and the unidirectional edge can be expressed as (A_S, B_T, (L_rem / C)).

[0133] In addition, based on the unidirectional edge, the embodiment of the present application further introduces a source node S and a destination node T, connects the source addresses of all servers through the source node S, and connects the destination addresses of all servers through the destination node T, thereby forming a matching bipartite graph. The source node S and the destination node T are introduced to facilitate the solution through the minimum cost maximum flow algorithm to obtain a reference service group.

[0134] For example, an exemplary reference business group obtained by solving the problem can be found in Fig.10 and Fig.11 The first service included in the reference service group is Fig.10 In the figure, it is represented as a curved arrow, while in Fig.11 In the figure, it is represented by a bold straight arrow, while Fig.11 The straight arrows that are not bold in the figure represent the first service that is not included in the reference service group. Fig.10 and Fig.11 It can be seen that the second service solved by the embodiment of the present application can enable each server to send only one service data of the second service and receive only one service data of the second service in the second time slice.

[0135] Step 503: The controller determines routing information corresponding to each second service in at least one second service.

[0136] Since the controller has determined the second service that needs to be transmitted within the second time slice, and the second service corresponds to an active network device and a destination network device, the controller needs to further determine the routing information between the source network device and the destination network device for transmitting the service data of the second service. The routing information is used to indicate which switching devices need to be passed through in what order during the transmission of the service data of the second service.

[0137] In some implementations, the controller may query the routing table to determine the routing information corresponding to the second service. Alternatively, in other implementations, the communication system further includes at least two switching devices, and each of the at least two switching devices corresponds to a level. For example, see Fig.12 The switching devices shown in the figure have the highest-level switching devices in the first row above, the lowest-level switching devices in the third row above, and the switching devices in the second row above are switching devices with levels between the highest and the lowest. Accordingly, determining the routing information corresponding to each second service in at least one second service includes: determining at least one first switching device with the highest corresponding level from at least two switching devices. For any one of the at least one second service, determining the second switching device corresponding to the second service from at least one first switching device, determining the routing information corresponding to the second service based on the second switching device, and the routing information corresponding to the second service includes information of the second switching device.

[0138] Among them, for a second service, the second switching device corresponding to the second service is determined from at least one first switching device with the highest level, and the routing information corresponding to the second service includes the information of the second switching device, so that the service data of the second service will be first transmitted from the source network device of the second service to the second switching device with the highest level, and then transmitted from the second switching device with the highest level to the destination network device of the second service. Since each second service will be transmitted to the second switching device with the highest level, it is guaranteed that different second services will have routes of the same length, forming an equal-length routing solution.

[0139] For example, the embodiment of the present application uses a graph coloring algorithm to determine the second switching device corresponding to each second service according to certain constraints. For example, each second switching device is corresponding to a color. If a second service corresponds to a second switching device, the source network device of the second service and the destination network device of the second service are both colored with the color corresponding to the second switching device. Fig.13 , the constraint conditions may include: the color corresponding to each second switching device can only be used to color two source network devices and two destination network devices at most, so as to ensure that each network device (i.e. Fig.13 The server shown in FIG. 1 only sends service data for one service and only receives service data for one service. Fig.13 ,Constraints can also include: the source network device and the destination network device in the same box cannot be colored the same color, because the combination Fig.12 It can be seen that two network devices in the same box correspond to the same second switching device. If the two network devices both use the same second switching device, conflicts are likely to occur.

[0140] Of course, the graph coloring algorithm is only an example. The embodiment of the present application can also use other methods other than the graph coloring algorithm to determine the second switching device corresponding to each second service according to actual needs, which is not limited here.

[0141] Step 504: For any second service among the at least one second service, the controller sends routing information corresponding to the second service to the source network device of the second service.

[0142] The routing information corresponding to a second service is used to control the source network device of the second service to transmit the service data of the second service to the destination network device of the second service within the second time slice. For each second service, the controller sends the routing information corresponding to the second service to the source network device of the second service to control the source network device of the second service, so that the source network device of the second service transmits the service data according to the routing information corresponding to the second service.

[0143] It should be understood that if the length of the service data of the second service that needs to be transmitted according to the sent routing information is a fixed length that is the default of both the controller and the source network device of the second service, the controller may not send the length. Alternatively, if the length of the service data of the second service that needs to be transmitted according to the sent routing information is a length determined by the controller itself, then in addition to sending the routing information corresponding to the second service, the controller also needs to send the determined length to ensure that the source network device of the second service transmits the service data of the second service of the length according to the sent routing information.

[0144] Step 505: The network device receives routing information corresponding to the second service sent by the controller.

[0145] When a network device is a source network device of a second service, since the controller sends routing information corresponding to the second service, the network device can correspondingly receive routing information corresponding to the second service. The second service is determined by the controller from at least two first services according to the first status information of each first service, and the first status information of a first service is used to indicate the transmission status of the first service after the end of the first time slice.

[0146] Step 506: The network device transmits the service data of the second service to the destination network device of the second service within the second time slice according to the routing information corresponding to the second service.

[0147] According to the description in step 503, the routing information is used to indicate which switching devices need to be passed through in what order during the transmission of the service data of the second service. Therefore, in the second time slice, the source network device of the second service transmits the service data of the second service to the first switching device indicated by the routing information, so that each switching device indicated by the routing information forwards the service data of the second service hop by hop, so that the service data of the second service reaches the destination network device of the second service. In this way, the source network device of the second service transmits the service data of the second service to the destination network device of the second service in the second time slice according to the routing information corresponding to the second service.

[0148] It should be understood that after the source network device of the second service transmits the service data of the second service according to the routing information corresponding to the second service, there may be a transmission failure, such as the transmission failure may be caused by a link abnormality, etc. Therefore, the method provided in the embodiment of the present application also includes: for any second service of at least one second service, when it is detected that the service data transmission failure of the second service in the second time slice occurs, controlling the source network device of the second service to retransmit the service data of the second service to the destination network device of the second service in a fourth time slice, and the fourth time slice is later than the second time slice.

[0149] In some implementations, when a network device is a destination network device for a second service, the network device sends a third length to the controller after the second time slice ends, and the third length is the length of service data of the second service received by the destination network device of the second service within the second time slice. Accordingly, for any second service among at least one second service, the controller receives the third length sent by the destination network device of the second service after the second time slice ends; when the third length is less than the length threshold, it is determined that the service data transmission of the second service within the second time slice fails.

[0150] The length threshold is less than or equal to the length of the service data of the second service sent by the source network device of the second service to the destination network device of the second service. If the third length is less than the length threshold, it means that the destination network device of the second service has not received all the service data sent by the source network device of the second service, but has not received any service data or has only received part of the service data, which can indicate that the service data transmission of the second service in the second time slice has failed.

[0151] Exemplarily, the third length sent by the destination network device of the second service may be a length that is continuous with the service data of the second service received previously. For example, the destination network device of the second service previously received data packet 1, and received data packets 2 and 4 within the second time. Since data packets 1 and 2 are continuous, but data packets 2 and 4 are not continuous, the destination network device of the second service only sends the third length of data packet 2 to the controller, but does not send the third length of data packet 4. After receiving the third length, the controller adjusts the confirmed length corresponding to the second service from the length of data packet 1 to the sum of the length of data packet 1 and the length of data packet 2. Of course, the destination network device of the second service can also send the third length together with the service identifier of the second service to the controller, so that the controller can identify which second service the received third length corresponds to.

[0152] Alternatively, the third length sent by the destination network device of the second service may be a length that is discontinuous with the service data of the second service previously received. For instance, in the above example, the destination network device of the second service not only sends the length of data packet 2, but also sends the length of data packet 4. Of course, the destination network device of the second service may also send the service identifier of the second service and the identifiers of each data packet, so that the controller can distinguish the length of the second service and different data packets. Accordingly, after receiving the third length, the service identifier, and the identifier of the data packet, the controller adjusts the confirmed length corresponding to the second service from the length of data packet 1 to the length of data packet 1, the length of data packet 2, and the length of data packet 4.

[0153] Of course, no matter how the destination network device of the second service sends the third length, the controller can accurately determine which service data of the second service is the service data that the destination network device of the second service has confirmed to receive after the second time slice, and which service data is the service data that has been transmitted by the source network device that has controlled the second service but failed to be received by the destination network device of the second service, based on the received third length, so that the service data that failed to be transmitted can be retransmitted. In addition, when retransmitting the service data that failed to be transmitted, the service data that has been successfully transmitted can also be transmitted together according to actual needs, so as to improve the reliability of data transmission through redundant data transmission.

[0154] In other embodiments, for any one of at least one second service, after sending the routing information corresponding to the second service to the source network device of the second service, if the length information sent by the destination network device of the second service is not received within a reference time period, it is determined that the service data transmission of the second service within the second time slice has failed.

[0155] Among them, the reference duration is greater than or equal to the duration of the second time slice, the sum of the first duration and the second duration, the first duration is the duration of the controller sending the routing information corresponding to the second service to the source network device of the second service, the second duration is the duration of the destination network device of the second service sending the length information to the controller, and the sum of the first duration and the second duration corresponds to the maximum RTT described in the above step 501. Therefore, for the moment when the controller sends the routing information of the second service to the source network device of the second service, and the moment when the controller receives the length information (such as the third length mentioned above) sent by the destination network device of the second service, the difference between the two moments is at least the reference duration. Therefore, in the embodiment of the present application, if the length information sent by the destination network device of the second service is not received after the reference duration, it is considered that the destination network device of the second service has not sent the length information because it has not received the service data of the second service or has only received a part of the service data of the second service sent, thereby considering that the transmission has failed, and the retransmission of the service data of the second service can be triggered in the case of transmission failure.

[0156] Of course, the embodiment of the present application may also determine a fixed duration greater than the reference duration, for example, the fixed duration is greater than or equal to the sum of the durations of two time slices, and the fixed duration is, for example, the sum of the durations of 2 time slices, the sum of the durations of 3 time slices, the sum of the durations of 4 time slices, etc. After the controller sends the routing information corresponding to the second service to the source network device of the second service, if the controller does not receive the length information sent by the destination network device of the second service within the fixed duration, it determines that the service data transmission of the second service in the second time slice fails.

[0157] For example, see Figure 7, the controller obtains result 1 (i.e., routing information corresponding to the second service) through scheduling calculation 1 in time 1 and time slice 2 (i.e., the first time slice), and the source network device of the second service sends the result 1 in time slice 2. The source network device of the second service receives the result 1 before the start of time slice 3, and sends the service data of the second service to the destination network device of the second service according to the result 1 in time slice 3 (i.e., the second time slice). However, due to link anomalies in time slices 2 and 3, the third length sent by the destination network device of the second service is less than the length threshold, and the controller determines that the transmission of the part marked as failed in scheduling calculation 4 fails, and the result 4 obtained by the controller through scheduling calculation 4 is to retransmit the data starting from the part marked as failed (i.e., the position continuously confirmed by the destination network device of the second service, or starting from the position after the confirmed length, and starting from the position after the part of the service data that has been successfully transmitted). As a result, the data can be retransmitted in the subsequent time slice 5 (i.e., the fourth time slice), and the process of retransmitting the data is also called return N frames (go-back-n).

[0158] In addition, in an exemplary embodiment, for any one of the at least one second service, after the controller sends routing information corresponding to the second service to the source network device of the second service, the method further includes: the controller updates the first status information of each first service to obtain the second status information of each first service, and the second status information of each first service is used to indicate the transmission status of the first service after the end of the second time slice. According to the second status information of each first service, the transmission process of the service data of each first service is controlled.

[0159] According to the description in step 501 above, the first state information of the first service after the end of the first time slice is obtained by maintaining the initial state information sent by the network device. Accordingly, the embodiment of the present application will continue to perform maintenance in the same manner after the end of the second time slice, so as to obtain the second state information of the first service after the end of the second time slice. It should be understood that the controller can perform real-time maintenance after the end of each time slice to ensure the accuracy of the state information of each first service, so as to continuously perform global scheduling of all first services based on the accurate state information of each first service.

[0160] Next, combine Figures 14 to 17 , the effect of the method for transmitting data provided in the embodiment of the present application is explained.

[0161] In the embodiment of the present application, the controller obtains the first state information of the first service that needs to be transmitted globally (i.e., all network devices), performs global scheduling (i.e., uniformly determines the second service that needs to be transmitted) and determines the corresponding routing information, thereby avoiding conflicts between different services and avoiding congestion of service data, thereby improving effective bandwidth utilization (goodput). In addition, in the embodiment of the present application, the number of time slices required to complete the transmission can be used as cost information, and global scheduling can be performed based on the cost information, so that the number of time slices required to complete the transmission is small, thereby reducing the average flow completion time (slowdown), thereby improving the effective throughput rate.

[0162] See also Fig.14 and Fig.15 In the embodiment of the present application, in a data center topology containing 64 network devices, the execution process of 100,000 services is simulated, the expected bandwidth occupancy is changed from 50% to 95%, and the effective bandwidth utilization and average flow completion time are recorded. Among them, the overall effective bandwidth utilization can reach more than 80%, and the relationship between the growth of the average flow completion time of the overall service and the expected bandwidth occupancy is relatively linear.

[0163] In addition, in a smaller data center network topology containing 16 network devices and a larger data center network topology containing 64 servers, we simulated the execution of 20,000 services, changing the expected bandwidth occupancy from 50% to 95%. The results are shown in Fig.16 and Fig.17 . Fig.16 and Fig.17 The horizontal and vertical axes are link utilization and effective transaction throughput, respectively, and the product of the two is the effective bandwidth utilization. It can be seen that under the same expected bandwidth occupancy conditions, compared with the data transmission methods in Related Technology 1 and Related Technology 2, the data transmission method provided by the embodiment of the present application can achieve a higher effective bandwidth utilization, and the effective bandwidth utilization is more significantly improved under a larger-scale data center network topology.

[0164] In summary, in the embodiment of the present application, the controller performs global scheduling in units of time slices, and accurately determines the second service that needs to be transmitted in the subsequent second time slice from each first service according to the first state information of each first service after the first time slice ends, and reasonably determines the routing information corresponding to the second service. The service data of the second service is transmitted between the source network device and the destination network device according to the routing information of the second service, thereby avoiding conflicts between different second services during the data transmission process. Therefore, the service data of different second services will not cause packet loss due to congestion, thereby improving the effective bandwidth utilization and effective throughput, which not only ensures the efficiency of data transmission, but also helps to improve the SLA of each first service.

[0165] In addition, the embodiment of the present application uses cost information when determining the second service from each first service. The cost information can be determined based on the number of time slices required to complete the transmission, and can also be determined based on the consistency of the scheduling. Therefore, under the premise of ensuring a high effective bandwidth utilization rate, a low average flow completion time and a high scheduling consistency are also guaranteed. The embodiment of the present application can also adjust the scheduling strategy in time and retransmit the data in the event of a transmission failure, thereby ensuring the success rate of data transmission and improving the integrity and robustness of the transmitted data.

[0166] The above describes the method for transmitting data provided by the embodiment of the present application. Corresponding to the above method, the embodiment of the present application also provides two devices for transmitting data. One device is applied to a controller, and the device is used to transmit data by Fig.18 The modules shown above perform the Figure 5 Another device is applied to a network device, the device is used to Fig.19 The modules shown above perform the Figure 5 The steps performed by the network device in the method shown. Fig.18 and Fig.19 These two devices are described separately.

[0167] like Fig.18 As shown, the device for transmitting data in the controller included in the communication system includes:

[0168] An acquisition module 1801 is used to acquire first status information of each first service of at least two first services, where the first status information of one first service is used to indicate a transmission status of the first service after the first time slice ends;

[0169] A determination module 1802, configured to determine at least one second service from at least two first services according to first status information of each first service;

[0170] The determination module 1802 is further configured to determine routing information corresponding to each second service in at least one second service;

[0171] Sending module 1803 is used to send routing information corresponding to the second service to the source network device of the second service for any one of the at least one second service, and the routing information corresponding to the second service is used to control the source network device of the second service to transmit the service data of the second service to the destination network device of the second service within a second time slice, and the second time slice is later than the first time slice.

[0172] In an exemplary embodiment, determination module 1802 is used to determine, for any one of at least two first services, cost information of the first service based on first status information of the first service, wherein cost information of a first service is used to indicate the cost of a source network device of the first service transmitting service data of the first service to a destination network device of the first service; determine at least two candidate service groups, wherein a candidate service group includes at least one first service of at least two first services; determine a reference service group from at least two candidate service groups based on cost information of the first services included in each of the at least two candidate service groups, and use at least one first service included in the reference service group as at least one second service.

[0173] In an exemplary embodiment, determination module 1802 is used to determine, for any one of at least two candidate business groups, the cost information corresponding to the candidate business group based on the cost information of the first business included in the candidate business group; from the at least two candidate business groups, the candidate business group with the smallest corresponding cost information and satisfying the constraint conditions is used as a reference business group.

[0174] In an exemplary embodiment, the first state information of a first service includes a first length, where the first length is the length of service data of the first service transmitted by a source network device that does not control the first service after the first time slice ends;

[0175] Determination module 1802 is used to obtain a second length, where the second length is the length of service data of the first service that the source network device of the first service is allowed to transmit within the second time slice; and determine the cost information of the first service according to the ratio of the first length to the second length.

[0176] In an exemplary embodiment, determination module 1802 is used to determine a third service from at least two first services, service data of the third service is transmitted within a third time slice, and the third time slice is earlier than the second time slice; determine a reference value based on the relationship between the first service and the third service, and the relationship between the first service and the third service is used to indicate whether the first service and the third service are the same; determine the cost information of the first service based on the ratio of the first length to the second length and the reference value.

[0177] In an exemplary embodiment, the device also includes: a control module, which is used to control the source network device of the second service to transmit the service data of the second service to the destination network device of the second service within a fourth time slice for any one of the at least one second services, when it is detected that the service data transmission of the second service within the second time slice fails, and the fourth time slice is later than the second time slice.

[0178] In an exemplary embodiment, the control module is also used to, for any one of at least one second service, receive a third length sent by the destination network device of the second service after the end of the second time slice, the third length being the length of the service data of the second service received by the destination network device of the second service within the second time slice; when the third length is less than a length threshold, determine that the service data transmission of the second service within the second time slice has failed, and the length threshold is less than or equal to the length of the service data of the second service sent by the source network device of the second service to the destination network device of the second service.

[0179] In an exemplary embodiment, the control module is also used to determine, for any one of at least one second service, that after sending routing information corresponding to the second service to the source network device of the second service, if the length information sent by the destination network device of the second service is not received within a reference time period, that the service data transmission of the second service within the second time slice has failed; the reference time period is greater than or equal to the sum of the time period of the second time slice, the first time period, and the second time period, the first time period being the time period for the controller to send the routing information corresponding to the second service to the source network device of the second service, and the second time period being the time period for the destination network device of the second service to send the length information to the controller.

[0180] In an exemplary embodiment, the communication system also includes at least two switching devices, each of the at least two switching devices corresponds to a level respectively; a determination module 1802 is used to determine at least one first switching device with the highest corresponding level from the at least two switching devices; for any one of the at least one second service, a second switching device corresponding to the second service is determined from the at least one first switching device, and routing information corresponding to the second service is determined based on the second switching device, and the routing information corresponding to the second service includes information of the second switching device.

[0181] In an exemplary embodiment, the device also includes: an update module, which is used to update the first status information of each first service and obtain the second status information of each first service, wherein the second status information of a first service is used to indicate the transmission status of the first service after the end of the second time slice; according to the second status information of each first service, the transmission process of the service data of each first service is controlled.

[0182] In addition, if Fig.19 As shown, the device for transmitting data in the network device included in the communication system includes:

[0183] A receiving module 1901 is used to receive routing information corresponding to a second service sent by a controller, where the second service is determined by the controller from at least two first services according to first status information of each first service, where the first status information of a first service is used to indicate a transmission status of the first service after the first time slice ends;

[0184] The transmission module 1902 is used to transmit the service data of the second service to the destination network device of the second service within a second time slice according to the routing information corresponding to the second service, and the second time slice is later than the first time slice.

[0185] In an exemplary embodiment, the transmission module 1902 is further configured to send a third length to the controller after the second time slice ends, where the third length is the length of service data of the second service sent by the source network device of the second service received in the second time slice.

[0186] It should be understood that the above Fig.18 The device provided in or 19 has the following beneficial effects when achieving its function: Figure 5 The method for transmitting data shown in the figure has the same beneficial effects. Fig.18 When the device provided in or 19 realizes its functions, only the division of the above-mentioned functional modules is used as an example. In practical applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0187] The present application also provides a device for transmitting data, the device comprising a memory and a processor; the memory stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor to enable the device to implement Figure 5 The method of transmitting data is shown.

[0188] See also Fig. 20 , Fig. 20 A schematic structural diagram of an exemplary data transmission device 2000 of the present application is shown. The data transmission device 2000 includes at least one processor 2001, a memory 2003, and at least one network interface 2004.

[0189] Processor 2001 is, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a GPU, a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor or one or more integrated circuits or application-specific integrated circuits (ASIC) for implementing the solution of the present application, a programmable logic device (PLD), other general-purpose processors or other programmable logic devices, discrete gates, transistor logic devices, discrete hardware components or any combination thereof. PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. A general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting an advanced RISC machines (ARM) architecture. It can implement or execute various logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0190] Optionally, the data transmission device 2000 further includes a bus 2002. The bus 2002 is used to transmit information between the components of the data transmission device 2000. The bus 2002 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus 2002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 20 The fact that only one line is used in the diagram does not mean that there is only one bus or only one type of bus.

[0191] The memory 2003 is, for example, a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache.

[0192] By way of example but not limitation, many forms of ROM and RAM are available. For example, ROM is a compact disc read-only memory (CD-ROM). RAM includes, but is not limited to, static RAM (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct rambus RAM (DR RAM).

[0193] The memory 2003 may also be other types of storage devices that can store static information and instructions. Or it may be other types of dynamic storage devices that can store information and instructions. Or it may be other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, blue-ray disk, etc.), magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by the computer, but is not limited to this. The memory 2003, for example, exists independently and is connected to the processor 2001 through the bus 2002. The memory 2003 may also be integrated with the processor 2001.

[0194] The network interface 2004 uses any transceiver-like device to communicate with other devices or communication networks, and the communication network can be Ethernet, radio access network (RAN) or wireless local area network (WLAN), etc. The network interface 2004 may include a wired network interface and may also include a wireless network interface. Specifically, the network interface 2004 may be an Ethernet interface, such as a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, an Asynchronous Transfer Mode (ATM) interface, a WLAN interface, a cellular network interface or a combination thereof. The Ethernet interface may be an optical interface, an electrical interface or a combination thereof. In some embodiments of the present application, the network interface 2004 may be used for the device 2000 for transmitting data to communicate with other devices.

[0195] In a specific implementation, as some embodiments, the processor 2001 may include one or more CPUs, such as Fig. 20 0 and CPU1 shown in FIG. Each of these processors may be a single-core processor or a multi-core processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0196] In a specific implementation, as some implementation methods, the device 2000 for transmitting data may include multiple processors, such as Fig. 20 2001 and processor 2005 shown in FIG. Each of these processors may be a single-core processor or a multi-core processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).

[0197] In some implementations, the memory 2003 is used to store the program instructions 2010 for executing the solution of the present application, and the processor 2001 can execute the program instructions 2010 stored in the memory 2003. That is, the device 2000 for transmitting data can implement the method provided in the method embodiment through the processor 2001 and the program instructions 2010 in the memory 2003, that is, Figure 5 The method for transmitting data shown in the figure. The program instruction 2010 may include one or more software modules. Optionally, the processor 2001 itself may also store program instructions for executing the solution of the present application.

[0198] In a specific implementation process, the data transmission device 2000 of the present application may correspond to a controller or a network device for executing the above method, and the processor 2001 in the data transmission device 2000 reads the instruction in the memory 2003, so that Fig. 20 The data transmission device 2000 shown can execute all or part of the steps in the method embodiment.

[0199] The data transmission device 2000 may also correspond to the above Fig.18 or the device shown in 19, Fig.18 Each functional module in the device shown in FIG. 19 is implemented by software of the device 2000 for transmitting data. In other words, Fig.18 The functional modules included in the apparatus shown in or 19 are generated after the processor 2001 of the data transmission device 2000 reads the program instructions 2010 stored in the memory 2003.

[0200] in, Figure 5 Each step of the method shown is completed by an integrated logic circuit of hardware or software instructions in the processor of the device 2000 for transmitting data. The steps of the method embodiment disclosed in the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method embodiment in combination with its hardware. To avoid repetition, it is not described in detail here.

[0201] Exemplarily, the embodiment of the present application further provides a system for transmitting data, the system comprising a controller and at least two network devices, the controller is used to execute Figure 5 In the method for transmitting data shown in the figure, the controller performs the steps, and any one of the at least two network devices is used to Figure 5 The steps performed by the network device in the method for transmitting data shown in FIG. Figure 3 A communication system in the illustrated implementation environment.

[0202] In an exemplary embodiment, the present application provides a computer-readable storage medium, in which at least one computer instruction is stored, and the computer instruction is loaded and executed by a processor to enable a computer (i.e., a device for transmitting data) to implement Figure 5 The steps in the method for transmitting data shown are performed by a controller or a network device.

[0203] Exemplarily, an embodiment of the present application provides a computer program or a computer program product, the computer program or the computer program product includes computer instructions, the computer instructions are executed by a processor to enable a computer to implement Figure 5 The steps in the method for transmitting data shown are performed by a controller or a network device.

[0204] Exemplarily, an embodiment of the present application provides a chip, including a processor, for calling and executing instructions stored in a memory, so that a computer equipped with the chip can realize Figure 5 The steps in the method for transmitting data shown are performed by a controller or a network device.

[0205] In an exemplary embodiment, the present application also provides another chip, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected through an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the computer equipped with the chip realizes Figure 5 The steps in the method for transmitting data shown are performed by a controller or a network device.

[0206] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in this application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk), etc.

[0207] In this application, the terms "first", "second", etc. are used to distinguish between identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there a limitation on the quantity and execution order. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another element.

[0208] It should also be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0209] In this application, the term "at least one" means one or more, and the term "multiple" means two or more, which can also be understood as "at least two". For example, multiple first services refer to two or more first services. In this document, the terms "system" and "network" are often used interchangeably.

[0210] It should be understood that the terms used in the description of the various examples herein are only for describing specific examples and are not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0211] It should also be understood that the term "and / or" used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. The term "and / or" is a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.

[0212] It should also be understood that the terms "if" and "if" may be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting." Similarly, the phrases "if it is determined that ..." or "if [a stated condition or event] is detected" may be interpreted to mean "upon determining that ..." or "in response to determining that ..." or "upon detecting [a stated condition or event]" or "in response to detecting [a stated condition or event]," depending on the context.

[0213] The above description is only an embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for transmitting data, characterized in that: The method is applied to a controller included in a communication system, wherein the communication system further includes at least two network devices, and the method includes: Acquire first status information of each first service of at least two first services, where the first status information of one first service is used to indicate a transmission status of the first service after a first time slice ends; Determining at least one second service from the at least two first services according to the first status information of each first service; Determine routing information corresponding to each second service in the at least one second service; For any one of the at least one second service, routing information corresponding to the second service is sent to the source network device of the second service, and the routing information corresponding to the second service is used to control the source network device of the second service to transmit the service data of the second service to the destination network device of the second service within a second time slice, and the second time slice is later than the first time slice.

2. The method according to claim 1, characterized in that The determining at least one second service from the at least two first services according to the first status information of each first service includes: For any one of the at least two first services, determining cost information of the first service according to the first state information of the first service, wherein the cost information of the first service is used to indicate the cost of transmitting the service data of the first service from the source network device of the first service to the destination network device of the first service; Determine at least two candidate service groups, one candidate service group including at least one first service among the at least two first services; According to the cost information of the first service included in each of the at least two candidate service groups, a reference service group is determined from the at least two candidate service groups, and at least one first service included in the reference service group is used as the at least one second service.

3. The method according to claim 2, characterized in that The determining of the reference service group from the at least two candidate service groups according to the cost information of the first service included in each of the at least two candidate service groups comprises: For any one of the at least two candidate service groups, determining cost information corresponding to the candidate service group according to cost information of a first service included in the candidate service group; From the at least two candidate service groups, the candidate service group having the minimum corresponding cost information and satisfying the constraint condition is used as the reference service group.

4. The method according to claim 2 or 3, characterized in that: The first status information of a first service includes a first length, where the first length is the length of service data of the first service transmitted by the source network device that does not control the first service after the first time slice ends; The determining the cost information of the first service according to the first state information of the first service includes: Acquire a second length, where the second length is a length of service data of the first service that the source network device of the first service is allowed to transmit within the second time slice; The cost information of the first service is determined according to the ratio of the first length to the second length.

5. The method according to claim 4, characterized in that The determining the cost information of the first service according to the ratio of the first length to the second length includes: Determine a third service from the at least two first services, service data of the third service is transmitted in a third time slice, and the third time slice is earlier than the second time slice; determining a reference value according to a relationship between the first service and the third service, where the relationship between the first service and the third service is used to indicate whether the first service is the same as the third service; The cost information of the first service is determined according to the ratio of the first length to the second length and the reference value.

6. The method according to any one of claims 1 to 5, characterized in that: After sending routing information corresponding to any one of the at least one second service to a source network device of the second service, the method further includes: For any one of the at least one second services, when it is detected that the service data transmission of the second service within the second time slice fails, the source network device that controls the second service transmits the service data of the second service to the destination network device of the second service within a fourth time slice, and the fourth time slice is later than the second time slice.

7. The method according to claim 6, characterized in that The method further comprises: For any one of the at least one second service, a third length sent by the destination network device receiving the second service after the second time slice ends, the third length being the length of service data of the second service received by the destination network device of the second service within the second time slice; When the third length is less than the length threshold, it is determined that the service data transmission of the second service within the second time slice has failed, and the length threshold is less than or equal to the length of the service data of the second service sent by the source network device of the second service to the destination network device of the second service.

8. The method according to claim 6, characterized in that The method further comprises: For any one of the at least one second service, after sending routing information corresponding to the second service to the source network device of the second service, if length information sent by the destination network device of the second service is not received within a reference time, it is determined that service data transmission of the second service within the second time slice fails; The reference duration is greater than or equal to the sum of the duration of the second time slice, the first duration and the second duration, the first duration being the duration for the controller to send the routing information corresponding to the second service to the source network device of the second service, and the second duration being the duration for the destination network device of the second service to send the length information to the controller.

9. The method according to any one of claims 1 to 8, characterized in that: The communication system further comprises at least two switching devices, each of the at least two switching devices corresponding to a level respectively; The determining routing information corresponding to each second service in the at least one second service includes: Determine at least one first switching device with the highest corresponding level from the at least two switching devices; For any one of the at least one second service, a second switching device corresponding to the second service is determined from the at least one first switching device, and routing information corresponding to the second service is determined based on the second switching device, wherein the routing information corresponding to the second service includes information of the second switching device.

10. The method according to any one of claims 1 to 9, characterized in that: After sending routing information corresponding to any one of the at least one second service to a source network device of the second service, the method further includes: Updating the first status information of each of the first services to obtain the second status information of each of the first services, wherein the second status information of one first service is used to indicate the transmission status of the first service after the second time slice ends; The transmission process of the service data of each first service is controlled according to the second status information of each first service.

11. A method for transmitting data, characterized in that: The method is applied to any one of at least two network devices included in a communication system, the communication system further includes a controller, and the method includes: receiving routing information corresponding to a second service sent by the controller, where the second service is determined by the controller from at least two first services according to first status information of each first service, where the first status information of a first service is used to indicate a transmission status of the first service after the end of a first time slice; According to the routing information corresponding to the second service, the service data of the second service is transmitted to the destination network device of the second service within a second time slice, and the second time slice is later than the first time slice.

12. The method according to claim 11, characterized in that The method further comprises: After the second time slice ends, a third length is sent to the controller, where the third length is the length of service data of the second service sent by the source network device of the second service received within the second time slice.

13. A device for transmitting data, characterized in that: The device is applied to a controller included in a communication system, the communication system also includes at least two network devices, and the device includes: An acquisition module, used to acquire first status information of each first service of at least two first services, wherein the first status information of one first service is used to indicate a transmission status of the first service after the end of a first time slice; A determination module, configured to determine at least one second service from the at least two first services according to the first status information of each of the first services; The determining module is further used to determine routing information corresponding to each second service in the at least one second service; A sending module is used to send routing information corresponding to any one of the at least one second service to a source network device of the second service, wherein the routing information corresponding to a second service is used to control the source network device of the second service to transmit the service data of the second service to the destination network device of the second service within a second time slice, and the second time slice is later than the first time slice.

14. The device according to claim 13, characterized in that The determination module is used to determine, for any one of the at least two first services, cost information of the first service according to the first state information of the first service, wherein the cost information of the first service is used to indicate the cost of transmitting the service data of the first service from the source network device of the first service to the destination network device of the first service; Determine at least two candidate service groups, one candidate service group including at least one first service among the at least two first services; According to the cost information of the first service included in each of the at least two candidate service groups, a reference service group is determined from the at least two candidate service groups, and at least one first service included in the reference service group is used as the at least one second service.

15. The device according to claim 14, characterized in that The determining module is configured to determine, for any one of the at least two candidate service groups, cost information corresponding to the candidate service group according to cost information of the first service included in the candidate service group; From the at least two candidate service groups, the candidate service group having the minimum corresponding cost information and satisfying the constraint condition is used as the reference service group.

16. The device according to claim 14 or 15, characterized in that The first status information of a first service includes a first length, where the first length is the length of service data of the first service transmitted by the source network device that does not control the first service after the first time slice ends; The determination module is used to obtain a second length, where the second length is the length of the service data of the first service allowed to be transmitted by the source network device of the first service within the second time slice; and determine the cost information of the first service based on the ratio of the first length to the second length.

17. The device according to claim 16, characterized in that The determining module is used to determine a third service from the at least two first services, the service data of the third service is transmitted in a third time slice, and the third time slice is earlier than the second time slice; A reference value is determined based on the relationship between the first service and the third service, wherein the relationship between the first service and the third service is used to indicate whether the first service is the same as the third service; and cost information of the first service is determined based on the ratio of the first length to the second length and the reference value.

18. The device according to any one of claims 13 to 17, characterized in that: The device also includes: A control module is used to control the source network device of any one of the at least one second services to transmit the service data of the second service to the destination network device of the second service within a fourth time slice, when detecting that the service data transmission of the second service within the second time slice fails, and the fourth time slice is later than the second time slice.

19. The device according to claim 18, characterized in that The control module is further configured to receive, for any one of the at least one second service, a third length sent by a destination network device of the second service after the second time slice ends, wherein the third length is a length of service data of the second service received by the destination network device of the second service within the second time slice; When the third length is less than the length threshold, it is determined that the service data transmission of the second service within the second time slice has failed, and the length threshold is less than or equal to the length of the service data of the second service sent by the source network device of the second service to the destination network device of the second service.

20. The device according to claim 18, characterized in that The control module is further configured to, for any one of the at least one second service, determine that service data transmission of the second service within the second time slice fails if, after sending routing information corresponding to the second service to a source network device of the second service, length information sent by a destination network device of the second service is not received within a reference time period; The reference duration is greater than or equal to the sum of the duration of the second time slice, the first duration and the second duration, the first duration being the duration for the controller to send the routing information corresponding to the second service to the source network device of the second service, and the second duration being the duration for the destination network device of the second service to send the length information to the controller.

21. The device according to any one of claims 13 to 20, characterized in that: The communication system further comprises at least two switching devices, each of the at least two switching devices corresponding to a level respectively; The determining module is used to determine at least one first switching device with the highest corresponding level from the at least two switching devices; For any one of the at least one second service, a second switching device corresponding to the second service is determined from the at least one first switching device, and routing information corresponding to the second service is determined based on the second switching device, wherein the routing information corresponding to the second service includes information of the second switching device.

22. The device according to any one of claims 13 to 21, characterized in that: The device also includes: An update module is used to update the first status information of each of the first services and obtain the second status information of each of the first services, wherein the second status information of a first service is used to indicate the transmission status of the first service after the end of the second time slice; and according to the second status information of each of the first services, the transmission process of the service data of each of the first services is controlled.

23. A device for transmitting data, characterized in that: The device is applied to any one of at least two network devices included in a communication system, the communication system further includes a controller, and the device includes: a receiving module, configured to receive routing information corresponding to a second service sent by the controller, wherein the second service is determined by the controller from at least two first services according to first status information of each first service, and the first status information of a first service is used to indicate a transmission status of the first service after the end of a first time slice; A transmission module is used to transmit the service data of the second service to the destination network device of the second service within a second time slice according to the routing information corresponding to the second service, and the second time slice is later than the first time slice.

24. The device according to claim 23, characterized in that The transmission module is further used to send a third length to the controller after the second time slice ends, where the third length is the length of the service data of the second service sent by the source network device of the second service received within the second time slice.

25. A device for transmitting data, characterized in that: The device includes a memory and a processor; the memory stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor, so that the device implements the method for transmitting data described in any one of claims 1-12.

26. A system for transmitting data, characterized in that: The system includes a controller and at least two network devices, wherein the controller is used to execute the method for transmitting data described in any one of claims 1-10, and any one of the at least two network devices is used to execute the method for transmitting data described in claim 11 or 12.

27. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer instruction, and the computer instruction is loaded and executed by a processor to enable a computer to implement the method for transmitting data as described in any one of claims 1 to 12.

28. A computer program product, characterized in that The computer program product comprises computer instructions, and the computer instructions are executed by a processor to enable a computer to implement the method for transmitting data according to any one of claims 1 to 12.