Data transmission control method and device, computer device and storage medium

CN122802443APending Publication Date: 2026-09-22SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510338591.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

[0003]然而,传统数据控制方法在实际应用中存在诸多弊端

Benefits of technology

[0027]本申请实施例提供的数据传输控制方法,若令牌桶中不存在令牌,则对待发送数据包进行识别,确定待发送数据包对应的接收设备以及执行命令,保证了确定的待发送数据包对应的接收设备以及执行命令的准确性。进而可以根据接收设备以及执行命令,确定待发送数据包对应的优先级。若待发送数据包对应的优先级大于或者等于预设优先级阈值,则控制增加令牌桶中令牌数量,并发送待发送数据包,从而确保关键数据及时传输。若待发送数据包对应的优先级小于预设优先级阈值,则将待发送数据包放入缓存区。从而可以等待合适时机,避免低优先级数据包占用过多资源,提高资源利用效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122802443A_ABST
    Figure CN122802443A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of data transmission, and in particular to a data transmission control method and device, a computer device and a storage medium. A to-be-sent data packet is generated; it is detected whether a token exists in a token bucket corresponding to the to-be-sent data packet; the token is used to control the sending of the to-be-sent data packet; and according to the detection result, the to-be-sent data packet is processed correspondingly. The sending of the to-be-sent data packet is controlled by the token in the token bucket, the data sending rhythm can be accurately controlled according to the token generation rate, so that the to-be-sent data packet can be reasonably controlled, the stable and reliable transmission of the to-be-sent data packet is ensured, and the stability and performance of the data sending device under various working conditions are verified. In addition, a large amount of manual setting and adjustment by a test engineer is not required, so time cost and labor cost are saved, work efficiency is improved, and errors caused by human negligence are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data transmission technology, and more specifically to data transmission control methods, devices, computer equipment, and storage media. Background Technology

[0002] Advances in semiconductor technology have led to a dramatic expansion in the scale and increasing complexity of integrated circuit designs. For example, application-specific integrated circuits (ASICs) can contain millions of transistors, resulting in intricate internal architectures and frequent signal interactions. Verification is crucial throughout the entire chip design process, from design conception to system software debugging; every step relies on verification support, highlighting its paramount importance. As the functional complexity of integrated circuits grows exponentially, the difficulty of verification work also skyrockets. In actual verification, it is necessary to simulate various complex scenarios, generate diverse stimulus data inputs to the module under test, and accurately determine whether the output data meets functional requirements.

[0003] However, traditional data control methods have many drawbacks in practical applications. When test scenarios change frequently, test engineers need to perform a lot of manual settings and adjustments, which not only consumes a lot of time and energy, but is also prone to errors due to human negligence.

[0004] To meet the stringent requirements of modern chip verification and ensure that chips can operate stably and reliably under various working conditions, it is imperative to introduce a method that can flexibly and efficiently control data. Summary of the Invention

[0005] In view of this, the present invention provides a data transmission control (subject name) to solve the problem of data transmission control.

[0006] In a first aspect, the present invention provides a data transmission control method applied to a data transmission device, the method comprising:

[0007] Generate data packets to be sent;

[0008] Check if a token exists in the token bucket corresponding to the data packet to be sent; the token is used to control the sending of the data packet to be sent.

[0009] Based on the detection results, the data packets to be sent are processed accordingly.

[0010] The data transmission control method provided in this application generates a data packet to be sent; detects whether a token exists in the token bucket corresponding to the data packet; and processes the data packet to be sent accordingly based on the detection result. This method controls the transmission of the data packet through the tokens in the token bucket, precisely controlling the data transmission rhythm based on the token generation rate. This allows for reasonable control of the data packet to be sent, ensuring stable and reliable transmission, and verifying the stability and performance of the data transmission device under various operating conditions. Furthermore, it eliminates the need for extensive manual settings and adjustments by test engineers, thus saving time and manpower costs, improving work efficiency, and preventing errors due to human negligence.

[0011] In one optional implementation, the data packet to be sent is processed accordingly based on the detection result, including:

[0012] If there are tokens in the token bucket, then obtain the amount of data corresponding to the data packet to be sent and the number of tokens in the token bucket;

[0013] Compare the amount of data with the number of tokens;

[0014] If the number of tokens is greater than or equal to the amount of data, then send the data packet to be sent.

[0015] The data transmission control method provided in this application embodiment, if tokens exist in the token bucket, obtains the data volume corresponding to the data packet to be sent and the number of tokens in the token bucket; compares the data volume with the number of tokens; if the number of tokens is greater than or equal to the data volume, then sends the data packet to be sent. By controlling the sending of the data packet to be sent through the tokens in the token bucket, the data transmission rhythm can be precisely controlled according to the token generation rate, thereby achieving reasonable control of the data packet to be sent, ensuring stable and reliable transmission of the data packet to be sent, and verifying the stability and performance of the data transmission device under various working conditions.

[0016] In one alternative implementation, the method further includes:

[0017] If the number of tokens is less than the amount of data, the data packet to be sent is identified to determine the receiving device corresponding to the data packet and the command to be executed.

