Method and device for data transmission, equipment and storage medium

By sorting and hierarchically scheduling data streams based on the target scheduling time in the RDMA network card, the problem of slow speed of speed limiters in the prior art is solved, and the data transmission rate and network card performance are improved.

CN119420698APending Publication Date: 2025-02-11DOUYIN VISION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411659306.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

When existing RDMA network cards process multiple data streams, the speed limiter's working speed is slow, resulting in insufficient data transmission rate and affecting the performance of the network card.

Method used

By sorting the data stream based on the target scheduling time, multiple data packets in the target data stream are determined, and hierarchically scheduled and sent according to the corresponding transmission time of the data packets, reducing the number of data stream sorting times and improving the speed of data transmission by the network card.

Benefits of technology

The hierarchical scheduling of data packets is realized, which reduces the number of data streams sorting during data transmission, improves the speed of data transmission of network cards, and thus improves the performance of network cards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119420698A_ABST
    Figure CN119420698A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data transmission method and device, equipment and a storage medium. The method comprises the step of determining a first data stream in one or more data streams as a target data stream to be scheduled based on target scheduling time corresponding to the one or more data streams. And determining a plurality of first data packets in the target data stream. And transmitting at least one part of the plurality of first data packets based on the corresponding transmission time of the plurality of first data packets. In this way, after the data streams are sorted based on the scheduling time of the data streams, a scheduled target data stream is selected, and a plurality of data packets in the target data stream are sent. Therefore, hierarchical scheduling of the data packets is realized, the sorting times of the data streams in the data sending process can be reduced, and the data sending speed of the network card is improved, so that the performance of the network card is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Example embodiments of the present disclosure generally relate to the field of computers, and more particularly, to methods, apparatuses, devices, and computer-readable storage media for data transmission. Background Art

[0002] A network card, also known as a network interface card (NIC), is a part of computer hardware that connects a computer to a network. A network card can be used to control traffic so that a computer can exchange data with other devices, and is a key component for network communication. Current network cards still have some problems that affect data transmission speeds. Summary of the invention

[0003] In a first aspect of the present disclosure, a method for data transmission is provided. The method comprises: determining a first data stream among one or more data streams as a target data stream to be scheduled based on target scheduling times respectively corresponding to the one or more data streams; determining a plurality of first data packets in the target data stream; and sending at least a portion of the plurality of first data packets based on corresponding transmission times of the plurality of first data packets.

[0004] In a second aspect of the present disclosure, a device for data transmission is provided. The device includes: a first determination module configured to determine a first data stream among one or more data streams as a target data stream to be scheduled based on target scheduling times corresponding to the one or more data streams; a second determination module configured to determine a plurality of first data packets in the target data stream; and a sending module configured to send at least a portion of the plurality of first data packets based on the corresponding transmission times of the plurality of first data packets.

[0005] In a third aspect of the present disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. When the instructions are executed by the at least one processing unit, the device executes the method of the first aspect.

[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processor to implement the method of the first aspect.

[0007] It should be understood that the contents described in this content section are not intended to limit the key features or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0009] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented;

[0010] Figure 2 A schematic diagram showing an example of a data transmission system according to some embodiments of the present disclosure;

[0011] Figure 3 A schematic diagram showing another example of a data transmission system according to some embodiments of the present disclosure;

[0012] Figure 4 A schematic diagram showing an example of a data packet sequence according to some embodiments of the present disclosure;

[0013] Figure 5 An architectural diagram showing an example of an RDMA network card according to some embodiments of the present disclosure;

[0014] Figure 6 A flowchart showing a process of data transmission according to some embodiments of the present disclosure;

[0015] Figure 7 A block diagram showing an apparatus for data transmission according to some embodiments of the present disclosure; and

[0016] Figure 8 A block diagram of a device capable of implementing various embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0017] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0018] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0019] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0020] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0021] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0022] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0023] It should be noted that the titles of any sections / subsections provided herein are not restrictive. Various embodiments are described throughout this article, and any type of embodiment may be included under any section / subsection. In addition, the embodiments described in any section / subsection may be combined in any manner with any other embodiments described in the same section / subsection and / or different sections / subsections.

[0024] Herein, unless explicitly stated, executing a step “in response to A” does not mean executing the step immediately after “A” but may include one or more intermediate steps.

[0025] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may be included below. The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may be included below.

[0026] Figure 1 1 is a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. Figure 1As shown, the example environment 100 includes two electronic devices, which can be represented as a first communication node and a second communication node, respectively. The first electronic device 110-1 and the second electronic device 110-2 can be individually or collectively referred to as electronic devices 110. The first processor 120-1 and the second processor 120-2 can be individually or collectively referred to as processors 120. The first direct memory access bus 130-1 and the second direct memory access bus 130-2 can be individually or collectively referred to as direct memory access buses 130. The first RDMA network card 140-1 and the second RDMA network card 140-2 can be individually or collectively referred to as RDMA network cards 140.

