Flow transmission control method and device, electronic equipment, medium and program product
By adjusting the number of descriptors to control traffic transmission based on the target token in the token bucket, the packet loss problem caused by insufficient cache on the traffic receiver is solved, and the success rate and accuracy of traffic transmission are improved.
Patent Information
- Application Number
- CN202411268472.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-12-31
AI Technical Summary
In the end-to-end traffic transmission scenario, the number of cached packets on the traffic receiver is limited, resulting in a high packet loss rate when the number of messages sent by the traffic transmitter increases, affecting the traffic transmission performance.
By obtaining the total amount of pre-transmission data of the descriptor and querying the target token in the token bucket, adjusting the number of descriptors to ensure that the transmitted target packets meet the traffic control requirements, rationally utilize network resources, and reduce network congestion.
Effectively reduce packet loss rate, improve the success rate and accuracy of message transmission, maximize network resources, and avoid network congestion.
Smart Images

Figure CN119232662A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to a flow transmission control method, device, electronic device, medium and program product. Background Art
[0002] In the scenario of end-to-end traffic transmission, the traffic receiver is used to receive the messages sent by the traffic sender. However, when the amount of messages sent by the traffic sender increases sharply, the number of messages that can be buffered by the traffic receiver is limited, resulting in a high packet loss rate, which in turn affects the traffic transmission performance. Summary of the invention
[0003] In view of this, the present disclosure provides a flow transmission control method, device, electronic device, medium and program product to solve the problem of high packet loss rate during flow transmission.
[0004] In a first aspect, the present disclosure provides a flow transmission control method, which is applied to a flow sending end, and the method includes:
[0005] Obtaining a first number of descriptors to obtain a total amount of pre-transmitted data, the descriptors being used to determine a data amount of a corresponding message;
[0006] Query the token bucket to determine the currently consumable target token to obtain the target transmission data volume;
[0007] Based on the relationship between the total amount of pre-transmission data and the target transmission data amount, the acquired number of descriptors is processed to obtain a second number of descriptors;
[0008] A target message for sending is determined based on the second number of descriptors.
[0009] In a second aspect, the present disclosure provides a flow transmission control device, which is applied to a flow sending end, and the device includes:
[0010] An acquisition module, used to acquire a first number of descriptors to obtain a total amount of pre-transmission data, wherein the descriptors are used to determine a data amount of a corresponding message;
[0011] A query module is used to query the token bucket to determine the currently consumable target tokens to obtain the target transmission data volume;
[0012] A first processing module, configured to process the acquired number of descriptors based on the relationship between the total amount of pre-transmission data and the target transmission data amount, to obtain a second number of descriptors;
[0013] The second processing module is used to determine a target message for sending based on a second number of descriptors.
[0014] In a third aspect, the present disclosure provides an electronic device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the traffic transmission control method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0015] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the traffic transmission control method of the first aspect or any corresponding embodiment thereof.
[0016] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the traffic transmission control method of the first aspect or any corresponding embodiment thereof.
[0017] The traffic transmission control method provided in this embodiment controls the number of descriptors obtained based on the currently consumable target tokens in the token bucket, and can ensure that when the target message corresponding to the obtained descriptor is subsequently sent, the quantity and data volume meet the traffic control requirements. It can reasonably control the traffic transmission, thereby maximizing the use of network resources and reducing the possibility of network congestion, thereby achieving the purpose of improving the success rate and accuracy of message transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 is a flow chart of a flow transmission control method provided according to an embodiment of the present disclosure;
[0020] Figure 2 is a flow chart of another flow transmission control method provided according to an embodiment of the present disclosure;
[0021] Figure 3 is a schematic diagram of a control process of flow transmission provided according to an embodiment of the present disclosure;
[0022] Figure 4 is a flowchart of a method for adjusting the number of descriptor acquisitions provided in an embodiment of the present disclosure;
[0023] Figure 5 is a structural block diagram of a flow transmission control device according to an embodiment of the present disclosure;
[0024] Figure 6 It is a schematic diagram of the hardware structure of the electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0026] In the scenario of end-to-end traffic transmission, the traffic receiver is used to receive the messages sent by the traffic sender. Since the traffic is bursty and the number of messages that can be buffered by the traffic receiver is limited, when the number of messages sent by the traffic sender increases sharply, some messages may not be effectively received by the traffic receiver, resulting in a high packet loss rate, affecting the traffic transmission performance.
[0027] In view of this, an embodiment of the present disclosure provides a traffic transmission control method, which can control the number of descriptors obtained based on the currently consumable target tokens in the token bucket, and then determine the target message to be sent according to the determined descriptor, thereby ensuring the effectiveness of message transmission and effectively reducing the packet loss rate.
[0028] According to an embodiment of the present disclosure, an embodiment of a traffic transmission control method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0029] In this embodiment, a flow transmission control method is provided, which can be used for a flow sending end, such as a mobile phone, a tablet computer, etc. Figure 1 is a flow chart of a flow transmission control method according to an embodiment of the present disclosure. Figure 1 As shown, the process includes the following steps:
[0030] Step S101, obtaining a first number of descriptors to obtain a total amount of pre-transmission data.
[0031] Among them, the descriptor is used to determine the data volume of the corresponding message. There is a one-to-one correspondence between the descriptor and the message. Therefore, through the first number of descriptors, the data volume of the message corresponding to each descriptor can be clarified, and then the total amount of pre-transmitted data to be transmitted by the traffic sender can be clarified, and the scale of the data volume that needs to be processed can be understood.
[0032] In some optional examples, the first number may be a pre-specified default number, thereby helping to improve the efficiency of obtaining the descriptor. In other optional examples, the first number may be determined based on the quality of service (QOS) of the current network, thereby helping to ensure the accuracy of the first number.
[0033] Step S102, querying the token bucket to determine the currently consumable target token to obtain the target transmission data volume.
[0034] The token bucket is a flow control strategy used to control the amount of data sent. The token represents the permission for data transmission allowed by the current system. To determine the amount of data that can be transmitted, the currently consumable target token in the token bucket is queried, and then the target transmission data volume corresponding to the target token is determined according to the preset conversion rules between tokens and data volume. The target transmission data volume can be used to determine the actual amount of data that the token bucket is allowed to transmit under the current network state.
[0035] Step S103: Based on the relationship between the total amount of pre-transmission data and the target transmission data amount, the acquired number of descriptors is processed to obtain a second number of descriptors.
[0036] According to the size relationship between the total amount of pre-transmitted data and the target amount of transmitted data, it can be determined whether the total amount of pre-transmitted data exceeds the data transmission range allowed by the token bucket, and then the number of descriptors obtained can be processed based on the size relationship. This can make the number of descriptors obtained more reasonable and more in line with the traffic rules set by the token bucket, thereby obtaining the second number of descriptors.
[0037] Step S104: determining a target message to be sent based on the second number of descriptors.
[0038] Since there is a one-to-one correspondence between descriptors and messages, the messages to be transmitted in the transmission traffic queue can be targeted and screened according to the determined second number of descriptors to obtain the target messages, thereby ensuring that when the target messages are subsequently sent, they can meet the requirements of flow control in terms of quantity and data volume. At the same time, it can also maximize the use of network resources, achieve efficient data transmission, and ensure the success rate and accuracy of message transmission.
[0039] The traffic transmission control method provided in this embodiment controls the number of descriptors obtained based on the currently consumable target tokens in the token bucket, and can ensure that when the target message corresponding to the obtained descriptor is subsequently sent, the quantity and data volume meet the traffic control requirements. It can reasonably control the traffic transmission, thereby maximizing the use of network resources and reducing the possibility of network congestion, thereby achieving the purpose of improving the success rate and accuracy of message transmission.
[0040] In some optional implementations, the descriptor includes the address and length of the corresponding message, and then the above step S101 includes:
[0041] Step a1, obtaining a first number of descriptors, and obtaining the length of the message corresponding to each descriptor;
[0042] Step a2, counting the length of the message corresponding to the descriptor to obtain the total amount of pre-transmission data.
[0043] Specifically, the length of the corresponding message can be clearly defined through the descriptor. Since the lengths of the messages corresponding to the descriptors are not exactly the same, in order to improve the accuracy of determining the total amount of pre-transmitted data, the lengths of the messages corresponding to each descriptor are counted respectively, and then the sum of the lengths is used as the total amount of pre-transmitted data. For example: if 5 descriptors are obtained, they correspond to 5 messages respectively. By reading the information in the descriptors, it can be clearly determined that the lengths of these 5 messages are: 100 bytes (bit), 200 bits, 150 bits, 80 bits and 120 bits, respectively. Then the total amount of pre-transmitted data = 100 bits + 200 bits + 150 bits + 80 bits + 120 bits = 650 bits.
[0044] By counting the total amount of pre-transmitted data in this way, the system can clearly understand the total amount of data in the message to be transmitted before data transmission, thereby providing an important basis for determining the subsequent target message.
[0045] In this embodiment, a flow transmission control method is provided, which can be used for the above-mentioned flow sending end, such as a mobile phone, a tablet computer, etc. Figure 2 is a flow chart of a flow transmission control method according to an embodiment of the present disclosure. Figure 2 As shown, the process includes the following steps:
[0046] Step S201, obtain a first number of descriptors to obtain the total amount of pre-transmission data. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0047] Step S202, query the token bucket to determine the currently expendable target tokens to obtain the target transmission data volume. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0048] Step S203: Based on the relationship between the total amount of pre-transmission data and the target transmission data amount, the acquired number of descriptors is processed to obtain a second number of descriptors.
[0049] Specifically, the above step S203 includes:
[0050] Step S2031: if the total amount of pre-transmission data is greater than the target transmission data amount, the number of descriptors to be obtained is reduced to obtain a second number of descriptors.
[0051] If the total amount of pre-transmitted data is greater than the target transmission data amount, which indicates that the total amount of data of the message to be transmitted is greater than the amount of data actually allowed to be transmitted by the token bucket, if the target message is determined according to the first number of descriptors, network congestion or delayed transmission may occur due to insufficient network resources.
[0052] Therefore, in order to improve the success rate of message sending, the number of descriptors obtained is reduced, so that when the second number of descriptors are subsequently used for message transmission, the actual amount of data transmitted can be guaranteed to be more in line with the flow limit specified by the token bucket, thereby effectively reducing the possibility of network congestion.
[0053] In some optional implementations, the process of determining the second number of descriptors may be as follows:
[0054] Step b1, determining invalid descriptors in the first number of descriptors based on the difference between the total amount of pre-transmission data and the target transmission data amount;
[0055] Step b2: Filter out invalid descriptors from the first number of descriptors to obtain a second number of descriptors.
[0056] Specifically, according to the difference between the total amount of pre-transmission data and the target amount of transmission data, the part where the total amount of pre-transmission data exceeds the target amount of transmission data can be determined. To improve the utilization of network resources, the invalid descriptors in the first number of descriptors are determined according to the difference.
[0057] In some examples, invalid descriptors can be determined by matching. For example, the amount of data required to be occupied by each descriptor is determined based on the length of the message corresponding to each descriptor. The descriptor whose required amount of data is equal to the difference is used as an invalid descriptor. Alternatively, the descriptor whose sum of the required amount of data is equal to the difference is used as an invalid descriptor. In other examples, the first number of descriptors can be screened based on factors such as the priority or sending time of the message corresponding to each descriptor, and then the invalid descriptor is determined therefrom. The specific determination process of the invalid descriptor can be determined according to the needs.
[0058] It should be noted that invalid descriptors are only temporarily not used for message transmission in this round. They will still be retained and will continue to be extracted and evaluated in the next round of processing to avoid missed transmission.
[0059] Invalid descriptors are filtered out from the first number of descriptors, and the remaining descriptors are used as the second number of descriptors.
[0060] By determining the second number of descriptors in the above manner, the actual amount of data transmitted can be made more in line with the flow limit of the token bucket, ensuring that the data transmission flow is within a reasonable range, thereby effectively reducing the risk of transmission failure due to excessive data volume, making the distribution of network traffic more reasonable and efficient, which is conducive to improving the success rate of message sending.
[0061] In some optional examples, the above step b1 includes:
[0062] Step b11, determining a difference between a total amount of pre-transmission data and a target transmission data amount, and obtaining a first sequence of a first number of descriptors;
[0063] Step b12: searching the first number of descriptors based on a second order opposite to the first order and the difference value to determine invalid descriptors.
[0064] Specifically, the first order may be determined according to the amount of data required to be occupied by the descriptor, generation time, priority or other specific rules.
[0065] Querying the first number of descriptors in a second order opposite to the first order and using differences can avoid prematurely determining potentially useful descriptors as invalid, thereby helping to improve the accuracy of determining invalid descriptors, so that the obtained second number of descriptors can better meet actual needs.
[0066] In some optional implementation scenarios, take the case where the first number of descriptors is 5 descriptors, and each descriptor is descriptor a (80 bits), descriptor b (120 bits), descriptor c (60 bits), descriptor d (90 bits) and descriptor e (50 bits) as an example. If the difference between the determined total amount of pre-transmitted data and the target amount of transmitted data is 200 bits, and the first order is to sort according to the generation time of the descriptors, then the 5 descriptors are sorted according to the first order, and the result is descriptor a, descriptor b, descriptor c, descriptor d, and descriptor e. In a second order opposite to the first order, the query is started from the last descriptor obtained. Then, accumulating from back to front, when the third descriptor (i.e., descriptor c) is checked, the accumulated message data volume is 80+120+60=260 bits, which has exceeded the difference of 200 bits. At this time, descriptors a and b can be determined as invalid descriptors.
[0067] In some optional implementations, the above step S203 further includes:
[0068] Step S2032: If the total amount of pre-transmission data is less than or equal to the target transmission data amount, the number of descriptors to be obtained is kept unchanged to obtain a second number of descriptors.
[0069] If the total amount of pre-transmitted data is less than or equal to the target amount of transmitted data, it indicates that the amount of data actually allowed to be transmitted by the token bucket can meet the transmission requirements of the message to be transmitted, so the number of descriptors obtained can be kept unchanged to obtain a second number of descriptors. That is, the second number is equal to the first number.
[0070] Step S204: Determine the target message to be sent based on the second number of descriptors. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.
[0071] The traffic transmission control method provided in this embodiment adjusts the number of descriptors obtained based on the comparison result of the total amount of pre-transmitted data and the target transmission data amount, which can ensure the rationality of the determination of the target message. Therefore, when the message is subsequently transmitted, it can ensure that the amount of transmitted data is in line with the current availability of network resources, avoid data congestion, and effectively improve the transmission success rate of the message.
[0072] In some optional implementations, in order to ensure the rationality of determining the target token, before executing any of the above traffic transmission control methods, the following steps are further performed:
[0073] Step c1, determining the maximum data receiving amount of the traffic receiving end.
[0074] The maximum data receiving amount is used to characterize the maximum data transmission amount that the traffic receiving end can bear. In order to improve the reliability of message transmission, the maximum data receiving amount of the traffic receiving end is determined, and the data processing capacity and limitation of the traffic receiving end are determined according to the maximum data receiving amount, so that reasonable data transmission planning can be carried out later to avoid packet loss caused by the traffic sent by the traffic sending end exceeding the receiving capacity of the traffic receiving end.
[0075] In some optional examples, the above step c1 includes:
[0076] Step c11, determining the maximum transmission data volume of the traffic sending end and the single data transmission volume per unit time;
[0077] Step c12, determining the flow transmission time according to the ratio between the maximum transmission data volume and the data transmission unit volume;
[0078] Step c13, determining the data receiving quantity of the traffic receiving end per unit time, and determining the maximum data receiving quantity of the traffic receiving end according to the product between the traffic transmission time and the data receiving quantity.
[0079] Specifically, in order to determine the maximum data receiving amount of the traffic receiving end, the maximum transmission data amount of the traffic sending end is first determined, so that the burst transmission capacity of the traffic sending end can be clarified based on the maximum transmission data amount. Among them, the maximum transmission data amount can be determined based on a first specified number of descriptors and the maximum amount of data required to be occupied by each descriptor, and a second specified number of queues of messages to be transmitted. The first specified number can be understood as the maximum number of descriptors that the traffic sending end can obtain in advance during the traffic transmission process. The second specified number can be understood as the maximum number of queues of messages to be transmitted by the traffic sending end during the traffic transmission process.
[0080] Based on the ratio between the maximum transmission data volume and the data sending unit volume, the traffic transmission time consumed by the traffic sending end in transmitting the maximum transmission data volume can be clearly determined, and then the traffic transmission time can be multiplied by the data receiving unit volume per unit time at the traffic receiving end, and the product can be used as the traffic receiving end per unit time.
[0081] For example: Take the first specified number of descriptors as 8, the maximum amount of data required for each descriptor is 64KByte, and the second specified number of queues for messages to be transmitted is 32. Then the maximum amount of data transmitted by the traffic sender = 64KByte×8×32 = 512bit×8×32. If the single amount of data sent by the traffic sender per unit time is 200Gbit, then the traffic transmission time = (512bit×8×32) / 200Gbit = 640μs. If the single amount of data received by the traffic receiver per unit time is 100Gbit, then the maximum amount of data received by the traffic receiver = 640μs×100Gbit = 64Mbit.
[0082] In other optional examples, the maximum data receiving amount of the traffic receiving end can be determined according to the configuration file of the traffic receiving end, thereby helping to improve the determination efficiency.
[0083] Step c2: determining the maximum burst data volume of the token bucket based on the maximum data reception volume, so as to determine the target token based on the maximum burst data volume.
[0084] The maximum burst size (Committed Burst Size, CBS) of the token bucket can limit the data burst size allowed by the traffic sender. If the maximum burst size of the token bucket is too large, the traffic data sent by the traffic sender may exceed the receiving capacity of the traffic receiver, resulting in excessive instantaneous packet loss rate. Therefore, in order to make the end-to-end traffic transmission control more reasonable, the maximum burst size of the token bucket is determined based on the maximum data receiving amount of the traffic receiver to achieve flexible control of the data transmission rate, which can not only ensure the stability of data transmission, but also allow burst transmission under certain conditions to meet different business needs.
[0085] In some optional examples, the above step c2 includes:
[0086] Step c21, determining the initial maximum burst data volume of the token bucket;
[0087] Step c22, adjusting the initial maximum burst data volume to obtain a maximum burst data volume having the same value as the maximum data reception volume.
[0088] Specifically, the initial maximum burst data volume of the token bucket is predetermined. If the initial maximum burst data volume is different from the maximum data receiving volume, the initial maximum burst data volume is adjusted to make the two values consistent, thereby ensuring that the token bucket can better adapt to the receiving capacity of the traffic receiving end when controlling message transmission, thereby avoiding congestion and packet loss during data transmission to a certain extent, and improving the efficiency and reliability of data transmission.
[0089] If the value of the initial maximum burst data volume is the same as the value of the maximum data reception volume, the initial maximum burst data volume can be directly used as the maximum burst data volume of the token bucket.
[0090] By determining the CBS of the token bucket in the above manner, reasonable control and optimization of traffic transmission can be achieved, thereby effectively improving the efficiency and reliability of traffic transmission and ensuring the stability of the network.
[0091] As one or more specific application embodiments of the embodiments of the present disclosure, taking the environment provided by the virtual machine where the traffic sending end is based on the DPU (Data Processing Unit) chip as an example, the process of end-to-end traffic transmission control can be as follows: Figure 3 As shown:
[0092] According to the mapping relationship between the to-be-transmitted messages and descriptors in the current system to-be-transmitted queue, a first number of descriptors are obtained to obtain the total amount of pre-transmitted data. The QOS of the current network environment is queried, and the target tokens that can be consumed in the token bucket are queried according to the QOS to determine the target amount of transmitted data, and then based on the relationship between the total amount of pre-transmitted data and the target amount of transmitted data, the number of descriptors obtained is adjusted through the scheduling module to obtain a second number of descriptors. Through a multiplexer (MUX), the target message for transmission is determined according to the second number of descriptors.
[0093] The process of adjusting the number of descriptors to be obtained can be as follows: Figure 4 As shown: According to the to-be-transmitted messages in the to-be-transmitted queue, a first number of descriptors is determined to obtain the total amount of pre-transmitted data. The token bucket is queried to determine the currently consumable target token to obtain the target amount of transmitted data. If the total amount of pre-transmitted data is greater than the target amount of transmitted data, the number of descriptors obtained is reduced to obtain a second number of descriptors. If the total amount of pre-transmitted data is less than or equal to the target amount of transmitted data, the number of descriptors obtained remains unchanged.
[0094] Through the above-mentioned traffic transmission control method, it can be ensured that the amount of data transmitted during the traffic transmission process is in line with the current availability of network resources, which can effectively avoid the occurrence of data congestion, and thus can effectively improve the transmission success rate of the message and reduce the possibility of packet loss.
[0095] In this embodiment, a flow transmission control device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0096] This embodiment provides a flow transmission control device, which is applied to a flow sending end, such as Figure 5 As shown, including:
[0097] An acquisition module 501 is used to acquire a first number of descriptors to obtain a total amount of pre-transmission data, where the descriptors are used to determine a data amount of a corresponding message;
[0098] A query module 502 is used to query a token bucket to determine a currently consumable target token to obtain a target transmission data volume;
[0099] A first processing module 503 is used to process the acquired number of descriptors based on the relationship between the total amount of pre-transmission data and the target transmission data amount to obtain a second number of descriptors;
[0100] The second processing module 504 is configured to determine a target message to be sent based on the second number of descriptors.
[0101] In some optional implementations, the descriptor includes the address and length of the corresponding message, and the acquisition module 501 includes:
[0102] An acquisition unit, configured to acquire a first number of descriptors and obtain the length of a message corresponding to each descriptor;
[0103] The statistical unit is used to count the length of the message corresponding to the descriptor to obtain the total amount of pre-transmission data.
[0104] In some optional implementations, the first processing module 503 includes:
[0105] The first processing unit is configured to reduce the number of descriptors to be acquired to obtain a second number of descriptors if the total amount of pre-transmission data is greater than the target transmission data amount.
[0106] In some optional implementations, the first processing unit includes:
[0107] A first execution unit, configured to determine invalid descriptors in the first number of descriptors based on a difference between a total amount of pre-transmitted data and a target amount of transmitted data;
[0108] The second execution unit is used to filter out invalid descriptors from the first number of descriptors to obtain a second number of descriptors.
[0109] In some optional implementations, the first execution unit includes:
[0110] A first execution subunit, configured to determine a difference between a total amount of pre-transmitted data and a target amount of transmitted data, and to obtain a first sequence of a first number of descriptors;
[0111] The second execution subunit is used to query the first number of descriptors based on a second order opposite to the first order and the difference value to determine the invalid descriptors.
[0112] In some optional implementations, the first processing module further includes:
[0113] The second processing module is used to keep the number of descriptors obtained unchanged if the total amount of pre-transmission data is less than or equal to the target transmission data amount, and obtain a second number of descriptors, the second number being equal to the first number.
[0114] In some optional embodiments, the device further comprises:
[0115] A third processing module is used to determine the maximum data receiving amount of the traffic receiving end;
[0116] The fourth processing module is used to determine the maximum burst data volume of the token bucket based on the maximum data reception volume, so as to determine the target token based on the maximum burst data volume.
[0117] In some optional embodiments, the third processing module includes:
[0118] The third execution unit is used to determine the maximum transmission data volume of the traffic sending end and the single data transmission volume per unit time;
[0119] A fourth execution unit, configured to determine the flow transmission time according to a ratio between the maximum transmission data volume and the data transmission unit volume;
[0120] The fifth execution unit is used to determine the data receiving unit quantity of the traffic receiving end per unit time, and determine the maximum data receiving unit quantity of the traffic receiving end according to the product between the traffic transmission time and the data receiving unit quantity.
[0121] In some optional embodiments, the fourth processing module includes:
[0122] A sixth execution unit, used to determine an initial maximum burst data volume of the token bucket;
[0123] The seventh execution unit is used to adjust the initial maximum burst data volume to obtain the maximum burst data volume having the same value as the maximum data reception volume.
[0124] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0125] The traffic transmission control device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0126] The present disclosure also provides an electronic device having the above Figure 5 The flow transmission control device shown.
[0127] See also Figure 6 , Figure 6 is a schematic diagram of the structure of an electronic device provided by an optional embodiment of the present disclosure, such as Figure 6As shown, the electronic device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.
[0128] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0129] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0130] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0131] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0132] The electronic device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.
[0133] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the electronic device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0134] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0135] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0136] 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.
[0137] 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.
[0138] 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.
[0139] 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.
[0140] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A flow transmission control method, characterized in that: Applied to a traffic sending end, the method includes: Obtaining a first number of descriptors to obtain a total amount of pre-transmission data, wherein the descriptors are used to determine a data amount of a corresponding message; Query the token bucket to determine the currently consumable target token to obtain the target transmission data volume; Based on the relationship between the total amount of pre-transmission data and the target transmission data amount, processing the acquired number of descriptors to obtain a second number of descriptors; A target message for sending is determined based on the second number of descriptors.
2. The method according to claim 1, characterized in that The descriptor includes an address and a length of a corresponding message, and the obtaining of the first number of descriptors to obtain the total amount of pre-transmission data includes: Obtaining the first number of descriptors, and obtaining the length of the message corresponding to each of the descriptors; The length of the message corresponding to the descriptor is counted to obtain the total amount of the pre-transmission data.
3. The method according to claim 1, characterized in that The step of processing the acquired number of descriptors based on the size relationship between the total amount of pre-transmission data and the target transmission data amount to obtain a second number of descriptors includes: If the total amount of pre-transmission data is greater than the target transmission data amount, the number of descriptors to be obtained is reduced to obtain the second number of descriptors.
4. The method according to claim 3, characterized in that The reducing the number of descriptors to obtain the second number of descriptors includes: Determining invalid descriptors in the first number of descriptors based on a difference between the total amount of pre-transmission data and the target transmission data amount; The invalid descriptors are filtered out from the first number of descriptors to obtain the second number of descriptors.
5. The method according to claim 4, characterized in that The determining, based on the difference between the total amount of pre-transmission data and the target transmission data amount, invalid descriptors in the first number of descriptors comprises: determining a difference between the total amount of pre-transmitted data and the target amount of transmitted data, and obtaining a first order of the first number of descriptors; The first number of descriptors are searched based on a second order opposite to the first order and the difference value to determine the invalid descriptors.
6. The method according to claim 3, characterized in that The method of processing the acquired number of descriptors based on the size relationship between the total amount of pre-transmission data and the target transmission data amount to obtain a second number of descriptors further includes: If the total amount of pre-transmission data is less than or equal to the target transmission data amount, the number of descriptors obtained is kept unchanged to obtain the second number of descriptors, and the second number is equal to the first number.
7. The method according to claim 1, characterized in that The method further comprises: Determining a maximum data receiving amount of the traffic receiving end; Based on the maximum data reception amount, a maximum burst data amount of the token bucket is determined, so as to determine the target token based on the maximum burst data amount.
8. The method according to claim 7, characterized in that The determining of the maximum data receiving amount of the traffic receiving end includes: Determine the maximum amount of data transmitted by the traffic sending end and the amount of data sent per unit time; Determining the flow transmission time according to the ratio between the maximum transmission data volume and the data transmission unit volume; Determine the data receiving unit quantity of the traffic receiving end in unit time, and determine the maximum transmission data quantity of the traffic receiving end according to the product between the traffic transmission time and the data receiving unit quantity.
9. The method according to claim 7 or 8, characterized in that: The determining, based on the maximum data reception amount, the maximum burst data amount of the token bucket comprises: Determine the initial maximum burst data volume of the token bucket; The initial maximum burst data amount is adjusted to obtain a maximum burst data amount having the same value as the maximum data reception amount.
10. A flow transmission control device, characterized in that: Applied to a traffic sending end, the device comprises: An acquisition module, configured to acquire a first number of descriptors to obtain a total amount of pre-transmission data, wherein the descriptors are used to determine a data amount of a corresponding message; A query module is used to query the token bucket to determine the currently consumable target tokens to obtain the target transmission data volume; A first processing module, configured to process the acquired number of descriptors based on the relationship between the total amount of pre-transmission data and the target transmission data amount, to obtain a second number of descriptors; The second processing module is used to determine a target message for sending based on the second number of descriptors.
11. An electronic device, characterized in that: include: 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 flow transmission control method according to any one of claims 1 to 9 by executing the computer instructions.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the flow transmission control method according to any one of claims 1 to 9.
13. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to enable a computer to execute the flow transmission control method according to any one of claims 1 to 9.
Citation Information
Cited By
Data transmission method of multi-controller storage system, storage medium and program product
CN120561046A