[0018] The priority of the data packet to be sent is determined based on the receiving device and the command executed.

[0019] If the priority of the data packet to be sent is greater than or equal to the preset priority threshold, then the number of tokens in the token bucket is increased and the data packet to be sent is sent.

[0020] If the priority of the data packet to be sent is less than the preset priority threshold, the data packet to be sent will be placed in the buffer.

[0021] The data transmission control method provided in this application identifies the data packet to be sent if the number of tokens is less than the amount of data, determining the receiving device and execution command corresponding to the data packet, thus ensuring the accuracy of the identified receiving device and execution command. Based on the receiving device and execution command, the priority of the data packet to be sent can then be determined. If the priority of the data packet to be sent is greater than or equal to a preset priority threshold, the number of tokens in the token bucket is increased, and the data packet to be sent is sent, ensuring timely transmission of critical data. If the priority of the data packet to be sent is less than the preset priority threshold, the data packet is placed in a buffer. This allows the system to wait for a suitable opportunity, preventing low-priority data packets from consuming excessive resources and improving resource utilization efficiency.

[0022] In one optional implementation, the data packet to be sent is processed accordingly based on the detection result, including:

[0023] If there is no token in the token bucket, the data packet to be sent is identified to determine the receiving device corresponding to the data packet and the command to be executed.

[0024] The priority of the data packet to be sent is determined based on the receiving device and the command executed.

[0025] If the priority of the data packet to be sent is greater than or equal to the preset priority threshold, then the number of tokens in the token bucket is increased and the data packet to be sent is sent.

[0026] If the priority of the data packet to be sent is less than the preset priority threshold, the data packet to be sent will be placed in the buffer.

[0027] The data transmission control method provided in this application identifies the data packet to be sent if there are no tokens in the token bucket, thus determining the receiving device and execution command corresponding to the data packet and ensuring the accuracy of the identified receiving device and execution command. Based on the receiving device and execution command, the priority of the data packet to be sent can then be determined. If the priority of the data packet to be sent is greater than or equal to a preset priority threshold, the number of tokens in the token bucket is increased, and the data packet to be sent is sent, ensuring timely transmission of critical data. If the priority of the data packet to be sent is less than the preset priority threshold, the data packet is placed in a buffer. This allows the data packet to wait for a suitable opportunity, preventing low-priority data packets from consuming excessive resources and improving resource utilization efficiency.

[0028] In one optional implementation, the data packet to be sent is at least one, and the method further includes:

[0029] Obtain the execution result corresponding to each data packet to be sent; the execution result includes at least one of the following: data size, sending time, response time received from the receiving device, and priority of each data packet to be sent;

[0030] Based on the execution results, update the token bucket parameters corresponding to the token bucket. The token bucket parameters include at least one of the following: token bucket capacity, token addition rate, and interval between each token addition.

[0031] The data transmission control method provided in this application obtains the execution result corresponding to each data packet to be sent; based on each execution result, it updates the token bucket parameters corresponding to the token bucket, thereby ensuring that the updated token bucket parameters match the data transmission rate and response rate of the data sending device. This solves the problem in the prior art where the verification of the data sending device requires a lot of manual setting and adjustment, increasing the workload of test engineers and making errors more likely.

[0032] In one alternative implementation, the method further includes:

[0033] Obtain data transmission test requirements;

[0034] Based on the data transmission test requirements, the token bucket parameters corresponding to the token bucket are adjusted; the token bucket parameters include at least one of the following: token bucket capacity, token addition rate, and interval between each token addition.

[0035] The data transmission control method provided in this application obtains data transmission test requirements and adjusts the token bucket parameters corresponding to the token bucket based on these requirements. This allows for the simulation of various transmission scenarios. It solves the problem that traditional data transmission device verification data control methods use fixed modes or static configurations to control data flow, resulting in insufficient flexibility and an inability to adapt to dynamically changing test requirements.

[0036] In one optional implementation, the token bucket parameters corresponding to the token bucket are adjusted according to data transmission test requirements, including:

[0037] If the data transmission test requirement is a burst scenario test, then set the token bucket capacity to the maximum, the token addition rate to the maximum, and the interval between each token addition to the minimum, in order to test the characteristic of the data sending device to send the data packet to be sent at the maximum rate;

[0038] If the data transmission test requires a latency scenario, then set the token bucket capacity to the minimum, the token addition rate to the minimum, and the interval between each token addition to the maximum to test the characteristics of the data packets to be sent by the data sending device under latency scenarios.

[0039] The data transmission control method provided in this application, if the data transmission test requirement is a burst scenario test, sets the token bucket capacity to the maximum, the token addition rate to the maximum, and the interval between each token addition to the minimum, to test the characteristic of the data transmission device sending data packets at the maximum rate, thereby testing the performance of the data transmission device under high load. If the data transmission test requirement is a latency scenario test, sets the token bucket capacity to the minimum, the token addition rate to the minimum, and the interval between each token addition to the maximum, to test the characteristic of the data transmission device sending data packets under latency scenarios. This helps to evaluate the system's adaptability in complex network environments, enabling the system to better cope with diverse application scenarios.