[0027] like Figure 1 As shown, the electronic device 110 at least includes: a remote direct memory access RDMA network card 140, a processor 120 (Central Processing Unit, CPU) and a high-speed serial computer expansion bus standard (peripheral component interconnect express, PCI-Express). The RDMA network card 140 of each node communicates with the processor 120 of the node through the PCI-E bus 130. The RDMA network card 140 is mainly used to perform RDMA read operations or RDMA write operations, so that no data copying is performed. In this way, data exchange is performed without the need for any kernel memory participation. As a result, the data transmission efficiency of the RDMA network card 140 is improved.

[0028] In some embodiments, the electronic device 110 can communicate with a server or other electronic devices through an RDMA network card 140 to achieve data transmission. The electronic device 110 can be any type of mobile terminal, fixed terminal or portable terminal, including a mobile phone, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a media computer, a multimedia tablet, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio broadcast receiver, an e-book device, a gaming device, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. In some embodiments, the terminal device 110 can also support any type of interface for the user (such as a "wearable" circuit, etc.). The server 130 can be various types of computing systems / servers that can provide computing power, including but not limited to mainframes, edge computing nodes, computing devices in cloud environments, and the like.

[0029] It should be understood that the structure and function of each element in the environment 100 are described for exemplary purposes only, and do not imply any limitation on the scope of the present disclosure. For example, the embodiments of the present disclosure can be applied to any suitable one or more applications, and are not limited to office suites.

[0030] As briefly mentioned above, network cards can be used to transmit computer traffic and control traffic. For example, Remote Direct Memory Access (RDMA) network cards allow data to be transferred directly between applications and network cards, bypassing the operating system kernel, thereby reducing CPU load and improving network throughput. RDMA reduces latency in network communications and improves data transmission efficiency by providing high-performance network services with low latency, high bandwidth, and low CPU utilization.

[0031] The RDMA network card implements congestion control and traffic isolation strategies through the traffic speed limiter. Specifically, for a large number of data streams on the end, the RDMA network card 140 limits the data transmission speed of each data stream and injects a transmission interval between data packets. As a result, the RDMA network card can achieve smoother traffic transmission, thereby optimizing network performance. At the same time, the traffic speed limiter can isolate the network traffic between users, thereby ensuring the stability of application performance and user experience.

[0032] Currently, most RDMA network cards implement traffic limiting through SENIC or PIEO, but both of them adopt an integrated design to directly limit the speed of the data streams that need to be scheduled. The SENIC or PIEO speed limiter can only transmit one data packet each time after sorting all data streams. If there are multiple data streams in the link, the traffic speed limiter takes a long time to sort a large number of data streams. Therefore, SENIC or PIEO works slowly and cannot meet the data transmission requirements of the RDMA network card, affecting the performance of the RDMA network card. For example, sorting 16K streams can only achieve a data transmission rate of 34.5Mpps, while the RDMA network card can achieve a data transmission rate of 110Mpps.

[0033] Embodiments of the present disclosure provide a scheme for data transmission. According to various embodiments of the present disclosure, based on target scheduling times corresponding to the one or more data streams, a first data stream in one or more data streams is determined as a target data stream to be scheduled. A plurality of first data packets in the target data stream is determined. Based on the corresponding transmission times of the plurality of first data packets, at least a portion of the plurality of first data packets is sent.

[0034] Based on the target scheduling time corresponding to the multiple data streams, the target data stream is determined. Based on the corresponding transmission time of the multiple first data packets in the target data stream, the data packet is sent. In this way, after the data streams are sorted based on the scheduling time of the data streams, the scheduled target data stream is selected, and the target data stream is sent. Thus, hierarchical scheduling of data packets is realized, the number of sorting times of data streams during data sending can be reduced, the speed of sending data by the network card can be increased, and thus the performance of the network card can be improved.

[0035] Figure 2 An example of a data transmission system 200 according to some embodiments of the present disclosure is shown. Figure 2 In the example of , the data transmission system generally includes a stream level rate limiting module 210 and a packet level rate limiting module 220. The stream level rate limiting module 210 and / or the packet level rate limiting module 220 may be implemented or included in the electronic device 110.

[0036] The stream level rate limiting module 210 is used to obtain multiple data streams 150 provided by the electronic device 110, and determine the first data stream as the target data stream from one or more data streams 150. The target data stream is the data stream 150 to be scheduled, that is, the scheduling time of the target data stream matches the system reference time.

