Resource Allocation Method, Apparatus and System, Storage Medium and Computer Program Product
By calculating the resource demand weight of the task in a distributed storage system, and dynamically adjusting resource allocation based on processing time and network retransmission times, the problem of insufficient IOPS control in the prior art is solved, and system performance and resource utilization efficiency are improved.
Patent Information
- Application Number
- CN202510038314.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-01-09
AI Technical Summary
The prior art in distributed storage systems from the edge to the cloud cannot effectively manage the processing time and network stability of tasks by controlling IOPS alone, 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 resource allocation is dynamically adjusted according to the complexity of the task and network stability.
Effectively manage the processing time and network stability of tasks, improve the overall performance of the system, and ensure fairness and efficiency of resource allocation.
Smart Images

Figure CN119484431B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of resource allocation, and particularly relates to a resource allocation method, apparatus, system, storage medium, and computer program product. Background Art
[0002] In the related mClock algorithm and dmClock algorithm, the allocation of storage resources is mainly focused on controlling the IOPS (Input / Output Operations Per Second). Summary of the Invention
[0003] The inventors have found through research that it is not enough to only control the IOPS in the related mClock algorithm and dmClock algorithm. Especially in a distributed storage system from the edge to the cloud, in addition to considering the number of IOs to be processed, the processing time of tasks and 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, apparatus, system, storage medium, and computer program product, which can determine the resource requirements actually occupied by each task based on the processing time and network retransmission times, and dynamically adjust the resource allocation according to the complexity and network stability of each task.
[0005] According to one aspect of the present disclosure, there is provided a resource allocation method, including:
[0006] Obtaining the processing time and network retransmission times of each task, where the task is each upload task of a terminal device when multiple terminal devices upload data to a cloud server simultaneously;
[0007] For each task, determining a resource requirement weight of the task according to the processing time and network retransmission times of the task;
[0008] For each task, determining whether to allocate resources to the task according to the resource requirement weight of the task.
[0009] In some embodiments of the present disclosure, the determining the resource requirement weight of the task according to the processing time and network retransmission times of the task includes:
[0010] Determining a processing time weight coefficient and a retransmission times weight coefficient of the task;
[0011] Determining the resource requirement weight of the task according to the processing time, network retransmission times, processing time weight coefficient, and retransmission times weight coefficient of the task.
[0012] In some embodiments of the present disclosure, determining the processing time weight coefficient and the retransmission times weight coefficient of the task includes:
[0013] Obtain network metrics, where the network metrics include at least one of delay time, packet loss rate, bandwidth utilization rate, and retransmission times;
[0014] Determine the current network state according to the network metrics;
[0015] According to the current network state, determine the processing time weight coefficient and the retransmission times weight coefficient of the task in the current network state.
[0016] In some embodiments of the present disclosure, determining the current network state according to the network metrics includes:
[0017] 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 a first utilization rate, and the retransmission times is equal to 0, determine that the current network state is a first state.
[0018] In some embodiments of the present disclosure, determining the processing time weight coefficient and the retransmission times weight coefficient of the task in the current network state includes:
[0019] When the current network state is the first state, determine that the processing time weight coefficient is a first processing time weight coefficient, the retransmission times weight coefficient is a first retransmission times weight coefficient, and the ratio of the first processing time weight coefficient to the first retransmission times weight coefficient is a first ratio.
[0020] In some embodiments of the present disclosure, determining the current network state according to the network metrics further includes:
[0021] When the delay time is greater than the 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 retransmission times is equal to 0, determine that the current network state is a second state, where the first predetermined time is less than the second predetermined time.
[0022] In some embodiments of the present disclosure, determining the processing time weight coefficient and the retransmission times weight coefficient of the task in the current network state further includes:
[0023] When the current network state is the second state, determine that the processing time weight coefficient is a second processing time weight coefficient, the retransmission times weight coefficient is a second retransmission times weight coefficient, the ratio of the second processing time weight coefficient to the second retransmission times weight coefficient is a second ratio, the second ratio is greater than the first ratio, and the second retransmission times weight coefficient is equal to the first retransmission times weight coefficient.
[0024] In some embodiments of the present disclosure, determining the current network state based on network metrics further includes:
[0025] When the packet loss rate is higher than a second packet loss rate, the bandwidth utilization rate is less than a second utilization rate, and the number of retransmissions is greater than 2, determine that the current network state is a third state, where 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.
[0026] In some embodiments of the present disclosure, determining the processing time weight coefficient and the retransmission number weight coefficient of the task in the current network state further includes:
[0027] When the current network state is the third state, determine that the processing time weight coefficient is a third processing time weight coefficient, the retransmission number weight coefficient is a third retransmission number weight coefficient, the ratio of the third processing time weight coefficient to the third retransmission number weight coefficient is a third ratio, the third ratio is less 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.
[0028] In some embodiments of the present disclosure, determining the current network state based on network metrics further includes:
[0029] 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 less than the first packet loss rate, the bandwidth utilization rate is greater than a third utilization rate, and the number of retransmissions is greater than 0, determine that the current network state is a fourth state, where the third predetermined time is less than the first predetermined time, and the third utilization rate is greater than the first utilization rate.
[0030] In some embodiments of the present disclosure, determining the processing time weight coefficient and the retransmission number weight coefficient of the task in the current network state further includes:
[0031] When the current network state is the fourth state, determine that the processing time weight coefficient is a fourth processing time weight coefficient, the retransmission number weight coefficient is a fourth retransmission number weight coefficient, the ratio of the fourth processing time weight coefficient to 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.
[0032] In some embodiments of the present disclosure, determining the current network state based on network metrics further includes:
[0033] When the latency 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, determine that the current network state is the fifth state, where the third packet loss rate is less than the second packet loss rate and greater than the first packet loss rate.
[0034] In some embodiments of the present disclosure, determining the processing time weight coefficient and the retransmission number weight coefficient of the task in the current network state further includes:
[0035] 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, and the sixth ratio is greater than the fifth ratio and less than the first ratio.
[0036] In some embodiments of the present disclosure, determining the current network state according to the network metrics further includes:
[0037] When it is determined 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 according to the network metrics, determine that the current network state is the first state.
[0038] In some embodiments of the present disclosure, determining whether to allocate resources to the task according to the resource demand weight of the task includes:
[0039] Determine the resource demand label of the task according to the resource demand weight of the task;
[0040] Determine whether to allocate resources to the task according to the resource demand label of the task.
[0041] In some embodiments of the present disclosure, determining the resource demand label of the task according to the resource demand weight of the task includes:
[0042] Determine the resource demand label of the current task according to the resource demand label of the previous moment of the current task, 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 demand weight of the current task, and the current time.
[0043] In some embodiments of the present disclosure, determining the resource requirement label of the current task according to the resource requirement label at the previous moment of the current task, 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:
[0044] Determine the first requirement label of the current task according to the resource requirement label at the previous moment of the current task, 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;
[0045] Take the maximum value of the first requirement label of the current task and the current time as the resource requirement label of the current task.
[0046] In some embodiments of the present disclosure, determining whether to allocate resources to the task according to the resource requirement label of the task includes:
[0047] Judge whether the resource requirement label of the task meets the resource allocation condition;
[0048] Judge whether the number of input / output operations per second of the task meets the limit condition of the number of input / output operations per second;
[0049] When the resource requirement label of the task meets the resource allocation condition and the number of input / output operations per second of the task meets the limit condition of the number of input / output operations per second, allocate resources to the task and allow the task to execute.
[0050] According to another aspect of the present disclosure, there is provided a resource allocation device, including:
[0051] A parameter acquisition module, configured to acquire the processing time and the number of network retransmissions of each task, where the task is each upload task of a terminal device when multiple terminal devices upload data to the cloud server at the same time;
[0052] A weight determination module, configured to determine the resource requirement weight of each task according to the processing time and the number of network retransmissions of the task;
[0053] A resource allocation module, configured to determine whether to allocate resources to each task according to the resource requirement weight of the task.
[0054] According to another aspect of the present disclosure, there is provided a resource allocation device, including:
[0055] A memory, configured to store instructions; and
[0056] A processor configured to execute the instructions such that the resource allocation device implements the resource allocation method as described in any of the above embodiments.
[0057] According to another aspect of the present disclosure, there is provided a resource allocation system including a terminal device, a cloud server, and the resource allocation device as described in any of the above embodiments.
[0058] According to another aspect of the present disclosure, there is provided 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 as described in any of the above embodiments is implemented.
[0059] According to another aspect of the present disclosure, there is provided a computer program product 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.
[0060] The present disclosure can determine the resource requirements actually occupied by each task by processing the time and the number of network retransmissions, and dynamically adjust the resource allocation according to the complexity and network stability of each task. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0062] Figure 1 Schematic diagrams of some embodiments of the resource allocation method of the present disclosure.
[0063] Figure 2 Schematic diagrams of other embodiments of the resource allocation method of the present disclosure.
[0064] Figure 3 Schematic diagrams of some embodiments of the resource allocation device of the present disclosure.
[0065] Figure 4 Schematic diagrams of other embodiments of the resource allocation device of the present disclosure.
[0066] Figure 5 Schematic diagrams of some embodiments of the resource allocation system of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0067] Next, the technical solutions in the embodiments of the present disclosure will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and in no way limits the present disclosure or its application or use. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present disclosure without creative efforts shall fall within the scope of protection of the present disclosure.
[0068] Unless otherwise specifically stated, the relative arrangements of components and steps, numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure.
[0069] At the same time, it should be understood that for the convenience of description, the dimensions of each part shown in the drawings are not drawn according to the actual proportional relationship.
[0070] Technologies, methods, and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and devices should be regarded as part of the specification.
[0071] In all the examples shown and discussed here, any specific value should be construed as merely exemplary and not as a limitation. Therefore, other examples of the exemplary embodiments may have different values.
[0072] It should be noted that like reference numerals and letters denote like items in the following drawings, and thus, once an item is defined in one drawing, it need not be further discussed in subsequent drawings.
[0073] Figure 1 It is a schematic diagram of some embodiments of the resource allocation method of the present disclosure. Figure 1 The embodiment can be executed by the resource allocation system or the resource allocation device of the present disclosure. As Figure 1 shown, Figure 1 the method of the embodiment may include at least one step from step 100 to step 300.
[0074] Step 100, obtaining the processing time and the number of network retransmissions of each task, where the task is each upload task of a terminal device in the case where multiple terminal devices upload data to the cloud server simultaneously.
[0075] In some embodiments of the present disclosure, the terminal device is a vehicle terminal device.
[0076] In some embodiments of the present disclosure, the task is a storage service from the terminal device to the cloud server.
[0077] Step 200: For each task, determine the resource requirement weight of the task according to the processing time and network retransmission times of the task.
[0078] In some embodiments of the present disclosure, the resources of the present disclosure refer to IOPS and bandwidth.
[0079] 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 network retransmission times of the task may include at least one of steps 210 to 220.
[0080] Step 210: Determine the processing time weight coefficient and retransmission times weight coefficient of the task.
[0081] In some embodiments of the present disclosure, step 210 may include at least one of steps 211 to 213.
[0082] Step 211: Obtain network metrics, where the network metrics include at least one of latency, packet loss rate, bandwidth utilization, and retransmission times.
[0083] Step 212: Determine the current network state according to the network metrics.
[0084] Step 213: According to the current network state, determine the processing time weight coefficient of the task in the current network state and the retransmission times weight coefficient .
[0085] Step 220: According to the processing time of the task , network retransmission times , processing time weight coefficient and retransmission times weight coefficient , determine the resource requirement weight of the task .
[0086] (1)
[0087] In formula (1), is the average processing time of task i (unit: ms), represents the time required for the task to be processed in the storage service. is the network retransmission times, reflecting the network instability or packet loss situation encountered by task i during transmission. is the processing time weight coefficient, used to control the influence of task processing time in resource scheduling. is the weight coefficient of retransmission times, indicating the influence of the retransmission times of the task on resource consumption.
[0088] Figure 2 Schematic diagram of some other embodiments of the resource allocation method of the present disclosure. Figure 1 The embodiments can be executed by the resource allocation system or the resource allocation device of the present disclosure. As Figure 1 shown, the resource allocation method of the present disclosure (e.g., Figure 1 step 200 of the embodiment) may include at least one of steps 1 to 22.
[0089] Step 1, obtain network metrics, where the network metrics include at least one of latency, packet loss rate, bandwidth utilization rate, and number of retransmissions.
[0090] Step 2, determine whether the network metrics meet the first network condition, where the first network condition includes that the latency 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 a first utilization rate, and the number of retransmissions is equal to 0. If the network metrics meet the first network condition, execute step 3; otherwise, if the network metrics do not meet the first network condition, execute step 6.
[0091] In some embodiments of the present disclosure, the first predetermined time may be 100 ms; the first packet loss rate may be 0.1%; the first utilization rate may be 80%.
[0092] Step 3, when the latency 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.
[0093] In some embodiments of the present disclosure, the first state may be a normal network state.
[0094] In some embodiments of the present disclosure, step 3 may include: when the latency < 100 ms, and the packet loss rate < 0.1%, and the bandwidth utilization rate >= 80%, and the number of retransmissions = 0, determine that the current network state is a normal network state.
[0095] In some embodiments of the present disclosure, the characteristics of the first state (normal network state) are: low network latency, almost no retransmissions; stable data transmission, bandwidth utilization rate close to the maximum value; short processing time, response time and processing time of tasks close to the theoretical values; number of retransmissions close to 0, and stable network transmission.
[0096] 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.
[0097] In some embodiments of the present disclosure, the first ratio is 10.
[0098] In some embodiments of the present disclosure, the weight of the first processing time may be 1; the weight coefficient of the first retransmission times may be 0.1.
[0099] In some embodiments of the present disclosure, when the current network state is the first state, the weight coefficient of the processing time maintains a normal value, for example ; the weight coefficient of the retransmission times may be set to a smaller weight, for example , because the network is stable and the impact of retransmission is small.
[0100] Step 5: Determine the resource demand weight of the task according to the processing time of the task , the number of network retransmissions , the first processing time weight coefficient, and the first retransmission times weight coefficient. After that, other steps of this embodiment are not executed.
[0101] In some embodiments of the present disclosure, step 5 may include: when the weight of the first processing time is 1 and the weight coefficient of the first retransmission times is 0.1, determine the resource demand weight of the task according to formula (2).
[0102] (2)
[0103] 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.
[0104] Step 6: Determine whether the network metrics meet the second network condition, where 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. When the network metrics meet the second network condition, execute step 7; otherwise, when the network metrics do not meet the second network condition, execute step 10.
[0105] In some embodiments of the present disclosure, the second predetermined time may be 500 ms.
[0106] 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.
[0107] In some embodiments of the present disclosure, the second state is a high-delay state.
[0108] In some embodiments of the present disclosure, step 7 may include: determining that the current network state is a high-latency state when the latency time > 100 ms and <= 500 ms, the packet loss rate < 0.1%, and the number of retransmissions = 0.
[0109] In some embodiments of the present disclosure, the characteristics of the second state (high-latency state) are as follows: the network response time is long, but the packet loss rate is low and the number of retransmissions is small; the network bandwidth utilization rate is low, and the task response is greatly affected by latency; the processing time is relatively long, and the response time of the task increases due to network latency; the number of retransmissions is close to 0, but due to high latency, the task takes a longer time to complete.
[0110] Step 8, when the current network state is the second state, determining that the processing time weight coefficient is the second processing time weight coefficient, the number of retransmissions weight coefficient is the second number of retransmissions weight coefficient, the ratio of the second processing time weight coefficient to the second number of retransmissions weight coefficient is the second ratio, the second ratio is greater than the first ratio, and the second number of retransmissions weight coefficient is equal to the first number of retransmissions weight coefficient.
[0111] In some embodiments of the present disclosure,
[0112] In some embodiments of the present disclosure, the second processing time weight may be 1.5; the second number of retransmissions weight coefficient may be 0.1.
[0113] In some embodiments of the present disclosure, compared with the normal network state, in the high-latency state, the processing time weight coefficient is larger, increasing the weight to reflect the impact of latency on resources; the number of retransmissions weight coefficient remains small, maintaining because no retransmissions occur.
[0114] Step 9, determining the resource demand weight of the task according to the processing time of the task, the number of network retransmissions the second processing time weight coefficient and the second number of retransmissions weight coefficient. Then, other steps of this embodiment are no longer executed.
[0115] In some embodiments of the present disclosure, step 9 may include: determining the resource demand weight of the task according to formula (3) when the second processing time weight is 1.5 and the second number of retransmissions weight coefficient is 0.1.
[0116] (3)
[0117] Compared with the normal network state, in the high-latency state in the above embodiments of the present disclosure, the processing time of tasks becomes longer, so the weight of
[0118] Step 10: Determine whether the network metrics meet the third network condition, where the third network condition includes that 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. 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. If the network metrics meet the third network condition, execute Step 11; otherwise, if the network metrics do not meet the third network condition, execute Step 14.
[0119] In some embodiments of the present disclosure, the second utilization rate may be 50%; the second packet loss rate is 2%.
[0120] Step 11: 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, determine that the current network state is the third state.
[0121] In some embodiments of the present disclosure, the third state is the high packet loss state.
[0122] In some embodiments of the present disclosure, Step 11 may include: when the packet loss rate > 2%, the bandwidth utilization rate < 50%, and the number of retransmissions > 2, determine that the current network state is the high packet loss state.
[0123] In some embodiments of the present disclosure, the characteristics of the third state (high packet loss state) are: the network packet loss rate is relatively high, resulting in frequent retransmissions during data transmission; the effective throughput of the transmission is low, the processing time of tasks 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.
[0124] 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 number of retransmissions weight coefficient is the third number of retransmissions weight coefficient, the ratio of the third processing time weight coefficient to the third number of retransmissions weight coefficient is the third ratio, the third ratio is less than the first ratio, and the ratio of the third number of retransmissions weight coefficient to the first number of retransmissions weight coefficient is the first ratio.
[0125] In some embodiments of the present disclosure, the third ratio is 1.2.
[0126] In some embodiments of the present disclosure, the third processing time weight may be 1.2; the third number of retransmissions weight coefficient may be 1.0.
[0127] In some embodiments of the present disclosure, compared with the normal network state, in the high packet loss state, the processing time weight coefficient slightly increases , reflecting that the processing time of the task is affected by packet loss; the retransmission times weight coefficient increases because more retransmissions are brought about by the high packet loss rate.
[0128] Step 13, determine the resource requirement weight of the task according to the processing time of the task, the network retransmission times , the third processing time weight coefficient and the third retransmission times weight coefficient. After that, other steps of this embodiment are no longer executed.
[0129] In some embodiments of the present disclosure, step 13 may include: when the third processing time weight is 1.2 and the third retransmission times weight coefficient is 1.0, determine the resource requirement weight of the task according to formula (4).
[0130] (4)
[0131] Compared with the normal network state in the above embodiments of the present disclosure, in the high packet loss state, the retransmission times significantly increase, resulting in an increase in the bandwidth occupancy of the task. Therefore, the weight of the retransmission times is increased.
[0132] Step 14, determine whether the network metrics meet the fourth network condition, where 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 retransmission times are 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. When the network metrics meet the fourth network condition, execute step 15; otherwise, when the network metrics do not meet the fourth network condition, execute step 18.
[0133] In some embodiments of the present disclosure, the third utilization rate may be 90%; the third predetermined time is 50 ms.
[0134] 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 retransmission times are greater than 0, determine that the current network state is the fourth state.
[0135] In some embodiments of the present disclosure, the fourth state is a bandwidth bottleneck state.
[0136] In some embodiments of the present disclosure, step 15 may include: when the bandwidth utilization rate >= 90%, the latency time > 50 ms and <= 500 ms, the packet loss rate < 0.1%, and the number of retransmissions > 0, determining that the current network state is a bandwidth bottleneck state.
[0137] In some embodiments of the present disclosure, the characteristics of the fourth state (bandwidth bottleneck state) are as follows: the network bandwidth is close to or has reached the system maximum value, and the transmission speed of tasks is limited; the network traffic bottleneck causes a large number of tasks to queue up, resulting in an increase in latency; the processing time increases because the data transmission rate decreases due to bandwidth limitations; the number of retransmissions is medium or increasing, and the bandwidth bottleneck may cause some tasks to be lost and need to be retransmitted.
[0138] Step 16, when the current network state is the fourth state, determining that the processing time weight coefficient is the fourth processing time weight coefficient, the number of retransmissions weight coefficient is the fourth number of retransmissions weight coefficient, the ratio of the fourth processing time weight coefficient to the fourth number of retransmissions weight coefficient is the 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.
[0139] In some embodiments of the present disclosure, the fourth ratio is 1.
[0140] In some embodiments of the present disclosure, the fourth processing time weight may be 1.5; the fourth number of retransmissions weight coefficient may be 1.5.
[0141] In some embodiments of the present disclosure, compared with the normal network state, in the bandwidth bottleneck state, the processing time weight coefficient increases , because the bandwidth bottleneck causes an increase in the task processing time; the number of retransmissions weight coefficient increases , because the latency caused by the bottleneck may lead to an increase in retransmissions.
[0142] Step 17, according to the processing time of the task , the number of network retransmissions , the fourth processing time weight coefficient and the fourth number of retransmissions weight coefficient, determining the resource demand weight of the task. Then, other steps of this embodiment are no longer executed.
[0143] In some embodiments of the present disclosure, step 17 may include: when the fourth processing time weight is 1.5 and the fourth number of retransmissions weight coefficient is 1.5, determining the resource demand weight of the task according to formula (5).
[0144] (5)
[0145] Compared with the normal network state in the above embodiments of the present disclosure, in the bandwidth bottleneck state, both the and have a greater impact on the resource requirements, so the weights of these two parameters are both increased.
[0146] Step 18: Determine whether the network metrics meet the fifth network condition, where 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. The third packet loss rate is less than the second packet loss rate and greater than the first packet loss rate. When the network metrics meet the fourth network condition, execute Step 19; otherwise, when the network metrics do not meet the fourth network condition, execute Step 22.
[0147] In some embodiments of the present disclosure, the third packet loss rate may be 1%.
[0148] 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.
[0149] In some embodiments of the present disclosure, the fifth state is the network jitter state.
[0150] In some embodiments of the present disclosure, Step 15 may include: when the delay time > 50 ms and <= 500 ms, the packet loss rate > 1%, and the number of retransmissions > 0, determine that the current network state is the network jitter state.
[0151] In some embodiments of the present disclosure, the characteristics of the fifth state (network jitter state) are as follows: there are fluctuations in network delay and bandwidth, resulting in instability in task processing time and the number of retransmissions; the uncertainty of the network condition causes large fluctuations in the task processing time and the network retransmission times; the processing time fluctuates greatly, and the task processing time sometimes increases due to instantaneous network delay; the number of retransmissions fluctuates greatly, and retransmissions occur from time to time, affecting resource allocation.
[0152] 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 number of retransmissions weight coefficient is the fifth number of retransmissions weight coefficient, the ratio of the fifth processing time weight coefficient to the fifth number of retransmissions 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 number of retransmissions weight coefficient to the first number of retransmissions weight coefficient is the sixth ratio, and the sixth ratio is greater than the fifth ratio and less than the first ratio.
[0153] In some embodiments of the present disclosure, the fifth ratio is 13:7.
[0154] In some embodiments of the present disclosure, the sixth ratio is 7.
[0155] In some embodiments of the present disclosure, the fifth processing time weight can be 1.3; the fifth retransmission times weight coefficient can be 0.7.
[0156] In some embodiments of the present disclosure, compared with the normal network state, in the network jitter state, the processing time weight coefficient increases , to cope with the impact of frequent network jitter on the processing time; the retransmission times weight coefficient increases , to reduce the impact of network fluctuations on the retransmission times.
[0157] Step 21, determine the resource requirement weight of the task according to the processing time of the task, the network retransmission times,
[0158] the fifth processing time weight coefficient and the fifth retransmission times weight coefficient. After that, other steps of this embodiment are not executed anymore.
[0159] (6)
[0160] Compared with the normal network state in the above embodiments of the present disclosure, in the network jitter state, the fluctuations of the task are relatively large. Therefore, the weight of the processing time is increased, but the fluctuations of the retransmission times are relatively low. Therefore, the weight of the retransmission times is moderately increased.
[0161] Step 22, in the case that it is determined according to the network metrics 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, determine that the current network state is the first state, that is, the network state cannot be recognized, and the normal network state is defaulted. Then step 4 is executed.
[0162] Step 300, for each task, determine whether to allocate resources to the task according to the resource requirement weight of the task.
[0163] In some embodiments of the present disclosure, step 300 may include: multiple terminals share the cloud distributed storage for their own IOPS and bandwidth, and different terminals have different priorities. Therefore, the present disclosure effectively allocates shared resources (IOPS and bandwidth) among different terminals according to the priorities configured for each terminal on the premise of ensuring that each terminal can enjoy at least the minimum resources (IOPS and bandwidth).
[0164] In some embodiments of the present disclosure, step 300 may include at least one of steps 310 to 320.
[0165] Step 310, determine the resource requirement label of the task according to the resource requirement weight of the task.
[0166] In some embodiments of the present disclosure, step 310 may include: determining the resource requirement label of the current task according to the resource requirement label 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.
[0167] In some embodiments of the present disclosure, step 310 may include at least one of steps 311 to 312.
[0168] Step 311, determine the first requirement label of the current task according to the resource requirement label 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.
[0169] Step 312, use the maximum value of the first requirement label of the current task and the current time as the resource requirement label of the current task.
[0170] In some embodiments of the present disclosure, step 310 may include: determining the resource requirement label according to formula (7).
[0171] (7)
[0172] In formula (7), represents the resource requirement label of the current task. represents the resource requirement label at the previous moment. represents the amount of data transmitted by the task since the last request. length is the byte size of this task, reflecting the request volume of the task. is the maximum processing capacity of each storage service, used to control the maximum resources that each task i can use.
[0173] Step 320: Determine whether to allocate resources to the task according to the resource requirement label of the task.
[0174] Based on the weight calculation of processing time and retransmission times, the embodiments of the present disclosure introduce a new label calculation method (resource requirement label) in the ddmClock algorithm to determine whether a task can obtain resources.
[0175] In some embodiments of the present disclosure, step 320 may include at least one of steps 321 to 323.
[0176] Step 321: Determine whether the resource requirement label of the task meets the resource allocation condition.
[0177] Step 322: Determine whether the number of input / output operations per second of the task meets the limit condition of the number of input / output operations per second.
[0178] Step 323: When the resource requirement label of the task meets the resource allocation condition and the number of input / output operations per second of the task meets the limit condition of the number of input / output operations per second, allocate resources to the task and allow the task to execute.
[0179] The above embodiments of the present disclosure provide a resource allocation method. The resource allocation method of the present disclosure is a ddmClock algorithm. In the ddmClock algorithm of the present disclosure, the resource allocation device (scheduler) of the present disclosure not only checks whether a task meets the IOPS limit, but also considers two factors of processing time and retransmission times to ensure that the resource requirements of each task can be reasonably met. The resource allocation device of the present disclosure will respond to a task in the following situations: when the IOPS and resource requirement label of the task both meet the conditions, the resource allocation device will allow the task to execute; if the processing time or retransmission times of the task are very high, the resource allocation device will give priority to tasks with low latency and high throughput; the above embodiments of the present disclosure also perform network status classification and parameter adjustment.
[0180] 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 judge the actual resource requirements occupied by each task through the factors of processing time and network retransmission times, and dynamically adjust the resource allocation according to its complexity and network stability.
[0181] In the above embodiments of the present disclosure, the resource requirements are dynamically calculated by processing time and retransmission times. The ddmClock algorithm can better reflect the actual resource requirements of each task for the system resources, thereby optimizing the resource allocation. The above embodiments of the present disclosure avoid the problems of uneven resource allocation and over-occupation that occur when only considering IOPS in the 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.
[0182] The above embodiments of the present disclosure can be applied to a distributed environment. The above embodiments of the present disclosure are designed specifically for a distributed storage system and can operate effectively in an environment where resources are shared among multiple terminals.
[0183] The above embodiments of the present disclosure can guarantee the service quality. The above embodiments of the present disclosure ensure that each storage service can obtain the expected resources through precise resource allocation, thereby improving the overall service quality.
[0184] Figure 3 It is a schematic structural diagram of some embodiments of the resource allocation device of the present disclosure. As Figure 3 shown, the resource allocation device of the present disclosure may include a parameter acquisition module 31, a weight determination module 32, and a resource allocation module 33.
[0185] The parameter acquisition module 31 is configured to acquire the processing time and network retransmission times of each task, where the task is each upload task of a terminal device in the case where multiple terminal devices upload data to the cloud server simultaneously.
[0186] The weight determination module 32 is configured to determine the resource requirement weight of each task according to the processing time and network retransmission times of the task.
[0187] In some embodiments of the present disclosure, the weight determination module 32 is configured to determine the processing time weight coefficient and the retransmission times weight coefficient of each task; and determine the resource requirement weight of the task according to the processing time, network retransmission times, processing time weight coefficient, and retransmission times weight coefficient of the task.
[0188] In some embodiments of the present disclosure, when the weight determination module 32 determines the processing time weight coefficient and the retransmission times weight coefficient of the task, it may be configured to acquire network metrics, where the network metrics include at least one of delay time, packet loss rate, bandwidth utilization rate, and retransmission times; determine the current network state according to the network metrics; and determine the processing time weight coefficient and the retransmission times weight coefficient of the task in the current network state according to the current network state.
[0189] In some embodiments of the present disclosure, when the weight determination module 32 determines the current network state according to network metrics, it may be configured to determine that the current network state is the first state when the latency 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 a first utilization rate, and the number of retransmissions is equal to 0.
[0190] In some embodiments of the present disclosure, when the weight determination module 32 determines the processing time weight coefficient and the retransmission number weight coefficient of the task in the current network state, it may be configured to determine that the processing time weight coefficient is a first processing time weight coefficient, the retransmission number weight coefficient is a first retransmission number weight coefficient, and the ratio of the first processing time weight coefficient to the first retransmission number weight coefficient is a first ratio when the current network state is the first state.
[0191] In some embodiments of the present disclosure, when the weight determination module 32 determines the current network state according to network metrics, it may also be configured to determine that the current network state is the second state when the latency time is greater than the 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, where the first predetermined time is less than the second predetermined time.
[0192] In some embodiments of the present disclosure, when the weight determination module 32 determines the processing time weight coefficient and the retransmission number weight coefficient of the task in the current network state, it may also be configured to determine that the processing time weight coefficient is a second processing time weight coefficient, the retransmission number weight coefficient is a second retransmission number weight coefficient, the ratio of the second processing time weight coefficient to the second retransmission number weight coefficient is 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 when the current network state is the second state.
[0193] In some embodiments of the present disclosure, when the weight determination module 32 determines the current network state according to network metrics, it may also be configured to determine that the current network state is the third state when the packet loss rate is higher than a second packet loss rate, the bandwidth utilization rate is less than a second utilization rate, and the number of retransmissions is greater than 2, where 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.
[0194] In some embodiments of the present disclosure, when the weight determination module 32 determines the processing time weight coefficient and the retransmission times weight coefficient of the task in the current network state, it may further be configured to determine that the processing time weight coefficient is the third processing time weight coefficient and the retransmission times weight coefficient is the third retransmission times weight coefficient when the current network state is the third state. The ratio of the third processing time weight coefficient to the third retransmission times weight coefficient is the third ratio, and the third ratio is less than the first ratio. The ratio of the third retransmission times weight coefficient to the first retransmission times weight coefficient is the first ratio.
[0195] In some embodiments of the present disclosure, when the weight determination module 32 determines the current network state according to network metrics, it may further be configured to determine that the current network state is the fourth state 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 retransmission times is greater than 0, where the third predetermined time is less than the first predetermined time and the third utilization rate is greater than the first utilization rate.
[0196] In some embodiments of the present disclosure, when the weight determination module 32 determines the processing time weight coefficient and the retransmission times weight coefficient of the task in the current network state, it may further be configured to determine that the processing time weight coefficient is the fourth processing time weight coefficient and the retransmission times weight coefficient is the fourth retransmission times weight coefficient when the current network state is the fourth state. The ratio of the fourth processing time weight coefficient to the fourth retransmission times weight coefficient is the fourth ratio, and the fourth ratio is less than the third ratio. The fourth processing time weight coefficient is equal to the second processing time weight coefficient.
[0197] In some embodiments of the present disclosure, when the weight determination module 32 determines the current network state according to network metrics, it may further be configured to determine that the current network state is the fifth state 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 retransmission times is greater than 0, where the third packet loss rate is less than the second packet loss rate and greater than the first packet loss rate.
[0198] In some embodiments of the present disclosure, when the weight determination module 32 determines the processing time weight coefficient and the retransmission times weight coefficient of the task in the current network state, it may further be configured to, 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 times weight coefficient is the fifth retransmission times weight coefficient, the ratio of the fifth processing time weight coefficient to the fifth retransmission times 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 times weight coefficient to the first retransmission times weight coefficient is the sixth ratio, and the sixth ratio is greater than the fifth ratio and less than the first ratio.
[0199] In some embodiments of the present disclosure, when the weight determination module 32 determines the current network state according to network metrics, it may further be configured to, when it is determined according to network metrics 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, determine that the current network state is the first state.
[0200] The resource allocation module 33 is configured to, for each task, determine whether to allocate resources to the task according to the resource demand weight of the task.
[0201] In some embodiments of the present disclosure, the resource allocation module 33 is configured to, for each task, determine the resource demand label of the task according to the resource demand weight of the task; and determine whether to allocate resources to the task according to the resource demand label of the task.
[0202] In some embodiments of the present disclosure, when the resource allocation module 33 determines the resource demand label of the task according to the resource demand weight of the task, it may be configured to determine the resource demand label of the current task according to the resource demand label 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 demand weight of the current task, and the current time.
[0203] In some embodiments of the present disclosure, when the resource allocation module 33 determines the resource requirement label of the current task based on the resource requirement label of the previous moment of the current task, the data volume 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, it may be configured to determine the first requirement label of the current task based on the resource requirement label of the previous moment of the current task, the data volume 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 label of the current task and the current time as the resource requirement label of the current task.
[0204] In some embodiments of the present disclosure, when the resource allocation module 33 determines whether to allocate resources to the task based on the resource requirement label of the task, it may be configured to determine whether the resource requirement label of the task meets the resource allocation condition; determine whether the number of input / output operations per second of the task meets the limit condition of the number of input / output operations per second; and when the resource requirement label of the task meets the resource allocation condition and the number of input / output operations per second of the task meets the limit condition of the number of input / output operations per second, allocate resources to the task and allow the task to execute.
[0205] In some embodiments of the present disclosure, the resource allocation device of the present disclosure may be configured to implement the resource allocation method described in any of the above embodiments.
[0206] Figure 4 It is a schematic structural diagram of some other embodiments of the resource allocation device of the present disclosure. As Figure 4 shown, the resource allocation device of the present disclosure may include a memory 41 and a processor 42.
[0207] The memory 41 is used to store instructions. The processor 42 is coupled to the memory 41, and the processor 42 is configured to execute the resource allocation method involved in the above embodiments based on the instructions stored in the memory.
[0208] As Figure 4 shown, the resource allocation device further includes a communication interface 43 for information interaction with other devices. At the same time, the resource allocation device further includes a bus 44, and the processor 42, the communication interface 43, and the memory 41 complete mutual communication through the bus 44.
[0209] 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 partitioned, and the partitions may be combined into virtual volumes according to certain rules.
[0210] In addition, the processor 42 may be a central processing unit (CPU), or may be an application specific integrated circuit (ASIC), or may be one or more integrated circuits configured to implement the embodiments of the present disclosure.
[0211] Figure 5 It is a schematic structural diagram of some embodiments of the resource allocation system of the present disclosure. As Figure 5 shown, the resource allocation system of the present disclosure may include a terminal device 51, a cloud server 52, and a resource allocation device 53.
[0212] The resource allocation system of the present disclosure may include a plurality of terminal devices 51.
[0213] In some embodiments of the present disclosure, the resource allocation device 53 may be the resource allocation device described in any of the above embodiments.
[0214] In some embodiments of the present disclosure, the resource allocation device 53 of the present disclosure may be implemented as a scheduler.
[0215] According to another aspect of the present disclosure, there is provided a computer program product, including a computer program, wherein when the computer program is executed by a processor, it implements the resource allocation method described in any of the above embodiments.
[0216] According to another aspect of the present disclosure, there is provided a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, they implement the resource allocation method described in any of the above embodiments.
[0217] The computer-readable storage medium of the present disclosure may be implemented as a non-transitory computer-readable storage medium.
[0218] Those skilled in the art should understand that the embodiments of the present disclosure may be provided as a method, an apparatus, or a computer program product. Therefore, the present disclosure may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present disclosure may adopt the form of a computer program product implemented on one or more computer-usable non-transitory storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.
[0219] This disclosure is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the disclosure. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate a means for implementing the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or a means for implementing the functions specified in one or more of the blocks.
[0220] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction means that implements the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or a means for implementing the functions specified in one or more of the blocks.
[0221] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or a means for implementing the functions specified in one or more of the blocks.
[0222] The resource allocation device, parameter acquisition module, weight determination module, and resource allocation module described above can be implemented as a general-purpose processor, programmable logic controller, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or any suitable combination thereof for performing the functions described in this disclosure.
[0223] Those of ordinary skill in the art can understand that all or part of the steps of the method according to the above embodiments of this disclosure can be completed by hardware, and the hardware can be implemented as a general-purpose processor, programmable logic controller, digital signal processor, application-specific integrated circuit, field-programmable gate array, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or any suitable combination thereof for performing the method described in this disclosure.
[0224] So far, the present disclosure has been described in detail. To avoid obscuring the concept of the present disclosure, some details well known in the art are not described. Those skilled in the art can fully understand how to implement the technical solutions disclosed herein based on the above description.
[0225] Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware or by a program instructing relevant hardware. The program can be stored in a non-transitory computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk, an optical disk, or the like.
[0226] The description of the present disclosure is given for purposes 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 are obvious to those of ordinary skill in the art. The embodiments are chosen and described in order to better explain the principles of the present disclosure and its practical application, and to enable those of ordinary skill in the art to understand the present disclosure and design various embodiments suitable for specific purposes with various modifications.
Claims
1. A resource allocation method, comprising: Obtaining the processing time and 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, and the task is a storage service from the terminal device to the cloud server; 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, determining whether to allocate resources to the task according to the resource requirement weight of the task; Wherein, determining whether to allocate resources to the task according to the resource requirement weight of the task includes: Determine 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, wherein 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 comprises: determine the first 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, 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; Determine whether to allocate resources to the task based on the resource requirement tag of the task, wherein determining whether to allocate resources to the task based on the resource requirement tag of the task includes: judging whether the resource requirement tag of the task satisfies a resource allocation condition, judging whether the number of input and output operations per second of the task satisfies a restriction on the number of input and output operations per second, and if the resource requirement tag of the task satisfies the resource allocation condition and the number of input and output operations per second of the task satisfies the restriction on the number of input and output operations per second, allocate resources to the task and allow the task to execute.
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. 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; A 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; The resource allocation module is configured to determine the resource requirement tag of the current task for each 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; and determine whether to allocate resources to the task according to the resource requirement tag of the task; Wherein, when determining the resource requirement tag of the current task according to the resource requirement tag of the previous moment of the current task, 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, the resource allocation module is configured to determine the first requirement tag of the current task according to the resource requirement tag of the previous moment of the current task, 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; The resource allocation module is configured to determine whether to allocate resources to the task based on the resource requirement tag of the task, and whether the resource requirement tag of the task meets the resource allocation conditions; determine whether the number of input and output operations per second of the task meets the restriction condition of 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 meets the resource allocation conditions and the number of input and output operations per second of the task meets the restriction condition of the number of input and output operations per second.
11. 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 9.
12. A resource allocation system, comprising a terminal device, a cloud server and the resource allocation device according to claim 10 or 11.
13. 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 9 is implemented.
14. 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 9 is implemented.
Citation Information
Patent Citations
Network resource allocation method and device, electronic equipment and storage medium
CN118368259A
Method for determining resource selection window, terminal apparatus, and storage medium
WO2021062605A1