[0040] In a second aspect, the present invention provides a data transmission control device, applied to a data transmission equipment, the device comprising:

[0041] The generation module is used to generate data packets to be sent.

[0042] The detection module is used to detect whether there is a token in the token bucket corresponding to the data packet to be sent; the token is used to control the sending of the data packet to be sent.

[0043] The processing module is used to process the data packets to be sent according to the detection results.

[0044] The data transmission control device provided in this application generates a data packet to be sent; detects whether a token exists in the token bucket corresponding to the data packet to be sent; and processes the data packet to be sent accordingly based on the detection result. This device controls the transmission of the data packet to be sent through the tokens in the token bucket, and can precisely control the data transmission rhythm based on the token generation rate. This allows for reasonable control of the data packet to be sent, ensuring stable and reliable transmission, and verifying the stability and performance of the data transmission device under various operating conditions. Furthermore, it eliminates the need for extensive manual settings and adjustments by test engineers, thus saving time and manpower costs, improving work efficiency, and preventing errors due to human negligence.

[0045] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the data transmission control method of the first aspect or any corresponding embodiment described above.

[0046] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the data transmission control method of the first aspect or any corresponding embodiment described above.

[0047] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to execute the data transmission control method of the first aspect or any corresponding embodiment thereof. Attached Figure Description

[0048] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0049] Figure 1 This is a flowchart illustrating a data transmission control method according to an embodiment of the present invention;

[0050] Figure 2 This is a schematic diagram of storing the chip host creation command into the chip host memory according to an embodiment of the present invention;

[0051] Figure 3 This is a schematic diagram of SQE data transmission according to an embodiment of the present invention;

[0052] Figure 4 This is a flowchart illustrating the processing of SQE data by the Controller according to an embodiment of the present invention;

[0053] Figure 5 This is a schematic diagram of the token bucket structure according to an embodiment of the present invention;

[0054] Figure 6 This is a flowchart illustrating another data transmission control method according to an embodiment of the present invention;

[0055] Figure 7 This is a flowchart illustrating another data transmission control method according to an embodiment of the present invention;

[0056] Figure 8 This is a schematic diagram of the token bucket algorithm controlling the SQE according to an embodiment of the present invention.

[0057] Figure 9 This is a structural block diagram of a data transmission control device according to an embodiment of the present invention;

[0058] Figure 10 This is a structural block diagram of another data transmission control device according to an embodiment of the present invention;

[0059] Figure 11 This is a structural block diagram of another data transmission control device according to an embodiment of the present invention;

[0060] Figure 12This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation

[0061] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0062] Advances in semiconductor technology have led to a dramatic expansion in the scale and increasing complexity of integrated circuit designs. For example, application-specific integrated circuits (ASICs) can contain millions of transistors, resulting in intricate internal architectures and frequent signal interactions. Verification is crucial throughout the entire chip design process, from design conception to system software debugging; every step relies on verification support, highlighting its paramount importance. As the functional complexity of integrated circuits grows exponentially, the difficulty of verification work also skyrockets. In actual verification, it is necessary to simulate various complex scenarios, generate diverse stimulus data inputs to the module under test, and accurately determine whether the output data meets functional requirements.

[0063] However, traditional data control methods have many drawbacks in practical applications. When test scenarios change frequently, test engineers need to perform a lot of manual settings and adjustments, which not only consumes a lot of time and energy, but is also prone to errors due to human negligence.

[0064] To meet the stringent requirements of modern chip verification and ensure that chips can operate stably and reliably under various working conditions, it is imperative to introduce a method that can flexibly and efficiently control data.

[0065] It should be noted that the data transmission control method provided in this application can be executed by a data transmission control device. This device can be implemented as part or all of a computer device through software, hardware, or a combination of both. The computer device can be a server or a terminal. In this application, the server can be a single server or a server cluster composed of multiple servers. The terminal can be a smartphone, personal computer, tablet computer, wearable device, or other intelligent hardware device such as a smart robot. In the following method embodiments, the execution subject is always described using an electronic device as an example.

[0066] According to an embodiment of the present invention, a data transmission control method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0067] This embodiment provides a data transmission control method that can be used in the aforementioned data transmission device. Figure 1 This is a flowchart of a data transmission control method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:

[0068] Step S101: Generate the data packet to be sent.

[0069] Specifically, the data transmitting device can generate data packets to be sent according to task requirements. This data transmitting device can be a chip device or other types of devices.

[0070] For example, assuming the data sending device is the chip to be verified, the data packet to be sent can be an SQE data packet generated by the chip. SQE data consists of NVME commands issued by the chip host, categorized into I / O Commands and AdminCommands. Admin commands are used by the chip host to manage and control the SSD, while I / O commands are used for data interaction between the chip host and the SSD. The chip host achieves communication with the SSD by creating different NVME commands. SQEs issued by the chip host are generally stored in different queues, categorized according to the SQ ID within the SQE. There are a total of 65 queues in the host memory, each with a maximum depth of 64k-1. The queue size can be configured via registers. Figure 2 The diagram shows the chip host creating commands being stored in the chip host memory. SQE data issued by the chip host is stored in the host memory. When the host writes to the controller's doorbell register, the controller reads the SQE data from the host memory, stores it in different queues, and outputs it to downstream modules. Figure 3 SQE data transmission diagram.