[0037] In some embodiments, the target data stream includes at least one or more data packets 280 and the transmission time corresponding to the data packets 280. The scheduling time of the target data stream can be the time information directly obtained, or the transmission time of the first data packet 280 transmitted in the target data stream can be used as the scheduling time of the target data stream. The scheduling time of the target data stream can be a time determined according to the system clock of the electronic device 110 based on the target data stream system reference time (i.e., the current system time). In some embodiments, the scheduling time of the target data stream matches the system reference time, and the scheduling time of the target data stream can be the same as the system reference time. If it is detected that the reference time reaches the scheduling time of the target data stream, the target data stream is scheduled. The reference time is a clock signal determined according to the timer 240 of the electronic device 110.

[0038] Alternatively or additionally, the scheduling time of the target data stream matches the system reference time, and the difference between the reference time and the target data stream can also be lower than the time threshold. The time threshold is determined by the time required for the stream scheduler 230 to schedule the data stream 150 and obtain the data packet 280 in the data stream 150. Specifically, since the stream scheduler 230 schedules the data stream 150 and obtains the data packet 280 in the data stream 150, a certain time is required. In order to prevent missing the preset transmission time of the data packet 280, the corresponding scheduling time can be reserved. For example, the time required for the stream scheduler 230 to schedule the data stream 150 is 3ms, and the time required to obtain the data packet 280 in the data stream 150 is 2ms, then the time threshold is set to 5ms. If the difference between the scheduling time of any data stream and the reference time is less than or equal to 5ms, then the data stream 150 is determined to be the target data stream. In this way, the target data stream is determined according to the time required for the electronic device 110 to schedule the data stream 150 and the time required to obtain the data packet 280 in the data stream 150. Thus, it is ensured that the data is sent to other nodes on time.

[0039] In some embodiments, after the flow level rate limiting module 210 obtains each data stream 150 provided by the electronic device 110, it first determines the scheduling time corresponding to each data stream 150 to determine the target data stream. Specifically, the scheduling time corresponding to each data stream 150 can be directly compared in each judgment operation, and the data stream 150 with the scheduling time closest to the reference time is used as the target data stream. Alternatively or additionally, a hierarchical structure 210 can be constructed based on the data stream 150, and the target data stream can be determined based on the hierarchical structure 210.

[0040] In some embodiments, the flow-level rate limiting module 210 sorts the multiple data streams 150 based on the scheduling time corresponding to each data stream 150. Based on the sorting result, a hierarchical structure 210 corresponding to the multiple data streams 150 is generated. The hierarchical structure 210 includes multiple nodes, each of which corresponds to a data stream 150. Specifically, a P-heap can be used to store multiple data streams 150, and the data streams 150 can be sorted based on the scheduling time of each data stream 150. For example, according to the difference between the scheduling time and the reference time of each data stream 150, the data stream 150 with the highest sorting result is first stored in the hierarchical structure 210 according to the first-in-first-out rule. Repeat this process to obtain the corresponding hierarchical structure 210. Based on the acquired hierarchical structure 210, the first data stream 150 of the hierarchical structure 210 is determined as the target data stream.

[0041] Figure 3 FIG. 2 is a schematic diagram showing another example of a data transmission system 300 according to some embodiments of the present disclosure. Figure 3As shown, the hierarchical structure 210 can be in the form of a binary tree. The stream-level rate limiting module 210 maintains the hierarchical structure 210 and allows the pipeline of the queue and dequeue operations, so that the operation of determining the target data stream can be completed in a constant time. Specifically, the P-heap can start an queue or dequeue operation once every four cycles. If it runs at a clock frequency of 250MHz, the data transmission rate can reach 62.5Mpps. In addition, the modular and pipeline design of the P-heap makes it friendly to hardware timing. This enables the P-heap to achieve high clock frequencies when supporting a large number of streams.

[0042] In some embodiments, if the scheduling time of the first data stream of the hierarchical structure 210 changes (for example, the data packet 280 in the target data stream has been transmitted, and the electronic device 110 changes the scheduling time of the target data stream), the target data stream will also change accordingly. In this case, the hierarchical structure 210 can be updated based on the target scheduling time corresponding to each data stream 150 (for example, the node where each data stream 150 is located in the hierarchical structure 210 is changed).

[0043] continue Figure 2 The packet level rate limiting module 220 is used to determine a plurality of first data packets in the target data stream. Based on the corresponding transmission times of the plurality of first data packets, at least a portion of the plurality of first data packets is sent. Figure 2 As shown, the packet level rate limiting module 220 at least includes a timer 240 , a packet filter 250 , and a packet scheduler 260 .

