Resource allocation method, device and system, storage medium and computer program product
By calculating the resource demand weight of the task in a distributed storage system, combining the processing time and network retransmission times, and dynamically adjusting resource allocation, the problem that only controlling IOPS in the prior art cannot meet task processing time and network stability, improves the problem of improving System performance.
Patent Information
- Application Number
- CN202510038314.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2045-01-09
AI Technical Summary
The prior art in distributed storage systems from the edge to the cloud cannot effectively consider the processing time and network stability of tasks only by controlling IOPS, resulting in poor system performance.
By obtaining the processing time and network retransmission times for each task, the resource requirement weight of the task is calculated, and the allocation of resources is dynamically adjusted according to the complexity of the task and network stability.
It improves the overall performance of the system, ensures task processing efficiency and network stability, and avoids the problems of uneven resource allocation and excessive occupation.
Smart Images

Figure CN119484431A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of resource allocation, and in particular to a resource allocation method, device and system, storage medium and computer program product. Background Art
[0002] In the mClock algorithm and dmClock algorithm in the related art, the main focus is on IOPS (input and output operations per second) to control the allocation of storage resources. Summary of the invention
[0003] Through research, the inventors found that it is not enough to simply control IOPS in the mClock algorithm and dmClock algorithm of the related technology, especially in the distributed storage system from the edge to the cloud. In addition to considering the number of IOs to be processed, the processing time of the task and the network stability (such as the number of retransmissions) also determine the overall performance of the system.
[0004] In view of at least one of the above technical problems, the present disclosure provides a resource allocation method, device and system, storage medium and computer program product, which can judge the actual resource requirements occupied by each task through processing time and number of network retransmissions, and dynamically adjust resource allocation according to the complexity of each task and network stability.
[0005] According to one aspect of the present disclosure, a resource allocation method is provided, comprising: Obtaining the processing time and the number of network retransmissions for each task, wherein the task is each upload task of a terminal device when multiple terminal devices upload data to a cloud server at the same time; For each task, determining a resource requirement weight of the task according to the processing time of the task and the number of network retransmissions; For each task, it is determined whether to allocate resources to the task according to the resource requirement weight of the task.
[0006] In some embodiments of the present disclosure, determining the resource requirement weight of the task according to the processing time of the task and the number of network retransmissions includes: Determining a processing time weight coefficient and a retransmission number weight coefficient of the task; The resource requirement weight of the task is determined according to the processing time of the task, the number of network retransmissions, the processing time weight coefficient and the retransmission number weight coefficient.
[0007] In some embodiments of the present disclosure, determining the processing time weight coefficient and the retransmission number weight coefficient of the task includes: Acquire network indicators, wherein the network indicators include at least one of delay time, packet loss rate, bandwidth utilization and number of retransmissions; Determine the current network status based on network indicators; According to the current network state, a processing time weight coefficient and a retransmission number weight coefficient of the task under the current network state are determined.
[0008] In some embodiments of the present disclosure, determining the current network state according to the network indicator includes: When the delay time is less than the first predetermined time, the packet loss rate is lower than the first packet loss rate, the bandwidth utilization rate is greater than or equal to the first utilization rate, and the number of retransmissions is equal to 0, it is determined that the current network state is the first state.
[0009] In some embodiments of the present disclosure, determining the processing time weight coefficient and the retransmission number weight coefficient of the task under the current network state includes: When the current network state is the first state, the processing time weight coefficient is determined to be the first processing time weight coefficient, the retransmission number weight coefficient is the first retransmission number weight coefficient, and the ratio of the first processing time weight coefficient to the first retransmission number weight coefficient is the first ratio.
[0010] In some embodiments of the present disclosure, determining the current network state according to the network indicator further includes: When the delay time is greater than the first predetermined time and less than or equal to the second predetermined time, the packet loss rate is lower than the first packet loss rate, and the number of retransmissions is equal to 0, the current network state is determined to be the second state, wherein the first predetermined time is less than the second predetermined time.
[0011] In some embodiments of the present disclosure, determining the processing time weight coefficient and the retransmission number weight coefficient of the task under the current network state further includes: When the current network state is the second state, the processing time weight coefficient is determined to be the second processing time weight coefficient, the retransmission number weight coefficient is the second retransmission number weight coefficient, the ratio of the second processing time weight coefficient and the second retransmission number weight coefficient is the second ratio, the second ratio is greater than the first ratio, and the second retransmission number weight coefficient is equal to the first retransmission number weight coefficient.
[0012] In some embodiments of the present disclosure, determining the current network state according to the network indicator further includes: When the packet loss rate is higher than the second packet loss rate, the bandwidth utilization rate is lower than the second utilization rate, and the number of retransmissions is greater than 2, the current network state is determined to be the third state, wherein the second packet loss rate is greater than the first packet loss rate, and the second utilization rate is lower than the first utilization rate.
[0013] In some embodiments of the present disclosure, determining the processing time weight coefficient and the retransmission number weight coefficient of the task under the current network state further includes: When the current network state is the third state, the processing time weight coefficient is determined to be the third processing time weight coefficient, the retransmission number weight coefficient is the third retransmission number weight coefficient, the ratio of the third processing time weight coefficient to the third retransmission number weight coefficient is the third ratio, the third ratio is smaller than the first ratio, and the ratio of the third retransmission number weight coefficient to the first retransmission number weight coefficient is the first ratio.
[0014] In some embodiments of the present disclosure, determining the current network state according to the network indicator further includes: When the delay time is greater than the third predetermined time and less than or equal to the second predetermined time, the packet loss rate is less than the first packet loss rate, the bandwidth utilization rate is greater than the third utilization rate, and the number of retransmissions is greater than 0, it is determined that the current network state is the fourth state, wherein the third predetermined time is less than the first predetermined time, and the third utilization rate is greater than the first utilization rate.
[0015] In some embodiments of the present disclosure, determining the processing time weight coefficient and the retransmission number weight coefficient of the task under the current network state further includes: When the current network state is the fourth state, the processing time weight coefficient is determined to be the fourth processing time weight coefficient, the retransmission number weight coefficient is the fourth retransmission number weight coefficient, the ratio of the fourth processing time weight coefficient and the fourth retransmission number weight coefficient is a fourth ratio, the fourth ratio is less than the third ratio, and the fourth processing time weight coefficient is equal to the second processing time weight coefficient.
[0016] In some embodiments of the present disclosure, determining the current network state according to the network indicator further includes: When the delay time is greater than the third predetermined time and less than or equal to the second predetermined time, the packet loss rate is greater than the third packet loss rate, and the number of retransmissions is greater than 0, the current network state is determined to be the fifth state, wherein the third packet loss rate is less than the second packet loss rate and greater than the first packet loss rate.
[0017] In some embodiments of the present disclosure, determining the processing time weight coefficient and the retransmission number weight coefficient of the task under the current network state further includes: When the current network state is the fifth state, the processing time weight coefficient is determined to be the fifth processing time weight coefficient, the retransmission number weight coefficient is the fifth retransmission number weight coefficient, the ratio of the fifth processing time weight coefficient and the fifth retransmission number weight coefficient is the fifth ratio, the fifth ratio is greater than the third ratio and less than the first ratio, the ratio of the fifth retransmission number weight coefficient and the first retransmission number weight coefficient is the sixth ratio, the sixth ratio is greater than the fifth ratio and less than the first ratio.
[0018] In some embodiments of the present disclosure, determining the current network state according to the network indicator further includes: When it is determined according to the network indicator that the current network state is not any one of the first state, the second state, the third state, the fourth state and the fifth state, the current network state is determined to be the first state.
[0019] In some embodiments of the present disclosure, determining whether to allocate resources to the task according to the resource requirement weight of the task includes: Determining a resource requirement label for the task according to the resource requirement weight of the task; Determine whether to allocate resources to the task according to the resource requirement tag of the task.
[0020] In some embodiments of the present disclosure, determining the resource requirement label of the task according to the resource requirement weight of the task includes: The resource requirement label of the current task is determined based on the resource requirement label of the current task at the last moment, the amount of data transmitted by the current task since the last request, the byte size of the current task, the maximum processing capacity of each storage service, the resource requirement weight of the current task, and the current time.
[0021] In some embodiments of the present disclosure, determining the resource requirement tag of the current task according to the resource requirement tag of the current task at the last moment, the amount of data transmitted by the current task since the last request, the byte size of the current task, the maximum processing capacity of each storage service, the resource requirement weight of the current task, and the current time includes: Determine the first requirement tag of the current task based on the resource requirement tag of the current task at the last moment, the amount of data transmitted by the current task since the last request, the byte size of the current task, the maximum processing capacity of each storage service, and the resource requirement weight of the current task; The maximum value of the first requirement tag of the current task and the current time is used as the resource requirement tag of the current task.
[0022] In some embodiments of the present disclosure, determining whether to allocate resources to the task according to the resource requirement tag of the task includes: Determine whether the resource requirement tag of the task meets the resource allocation condition; Determine whether the number of input and output operations per second of the task meets the limit condition of the number of input and output operations per second; When the resource requirement tag of the task meets the resource allocation condition and the number of input and output operations per second of the task meets the limit condition of the number of input and output operations per second, resources are allocated to the task and the task is allowed to be executed.
[0023] According to another aspect of the present disclosure, there is provided a resource allocation device, comprising: A parameter acquisition module, configured to acquire the processing time and the number of network retransmissions of each task, wherein the task is each upload task of a terminal device when multiple terminal devices upload data to a cloud server at the same time; A weight determination module is configured to determine, for each task, a resource requirement weight of the task according to a processing time of the task and a number of network retransmissions; The resource allocation module is configured to determine, for each task, whether to allocate resources to the task according to the resource requirement weight of the task.
[0024] According to another aspect of the present disclosure, there is provided a resource allocation device, comprising: a memory configured to store instructions; and The processor is configured to execute the instructions so that the resource allocation device implements the resource allocation method as described in any of the above embodiments.
[0025] According to another aspect of the present disclosure, a resource allocation system is provided, including a terminal device, a cloud server, and a resource allocation apparatus as described in any of the above embodiments.
[0026] According to another aspect of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the resource allocation method as described in any of the above embodiments is implemented.
[0027] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the resource allocation method as described in any of the above embodiments is implemented.
[0028] The present disclosure can determine the actual resource demand of each task through processing time and the number of network retransmissions, and dynamically adjust resource allocation according to the complexity of each task and network stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only 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.
[0030] Figure 1 The following is a schematic diagram of some embodiments of the resource allocation method disclosed in the present invention.
[0031] Figure 2 Schematic diagram of other embodiments of the resource allocation method disclosed in the present invention.
[0032] Figure 3 It is a schematic diagram of the structure of some embodiments of the resource allocation device disclosed in the present invention.
[0033] Figure 4 It is a schematic diagram of the structure of other embodiments of the resource allocation device disclosed in the present invention.
[0034] Figure 5 It is a schematic diagram of the structure of some embodiments of the resource allocation system disclosed in the present invention. DETAILED DESCRIPTION
[0035] The technical solutions 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 only part of the embodiments of the present disclosure, rather than all of the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present disclosure and its application or use. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0036] Unless specifically stated otherwise, the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure.
[0037] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0038] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0039] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0040] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0041] Figure 1 The following is a schematic diagram of some embodiments of the resource allocation method disclosed in the present invention. Figure 1 The embodiment may be executed by the resource allocation system or the resource allocation device of the present disclosure. Figure 1 As shown, Figure 1 The method of the embodiment may include at least one of steps 100 to 300 .
[0042] Step 100, obtaining the processing time and the number of network retransmissions for each task, wherein the task is each upload task of a terminal device when multiple terminal devices upload data to a cloud server at the same time.
[0043] In some embodiments of the present disclosure, the terminal device is a vehicle terminal device.
[0044] In some embodiments of the present disclosure, the task is storage service from a terminal device to a cloud server.
[0045] Step 200: For each task, determine the resource requirement weight of the task according to the processing time and the number of network retransmissions of the task.
[0046] In some embodiments of the present disclosure, the resources of the present disclosure refer to IOPS and bandwidth.
[0047] In some embodiments of the present disclosure, in step 200 , the step of determining the resource requirement weight of the task according to the processing time and the number of network retransmissions of the task may include at least one of steps 210 to 220 .
[0048] Step 210, determining the processing time weight coefficient and the retransmission number weight coefficient of the task.
[0049] In some embodiments of the present disclosure, step 210 may include at least one of steps 211 to 213 .
[0050] Step 211, obtaining network indicators, wherein the network indicators include at least one of delay time, packet loss rate, bandwidth utilization and number of retransmissions.
[0051] Step 212, determining the current network status according to the network indicators.
[0052] Step 213: Determine the processing time weight coefficient of the task under the current network state according to the current network state. and retransmission weight coefficient .
[0053] Step 220, based on the processing time of the task , Network retransmission times , Processing time weight coefficient and retransmission weight coefficient , determine the resource requirement weight of the task .
[0054] (1) In formula (1), is the average processing time of task i (unit: ms), Indicates the time required for a task to be processed in the storage service. It is the number of network retransmissions, reflecting the network instability or packet loss encountered by task i during transmission. It is the processing time weight coefficient, which is used to control the impact of task processing time in resource scheduling. is the weight coefficient of the number of retransmissions, indicating the impact of the number of task retransmissions on resource consumption.
[0055] Figure 2 Schematic diagram of other embodiments of the resource allocation method disclosed in the present invention. Figure 1 The embodiment may be executed by the resource allocation system or the resource allocation device of the present disclosure. Figure 1 As shown, the resource allocation method disclosed in the present invention (for example Figure 1 Step 200 of the embodiment may include at least one of steps 1 to 22.
[0056] Step 1, obtaining network indicators, wherein the network indicators include at least one of delay time, packet loss rate, bandwidth utilization and number of retransmissions.
[0057] Step 2, determining whether the network indicator meets the first network condition, wherein the first network condition includes that the delay time is less than the first predetermined time, the packet loss rate is lower than the first packet loss rate, the bandwidth utilization rate is greater than or equal to the first utilization rate, and the number of retransmissions is equal to 0. If the network indicator meets the first network condition, execute step 3; otherwise, if the network indicator does not meet the first network condition, execute step 6.
[0058] In some embodiments of the present disclosure, the first predetermined time may be 100 ms; the first packet loss rate may be 0.1%; and the first utilization rate may be 80%.
[0059] Step 3: When the delay time is less than the first predetermined time, the packet loss rate is lower than the first packet loss rate, the bandwidth utilization rate is greater than or equal to the first utilization rate, and the number of retransmissions is equal to 0, determine that the current network state is the first state.
[0060] In some embodiments of the present disclosure, the first state may be a normal network state.
[0061] In some embodiments of the present disclosure, step 3 may include: when the delay time is <100ms, the packet loss rate is <0.1%, the bandwidth utilization rate is >=80%, and the number of retransmissions is 0, determining that the current network state is a normal network state.
[0062] In some embodiments of the present disclosure, the first state (normal network state) is characterized by: low network latency and almost no retransmission; stable data transmission and bandwidth utilization close to the maximum value; short processing time, and the response time and processing time of the task are close to the theoretical values; the number of retransmissions is close to 0, and the network transmission is stable.
[0063] Step 4, when the current network state is the first state, determine that the processing time weight coefficient is the first processing time weight coefficient, the retransmission number weight coefficient is the first retransmission number weight coefficient, and the ratio of the first processing time weight coefficient to the first retransmission number weight coefficient is the first ratio.
[0064] In some embodiments of the present disclosure, the first ratio is 10.
[0065] In some embodiments of the present disclosure, the first processing time weight may be 1; and the first retransmission number weight coefficient may be 0.1.
[0066] In some embodiments of the present disclosure, when the current network state is the first state, the processing time weight coefficient Maintaining normal values, e.g. ; Retransmission times weight coefficient You can set smaller weights, such as , because the network is stable, the impact of retransmission is small.
[0067] Step 5: Based on the processing time of the task , Network retransmission times , a first processing time weight coefficient and a first retransmission number weight coefficient, and determine the resource requirement weight of the task. After that, the other steps of this embodiment are not performed.
[0068] In some embodiments of the present disclosure, step 5 may include: determining the resource requirement weight of the task according to formula (2) when the first processing time weight is 1 and the first retransmission number weight coefficient is 0.1.
[0069] (2) In the above embodiments of the present disclosure, under normal network conditions, the processing time of the task is dominant, while the number of retransmissions has little impact on resource requirements.
[0070] Step 6, determining whether the network indicator meets the second network condition, wherein the second network condition includes that the delay time is greater than the first predetermined time and less than or equal to the second predetermined time, the packet loss rate is lower than the first packet loss rate, and the number of retransmissions is equal to 0, and the first predetermined time is less than the second predetermined time. If the network indicator meets the second network condition, execute step 7; otherwise, if the network indicator does not meet the second network condition, execute step 10.
[0071] In some embodiments of the present disclosure, the second predetermined time may be 500 ms.
[0072] Step 7: When the delay time is greater than the first predetermined time and less than or equal to the second predetermined time, the packet loss rate is lower than the first packet loss rate, and the number of retransmissions is equal to 0, determine that the current network state is the second state.
[0073] In some embodiments of the present disclosure, the second state is a high latency state.
[0074] In some embodiments of the present disclosure, step 7 may include: when the delay time is >100ms and <=500ms, the packet loss rate is <0.1%, and the number of retransmissions is 0, determining that the current network state is a high-delay state.
[0075] In some embodiments of the present disclosure, the second state (high latency state) is characterized by: a long network response time, but a low packet loss rate and a small number of retransmissions; low network bandwidth utilization, and a task response is greatly affected by delays; a relatively long processing time, and the task response time is increased due to network delays; and the number of retransmissions is close to 0, but due to high latency, the task takes a longer time to complete.
[0076] Step 8. When the current network state is the second state, determine that the processing time weight coefficient is the second processing time weight coefficient, the retransmission number weight coefficient is the second retransmission number weight coefficient, the ratio of the second processing time weight coefficient and the second retransmission number weight coefficient is the second ratio, the second ratio is greater than the first ratio, and the second retransmission number weight coefficient is equal to the first retransmission number weight coefficient.
[0077] In some embodiments of the present disclosure, In some embodiments of the present disclosure, the second processing time weight may be 1.5; and the second retransmission number weight coefficient may be 0.1.
[0078] In some embodiments of the present disclosure, compared with the normal network state, the processing time weight coefficient is Larger, increasing weight , to reflect the impact of delay on resources; retransmission weight coefficient Still small, keep , because no retransmission occurs.
[0079] Step 9: Based on the processing time of the task , Network retransmission times , a second processing time weight coefficient and a second retransmission number weight coefficient, to determine the resource requirement weight of the task. Thereafter, the other steps of this embodiment are not performed.
[0080] In some embodiments of the present disclosure, step 9 may include: determining the resource requirement weight of the task according to formula (3) when the second processing time weight is 1.5 and the second retransmission number weight coefficient is 0.1.
[0081] (3) Compared with the normal network state, the above embodiments of the present disclosure take longer to process tasks in a high-latency state. The weight of is increased.
[0082] Step 10, determining whether the network indicator meets the third network condition, wherein the third network condition includes that the packet loss rate is higher than the second packet loss rate, the bandwidth utilization rate is lower than the second utilization rate, and the number of retransmissions is greater than 2, the second packet loss rate is greater than the first packet loss rate, and the second utilization rate is lower than the first utilization rate. If the network indicator meets the third network condition, execute step 11; otherwise, if the network indicator does not meet the third network condition, execute step 14.
[0083] In some embodiments of the present disclosure, the second utilization rate may be 50%; and the second packet loss rate may be 2%.
[0084] Step 11: When the packet loss rate is higher than the second packet loss rate, the bandwidth utilization rate is lower than the second utilization rate, and the number of retransmissions is greater than 2, determine that the current network state is the third state.
[0085] In some embodiments of the present disclosure, the third state is a high packet loss state.
[0086] In some embodiments of the present disclosure, step 11 may include: when the packet loss rate is greater than 2%, the bandwidth utilization is less than 50%, and the number of retransmissions is greater than 2, determining that the current network state is a high packet loss state.
[0087] In some embodiments of the present disclosure, the third state (high packet loss state) is characterized by: a high network packet loss rate, resulting in frequent retransmissions during data transmission; the effective throughput of the transmission is low, the processing time of the task may increase slightly, but the number of retransmissions increases significantly; the processing time increases moderately, and the transmission efficiency decreases due to packet loss; the number of retransmissions increases significantly, and the retransmissions increase due to network instability.
[0088] Step 12, when the current network state is the third state, determine that the processing time weight coefficient is the third processing time weight coefficient, the retransmission number weight coefficient is the third retransmission number weight coefficient, the ratio of the third processing time weight coefficient to the third retransmission number weight coefficient is the third ratio, the third ratio is smaller than the first ratio, and the ratio of the third retransmission number weight coefficient to the first retransmission number weight coefficient is the first ratio.
[0089] In some embodiments of the present disclosure, the third ratio is 1.2.
[0090] In some embodiments of the present disclosure, the third processing time weight may be 1.2; and the third retransmission number weight coefficient may be 1.0.
[0091] In some embodiments of the present disclosure, compared with the normal network state, the processing time weight coefficient is Slightly increase , reflects that the task processing time is affected by packet loss; the weight coefficient of the number of retransmissions Increase , due to high packet loss rate, more retransmissions are caused.
[0092] Step 13: based on the processing time of the task , Network retransmission times , a third processing time weight coefficient and a third retransmission number weight coefficient, to determine the resource requirement weight of the task. After that, the other steps of this embodiment are not performed.
[0093] In some embodiments of the present disclosure, step 13 may include: determining the resource requirement weight of the task according to formula (4) when the third processing time weight is 1.2 and the third retransmission number weight coefficient is 1.0.
[0094] (4) Compared with the normal network state, in the above-mentioned embodiments of the present disclosure, the number of retransmissions increases significantly under high packet loss conditions, resulting in an increase in the bandwidth occupancy of the task, and thus the weight of the number of retransmissions is increased.
[0095] Step 14, determining whether the network indicator meets the fourth network condition, wherein the fourth network condition includes that the delay time is greater than the third predetermined time and less than or equal to the second predetermined time, the packet loss rate is less than the first packet loss rate, the bandwidth utilization rate is greater than the third utilization rate, and the number of retransmissions is greater than 0, the third predetermined time is less than the first predetermined time, and the third utilization rate is greater than the first utilization rate. If the network indicator meets the fourth network condition, execute step 15; otherwise, if the network indicator does not meet the fourth network condition, execute step 18.
[0096] In some embodiments of the present disclosure, the third utilization rate may be 90%; and the third predetermined time may be 50 ms.
[0097] Step 15: When the delay time is greater than the third predetermined time and less than or equal to the second predetermined time, the packet loss rate is less than the first packet loss rate, the bandwidth utilization rate is greater than the third utilization rate, and the number of retransmissions is greater than 0, determine that the current network state is the fourth state.
[0098] In some embodiments of the present disclosure, the fourth state is a bandwidth bottleneck state.
[0099] In some embodiments of the present disclosure, step 15 may include: when bandwidth utilization >= 90%, delay time >50ms and <=500ms, packet loss rate <0.1%, and number of retransmissions >0, determining that the current network state is a bandwidth bottleneck state.
[0100] In some embodiments of the present disclosure, the fourth state (bandwidth bottleneck state) is characterized by: the network bandwidth is close to or has reached the system maximum value, and the transmission speed of the task is limited; the network traffic bottleneck causes a large number of tasks to be queued, and the delay is increased; the processing time increases because the data transmission rate decreases due to bandwidth limitations; the number of retransmissions is moderate or increases, and the bandwidth bottleneck may cause some tasks to be lost and need to be retransmitted.
[0101] Step 16, when the current network state is the fourth state, determine that the processing time weight coefficient is the fourth processing time weight coefficient, the retransmission number weight coefficient is the fourth retransmission number weight coefficient, the ratio of the fourth processing time weight coefficient and the fourth retransmission number weight coefficient is a fourth ratio, the fourth ratio is less than the third ratio, and the fourth processing time weight coefficient is equal to the second processing time weight coefficient.
[0102] In some embodiments of the present disclosure, the fourth ratio is 1.
[0103] In some embodiments of the present disclosure, the fourth processing time weight may be 1.5; the fourth retransmission number weight coefficient may be 1.5.
[0104] In some embodiments of the present disclosure, compared with the normal network state, the processing time weight coefficient is Increase , because bandwidth bottlenecks increase task processing time; retransmission weight coefficient Increase , because the delay caused by the bottleneck may lead to increased retransmissions.
[0105] Step 17: based on the processing time of the task , Network retransmission times , a fourth processing time weight coefficient and a fourth retransmission number weight coefficient, to determine the resource requirement weight of the task. After that, the other steps of this embodiment are not performed.
[0106] In some embodiments of the present disclosure, step 17 may include: determining the resource requirement weight of the task according to formula (5) when the fourth processing time weight is 1.5 and the fourth retransmission number weight coefficient is 1.5.
[0107] (5) Compared with the normal network state, the above embodiments of the present disclosure have a lower task load under the bandwidth bottleneck state. and Both have a greater impact on resource demand, so the weights of these two parameters increase.
[0108] Step 18, determining whether the network indicator meets the fifth network condition, wherein the fifth network condition includes that the delay time is greater than the third predetermined time and less than or equal to the second predetermined time, the packet loss rate is greater than the third packet loss rate, and the number of retransmissions is greater than 0, and the third packet loss rate is less than the second packet loss rate and greater than the first packet loss rate. If the network indicator meets the fourth network condition, execute step 19; otherwise, if the network indicator does not meet the fourth network condition, execute step 22.
[0109] In some embodiments of the present disclosure, the third packet loss rate may be 1%.
[0110] Step 19: When the delay time is greater than the third predetermined time and less than or equal to the second predetermined time, the packet loss rate is greater than the third packet loss rate, and the number of retransmissions is greater than 0, determine that the current network state is the fifth state.
[0111] In some embodiments of the present disclosure, the fifth state is a network jitter state.
[0112] In some embodiments of the present disclosure, step 15 may include: when the delay time is >50ms and <=500ms, the packet loss rate is >1%, and the number of retransmissions is >0, determining that the current network state is a network jitter state.
[0113] In some embodiments of the present disclosure, the fifth state (network jitter state) is characterized by: fluctuations in network delay and bandwidth, resulting in instability in task processing time and number of retransmissions; uncertainty in network conditions causes large fluctuations in task processing time and number of network retransmissions; processing time fluctuates greatly, and task processing time sometimes increases due to instantaneous network delays; retransmission times fluctuate greatly, and retransmission times occur from time to time, affecting resource allocation.
[0114] Step 20, when the current network state is the fifth state, determine that the processing time weight coefficient is the fifth processing time weight coefficient, the retransmission number weight coefficient is the fifth retransmission number weight coefficient, the ratio of the fifth processing time weight coefficient to the fifth retransmission number weight coefficient is the fifth ratio, the fifth ratio is greater than the third ratio and less than the first ratio, the ratio of the fifth retransmission number weight coefficient to the first retransmission number weight coefficient is the sixth ratio, the sixth ratio is greater than the fifth ratio and less than the first ratio.
[0115] In some embodiments of the present disclosure, the fifth ratio is 13:7.
[0116] In some embodiments of the present disclosure, the sixth ratio is 7.
[0117] In some embodiments of the present disclosure, the fifth processing time weight may be 1.3; the fifth retransmission number weight coefficient may be 0.7.
[0118] In some embodiments of the present disclosure, compared with the normal network state, the processing time weight coefficient is Increase , to cope with the impact of frequent network jitter on processing time; retransmission weight coefficient Increase , in order to reduce the impact of retransmission times caused by network fluctuations.
[0119] Step 21: according to the processing time of the task , Network retransmission times , the fifth processing time weight coefficient and the fifth retransmission number weight coefficient, to determine the resource requirement weight of the task. After that, the other steps of this embodiment are not performed.
[0120] In some embodiments of the present disclosure, step 21 may include: determining the resource requirement weight of the task according to formula (6) when the fifth processing time weight is 1.3 and the fifth retransmission number weight coefficient is 0.7.
[0121] (6) Compared with the normal network state, in the above-mentioned embodiments of the present disclosure, the fluctuation of tasks is larger under the network jitter state, so the weight of processing time is increased, but the volatility of the number of retransmissions is lower, so the weight of the number of retransmissions is kept moderately increased.
[0122] Step 22: If the current network state is not any of the first state, the second state, the third state, the fourth state and the fifth state according to the network indicator, the current network state is determined to be the first state, that is, the network state cannot be identified, and the network state is assumed to be normal. Then, step 4 is executed.
[0123] Step 300: for each task, determine whether to allocate resources to the task according to the resource requirement weight of the task.
[0124] In some embodiments of the present disclosure, step 300 may include: multiple terminals share the IOPS and bandwidth of the cloud distributed storage itself, and different terminals have different priorities. Therefore, the present disclosure effectively allocates shared resources (IOPS and bandwidth) among different terminals according to the priority configured for each terminal while ensuring that each terminal can enjoy the minimum resources (IOPS and bandwidth).
[0125] In some embodiments of the present disclosure, step 300 may include at least one of steps 310 to 320 .
[0126] Step 310: Determine the resource requirement label of the task according to the resource requirement weight of the task.
[0127] In some embodiments of the present disclosure, step 310 may include: determining the resource requirement tag of the current task based on the resource requirement tag of the current task at the previous moment, the amount of data transmitted by the current task since the last request, the byte size of the current task, the maximum processing capacity of each storage service, the resource requirement weight of the current task and the current time.
[0128] In some embodiments of the present disclosure, step 310 may include at least one of steps 311 to 312 .
[0129] Step 311, determine the first requirement tag of the current task based on the resource requirement tag of the current task at the last moment, the amount of data transmitted by the current task since the last request, the byte size of the current task, the maximum processing capacity of each storage service, and the resource requirement weight of the current task.
[0130] Step 312: Use the maximum value of the first requirement tag of the current task and the current time as the resource requirement tag of the current task.
[0131] In some embodiments of the present disclosure, step 310 may include: determining a resource requirement tag according to formula (7).
[0132] (7) In formula (7), Indicates the resource requirement label of the current task. Indicates the resource demand label at the previous moment. Indicates the amount of data transferred by the task since the last request. length is the size of the task in bytes, reflecting the request size of the task. is the maximum processing capacity of each storage service, which is used to control the maximum resources that each task i can use.
[0133] Step 320: Determine whether to allocate resources to the task according to the resource requirement tag of the task.
[0134] The disclosed embodiment introduces a new label calculation method (resource requirement label) in the ddmClock algorithm based on the weight calculation of the processing time and the number of retransmissions to determine whether a task can obtain resources.
[0135] In some embodiments of the present disclosure, step 320 may include at least one of steps 321 to 323 .
[0136] Step 321, determining whether the resource requirement tag of the task satisfies the resource allocation condition.
[0137] Step 322, determining whether the number of input and output operations per second of the task meets the limit condition of the number of input and output operations per second.
[0138] Step 323, when the resource requirement tag of the task meets the resource allocation condition and the number of input and output operations per second of the task meets the limit condition of the number of input and output operations per second, resources are allocated to the task and the task is allowed to execute.
[0139] The above embodiment of the present disclosure provides a resource allocation method, which is a ddmClock algorithm. In the ddmClock algorithm of the present disclosure, the resource allocation device (scheduler) of the present disclosure will not only check whether the task meets the IOPS limit, but also consider the two factors of processing time and number of retransmissions to ensure that the resource requirements of each task can be reasonably met. The resource allocation device of the present disclosure will respond to the task in the following cases: when the IOPS and resource requirement tags of the task meet the conditions at the same time, the resource allocation device will allow the task to be executed; if the processing time or number of retransmissions of the task is very high, the resource allocation device will give priority to low-latency and high-throughput tasks; the above embodiment of the present disclosure also performs network status classification and parameter adjustment.
[0140] In addition to controlling IOPS, the above embodiments of the present disclosure further introduce processing time and network retransmission times as key factors for resource scheduling. The above embodiments of the present disclosure use processing time and network retransmission times to determine the actual resource requirements of each task, and dynamically adjust resource allocation based on its complexity and network stability.
[0141] The above embodiments of the present disclosure dynamically calculate resource requirements by processing time and number of retransmissions, and the ddmClock algorithm can better reflect the actual requirements of each task for system resources, thereby optimizing resource allocation. The above embodiments of the present disclosure avoid the problems of uneven resource allocation and excessive occupation that occur when only IOPS is considered in related technical methods, and the above embodiments of the present disclosure can allocate system resources more intelligently and fairly in an environment with unstable network or high load.
[0142] The above embodiments of the present disclosure may be applicable to a distributed environment. The above embodiments of the present disclosure are specially designed for a distributed storage system and can effectively operate in an environment where multiple terminals share resources.
[0143] The above embodiments of the present disclosure can guarantee service quality. The above embodiments of the present disclosure ensure that each storage service can obtain expected resources through precise resource allocation, thereby improving the overall service quality.
[0144] Figure 3 FIG. 1 is a schematic diagram of the structure of some embodiments of the resource allocation device disclosed in the present invention. Figure 3 As shown, the resource allocation device disclosed in the present invention may include a parameter acquisition module 31 , a weight determination module 32 and a resource allocation module 33 .
[0145] The parameter acquisition module 31 is configured to acquire the processing time and the number of network retransmissions for each task, wherein the task is each upload task of a terminal device when multiple terminal devices upload data to the cloud server at the same time.
[0146] The weight determination module 32 is configured to determine, for each task, a resource requirement weight of the task according to the processing time and the number of network retransmissions of the task.
[0147] In some embodiments of the present disclosure, the weight determination module 32 is configured to determine the processing time weight coefficient and the retransmission number weight coefficient of each task; and determine the resource requirement weight of the task based on the processing time of the task, the number of network retransmissions, the processing time weight coefficient and the retransmission number weight coefficient.
[0148] In some embodiments of the present disclosure, the weight determination module 32 can be configured to obtain network indicators when determining the processing time weight coefficient and the retransmission number weight coefficient of the task, wherein the network indicators include at least one of delay time, packet loss rate, bandwidth utilization and retransmission number; determine the current network status according to the network indicators; and determine the processing time weight coefficient and the retransmission number weight coefficient of the task under the current network status according to the current network status.
[0149] In some embodiments of the present disclosure, the weight determination module 32, when determining the current network state based on network indicators, can be configured to determine that the current network state is the first state when the delay time is less than a first predetermined time, the packet loss rate is lower than a first packet loss rate, the bandwidth utilization rate is greater than or equal to the first utilization rate, and the number of retransmissions is equal to 0.
[0150] In some embodiments of the present disclosure, the weight determination module 32 can be configured to, when determining the processing time weight coefficient and the retransmission number weight coefficient of the task under the current network state, determine that when the current network state is a first state, the processing time weight coefficient is the first processing time weight coefficient, the retransmission number weight coefficient is the first retransmission number weight coefficient, and the ratio of the first processing time weight coefficient to the first retransmission number weight coefficient is the first ratio.
[0151] In some embodiments of the present disclosure, the weight determination module 32 can also be configured to determine that the current network state is the second state when the delay time is greater than a first predetermined time and less than or equal to a second predetermined time, the packet loss rate is lower than the first packet loss rate, and the number of retransmissions is equal to 0, when determining the current network state based on network indicators, wherein the first predetermined time is less than the second predetermined time.
[0152] In some embodiments of the present disclosure, the weight determination module 32 can also be configured to, when the current network state is a second state, determine the processing time weight coefficient and the retransmission number weight coefficient of the task under the current network state, to be the second processing time weight coefficient, the retransmission number weight coefficient to be the second retransmission number weight coefficient, the ratio of the second processing time weight coefficient to the second retransmission number weight coefficient to be a second ratio, the second ratio is greater than the first ratio, and the second retransmission number weight coefficient is equal to the first retransmission number weight coefficient.
[0153] In some embodiments of the present disclosure, the weight determination module 32 can also be configured to determine that the current network state is a third state when the packet loss rate is higher than the second packet loss rate, the bandwidth utilization rate is less than the second utilization rate, and the number of retransmissions is greater than 2, when determining the current network state based on network indicators, wherein the second packet loss rate is greater than the first packet loss rate, and the second utilization rate is less than the first utilization rate.
[0154] In some embodiments of the present disclosure, the weight determination module 32 can also be configured to, when the current network state is a third state, determine the processing time weight coefficient as the third processing time weight coefficient, the retransmission number weight coefficient as the third retransmission number weight coefficient, the ratio of the third processing time weight coefficient to the third retransmission number weight coefficient as the third ratio, the third ratio is smaller than the first ratio, and the ratio of the third retransmission number weight coefficient to the first retransmission number weight coefficient as the first ratio.
[0155] In some embodiments of the present disclosure, the weight determination module 32 can also be configured to determine that the current network state is a fourth state when the delay time is greater than a third predetermined time and less than or equal to the second predetermined time, the packet loss rate is less than the first packet loss rate, the bandwidth utilization rate is greater than the third utilization rate, and the number of retransmissions is greater than 0, when determining the current network state based on network indicators, wherein the third predetermined time is less than the first predetermined time, and the third utilization rate is greater than the first utilization rate.
[0156] In some embodiments of the present disclosure, the weight determination module 32 can also be configured to, when the current network state is a fourth state, determine the processing time weight coefficient as the fourth processing time weight coefficient, the retransmission number weight coefficient as the fourth retransmission number weight coefficient, the ratio of the fourth processing time weight coefficient to the fourth retransmission number weight coefficient as a fourth ratio, the fourth ratio is less than the third ratio, and the fourth processing time weight coefficient is equal to the second processing time weight coefficient.
[0157] In some embodiments of the present disclosure, the weight determination module 32 can also be configured to determine that the current network state is a fifth state when the delay time is greater than a third predetermined time and less than or equal to a second predetermined time, the packet loss rate is greater than a third packet loss rate, and the number of retransmissions is greater than 0, when determining the current network state based on network indicators, wherein the third packet loss rate is less than the second packet loss rate and greater than the first packet loss rate.
[0158] In some embodiments of the present disclosure, the weight determination module 32 can also be configured to, when the current network state is the fifth state, determine the processing time weight coefficient and the retransmission number weight coefficient of the task under the current network state, to be the fifth processing time weight coefficient, the retransmission number weight coefficient to be the fifth retransmission number weight coefficient, the ratio of the fifth processing time weight coefficient to the fifth retransmission number weight coefficient to be the fifth ratio, the fifth ratio being greater than the third ratio and less than the first ratio, the ratio of the fifth retransmission number weight coefficient to the first retransmission number weight coefficient to be the sixth ratio, the sixth ratio being greater than the fifth ratio and less than the first ratio.
[0159] In some embodiments of the present disclosure, the weight determination module 32, when determining the current network state according to the network indicators, can also be configured to determine that the current network state is the first state when it is determined according to the network indicators that the current network state is not any one of the first state, the second state, the third state, the fourth state and the fifth state.
[0160] The resource allocation module 33 is configured to determine, for each task, whether to allocate resources to the task according to the resource requirement weight of the task.
[0161] In some embodiments of the present disclosure, the resource allocation module 33 is configured to determine, for each task, a resource requirement tag of the task according to the resource requirement weight of the task; and determine whether to allocate resources to the task according to the resource requirement tag of the task.
[0162] In some embodiments of the present disclosure, the resource allocation module 33, when determining the resource requirement tag of the task based on the resource requirement weight of the task, can be configured to determine the resource requirement tag of the current task based on the resource requirement tag of the current task at the previous moment, the amount of data transmitted by the current task since the last request, the byte size of the current task, the maximum processing capacity of each storage service, the resource requirement weight of the current task and the current time.
[0163] In some embodiments of the present disclosure, the resource allocation module 33 can be configured to determine the first requirement tag of the current task based on the resource requirement tag of the current task at the previous moment, the amount of data transmitted by the current task since the last request, the byte size of the current task, the maximum processing capacity of each storage service, and the resource requirement weight of the current task, when determining the resource requirement tag of the current task based on the resource requirement tag of the current task at the previous moment, the amount of data transmitted by the current task since the last request, the byte size of the current task, the maximum processing capacity of each storage service, and the resource requirement weight of the current task; and use the maximum value of the first requirement tag of the current task and the current time as the resource requirement tag of the current task.
[0164] In some embodiments of the present disclosure, the resource allocation module 33, when determining whether to allocate resources to the task based on the resource requirement tag of the task, can be configured to judge whether the resource requirement tag of the task satisfies the resource allocation conditions; judge whether the number of input and output operations per second of the task satisfies the restriction condition on the number of input and output operations per second; and allocate resources to the task and allow the task to be executed if the resource requirement tag of the task satisfies the resource allocation conditions and the number of input and output operations per second of the task satisfies the restriction condition on the number of input and output operations per second.
[0165] In some embodiments of the present disclosure, the resource allocation device of the present disclosure may be configured to implement the resource allocation method as described in any of the above embodiments.
[0166] Figure 4 FIG. 1 is a schematic diagram of the structure of some other embodiments of the resource allocation device disclosed in the present invention. Figure 4 As shown, the resource allocation device disclosed in the present invention may include a memory 41 and a processor 42 .
[0167] The memory 41 is used to store instructions. The processor 42 is coupled to the memory 41 . The processor 42 is configured to execute the resource allocation method involved in the above embodiment based on the instructions stored in the memory.
[0168] like Figure 4As shown, the resource allocation device also includes a communication interface 43 for information exchange with other devices. At the same time, the resource allocation device also includes a bus 44, through which the processor 42, the communication interface 43, and the memory 41 communicate with each other.
[0169] The memory 41 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory. The memory 41 may also be a memory array. The memory 41 may also be divided into blocks, and the blocks may be combined into virtual volumes according to certain rules.
[0170] In addition, the processor 42 may be a central processing unit (CPU), or may be an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present disclosure.
[0171] Figure 5 FIG. 1 is a schematic diagram of the structure of some embodiments of the resource allocation system disclosed in the present invention. Figure 5 As shown, the resource allocation system disclosed herein may include a terminal device 51 , a cloud server 52 and a resource allocation apparatus 53 .
[0172] The resource allocation system of the present disclosure may include a plurality of terminal devices 51 .
[0173] In some embodiments of the present disclosure, the resource allocation device 53 may be a resource allocation device as described in any of the above embodiments.
[0174] In some embodiments of the present disclosure, the resource allocation device 53 of the present disclosure may be implemented as a scheduler.
[0175] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the resource allocation method as described in any of the above embodiments is implemented.
[0176] According to another aspect of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the resource allocation method as described in any of the above embodiments is implemented.
[0177] The computer-readable storage medium of the present disclosure may be implemented as a non-transitory computer-readable storage medium.
[0178] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, devices, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable non-transient storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0179] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram and the combination of processes and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0180] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0181] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0182] The resource allocation device, parameter acquisition module, weight determination module and resource allocation module described above can be implemented as a general-purpose processor, a programmable logic controller, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component or any appropriate combination thereof for performing the functions described in the present disclosure.
[0183] Those skilled in the art will appreciate that all or part of the steps of the above-described embodiment method of the present disclosure may be accomplished by hardware, and the hardware may be implemented as a general-purpose processor, a programmable logic controller, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, or any appropriate combination thereof for executing the method described in the present disclosure.
[0184] So far, the present disclosure has been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solution disclosed here.
[0185] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by instructing the relevant hardware through a program, and the program may be stored in a non-transitory computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0186] The description of the present disclosure is given for the purpose of illustration and description, and is not intended to be exhaustive or to limit the present disclosure to the disclosed form. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present disclosure, and to enable those of ordinary skill in the art to understand the present disclosure and thereby design various embodiments with various modifications suitable for specific uses.
Claims
1. A resource allocation method, comprising: Obtaining the processing time and the number of network retransmissions for each task, wherein the task is each upload task of a terminal device when multiple terminal devices upload data to a cloud server at the same time; For each task, determining a resource requirement weight of the task according to the processing time of the task and the number of network retransmissions; For each task, it is determined whether to allocate resources to the task according to the resource requirement weight of the task.
2. The resource allocation method according to claim 1, wherein: Determining the resource requirement weight of the task according to the processing time of the task and the number of network retransmissions includes: Determining a processing time weight coefficient and a retransmission number weight coefficient of the task; The resource requirement weight of the task is determined according to the processing time of the task, the number of network retransmissions, the processing time weight coefficient and the retransmission number weight coefficient.
3. The resource allocation method according to claim 2, wherein: The determining of the processing time weight coefficient and the retransmission number weight coefficient of the task includes: Acquire network indicators, wherein the network indicators include at least one of delay time, packet loss rate, bandwidth utilization and number of retransmissions; Determine the current network status based on network indicators; According to the current network state, a processing time weight coefficient and a retransmission number weight coefficient of the task under the current network state are determined.
4. The resource allocation method according to claim 3, wherein: Determining the current network status according to the network indicator includes: When the delay time is less than the first predetermined time, the packet loss rate is lower than the first packet loss rate, the bandwidth utilization rate is greater than or equal to the first utilization rate, and the number of retransmissions is equal to 0, determining that the current network state is the first state; The determination of the processing time weight coefficient and the retransmission number weight coefficient of the task under the current network state includes: When the current network state is the first state, the processing time weight coefficient is determined to be the first processing time weight coefficient, the retransmission number weight coefficient is the first retransmission number weight coefficient, and the ratio of the first processing time weight coefficient to the first retransmission number weight coefficient is the first ratio.
5. The resource allocation method according to claim 4, wherein: Determining the current network status according to the network indicator also includes: When the delay time is greater than the first predetermined time and less than or equal to the second predetermined time, the packet loss rate is lower than the first packet loss rate, and the number of retransmissions is equal to 0, determining that the current network state is the second state, wherein the first predetermined time is less than the second predetermined time; The determining of the processing time weight coefficient and the retransmission number weight coefficient of the task under the current network state also includes: When the current network state is the second state, the processing time weight coefficient is determined to be the second processing time weight coefficient, the retransmission number weight coefficient is the second retransmission number weight coefficient, the ratio of the second processing time weight coefficient and the second retransmission number weight coefficient is the second ratio, the second ratio is greater than the first ratio, and the second retransmission number weight coefficient is equal to the first retransmission number weight coefficient.
6. The resource allocation method according to claim 5, wherein: Determining the current network status according to the network indicator also includes: When the packet loss rate is higher than the second packet loss rate, the bandwidth utilization rate is lower than the second utilization rate, and the number of retransmissions is greater than 2, determining that the current network state is a third state, wherein the second packet loss rate is higher than the first packet loss rate, and the second utilization rate is lower than the first utilization rate; The determining of the processing time weight coefficient and the retransmission number weight coefficient of the task under the current network state also includes: When the current network state is the third state, the processing time weight coefficient is determined to be the third processing time weight coefficient, the retransmission number weight coefficient is the third retransmission number weight coefficient, the ratio of the third processing time weight coefficient to the third retransmission number weight coefficient is the third ratio, the third ratio is smaller than the first ratio, and the ratio of the third retransmission number weight coefficient to the first retransmission number weight coefficient is the first ratio.
7. The resource allocation method according to claim 6, wherein: Determining the current network status according to the network indicator also includes: When the delay time is greater than the third predetermined time and less than or equal to the second predetermined time, the packet loss rate is less than the first packet loss rate, the bandwidth utilization rate is greater than the third utilization rate, and the number of retransmissions is greater than 0, determining that the current network state is the fourth state, wherein the third predetermined time is less than the first predetermined time, and the third utilization rate is greater than the first utilization rate; The determining of the processing time weight coefficient and the retransmission number weight coefficient of the task under the current network state also includes: When the current network state is the fourth state, the processing time weight coefficient is determined to be the fourth processing time weight coefficient, the retransmission number weight coefficient is the fourth retransmission number weight coefficient, the ratio of the fourth processing time weight coefficient and the fourth retransmission number weight coefficient is a fourth ratio, the fourth ratio is less than the third ratio, and the fourth processing time weight coefficient is equal to the second processing time weight coefficient.
8. The resource allocation method according to claim 7, wherein: Determining the current network status according to the network indicator also includes: When the delay time is greater than the third predetermined time and less than or equal to the second predetermined time, the packet loss rate is greater than the third packet loss rate, and the number of retransmissions is greater than 0, determining that the current network state is a fifth state, wherein the third packet loss rate is less than the second packet loss rate and greater than the first packet loss rate; The determining of the processing time weight coefficient and the retransmission number weight coefficient of the task under the current network state also includes: When the current network state is the fifth state, the processing time weight coefficient is determined to be the fifth processing time weight coefficient, the retransmission number weight coefficient is the fifth retransmission number weight coefficient, the ratio of the fifth processing time weight coefficient and the fifth retransmission number weight coefficient is the fifth ratio, the fifth ratio is greater than the third ratio and less than the first ratio, the ratio of the fifth retransmission number weight coefficient and the first retransmission number weight coefficient is the sixth ratio, the sixth ratio is greater than the fifth ratio and less than the first ratio.
9. The resource allocation method according to claim 8, wherein: Determining the current network status according to the network indicator also includes: When it is determined according to the network indicator that the current network state is not any one of the first state, the second state, the third state, the fourth state and the fifth state, the current network state is determined to be the first state.
10. The resource allocation method according to any one of claims 1 to 9, wherein: The determining whether to allocate resources to the task according to the resource requirement weight of the task comprises: Determining a resource requirement label for the task according to the resource requirement weight of the task; Determine whether to allocate resources to the task according to the resource requirement tag of the task.
11. The resource allocation method according to claim 10, wherein: Determining the resource requirement label of the task according to the resource requirement weight of the task includes: The resource requirement label of the current task is determined based on the resource requirement label of the current task at the last moment, the amount of data transmitted by the current task since the last request, the byte size of the current task, the maximum processing capacity of each storage service, the resource requirement weight of the current task, and the current time.
12. The resource allocation method according to claim 11, wherein: Determining the resource requirement tag of the current task according to the resource requirement tag of the current task at the last moment, the amount of data transmitted by the current task since the last request, the byte size of the current task, the maximum processing capacity of each storage service, the resource requirement weight of the current task and the current time includes: Determine the first requirement tag of the current task based on the resource requirement tag of the current task at the last moment, the amount of data transmitted by the current task since the last request, the byte size of the current task, the maximum processing capacity of each storage service, and the resource requirement weight of the current task; The maximum value of the first requirement tag of the current task and the current time is used as the resource requirement tag of the current task.
13. The resource allocation method according to claim 10, wherein: The determining whether to allocate resources to the task according to the resource requirement tag of the task comprises: Determine whether the resource requirement tag of the task meets the resource allocation condition; Determine whether the number of input and output operations per second of the task meets the limit condition of the number of input and output operations per second; When the resource requirement tag of the task meets the resource allocation condition and the number of input and output operations per second of the task meets the limit condition of the number of input and output operations per second, resources are allocated to the task and the task is allowed to be executed.
14. A resource allocation device, comprising: A parameter acquisition module, configured to acquire the processing time and the number of network retransmissions of each task, wherein the task is each upload task of a terminal device when multiple terminal devices upload data to a cloud server at the same time; A weight determination module is configured to determine, for each task, a resource requirement weight of the task according to a processing time of the task and a number of network retransmissions; The resource allocation module is configured to determine, for each task, whether to allocate resources to the task according to the resource requirement weight of the task.
15. A resource allocation device, comprising: a memory configured to store instructions; and The processor is configured to execute the instructions so that the resource allocation device implements the resource allocation method according to any one of claims 1 to 13.
16. A resource allocation system, comprising a terminal device, a cloud server and the resource allocation device according to claim 14 or 15.
17. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the resource allocation method according to any one of claims 1 to 13 is implemented.
18. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the resource allocation method according to any one of claims 1 to 13 is implemented.
Citation Information
Patent Citations
Network resource allocation method and device, electronic equipment and storage medium
CN118368259A
Method and apparatus for optimizing the persistent scheduling in two-hop relay networks
KR1020120082742A
Method for detecting of accidental launch probability of ordnance of aircraft and system thereof
KR102019948B1
Apparatus and method for retransmission in wireless communication system
US20190182006A1
Method for determining resource selection window, terminal apparatus, and storage medium
WO2021062605A1