[0071] In the data interaction between the chip host and the SSD, the chip host can send a large amount of SQE data at once. This SQE data is stored in the chip host's memory. The chip host notifies the controller by writing to the controller's doorbell register. The controller reads the SQE data from the chip host's memory and writes it to other modules. The command processing module parses the chip host's commands, and the command execution module executes the commands. When the command execution is complete, the result module replies with a completion message to the controller. The controller then converts the completion message into a command that the host can recognize and sends it back to the chip host. For example... Figure 4 The diagram shown is a flowchart of how the Controller processes SQE data.

[0072] Step S102: Check if there is a token in the token bucket corresponding to the data packet to be sent.

[0073] The token is used to control the sending of data packets.

[0074] Specifically, after generating the data packet to be sent, the data sending device can detect whether there is a token in the token bucket corresponding to the data packet to be sent based on the token bucket algorithm control mechanism.

[0075] The token bucket algorithm control mechanism uses the presence of tokens in the token bucket to indicate whether data can be sent. Each token in the token bucket represents a virtual information packet, and the token bucket is a storage pool for tokens. If there are tokens in the token bucket, data transmission is allowed; if there are no tokens, data transmission is not allowed. If there are not enough tokens in the token bucket or it overflows, data can be discarded or stored in a buffer. Tokens are added to the token bucket at a certain rate, and the data transmission rate is controlled by controlling the rate at which tokens are added. When the rate at which tokens are added to the token bucket is much greater than the data transmission rate, data will be sent continuously; conversely, if the rate at which tokens are added to the token bucket is less than the data transmission rate, the data transmission rate will be limited by the rate at which tokens are added. The token bucket's storage capacity is also limited. Each time data is transmitted, the token bucket deducts a number of tokens equal to the amount of data transmitted. If the amount of data transmitted exceeds the number of tokens in the token bucket, the transmitted data cannot be output. Once the number of tokens in the token bucket reaches a certain threshold, the number of tokens in the token bucket will not increase; excess tokens will overflow. For example, as shown... Figure 5 The diagram shown is a schematic of the token bucket structure.

[0076] The key control parameters involved in the token bucket algorithm generally include the following:

[0077] Size of each token: Each token represents one byte, and one token is consumed for each byte of data transmitted.

[0078] The interval for adding a token is T.

[0079] Number of tokens replenished each time: M.

[0080] The token bucket's capacity is B.

[0081] Token Generation Rate: r = M / T, which is the rate at which tokens are filled into the bucket, usually measured in tokens per second.

[0082] Token Consumption: When a data transfer of size n bytes is completed, n tokens are removed from the bucket.

[0083] Token Addition: Add one token to the bucket every 1 / r seconds until the bucket is full or the bucket size limit B is reached. If the token bucket limit is exceeded, the tokens will overflow.

[0084] Traffic Control: The token bucket algorithm indicates when traffic can be sent based on the presence of tokens in the bucket. If the number of tokens is greater than 0, traffic is allowed to be sent; otherwise, traffic is not allowed to be sent or the data is cached.

[0085] Burst Transmission Capability: If there are enough tokens in the bucket, traffic can be sent at a peak rate, which depends on the size of the bucket and the size of the packets.

[0086] Token Bucket State Update: The state of the bucket is updated at each time interval based on the generation and consumption of tokens.

[0087] It should be noted that when a token bucket algorithm module is integrated into a data sending device, the initial token generation rate and initial bucket capacity must first be configured according to the specific test scenario. The transmission of data packets depends on the initial token generation rate and initial bucket capacity configured in the token bucket settings. Therefore, after generating the data packet to be sent, the data sending device needs to check whether a token exists in the token bucket corresponding to the data packet.

[0088] For example, when the token bucket algorithm module is integrated into the chip's test environment, and the corresponding token generation rate and bucket capacity are configured according to the test scenario requirements, the chip host's write behavior to the controller doorbell register will depend on the token generation rate in the token bucket. When the downstream processing module takes a long time to process commands, the token generation rate can be slowed down by configuring parameters. The frequency of the chip host writing to the controller's doorbell register and the number of rings per cycle will be limited by the number of tokens in the token bucket, thereby slowing down the SQE output rate. When the downstream module takes a short time to process commands, the token generation rate in the token bucket can be increased by configuring parameters. The frequency of the host writing to the controller's doorbell register and the number of rings per cycle will increase, thereby increasing the SQE output rate. The token bucket algorithm is applied to the control of SQE data output, which can avoid data congestion and ensure that downstream modules are not idle for a long time, avoiding resource waste. When the token bucket parameters are set so that there are always "sufficient" tokens in the token bucket, the host will reach the maximum rate of writing to the controller's doorbell register, at which point the SQE will output at the maximum rate.

[0089] Step S103: Based on the detection results, process the data packet to be sent accordingly.

[0090] Specifically, the data transmitting device can send or buffer the data packets to be transmitted based on the detection results.