[0044] If the target data stream provided by the stream-level rate limiting module 210 is obtained, the packet-level rate limiting module 220 obtains a plurality of first data packets in the provided target data stream. Specifically, the packet-level rate limiting module 220 sorts the plurality of first data packets based on the transmission end time corresponding to the plurality of first data packets to ensure that the data packets 280 can be sent to the next node on time. The data packet sequence 270 is determined based on the sorting result. The data is sent to other nodes according to the arrangement order of each data packet 280 in the data packet sequence 270. In some embodiments, the plurality of first data packets can be sorted based on the transmission start time corresponding to each first data packet.

[0045] In some embodiments, if it is detected that the difference between the transmission start time of a data packet 280 in the data packet sequence 270 and the reference time is lower than the time threshold, the corresponding data packet 280 is sent. In some embodiments, the data packet 280 that is sent most recently can be stored at the first position of the data packet sequence 270, so that the data packets 280 in the data packet sequence 270 are sent in sequence based on the transmission start time of the data packet 280 and the reference time.

[0046] In some embodiments, the first data packet obtained by the packet-level rate limiting module 220 may be all data packets 280 in the target data stream, or may be part of the data packets 280. The packet-level rate limiting module 220 determines a plurality of candidate data packets from the data packets 280 in the first data stream based on the difference between the reference time and the corresponding transmission start time of the data packets 280 in the first data stream. Subsequently, a target number of first data packets are obtained from the candidate data packets. The number of first data packets is determined by the data transmission capacity of the electronic device 110 (i.e., the limiting rate during the data transmission process of the electronic device 110) and the size of the first data packet. Specifically, the target number can be determined based on the average size of the first data packets in the target data stream, or it can be determined based on the maximum amount of data of the first data packets in the target data stream. The calculation formula for the target number is as follows:

[0047] N=rate_limit*scheduling_latency / typical_packet_size(1)

[0048] Wherein N is the target number, rate_limit is the capacity of the electronic device 110 to send data, scheduling_latency is the scheduling delay time of the flow scheduler 230, and typical_packet_size is the data volume of the first data packet.

[0049] In some embodiments, after the packet scheduler 260 obtains the first data packet, it uses the WF2Q+ algorithm to calculate the transmission time of each data packet 280. The transmission time of the data packet 280 includes the transmission start time and the transmission end time of each data packet 280. The transmission time is determined based on the rate limit of the data stream 150. In some embodiments, it is also necessary to perform a qualification evaluation on the first data packet to prevent the first data packet from being a data packet 280 that has already been sent or has expired. Specifically, if the transmission start time of the first data packet is later than the reference time, the first data packet is considered to be a qualified data packet 280. Subsequently, the algorithm transmits these qualified first data packets in ascending order of the end time to achieve high-precision data transmission. Transmission start time of data packet 280 and the transfer end time The calculation formula is as follows:

[0050]

[0051] in is the scheduling time of the ith flow, is the length of the jth data packet 280, is the transmission rate limit of the ith stream determined based on the data capacity.

[0052] In some embodiments, if the packet-level rate limiting module 220 obtains a large number of first data packets, these first data packets cannot be all sent within the preset time, affecting the normal transmission of data. Therefore, the packet filter 250 can filter out the data packets 280 that do not meet the requirements. Only part of the first data packets are added to the data packet sequence 270, and the other data packets 280 are discarded. Specifically, the "upcoming window" can be defined as a time period starting from the current system time (i.e., the reference time), and the "upcoming data packet 280" refers to the data packet 280 whose transmission start time falls within the "upcoming window". The number (W) of "upcoming data packets 280" in the remote direct memory access network interface card (RDMA Network Interface Card, RNIC) is limited. The calculation formula is as follows:

[0053] W=system_packet_rate*scheduling_latency(4)

[0054] Where system_packet_rate is the rate at which the system sends data packets 280.

[0055] In this way, the packet level rate limiting module 220 effectively reduces the number of packets 280 that need to be rate limited at the packet level. After the packets 280 are filtered, the packet level rate limiting only needs to manage a small number of incoming packets 280. This makes the packet 280 level rate limiting both fast and accurate.

[0056] In some embodiments, the packet scheduler 260 deploys fast and accurate rate limits for these "upcoming data packets 280". Similar to the stream scheduler 230, the packet scheduler 260 also sorts all "upcoming data packets 280" from different streams and monitors the global timer to transmit the data packets 280 on time. Specifically, the packet scheduler 260 maintains two ordered lists, one for sorting start time (for qualification assessment) and the other for sorting end time (for ranking sorting). If the link is idle, get the first data packet 280 in the sorted list of the end time. The packet scheduler 260 infers the link status by calculating the transmission time of the last transmitted data packet 280. The calculation formula for the transmission time transmission_time included in the data is as follows:

[0057] transmission_time=packet_length / link_rate(5)

[0058] Where packet_length is the length of data packet 280, and link_rate is the transmission rate of data packet 280.

[0059] like Figure 3 As shown, the data packets 280 in the target data stream can be obtained through the timing wheel 320. The timing wheel 320 is a circular array, and each slot in the timing wheel 320 represents a different time interval. The data packets 280 are inserted into the corresponding slots according to their transmission time. The timing wheel 320 supports efficient enqueue / dequeue operations. When inserting the data packet 280, the timing wheel 320 uses the timestamp of the data packet 280 to calculate the offset of the slot, so that the insertion operation is completed in O(1) time. For the dequeue operation, the timer continuously checks the current time slot in the timing wheel 320. If there are data packets 280, they will be dequeued immediately, and the dequeue operation is also completed in O(1) time. The resource overhead of the timing wheel 320 is very low. Considering the time granularity of 4ns and the time range of 1 microsecond, only 250 slots are required.

[0060] like Figure 3 As shown, the data packet sequence 270 can be determined in the form of a register array. Specifically, the register array uses a parallel comparison and shift architecture to sort and store the first data packets based on the transmission end time of the qualified first data packets. The sorted register array supports enqueue and dequeue operations every two cycles, and can maintain a high clock frequency when processing only a few hundred elements, thereby increasing the data packet transmission rate. Figure 4 FIG. 4 is a schematic diagram showing an example of a data packet sequence 400 according to some embodiments of the present disclosure. Figure 4 As shown, each data packet 280 in the data packet sequence 270 is sent in sequence based on the transmission start time of each first data packet.

[0061] The packet level filtering module can also store only the metadata of the first data packet obtained. The metadata includes the transmission time and the descriptor of the data packet 280. Accordingly, the discarded data packet 280 can be retrieved when the flow is scheduled next time, ensuring that performance and accuracy are not affected.

[0062] In some embodiments, after the packet filter 250 discards the first data packet that is not added to the data packet sequence 270, it can also update the target scheduling time corresponding to the first data stream based on the transmission time of the discarded first data packet. Specifically, the packet filter 250 passes the information required to reschedule the stream to the following packet scheduler 260. This information includes the transmission time and data offset of the data packet 280 with the closest transmission time among the discarded data packets 280. Based on this information, the stream scheduler 230 is notified to update and reschedule the stream. The scheduling time of the stream is set to the transmission time of the discarded data packet 280 that is most recently transmitted. For example, if the transmission start time of the data packet 280 that is most recently transmitted among the discarded data packets 280 corresponding to the first data stream is t=50, the scheduling time of the first data stream is t=50.

[0063] In some embodiments, the target data stream may change during the process of sending data packets. For example, the reference time is t=0. The first data stream includes data packet 1 (t=10) and data packet 2 (t=20), and the second data stream includes data packet 3 (t=16) and data packet 4 (t=30). Since the transmission start time of data packet 1 is closest to the reference time, the first data stream is first used as the target data stream. The packet-level rate limiting module obtains data packet 1 (t=10) and data packet 2 (t=20) from the first data stream and establishes a data packet sequence. In the case of t=13, data packet 1 has been sent, and the second data stream becomes the target data stream. The sending time of data packet 3 is earlier than that of data packet 2. In order to ensure normal data transmission, it is necessary to obtain multiple second data packets in the second data stream after the target data stream is updated from the first data stream to the second data stream 150. Based on the corresponding transmission end time of the multiple second data packets, the data packet sequence 270 is updated. And based on the reference time 524 and the updated data packet sequence 270, the data packet 280 in the updated data packet sequence 270 is sent. Thus, data packet 280 is sent based on updated data packet sequence 270, thereby improving the accuracy and reliability of the data sending process.

[0064] The packet scheduler 260 supports strict rate limits and also supports weighted sharing by adjusting the timing rate of the global timer. If the rate limit of the total traffic (i.e., the capacity of data transmission) is lower than the link transmission rate, the data transmission will not be completed within the scheduled time, affecting the subsequent data flow scheduling. Therefore, in some embodiments, if it is detected that the sum of the data volume of the data packets 280 in the data packet sequence 270 is greater than the data volume threshold, the clock adjustment value is determined based on the capacity and data volume of the data transmission; and based on the clock adjustment value, the period of the system clock used for data transmission is adjusted. Specifically, each periodic timer increases the system time by one clock time, for example, 4 nanoseconds at a clock frequency of 250MHz. When the rate limit of the total traffic is greater than the link rate, the link is oversubscribed, and the timer slows down the system time proportionally. This enables the packet scheduler 260 to transmit more data packets 280 in the actual unit time, thereby preventing the backlog and queuing of data packets 280 caused by oversubscription. The timer adjusts the timing rate according to the rate oversubscription factor Φ, which is defined as the sum of the active flow rate limits divided by the link rate. After the time period δ, the formula for the timer to update the reference time T is as follows:

[0065] T(t+δ)=T(t)+δ*max(1,Φ)(6)

[0066] In some embodiments, if all first data packets in the data packet sequence 270 are sent within the scheduling period of the target data stream, multiple third data packets 280 in the first data stream are determined; and based on the corresponding transmission end time of the multiple third data packets 280, the data packet sequence 270 is updated. In this way, link idleness is prevented and the data transmission rate is increased.

[0067] Figure 5 FIG. 5 shows an example architecture diagram of an RDMA network card 500 according to some embodiments of the present disclosure. Figure 5 As shown, the RDMA network card 140 includes a host layer 510 and an RNIC layer 520 .

[0068] In some embodiments, the event multiplexer 521 is used to collect events related to data flow scheduling, including: host doorbell signals indicating the presence of new data packets 280, rates and updates of congestion control, events that data flow 150 is ready to be rescheduled, etc. Figure 5 As shown, the event multiplexer 521 passes the active data stream 150 that has data and congestion control to allow the data to be sent to the stream scheduler 230 for stream-level rate limiting and scheduling. The stream scheduler 230 uses the timeline 523 to sort a large number of data streams 150 and monitors the timer to schedule the latest data stream 150 on time. Then, it applies adaptive batching and notifies the DMA engine 525 to obtain multiple work queue entries (Work Queue Entry, WQE). The packet scheduler 260 obtains the data packet 280 and calculates the transmission time of the data packet 280. Subsequently, the packet filter 250 is applied to pick up the "data packet 280 that is about to be sent" and store its WQE in the WQE buffer 522, discarding the rest of the information. Subsequently, the packet scheduler 260 calculates the rescheduling time of the data stream 150 corresponding to the lost data packet 280 and notifies the event multiplexer 521. Next, the data packet 280 scheduler 260 uses the timeline 523 to sort hundreds of "data packets 280 that are about to be sent". At the same time, the packet 280 scheduler 260 queries the global timer to schedule and transmit the qualified packet 280 with the earliest end time. Finally, the WQE in the WQE buffer 522 and the DMA engine 525 are used to retrieve the packet 280 data from the host, attach the RDMA header at the transport layer 526, and then transmit it to the network through the basic network card. In this way, it is possible to support the processing of a large number of data streams at the same time with low resource occupancy. When processing a large number of data streams, extremely high processing speeds can be achieved, improving data transmission efficiency. On the other hand, this solution can accurately perform rate limiting and achieve rate limiting in the range of 100Kbps to 100Gbps for thousands of concurrent streams. When the link is oversubscribed, the bandwidth can be shared proportionally. As a result, the performance of the RDMA network card is improved.

[0069] Figure 6 A flow chart of a process 600 for data transmission according to some embodiments of the present disclosure is shown. The process 600 may be implemented at the electronic device 110.

[0070] In block 610, based on target scheduling times respectively corresponding to the one or more data flows, a first data flow among the one or more data flows is determined as a target data flow to be scheduled.

[0071] In some embodiments, determining the target data stream includes: sorting the one or more data streams based on target scheduling times corresponding to the one or more data streams respectively; generating a hierarchical structure corresponding to the one or more data streams based on the sorting results, the hierarchical structure including multiple nodes, each node corresponding to one of the one or more data streams; and determining the target data stream based on the hierarchical structure.

[0072] At block 620, a plurality of first data packets in a target data flow are determined.

[0073] In some embodiments, determining a plurality of first data packets in a target data stream includes: determining a plurality of candidate data packets from data packets in the first data stream based on a difference between a reference time and a corresponding transmission start time of the data packets in the first data stream; and selecting a target number of first data packets from the plurality of candidate data packets.

[0074] In some embodiments, the target number is determined by: determining the target number based on a capacity of data transmission and a data volume of data packets in the first data flow.

[0075] At block 630, at least a portion of the plurality of first data packets are transmitted based on respective transmission times of the plurality of first data packets.

[0076] In some embodiments, sending at least a portion of multiple first data packets includes: sorting the multiple first data packets based on corresponding transmission end times of the multiple first data packets; determining a data packet sequence based on at least one data packet among the multiple first data packets according to the sorting results of the multiple first data packets; and sending the data packets in the data packet sequence according to the order of the data packets in the data packet sequence.

[0077] In some embodiments, sending a data packet in the data packet sequence includes: sending the first data packet in response to a difference between a transmission start time of a first data packet in the data packet sequence and a reference time being lower than a time threshold.

[0078] In some embodiments, process 600 also includes acquiring multiple second data packets in the second data stream in response to the target data stream being updated from the first data stream to the second data stream; updating the data packet sequence based on the corresponding transmission end times of the multiple second data packets; and sending the data packets in the updated data packet sequence based on the reference time and the updated data packet sequence.