[0091] This step will be explained in detail below.

[0092] The data transmission control method provided in this application generates a data packet to be sent; detects whether a token exists in the token bucket corresponding to the data packet; and processes the data packet to be sent accordingly based on the detection result. This method controls the transmission of the data packet through the tokens in the token bucket, precisely controlling the data transmission rhythm based on the token generation rate. This allows for reasonable control of the data packet to be sent, ensuring stable and reliable transmission, and verifying the stability and performance of the data transmission device under various operating conditions. Furthermore, it eliminates the need for extensive manual settings and adjustments by test engineers, thus saving time and manpower costs, improving work efficiency, and preventing errors due to human negligence.

[0093] This embodiment provides a data transmission control method, which can be used in the aforementioned electronic device. Figure 6 This is a flowchart of a data transmission control method according to an embodiment of the present invention, such as... Figure 6 As shown, the process includes the following steps:

[0094] Step S201: Generate the data packet to be sent.

[0095] Please refer to the above description of step S101 for details on this step, which will not be repeated here.

[0096] Step S202: Check whether there is a token in the token bucket corresponding to the data packet to be sent.

[0097] The token is used to control the sending of data packets.

[0098] Step S203: Based on the detection results, process the data packet to be sent accordingly.

[0099] Specifically, step S203 above may include the following steps:

[0100] Step S2031: If there are tokens in the token bucket, then obtain the data volume corresponding to the data packet to be sent and the number of tokens in the token bucket.

[0101] Specifically, the data sending device detects whether there is a token in the token bucket. If there is a token in the token bucket, it obtains the amount of data corresponding to the data packet to be sent and the number of tokens in the token bucket.

[0102] Step S2032: Compare the amount of data with the number of tokens.

[0103] Specifically, the data sending device compares the amount of data corresponding to the data packet to be sent with the number of tokens.

[0104] Step S2033: If the number of tokens is greater than or equal to the amount of data, then send the data packet to be sent.

[0105] Specifically, if the number of tokens is greater than or equal to the amount of data, then a data packet to be sent is sent.

[0106] Step S2034: If the number of tokens is less than the amount of data, identify the data packet to be sent, determine the receiving device corresponding to the data packet to be sent, and execute the command.

[0107] Specifically, if the number of tokens is less than the amount of data, the data sending device identifies the data packet to be sent, determines the receiving device corresponding to the data packet, and executes the command.

[0108] Step S2035: Determine the priority of the data packet to be sent based on the receiving device and the executed command.

[0109] Specifically, the data transmitting device can identify the receiving device, determine its priority and current traffic volume. Then, the electronic device identifies the execution command, determining its type, execution time requirement, and scope of influence. Next, the data transmitting device determines the weight information corresponding to the device priority, current traffic, command type, execution time requirement, and scope of influence. Finally, the device priority, current traffic, command type, execution time requirement, and scope of influence are multiplied by their respective weight information to obtain the priority of the data packet to be transmitted.

[0110] Step S2036: If the priority of the data packet to be sent is greater than or equal to the preset priority threshold, then control the increase of the number of tokens in the token bucket and send the data packet to be sent.

[0111] Specifically, the data transmitting device compares the priority of the data packet to be sent with a preset priority threshold. If the priority of the data packet to be sent is greater than or equal to the preset priority threshold, the data transmitting device controls the increase of the number of tokens in the token bucket according to the maximum token addition rate, and then sends the data packet to be sent.

[0112] Step S2037: If the priority of the data packet to be sent is less than the preset priority threshold, then the data packet to be sent is placed in the buffer.

[0113] Specifically, if the priority of the data packet to be sent is less than the preset priority threshold, the data sending device will put the data packet to be sent into the buffer and wait for the number of tokens to be sufficient to send the data packet before sending it.

[0114] Step S2038: If there is no token in the token bucket, the data packet to be sent is identified to determine the receiving device corresponding to the data packet and the command to be executed.

[0115] Specifically, if there is no token in the token bucket, the data sending device identifies the data packet to be sent, determines the receiving device corresponding to the data packet, and executes the command.

[0116] Step S2039: Determine the priority of the data packet to be sent based on the receiving device and the executed command.

[0117] Specifically, the data transmitting device can identify the receiving device, determine its priority and current traffic volume. Then, the electronic device identifies the execution command, determining its type, execution time requirement, and scope of influence. Next, the data transmitting device determines the weight information corresponding to the device priority, current traffic, command type, execution time requirement, and scope of influence. Finally, the device priority, current traffic, command type, execution time requirement, and scope of influence are multiplied by their respective weight information to obtain the priority of the data packet to be transmitted.

[0118] In step S20310, if the priority of the data packet to be sent is greater than or equal to the preset priority threshold, the number of tokens in the token bucket is increased and the data packet to be sent is sent.

[0119] Specifically, if the priority of the data packet to be sent is greater than or equal to the preset priority threshold, the data sending device controls the increase of the number of tokens in the token bucket according to the maximum token addition rate, and sends the data packet to be sent.

[0120] Step S20311: If the priority of the data packet to be sent is less than the preset priority threshold, then the data packet to be sent is placed in the buffer.

[0121] Specifically, if the priority of the data packet to be sent is less than the preset priority threshold, the data sending device will put the data packet to be sent into the buffer and wait for the number of tokens to be sufficient to send the data packet before sending it.

[0122] The data transmission control method provided in this application embodiment, if tokens exist in the token bucket, obtains the data volume corresponding to the data packet to be sent and the number of tokens in the token bucket; compares the data volume with the number of tokens; if the number of tokens is greater than or equal to the data volume, the data packet to be sent is sent. By controlling the sending of the data packet through the tokens in the token bucket, the data transmission rhythm can be precisely controlled according to the token generation rate, thereby achieving reasonable control of the data packet to be sent, ensuring stable and reliable transmission, and verifying the stability and performance of the data transmission device under various working conditions. If the number of tokens is less than the data volume, the data packet to be sent is identified, and the receiving device and execution command corresponding to the data packet to be sent are determined, ensuring the accuracy of the determined receiving device and execution command. Then, the priority of the data packet to be sent can be determined based on the receiving device and execution command. If the priority of the data packet to be sent is greater than or equal to a preset priority threshold, the number of tokens in the token bucket is increased, and the data packet to be sent is sent, thereby ensuring timely transmission of critical data. If the priority of the data packet to be sent is less than the preset priority threshold, the data packet to be sent is placed in the buffer. This allows waiting for a suitable opportunity, avoiding low-priority data packets from consuming too many resources and improving resource utilization efficiency.

[0123] If no tokens are available in the token bucket, the data packet to be sent is identified to determine the corresponding receiving device and execution command, ensuring the accuracy of this identification. Based on the receiving device and execution command, the priority of the data packet to be sent can then be determined. If the priority of the data packet to be sent is greater than or equal to a preset priority threshold, the number of tokens in the token bucket is increased, and the data packet to be sent is sent, ensuring timely transmission of critical data. If the priority of the data packet to be sent is less than the preset priority threshold, the data packet to be sent is placed in the buffer. This allows it to wait for an appropriate time, preventing low-priority data packets from consuming excessive resources and improving resource utilization efficiency.

[0124] This embodiment provides a data transmission control method, which can be used in the aforementioned electronic device. Figure 7 This is a flowchart of a data transmission control method according to an embodiment of the present invention, such as... Figure 7 As shown, the process includes the following steps:

[0125] Step S301: Generate the data packet to be sent.

[0126] Please refer to the above description of step S201 for details on this step, which will not be repeated here.

[0127] Step S302: Check whether there is a token in the token bucket corresponding to the data packet to be sent.

[0128] The token is used to control the sending of data packets.

[0129] Please refer to the above description of step S202 for details on this step, which will not be repeated here.

[0130] Step S303: Based on the detection results, process the data packet to be sent accordingly.

[0131] Please refer to the above description of step S203 for details on this step, which will not be repeated here.

[0132] Step S304: Obtain the execution result corresponding to each data packet to be sent.

[0133] The execution result includes at least one of the following: the data size of each sent data packet, the sending time, the response time received from the receiving device, and the priority.

[0134] Specifically, the data transmitting device can retrieve from the storage space at least one of the following: the data size, transmission time, response time received from the receiving device, and priority of each data packet to be transmitted.

[0135] Step S305: Update the token bucket parameters corresponding to each token bucket based on the execution results.

[0136] The token bucket parameters include at least one of the following: token bucket capacity, token addition rate, and interval between each token addition.

[0137] In one optional implementation, the data transmitting device can input the data size, transmission time, response time received from the receiving device, and priority of each data packet to be transmitted into a preset token bucket parameter determination model. The preset token bucket parameter determination model extracts features from the data size, transmission time, response time received from the receiving device, and priority of each data packet to be transmitted, and outputs the corresponding target token bucket parameters. The data transmitting device updates the token bucket parameters corresponding to the output target token bucket parameters.

[0138] In another optional implementation, the data sending device can count the transmission time interval between any two adjacent data packets to be sent, as well as the reception time interval between the transmission time and response time of each data packet to be sent, and update the token bucket parameters corresponding to the token bucket according to the data size and priority of the data packets to be sent.

[0139] Specifically, if there is a transmission time interval greater than or equal to a first preset ratio that is greater than a preset transmission time interval, and / or a reception time interval greater than or equal to a second preset ratio that is greater than a preset reception time, the data transmission device will increase the token bucket capacity, increase the token addition rate, and decrease the interval between each token addition.

[0140] For example, such as Figure 8 The diagram illustrates the token bucket algorithm controlling the SQE (Signal Token Output). When data is input into the data input module, it first checks if there are enough tokens in the token bucket. If there are enough tokens, the data is output; otherwise, the data is either cached or discarded based on the user's choice. The data monitoring and feedback module monitors the rates of input and output data, collects characteristics of the input and output data, statistically analyzes these characteristics, and feeds the results back to the token bucket control module. The token bucket control module adjusts the token bucket parameters based on the feedback data, controlling the token generation rate and thus dynamically regulating data input and output.

[0141] Step S306: Obtain data transmission test requirements.