[0079] In some embodiments, process 600 also includes determining a clock adjustment value based on the capacity and data amount of data transmission in response to the sum of the data amounts of data packets in the data packet sequence being greater than a data amount threshold; and adjusting the period of the system clock used for data transmission based on the clock adjustment value.

[0080] In some embodiments, process 600 further includes determining a plurality of third data packets in the first data stream in response to all first data packets in the data packet sequence being sent; and updating the data packet sequence based on corresponding transmission end times of the plurality of third data packets.

[0081] In some embodiments, process 600 further includes updating a target scheduling time corresponding to the first data flow based on a transmission time of the at least one first data packet in response to at least one first data packet of the plurality of first data packets not being added to the data packet sequence.

[0082] In some embodiments, process 600 further includes updating the hierarchy structure based on target scheduling times respectively corresponding to the one or more data flows in response to determining a plurality of first data packets in the first data flow.

[0083] Figure 7 1 is a schematic structural block diagram of an apparatus 700 for data transmission according to some embodiments of the present disclosure. The apparatus 700 may be implemented as or included in the electronic device 110. Each module / component in the apparatus 700 may be implemented by hardware, software, firmware or any combination thereof.

[0084] As shown in the figure, the device 700 includes a first determination module 710, which is configured to determine a first data stream in one or more data streams as a target data stream to be scheduled based on the target scheduling time corresponding to the one or more data streams. The device 700 also includes a second determination module 720, which is configured to determine a plurality of first data packets in the target data stream. The device 700 also includes a sending module 730, which is configured to send at least a portion of the plurality of first data packets based on the corresponding transmission times of the plurality of first data packets.

[0085] In some embodiments, the first determination module 710 is also configured to sort one or more data streams based on target scheduling times corresponding to the one or more data streams respectively; generate a hierarchical structure corresponding to the one or more data streams based on the sorting results, the hierarchical structure comprising multiple nodes, each node corresponding to one of the one or more data streams; and determine the target data stream based on the hierarchical structure.

[0086] In some embodiments, the second determination module 720 is further configured to determine a plurality of candidate data packets from the data packets in the first data stream based on the difference between the reference time and the corresponding transmission start time of the data packets in the first data stream; and to select a target number of multiple first data packets from the plurality of candidate data packets.

[0087] In some embodiments, the second determination module 720 is further configured to determine the target number based on the capacity of data transmission and the data volume of the data packets in the first data flow.

[0088] In some embodiments, the sending module 730 is also configured to sort the multiple first data packets based on the corresponding transmission end times of the multiple first data packets; determine a data packet sequence based on at least one of the multiple first data packets according to the sorting results of the multiple first data packets; and send the data packets in the data packet sequence according to the order of the data packets in the data packet sequence.

[0089] In some embodiments, the sending module 730 is further configured to send the first data packet in response to a difference between the transmission start time of the first data packet in the data packet sequence and the reference time being lower than a time threshold.

[0090] In some embodiments, the device 700 also includes a target data stream update module, which is configured to obtain multiple second data packets in the second data stream in response to the target data stream being updated from the first data stream to the second data stream; update the data packet sequence based on the corresponding transmission end time of the multiple second data packets; and send the data packets in the updated data packet sequence based on the reference time and the updated data packet sequence.

[0091] In some embodiments, the device 700 also includes a reference time update module, which is configured to determine a clock adjustment value based on the capacity and data volume of data transmission in response to the sum of the data volumes of data packets in a data packet sequence being greater than a data volume threshold; and adjust the period of the system clock used for data transmission based on the clock adjustment value.

[0092] In some embodiments, the device 700 also includes a data packet sequence update module, which is configured to determine multiple third data packets in the first data stream in response to all first data packets in the data packet sequence being sent; and update the data packet sequence based on the corresponding transmission end time of the multiple third data packets.

[0093] In some embodiments, the device 700 also includes a target scheduling time update module, which is configured to update the target scheduling time corresponding to the first data stream based on the transmission time of at least one first data packet in response to at least one first data packet among the multiple first data packets not being added to the data packet sequence.

[0094] In some embodiments, the apparatus 700 further comprises a hierarchical structure updating module configured to update the hierarchical structure based on target scheduling times respectively corresponding to one or more data flows in response to determining a plurality of first data packets in the first data flow.

[0095] Figure 8 A block diagram of an electronic device 800 is shown in which one or more embodiments of the present disclosure may be implemented. It should be understood that Figure 8 The electronic device 800 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. Figure 8 The electronic device 800 shown can be used to implement Figure 1 An electronic device 110.