[0142] Specifically, the data transmission device can receive data transmission test requests input by the user, or determine data transmission test requests based on the current data transmission status.

[0143] For example, if the amount of data that the current data transmitting device needs to send exceeds a preset amount, then the current data transmission test requirement is determined to be a burst scenario test. If the time interval between the sending time of more than a preset number of data packets to be sent and the response time received from the data receiving device exceeds a preset time interval, then the current data transmission test requirement is determined to be a latency scenario test.

[0144] Step S307: Adjust the token bucket parameters corresponding to the token bucket according to the data transmission test requirements.

[0145] The token bucket parameters include at least one of the following: token bucket capacity, token addition rate, and interval between each token addition.

[0146] Specifically, step S307 above may include the following steps:

[0147] Step S3071: If the data transmission test requirement is a burst scenario test, then set the token bucket capacity to the maximum, the token addition rate to the maximum, and the interval between each token addition to the minimum, in order to test the characteristic of the data sending device to send the data packet to be sent at the maximum rate.

[0148] Specifically, if the data transmission test requirement is a burst scenario test, then the token bucket capacity is set to the maximum, the token addition rate is set to the maximum, and the interval between each token addition is set to the minimum, in order to test the characteristic of the data sending device to send the data packets to be sent at the maximum rate.

[0149] Step S3072: If the data transmission test requirement is a latency scenario test, then set the token bucket capacity to the minimum, the token addition rate to the minimum, and the interval between each token addition to the maximum, in order to test the characteristics of the data packet to be sent by the data sending device in a latency scenario.

[0150] Specifically, if the data transmission test requirement is a latency scenario test, then the token bucket capacity is set to the minimum, the token addition rate is set to the minimum, and the interval between each token addition is set to the maximum, in order to test the characteristics of the data packets to be sent by the data sending device under latency scenarios.

[0151] The data transmission control method provided in this application obtains the execution result corresponding to each data packet to be sent; based on each execution result, it updates the token bucket parameters corresponding to the token bucket, thereby ensuring that the updated token bucket parameters match the data transmission rate and response rate of the data sending device. This solves the problem in the prior art where the verification of the data sending device requires a lot of manual setting and adjustment, increasing the workload of test engineers and making errors more likely.

[0152] Furthermore, the system acquires data transmission test requirements and adjusts the token bucket parameters accordingly. This allows for the simulation of various transmission scenarios. It solves the problem that traditional data transmission device verification data control methods, which use fixed modes or static configurations to control data flow, lack flexibility and cannot adapt to dynamically changing test requirements. If the data transmission test requirement is a burst scenario test, the token bucket capacity is set to maximum, the token addition rate is set to maximum, and the interval between token additions is set to minimum to test the data transmission device's ability to send data packets at maximum rate, thus testing the device's performance under high load. If the data transmission test requirement is a latency scenario test, the token bucket capacity is set to minimum, the token addition rate is set to minimum, and the interval between token additions is set to maximum to test the data transmission device's characteristics in latency scenarios. This helps evaluate the system's adaptability in complex network environments, enabling the system to better cope with diverse application scenarios.

[0153] This embodiment also provides a data transmission control device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0154] This embodiment provides a data transmission control device, applied to a data transmission equipment, such as... Figure 9 As shown, it includes:

[0155] Generation module 401 is used to generate data packets to be sent;

[0156] The detection module 402 is used to detect whether there is a token in the token bucket corresponding to the data packet to be sent; the token is used to control the sending of the data packet to be sent.

[0157] The processing module 403 is used to process the data packet to be sent according to the detection result.

[0158] In some optional implementations, the processing module 403 is specifically used to: if there are tokens in the token bucket, obtain the data volume corresponding to the data packet to be sent and the number of tokens in the token bucket; compare the data volume with the number of tokens; if the number of tokens is greater than or equal to the data volume, then send the data packet to be sent.

[0159] In some optional implementations, the processing module 403 is specifically used to identify the data packet to be sent if the number of tokens is less than the amount of data, determine the receiving device and execution command corresponding to the data packet to be sent; determine the priority of the data packet to be sent according to the receiving device and execution command; if the priority of the data packet to be sent is greater than or equal to a preset priority threshold, control the increase of the number of tokens in the token bucket and send the data packet to be sent; if the priority of the data packet to be sent is less than the preset priority threshold, put the data packet to be sent into the buffer area.

[0160] In some optional implementations, the processing module 403 is specifically used to identify the data packet to be sent if there is no token in the token bucket, determine the receiving device and execution command corresponding to the data packet to be sent; determine the priority of the data packet to be sent according to the receiving device and execution command; if the priority of the data packet to be sent is greater than or equal to a preset priority threshold, control the increase of the number of tokens in the token bucket and send the data packet to be sent; if the priority of the data packet to be sent is less than the preset priority threshold, put the data packet to be sent into the buffer area.

[0161] In some alternative implementations, the data packet to be sent is at least one, such as the aforementioned data transmission control device. Figure 10 As shown, it also includes:

[0162] The first acquisition module 404 is used to acquire the execution result corresponding to each data packet to be sent; the execution result includes at least one of the following: the data size, sending time, response time received from the receiving device, and priority of each data packet to be sent;

[0163] The update module 405 is used to update the token bucket parameters corresponding to the token bucket based on each execution result. The token bucket parameters include at least one of the following: token bucket capacity, token addition rate, and interval time between each token addition.

[0164] In some alternative implementations, the aforementioned data transmission control device, such as Figure 11 As shown, it also includes:

[0165] The second acquisition module 406 is used to acquire data transmission test requirements;

[0166] The adjustment module 407 is used to adjust the token bucket parameters corresponding to the token bucket according to the data transmission test requirements; the token bucket parameters include at least one of the following: token bucket capacity, token addition rate, and interval time between each token addition.

[0167] In some optional implementations, the adjustment module 407 is specifically used to set the token bucket capacity to the maximum, the token addition rate to the maximum, and the interval between each token addition to the minimum if the data transmission test requirement is a burst scenario test, so as to test the characteristic of the data sending device to send the data packet to be sent at the maximum rate; if the data transmission test requirement is a delay scenario test, the token bucket capacity to the minimum, the token addition rate to the minimum, and the interval between each token addition to the maximum are set to the maximum, so as to test the characteristic of the data sending device to send the data packet to be sent in a delay scenario.

[0168] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0169] In this embodiment, the data transmission control device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0170] This invention also provides a computer device having the above-described features. Figures 9-11 The data transmission control device shown.

[0171] Please see Figure 12 , Figure 12 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 12 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 12 Take a processor 10 as an example.

[0172] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware integrated circuit. The aforementioned hardware integrated circuit may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0173] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.

[0174] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0175] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0176] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.

[0177] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0178] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0179] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A data transmission control method, characterized in that, Applied to a data transmission device, the method includes: Generate data packets to be sent; Detect whether a token exists in the token bucket corresponding to the data packet to be sent; the token is used to control the sending of the data packet to be sent; Based on the detection results, the data packets to be sent are processed accordingly.

2. The method according to claim 1, characterized in that, The step of processing the data packet to be sent according to the detection result includes: If there are tokens in the token bucket, then obtain the amount of data corresponding to the data packet to be sent and the number of tokens in the token bucket; Compare the amount of data with the number of tokens; If the number of tokens is greater than or equal to the amount of data, then the data packet to be sent is sent.

3. The method according to claim 2, characterized in that, The method further includes: If the number of tokens is less than the amount of data, the data packet to be sent is identified, and the receiving device and the command to be executed corresponding to the data packet to be sent are determined. The priority of the data packet to be sent is determined based on the receiving device and the execution command. If the priority of the data packet to be sent is greater than or equal to a preset priority threshold, then the number of tokens in the token bucket is increased, and the data packet to be sent is sent. If the priority of the data packet to be sent is less than the preset priority threshold, then the data packet to be sent is placed in the buffer.

4. The method according to claim 1, characterized in that, The step of processing the data packet to be sent according to the detection result includes: If there is no token in the token bucket, the data packet to be sent is identified to determine the receiving device and the command to be executed. The priority of the data packet to be sent is determined based on the receiving device and the execution command. If the priority of the data packet to be sent is greater than or equal to a preset priority threshold, then the number of tokens in the token bucket is increased, and the data packet to be sent is sent. If the priority of the data packet to be sent is less than the preset priority threshold, then the data packet to be sent is placed in the buffer.

5. The method according to claim 1, characterized in that, The data packet to be sent is at least one, and the method further includes: Obtain the execution result corresponding to each of the data packets to be sent; the execution result includes at least one of the following: data size, sending time, response time received from the receiving device, and priority of each data packet to be sent; Based on the execution results, update the token bucket parameters corresponding to the token bucket. The token bucket parameters include at least one of the following: token bucket capacity, token addition rate, and interval between each token addition.

6. The method according to claim 1, characterized in that, The method further includes: Obtain data transmission test requirements; According to the data transmission test requirements, the token bucket parameters corresponding to the token bucket are adjusted; the token bucket parameters include at least one of the following: token bucket capacity, token addition rate, and interval between each token addition.

7. The method according to claim 6, characterized in that, The step of adjusting the token bucket parameters corresponding to the token bucket according to the data transmission test requirements includes: If the data transmission test requirement is a burst scenario test, then the token bucket capacity is set to the maximum, the token addition rate is set to the maximum, and the interval between each token addition is set to the minimum, in order to test the characteristic of the data sending device to send the data packet to be sent at the maximum rate; If the data transmission test requirement is a latency scenario test, then the token bucket capacity is set to the minimum, the token addition rate is set to the minimum, and the interval between each token addition is set to the maximum, in order to test the characteristics of the data packet to be sent by the data sending device under a latency scenario.

8. A data transmission control device, characterized in that, Applied to a data transmission device, the device includes: The generation module is used to generate data packets to be sent. The detection module is used to detect whether there is a token in the token bucket corresponding to the data packet to be sent; the token is used to control the sending of the data packet to be sent. The processing module is used to process the data packet to be sent according to the detection results.

9. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the data transmission control method of any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the data transmission control method according to any one of claims 1 to 7.