[0096] like Figure 8 As shown, the electronic device 800 is in the form of a general electronic device. The components of the electronic device 800 may include, but are not limited to, one or more processors or processing units 810, a memory 820, a storage device 830, one or more communication units 840, one or more input devices 850, and one or more output devices 860. The processing unit 810 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 820. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 800.

[0097] The electronic device 800 typically includes a plurality of computer storage media. Such media can be any accessible media that can be obtained by the electronic device 800, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 820 can be a volatile memory (e.g., a register, a cache, a random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 830 can be a removable or non-removable medium, and can include a machine-readable medium, such as a flash drive, a disk, or any other medium, which can be used to store information and / or data and can be accessed within the electronic device 800.

[0098] The electronic device 800 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 8 As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. The memory 820 may include a computer program product 825 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.

[0099] The communication unit 840 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 800 can be implemented with a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 800 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.

[0100] The input device 850 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 860 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 800 may also communicate with one or more external devices (not shown) through the communication unit 840 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 800, or communicate with any device that allows the electronic device 800 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).

[0101] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.

[0102] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0103] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0104] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0105] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.

[0106] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.

Claims

1. A data transmission method, comprising: Based on target scheduling times respectively corresponding to the one or more data streams, determining a first data stream among the one or more data streams as a target data stream to be scheduled; Determining a plurality of first data packets in the target data stream; as well as At least a portion of the plurality of first data packets are sent based on respective transmission times of the plurality of first data packets.

2. The method of claim 1 , wherein sending at least a portion of the plurality of first data packets comprises: sorting the plurality of first data packets based on corresponding transmission end times of the plurality of first data packets; According to the sorting result of the plurality of first data packets, determining a data packet sequence based on at least one data packet among the plurality of first data packets; as well as The data packets in the data packet sequence are sent according to the order of the data packets in the data packet sequence.

3. The method of claim 2, wherein sending a data packet in the sequence of data packets comprises: In response to a difference between a transmission start time of a first data packet in the data packet sequence and a reference time being lower than a time threshold, the first data packet is sent.

4. The method of claim 1, wherein determining a plurality of first data packets in the target data stream comprises: determining a plurality of candidate data packets from the data packets in the first data stream based on a difference between a reference time and a corresponding transmission start time of the data packets in the first data stream; as well as A target number of the plurality of first data packets are selected from the plurality of candidate data packets.

5. The method according to claim 4, wherein the target number is determined by: The target number is determined based on a data transmission capacity and a data volume of data packets in the first data flow.

6. The method according to claim 2, further comprising: In response to the target data stream being updated from the first data stream to a second data stream, acquiring a plurality of second data packets in the second data stream; updating the data packet sequence based on corresponding transmission end times of the plurality of second data packets; as well as Based on the reference time and the updated sequence of data packets, data packets in the updated sequence of data packets are sent.

7. The method according to claim 2, further comprising: In response to a sum of data volumes of data packets in the data packet sequence being greater than a data volume threshold, determining a clock adjustment value based on a data transmission capacity and the data volume; as well as Based on the clock adjustment value, a period of a system clock used for data transmission is adjusted.

8. The method according to claim 2, further comprising: In response to all of the first data packets in the sequence of data packets being sent, determining a plurality of third data packets in the first data stream; as well as The data packet sequence is updated based on corresponding transmission end times of the plurality of third data packets.

9. The method of claim 1, wherein determining the target data stream comprises: sorting the one or more data flows based on the target scheduling times respectively corresponding to the one or more data flows; Based on the sorting result, generating a hierarchical structure corresponding to the one or more data streams, the hierarchical structure comprising a plurality of nodes, each node corresponding to one of the one or more data streams; as well as The target data flow is determined based on the hierarchical structure.

10. The method according to claim 9, further comprising: In response to determining the plurality of first data packets in the first data flow, the hierarchical structure is updated based on target scheduling times respectively corresponding to the one or more data flows.

11. The method according to claim 2, further comprising: In response to at least one first data packet of the plurality of first data packets not being added to the data packet sequence, the target scheduling time corresponding to the first data flow is updated based on a transmission time of the at least one first data packet.

12. A device for data transmission, comprising: A first determining module is configured to determine a first data stream among the one or more data streams as a target data stream to be scheduled based on target scheduling times respectively corresponding to the one or more data streams; A second determining module is configured to determine a plurality of first data packets in the target data stream; as well as The sending module is configured to send at least a portion of the plurality of first data packets based on corresponding transmission times of the plurality of first data packets.

13. An electronic device comprising: at least one processing unit; as well as At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 11 when executed by the at least one processing unit.

14. A computer-readable storage medium having a computer program stored thereon, wherein the computer program can be executed by a processor to implement the method according to any one of claims 1 to 11.