Cloud service resource allocation method and device, equipment, storage medium and program product
By filtering target providers and cloud servers using trust assessment parameters and task information, and dynamically matching tasks with servers, the problem of resource idleness and overload in cloud service resource scheduling is solved, thereby improving QoS fulfillment capabilities and resource allocation efficiency.
Patent Information
- Application Number
- CN202511341305.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-19
- Publication Date
- 2026-02-10
AI Technical Summary
Existing cloud service resource scheduling mechanisms are unable to adapt to complex changes in demand in real time, resulting in both idle and overloaded resources, which affects QoS fulfillment capabilities. Furthermore, traditional allocation strategies suffer from resource waste and efficiency loss.
By filtering target providers and cloud servers through trust assessment parameters, and combining task information with server parameters, tasks and servers are dynamically matched to optimize resource allocation and reduce resource idleness and overload.
It achieves precise matching of cloud service resources, improves QoS fulfillment capabilities, reduces resource waste and efficiency loss, enhances the overall optimality of resource allocation, and avoids the risks associated with random vendor selection.
Smart Images

Figure CN121501474A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communications, and more particularly to a cloud service resource allocation method, apparatus, device, storage medium, and program product. Background Technology
[0002] Cloud services refer to a model that provides users with computing resources, storage capacity, software applications, and other services via the internet. Users do not need to deploy physical servers, storage devices, or install complex software on their local machines; they can simply access these cloud service resources on demand through network access. Currently, with the growth of the cloud service market, cloud service providers face increasingly complex challenges, needing to effectively manage the dynamic and diverse demands for computing resources while fulfilling their QoS (Quality of Service) commitments. However, existing cloud service resource scheduling mechanisms are gradually revealing their shortcomings in dealing with such complex scenarios. Traditional static allocation strategies struggle to adapt to real-time changes in demand, often leading to the paradox of resource idleness and overload. For example, at one moment, some servers are idle, wasting computing power, while users in another region experience service degradation due to insufficient resources. Summary of the Invention
[0003] The purpose of this invention is to provide a cloud service resource allocation method, apparatus, device, storage medium, and program product that can effectively optimize cloud service resource scheduling, dynamically adapt to changes in demand, accurately match tasks with servers, reduce resource idleness and overload, improve QoS fulfillment capabilities, and alleviate service degradation problems.
[0004] To achieve the above objectives, embodiments of the present invention provide a cloud service resource allocation method, comprising:
[0005] Receive user requests sent by terminal devices;
[0006] At least one user task is generated based on the user request, and the task information of the user task is determined;
[0007] When there are at least two cloud service providers, the target provider is determined based on the trust assessment parameters of each cloud service provider.
[0008] Obtain the basic parameters of all candidate cloud servers corresponding to the target provider;
[0009] For each user task, a corresponding target cloud server is selected from the candidate cloud servers based on the task information and the basic parameters.
[0010] Assign the target cloud server to the corresponding user task.
[0011] As an improvement to the above scheme, the trust evaluation parameters include the following information:
[0012] Historical trust scores for each cloud service provider;
[0013] The reputation reference value and quantity of all cloud servers corresponding to each cloud service provider.
[0014] As an improvement to the above scheme, the step of determining the target provider based on the trust assessment parameters of each cloud service provider includes:
[0015] An initial trust score for each cloud service provider is determined based on the aforementioned trust assessment parameters;
[0016] For each cloud service provider, a final trust score is determined based on the initial trust score and the reputation reference value.
[0017] The cloud service provider corresponding to the maximum value in the final trust score is selected as the target provider.
[0018] As an improvement to the above scheme, the task information includes task identification information, task attribute information, and task processing feature information; wherein, the task attribute information includes at least one of task size, task arrival time, and task memory requirements; and the task processing feature information includes at least one of task cost, task scheduling efficiency, and task weight.
[0019] As an improvement to the above scheme, the basic parameters include electrical parameters.
[0020] As an improvement to the above solution, the step of selecting the target cloud server from the candidate cloud servers based on the task information and the basic parameters includes:
[0021] Based on the task information and the basic parameters, determine the energy consumption parameters and attribute parameters of each candidate cloud server;
[0022] Based on the task information, the energy consumption parameters, and the attribute parameters, calculate the matching degree value between each candidate cloud server and the user task;
[0023] When all matching degree values are different, the candidate cloud server corresponding to the maximum value among the matching degree values is selected as the target cloud server.
[0024] As an improvement to the above solution, the method further includes:
[0025] When at least two identical matching degree values exist, obtain the reference number of reference cloud servers with the same matching degree value;
[0026] Calculate the target fit based on the same matching degree value and the reference quantity;
[0027] Based on the target adaptability and the processing capacity of each reference cloud server, the target cloud server is selected from the reference cloud servers.
[0028] To achieve the above objectives, embodiments of the present invention also provide a cloud service resource allocation device, comprising:
[0029] The user request receiving module is used to receive user requests sent by terminal devices.
[0030] The user task generation module is used to generate at least one user task based on the user request.
[0031] The task information determination module is used to determine the task information of the user task;
[0032] The target provider determination module is used to determine the target provider based on the trust assessment parameters of each cloud service provider when there are at least two cloud service providers.
[0033] The basic parameter acquisition module is used to acquire the basic parameters of all candidate cloud servers corresponding to the target provider.
[0034] The target cloud server filtering module is used to filter the corresponding target cloud server from the candidate cloud servers for each user task based on the task information and the basic parameters.
[0035] The cloud server allocation module is used to allocate the target cloud server to the corresponding user task.
[0036] To achieve the above objectives, embodiments of the present invention also provide a cloud service resource allocation device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the cloud service resource allocation method as described in any of the above embodiments.
[0037] To achieve the above objectives, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the cloud service resource allocation method as described in any of the above embodiments.
[0038] To achieve the above objectives, embodiments of the present invention also provide a computer program product, including a computer program / instruction, which, when executed by a processor, implements the cloud service resource allocation method as described in any of the above embodiments.
[0039] Compared to existing technologies, the cloud service resource allocation method, apparatus, device, storage medium, and program products disclosed in this invention can effectively optimize cloud service resource scheduling, dynamically adapt to changes in demand, accurately match tasks with servers, reduce resource idleness and overload, improve QoS fulfillment capabilities, and alleviate service degradation issues. Furthermore, by filtering target providers through trust assessment parameters, the blindness of random provider selection is avoided, ensuring that the service foundation (provider) better matches the needs and reducing the risks associated with unreliable providers. Dynamic matching is achieved by combining task information with cloud server parameters, considering both task requirements and server differences, making "task-cloud server" adaptation more efficient, ultimately improving the overall optimality of resource allocation and reducing the resource waste and efficiency losses associated with traditional random allocation. Attached Figure Description
[0040] Figure 1 This is a flowchart of a cloud service resource allocation method provided in an embodiment of the present invention;
[0041] Figure 2 This is a flowchart of the process for selecting target providers provided in an embodiment of the present invention;
[0042] Figure 3 This is a flowchart of the process for selecting target cloud servers provided in an embodiment of the present invention;
[0043] Figure 4 This is another flowchart of the process for selecting target cloud servers provided in this embodiment of the invention;
[0044] Figure 5 This is a structural block diagram of a cloud service resource allocation device provided in an embodiment of the present invention;
[0045] Figure 6 This is a structural block diagram of a cloud service resource allocation device provided in an embodiment of the present invention. Detailed Implementation
[0046] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0047] See Figure 1 , Figure 1 This is a flowchart of a cloud service resource allocation method provided in an embodiment of the present invention. The cloud service resource allocation method includes:
[0048] S1. Receive user requests sent by terminal devices;
[0049] S2. Generate at least one user task based on the user request, and determine the task information of the user task;
[0050] S3. When there are at least two cloud service providers, the target provider is determined based on the trust assessment parameters of each cloud service provider.
[0051] S4. Obtain the basic parameters of all candidate cloud servers corresponding to the target provider;
[0052] S5. For each user task, select the corresponding target cloud server from the candidate cloud servers based on the task information and the basic parameters.
[0053] S6. Assign the target cloud server to the corresponding user task.
[0054] For example, a cloud service provider can provide cloud servers to offer cloud services to users, thereby processing user tasks. Each cloud server deploys several virtual machines. In the cloud service resource allocation method provided by this invention, the filtering logic first selects a target provider from multiple cloud service providers, which can provide multiple cloud server resources for use. Then, the target cloud server for providing the service is selected from the target provider. During this process, upon receiving a user request, at least one user task is first generated based on the user request, and the task information is determined. When there is only one cloud service provider, that cloud service provider is directly selected as the target provider, and the process proceeds directly to step S4. When there are at least two cloud service providers, the target provider needs to be determined based on the trust assessment parameters of the cloud service providers. Then, the basic parameters of all candidate cloud servers corresponding to the target provider are obtained. Finally, for each user task, the target cloud server is selected from the candidate cloud servers based on the task information and basic parameters, thereby allocating these servers to the corresponding task.
[0055] In this embodiment of the invention, steps S1 to S6 effectively optimize cloud service resource scheduling, dynamically adapt to changing demands, accurately match tasks with servers, reduce resource idleness and overload, improve QoS fulfillment capabilities, and alleviate service degradation issues. Furthermore, by filtering target providers through trust assessment parameters, the blindness of random provider selection is avoided, ensuring the service provider is more aligned with needs and reducing risks associated with unreliable providers. Dynamic matching is achieved by combining task information with cloud server parameters, considering both task requirements and server differences, making "task-cloud server" adaptation more efficient, ultimately improving the overall optimality of resource allocation and reducing resource waste and efficiency losses associated with traditional random allocation.
[0056] Specifically, in step S1, a user request sent by the terminal device is received. The user request is a demand or requirement made by the user to the cloud service provider through a terminal device such as a mobile phone or computer.
[0057] For example, suppose a user request is: "During a certain time period, to support a large number of concurrent order transactions on the platform, it is necessary to call functions such as product inventory query, order creation, payment interface, logistics, and tracking, ensuring that the order processing latency is <500ms and the system availability is ≥99.99%." In this e-commerce scenario request, "concurrent order transactions" is the overarching goal, which can actually be broken down into multiple fine-grained user tasks. Each task corresponds to a specific function / step, such as: Task 1, product inventory query task (verifying whether product inventory is sufficient); Task 2, order creation task (generating user order data); Task 3, payment interface call task (processing the payment process); Task 4, logistics tracking initialization task (associating logistics information). Each task has clear functional boundaries (e.g., inventory query only checks inventory), resource requirements (e.g., order creation requires database write operations, payment requires encrypted computing power), and QoS requirements (e.g., inventory query must return results within 100ms). The core of cloud services is to provide computing, storage, and software application capabilities. Different functional requirements in user requests correspond to different tasks. For example, "inventory query" calls the database query capability, and "payment" calls the encrypted computing + payment interface capability. Each function can be broken down into an independent task.
[0058] Specifically, in step S2, at least one user task is generated based on the user request, and task information for the user task is determined; wherein, the task information includes:
[0059] 1) Task identification information; this is the task ID, used to distinguish different tasks, and can be configured by the system.
[0060] 2) Task attribute information; the task attribute information includes at least one of the following: task size, task arrival time, and task memory requirements.
[0061] For example, the task size refers to the amount of data or computational load of the user task itself, which can be directly defined by the business content requested by the user. For instance, if a user uploads 1GB of data for processing, the task size is 1GB. The task arrival time is the point in time when the user task enters the cloud service system and awaits scheduling, such as the moment the user clicks the "Place Order" button, or the timestamp when the system receives the API (Application Programming Interface) call. The task memory requirement refers to the amount of memory resources required to process the user task, which can be determined by looking up a preset template based on the task type.
[0062] 3) Task processing feature information; the task processing feature information includes at least one of task cost, task scheduling efficiency and task weight.
[0063] For example, the task cost can be calculated based on the user task's data rate requirements and the processing time required by the user task, and the calculation process satisfies the following formula:
[0064] F tc =d τ *δ t (1);
[0065] Among them, F tc For task cost; d τ The data rate requirement for a user task can be determined based on the amount of data to be transmitted / processed and the time requirements of the task. For example, a video processing task requires the transmission of 20MB of data per second to ensure smooth decoding, so the data rate requirement is 20MB / s; δ t The processing time required for a user task can be determined by the task complexity and server performance. The system will estimate based on historical data. For example, a similar image compression task takes an average of 5 seconds on a certain configuration server, and new tasks will refer to this value.
[0066] For example, task scheduling efficiency can be calculated based on the turnaround time and latency required to process user tasks, and the calculation process satisfies the following formula:
[0067]
[0068] Among them, F tsp To improve task scheduling efficiency; The turnaround time required to process user tasks is determined by the characteristics of the task type. It represents the time consumed by the task switching and waiting operation, reflecting the time cost incurred by the task in scheduling due to switching or waiting; λ is the delayed processing time of the user task, representing the maximum tolerable delay time of the task, which can be preset by the system.
[0069] For example, task weights can be calculated based on the user task's scheduling efficiency and task cost, and the calculation process satisfies the following formula:
[0070] F tw =γ(F tc +F tsp (3);
[0071] Among them, F tw γ represents the task weight; γ is the preset weight factor, which can be preset according to the task type of this user task.
[0072] In this embodiment of the invention, task information is categorized into task identification information, task attribute information, and task processing characteristic information. This allows for precise task characterization. Task attribute information focuses on the inherent "physical" characteristics of the task (size, arrival time, memory requirements), enabling the system to quickly match hardware resources, such as allocating high-memory servers to tasks with large memory requirements. Task processing characteristic information (cost, scheduling efficiency, weight) reflects the scheduling priority and resource consumption cost of the task, guiding the system to prioritize high-weight, low-cost, and efficient tasks when resources are scarce. This achieves precise on-demand resource allocation and avoids resource mismatch caused by ambiguous task characteristics in traditional scheduling. Furthermore, the categorized task information structure is clear, providing a foundation for subsequent allocation of cloud service resources.
[0073] Specifically, in step S3, when there are at least two cloud service providers, the target provider is determined based on the trust assessment parameters of each cloud service provider. The trust assessment parameters include the following information:
[0074] 1) Historical trust scores for each cloud service provider;
[0075] For example, the historical trust score is calculated based on the mean value of historical data. Since cloud service providers can provide a variety of services, different historical trust scores can be given for different services.
[0076] 2) The reputation reference value and quantity of all cloud servers corresponding to each cloud service provider;
[0077] For example, the reputation reference value of a cloud server is obtained by comprehensively evaluating all cloud servers under the cloud service provider. The system records the historical task execution data of each cloud server and calculates the reputation based on this data, such as the completion rate (number of successfully processed tasks / total number of assigned tasks). The higher the completion rate, the better the reputation.
[0078] In this embodiment of the invention, historical trust scores reflect the long-term service performance of the provider, reputation reference values reflect the reliability of the server, and quantity clearly defines the scale of resources. The combination of these three factors allows the system to prioritize high-trust, high-reputation providers when allocating resources, and to reasonably distribute tasks based on the number of servers, avoiding resource overcrowding or idleness, and achieving precise matching of "demand and resources".
[0079] Specifically, when allocating resources for each user task, a cloud service provider must first be selected. After determining the cloud service provider, the cloud server and the virtual machine processing the user task are then selected. To ensure the security and trustworthiness of the cloud service, a reputation score for each cloud service provider can be calculated before selecting the target cloud service provider. See [link to relevant documentation]. Figure 2 , Figure 2 This is a flowchart of the screening of target providers provided in an embodiment of the present invention, wherein step S3 specifically includes:
[0080] S31. Determine the initial trust score for each cloud service provider based on the trust assessment parameters.
[0081] S32. For each cloud service provider, determine the final trust score for each cloud service provider based on the initial trust score and the reputation reference value;
[0082] S33. The cloud service provider corresponding to the maximum value in the final trust score is the target provider.
[0083] For example, in step S31, the calculation process of the initial trust score satisfies the following formula:
[0084]
[0085] Among them, T(U i R is the initial trust score of the cloud service provider calculated at the time of sending this user request; L (S i ) represents the reputation reference value for cloud servers; N p The total number of cloud servers provided to cloud service providers; T i (U i ) represents the historical trust score of the cloud service provider for a specific service, which must be the same as the service requested by the user, such as transaction service, storage service, data analysis service, etc.; α is the preset reputation threshold of the cloud server, for example, it can be 0.2 in this invention; β is the normalization parameter of the reputation reference value of the cloud server, for example, it can be 100 in this invention.
[0086] For example, in step S32, the final trust score for each cloud service provider is determined based on the initial trust score and the reputation reference value. At this point, there are three possibilities:
[0087] Case 1, satisfying: initial trust score T(U) i > The credit threshold of the cloud service provider, or the credit reference value T of the cloud server. i (U i If the cloud service provider's final trust score is less than the cloud server's preset reputation threshold α, then the cloud service provider's final trust score satisfies the following formula:
[0088]
[0089] Among them, R P (S i R is the final trust score for cloud service providers; L(S i ) * This represents the optimal solution, which is the maximum value of the reputation reference value in historical data.
[0090] Scenario 2, satisfying: the cloud server's reputation reference value T i (U i If the cloud service provider's final trust score is greater than or equal to the cloud server's preset reputation threshold α, then the cloud service provider's final trust score satisfies the following formula:
[0091]
[0092] in, This represents the optimal solution, calculated from historical data. The maximum value.
[0093] Case 3, satisfying: initial trust score T(U) i If the trust score of the cloud service provider is less than or equal to the reputation threshold of the cloud service provider, then the final trust score of the cloud service provider satisfies the following formula:
[0094] R P (S i ) = R L (S i (7);
[0095] For example, in step S33, after calculating the final trust score of each cloud service provider, the cloud service provider corresponding to the maximum value in the final trust score is selected as the target provider. If there are two identical scores, the cloud service provider with more cloud servers can be selected as the target provider.
[0096] In this embodiment of the invention, an initial trust score is calculated first, and then a final score is calculated by combining it with a reputation reference value. This upgrades from a single dimension to a hierarchical and refined approach, considering both the overall performance of the provider and the individual reputation of the server. This makes the score more closely reflect the actual service capabilities and avoids selecting the wrong provider due to incomplete information. In addition, the target provider is determined by the maximum value of the final trust score, quickly identifying the best option, reducing decision-making costs, and adapting to the efficient screening needs of multiple provider competition in cloud service scenarios.
[0097] Specifically, in step S4, the basic parameters of all candidate cloud servers corresponding to the target provider are obtained; wherein, the basic parameters include electrical parameters.
[0098] For example, the electrical parameters include the static power consumption, active power consumption, dynamic power consumption, effective load capacitance, CPU (Central Processing Unit) voltage and clock frequency of all candidate cloud servers under the target provider, and also include the power configuration parameters of the target provider for all candidate cloud servers. The meaning of each electrical parameter is as follows:
[0099] 1) Static power consumption refers to the power consumed by a cloud server to maintain basic operation under low load or idle state. For example, when the server is in standby state, the power consumption generated by components such as memory and motherboard to maintain basic power supply is relatively stable and does not fluctuate drastically with large changes in server workload.
[0100] 2) Active power consumption is the power consumed by a cloud server when it is processing tasks, performing computing operations, or in other active states.
[0101] 3) Dynamic power consumption is mainly related to the state switching of digital circuits in cloud servers. In the circuit, transistors constantly change between being on and off. Each state switch consumes a certain amount of energy, thus generating dynamic power consumption.
[0102] 4) Effective load capacitance represents the equivalent capacitance on the digital circuit nodes in the cloud server. It is used to measure the ability of the circuit node to store charge. The larger the capacitance value, the more charge is stored and released during state switching, and the more energy is consumed, which in turn affects dynamic power consumption.
[0103] 5) CPU voltage is the operating voltage supplied to the CPU. Increasing the CPU voltage can make the CPU run more stably and faster, but it will also increase power consumption; decreasing the CPU voltage may limit CPU performance, but it can reduce power consumption.
[0104] 6) Clock frequency, also known as clock speed, is the number of pulse signals emitted by the CPU per unit time. It is used to measure the CPU's processing speed. The higher the clock frequency, the more instructions the CPU executes per unit time, and the faster the processing speed. However, the dynamic power consumption will also increase accordingly.
[0105] 7) Power configuration parameters refer to the power-related settings and plans of the target provider for these candidate cloud servers. For example, the power allocation for each cloud server can be calculated in real time based on the server performance.
[0106] It should be noted that cloud service providers typically provide detailed server hardware specifications, which clearly list the server's power consumption parameters under different states, as well as hardware parameters such as effective load capacitance, CPU voltage, and clock frequency. Alternatively, through server management software or tools provided by cloud service providers, such as server monitoring platforms and management consoles, the server's operating status can be monitored in real time, and current power consumption data, as well as parameters such as CPU voltage and clock frequency, can be obtained.
[0107] In this embodiment of the invention, electrical parameters are the core basis for calculating total power consumption, enabling precise optimization of server power consumption and avoiding resource waste or overload. Furthermore, different tasks have different electrical performance requirements; based on these parameters, the most suitable server can be matched to ensure efficient task operation.
[0108] Specifically, see Figure 3 , Figure 3 This is a flowchart for screening target cloud servers provided in an embodiment of the present invention. While ensuring the security and trustworthiness of cloud services, it is also necessary to consider the performance parameters of the cloud servers. Therefore, after determining the target cloud service provider, it is also necessary to further determine the energy consumption parameters (including total power consumption parameters and energy consumption parameters) and attribute parameters (including time latency overhead information, operating cost information, and service quality information) of each cloud server under the target cloud service provider. In this case, step S5 specifically includes:
[0109] S51. Based on the task information and the basic parameters, determine the energy consumption parameters and attribute parameters of each candidate cloud server;
[0110] S52. Calculate the matching degree value between each candidate cloud server and the user task based on the task information, the energy consumption parameters, and the attribute parameters.
[0111] S53. When all matching degree values are different, the candidate cloud server corresponding to the maximum value among the matching degree values shall be the target cloud server.
[0112] For example, in step S51, the energy consumption parameters include the total power consumption parameter and energy consumption parameter of the candidate cloud server. The attribute parameters include the time latency overhead information, operating cost information, and service quality information of the candidate cloud server.
[0113] Based on the aforementioned basic parameters, the total power consumption parameter of each candidate cloud server is determined. The calculation process for the total power consumption parameter satisfies the following formula:
[0114] P tot =P sta +ε(P act +P doc (8);
[0115] Among them, P tot P represents the total power consumption parameter of the current candidate cloud servers. sta P represents the static power consumption of the current candidate cloud server. act P represents the active power consumption of the current candidate cloud server. doc This represents the dynamic power consumption of the current candidate cloud servers. V τ The effective load capacity of the current candidate cloud server; f is the CPU voltage of the current candidate cloud server; a ε is the clock frequency of the current candidate cloud server; ε is the preset weight value corresponding to the current candidate cloud server, which can be determined based on processing performance.
[0116] Based on the basic parameters, the task information, and the total power consumption parameters, the energy consumption parameters for each candidate cloud server for each user task are determined. The calculation process for the energy consumption parameters satisfies the following formula:
[0117]
[0118] Among them, E j P(S) represents the energy consumption parameter of the current candidate cloud server. j,f D represents the power configuration parameters of the target provider for the current candidate cloud servers; s To set the clock frequency on the current candidate cloud server The difficulty of processing each user task can be determined based on task attribute information (such as task size, task arrival time, and task memory requirements) and task processing characteristic information (such as task cost, task scheduling efficiency, and task weight). s The calculation process satisfies the following formula;
[0119]
[0120] Among them, F tc For task cost; F tsp For task scheduling efficiency; F tw For task weights; F i For task size; F arrive For the user task's arrival time; F now Current time; F arrive -F now The time interval between the arrival time of the user task and the current time; F tm This refers to the memory requirements of the task.
[0121] It should be noted that even if there are multiple user tasks, a D must be calculated for each user task. s In other words, assuming that after the user request is divided into 5 user tasks, then 5 D's can be calculated. s If the target provider has 10 candidate cloud servers for allocation at this time, and each user task independently selects the target cloud server, then the energy consumption parameters and the latency overhead information and operating cost information calculated below need to be calculated 5*10=50 times. The total power consumption parameters and service quality information are 10 values corresponding to the number of candidate cloud servers because the task information is not included in the calculation.
[0122] Considering that in practical applications, the same user task may be assigned to one cloud server for processing, or the same user task may be assigned to multiple cloud servers for processing, this embodiment of the invention, when determining the time delay overhead information of each candidate cloud server under the target provider, can first determine whether the same user task should be assigned to one candidate cloud server for processing or to multiple candidate cloud servers for processing. At this time, the following two situations exist:
[0123] Scenario 1: If it is expected that the same user task will be assigned to a cloud server for processing, the time delay overhead information for each candidate cloud server for each user task can be calculated as follows:
[0124]
[0125] Among them, T comp Information on time latency overhead for candidate cloud servers; F i The task size for the user task; D s The task difficulty of the user task itself; P(m j ,v k ) is the candidate cloud server m j For its k-th virtual machine v k The power distribution, k = 1, 2...V.
[0126] Scenario 2: If it is expected that the same user task will be assigned to multiple cloud servers for processing, the time delay overhead information for each candidate cloud server for each user task can be calculated as follows:
[0127]
[0128] Wherein, T(m) s ,m d This indicates that the same user task is assigned to two candidate cloud servers m. s ,m d During processing, candidate cloud server m s ,m d Their respective time delay overhead information, B(m) s ,m d B(m) represents the preset user task allocation function for the candidate cloud server. s ,m d ) = minload(m s ,m d ) indicates selecting cloud server m s ,m d Among them, the candidate cloud servers with lower load.
[0129] Based on the time latency overhead information of each candidate cloud server, as well as the startup time, idle time, and shutdown time of the virtual machines deployed on each cloud server, the operating cost information for each candidate cloud server for each user task is calculated according to the following calculation method:
[0130] ω(m i ) = T comp -η (13);
[0131] Where, ω(m) i ) represents the current candidate cloud server m i Operational cost information for each user task; T comp Indicates candidate cloud server m i Information regarding the time delay cost of the current user task; η represents the candidate cloud server m. i The virtual machine's time state information, η = T st +T id +T sh ,T st Indicates candidate cloud server m i Average startup time of all virtual machines in the system; T id Indicates candidate cloud server m i The average idle time of all virtual machines in the system; T sh Indicates candidate cloud server m i The average shutdown time of all virtual machines in the system.
[0132] The service quality information for each candidate cloud server is calculated according to the following process:
[0133]
[0134] Where q represents the service quality information of the current candidate cloud server; t r t represents the total runtime of the current candidate cloud server; s This represents the total downtime of the current candidate cloud server due to anomalies or updates; p t This represents the proportion of the total tasks currently assigned to the current candidate cloud server.
[0135] For example, in step S52, based on the task information, the energy consumption parameters, and the attribute parameters, the matching degree value between each candidate cloud server and the user task is calculated. If there are multiple user tasks, for each user task, it is necessary to filter out the energy consumption parameters, latency overhead information, and operating cost information of the corresponding candidate cloud servers, and then calculate the matching degree value. The formula for calculating the matching degree value is as follows:
[0136]
[0137] Where α(d) is the matching degree value of the current candidate cloud server for any user task (assuming it is user task D1); α0 is the availability factor of the current candidate cloud server; ξ is the overall performance score of the current candidate cloud server for the current user task D1, and the calculation process of ξ is based on the total power consumption parameter P obtained by formula (8) above. tot The energy consumption parameter E for the current user task D1 is calculated using formula (9). j The time delay overhead information T for the current user task D1 is calculated by formula (11). comp The operating cost information ω(m) for the current user task D1 is calculated using formula (13). i The service quality information q obtained by formula (14) is provided in the following calculation example in this embodiment of the invention:
[0138] ξ=φ1*P tot +φ2*E j +φ3*T comp +φ4*ω(m i )+φ5*q (16);
[0139] Wherein, φ1 is the power consumption weight; φ2 is the energy consumption weight; φ3 is the time delay weight; φ4 is the operating cost weight; and φ5 is the service quality weight. It should be noted that these weight values can be preset by the user, and this invention does not impose specific limitations on them, but they must satisfy: φ1+φ2+φ3+φ4+φ5=1.
[0140] For example, in step S53, when all matching degree values are different, the candidate cloud server corresponding to the maximum value among the matching degree values is taken as the target cloud server. Each user task can calculate its matching degree value with all candidate cloud servers using formula (15). Assume there are 5 user tasks [D1,D2,D3,D4,D5] and 10 candidate cloud servers [S1,S2,S3,S4,S5,S6,S7,S8,S9,S1]. 10 Taking user task D1 as an example, its relationship with candidate cloud servers S1 to S2 can be calculated. 10 The degree of matching, assuming S 10 If the matching degree value is the highest, then S 10 The target cloud server for user task D1 is S. 10 Assign task D1 to user.
[0141] It should be noted that since multiple user tasks are competing for 10 candidate cloud servers, there may be situations where two or more user tasks win the same candidate cloud server. In this case, according to the task weight of the user task, the user task with the higher task weight will be assigned first. The remaining user tasks will continue to select the second matching server from the remaining 9 candidate cloud servers until all selections are completed.
[0142] In this embodiment of the invention, energy consumption and attribute parameters are first determined by combining task information and basic server parameters, making the matching basis more comprehensive and avoiding resource mismatch caused by single-dimensional evaluation. Then, the suitability between the server and the task is quantified by the matching degree value, transforming the complex suitability judgment into a comparable value and improving the objectivity of decision-making. Finally, the target cloud server is locked with the maximum value, and the optimal choice is quickly determined when the matching value is unique, shortening the scheduling time. The overall logic takes into account the balance between task requirements and server performance and energy consumption, and improves the screening efficiency through quantitative comparison, ensuring that the task runs efficiently under the support of optimal resources and reducing energy waste and scheduling risks.
[0143] Furthermore, when multiple cloud servers under the target provider have the same matching degree value, this embodiment of the invention provides an implementation method in which any candidate cloud server can be arbitrarily selected as the target cloud server. However, considering that the arbitrariness of cloud server selection in this process may affect the optimal result of resource allocation, this invention also provides a second implementation method, which selects the target cloud server that best matches the user's task from these cloud servers.
[0144] See Figure 4 , Figure 4 This is another flowchart of the screening of target cloud servers provided in an embodiment of the present invention. Step S5 further includes:
[0145] S54. When there are at least two identical matching degree values, obtain the reference number of reference cloud servers with identical matching degree values;
[0146] S55. Calculate the target fit based on the same matching degree value and the reference quantity;
[0147] S56. Based on the target adaptability and the processing capability of each reference cloud server, select the target cloud server from the reference cloud servers.
[0148] For example, in step S54, when multiple candidate cloud servers under the target provider have the same degree of compatibility with the same user task, the reference number of reference cloud servers with the same degree of matching is obtained. Assuming that user task D1 has the same degree of compatibility with 3 candidate cloud servers, the three candidate cloud servers are reference cloud servers, and the number of reference cloud servers is 3.
[0149] For example, in step S55, the target fit of each reference cloud server is calculated based on the same matching degree value and the number of references, satisfying the following formula:
[0150]
[0151] Where, f(C) p ) represents the target adaptability of any reference cloud server; C p For fit parameters, n represents the number of reference cloud servers with the same matching degree value, used in... The dynamic factor is evenly distributed across all reference cloud servers to create subtle differences; t is the time threshold, which can be preset and is used in the formula. The fit parameter C reflects the fit. p The correlation with task time constraints is that the tighter the time (smaller t), the better the target fit f(C). p The more C p Influence; Using the tangent function, Mapped to The interval allows the target fit f(C) to be determined. p The formula essentially uses subtle time-related differences to break the tie of identical matching scores, allowing reference cloud servers with identical matching scores to generate a new priority ranking.
[0152] For example, in step S56, a target cloud server is selected from the reference cloud servers based on the target adaptability and the processing capability of each reference cloud server. This process satisfies the following formula:
[0153]
[0154] Among them, s i This refers to the allocation result of the reference cloud server, which can be understood as a quantitative value indicating whether it has been selected. It is used to quantify the likelihood of the server undertaking the task. Initially, there is a base value, which is subsequently updated through a formula; s j This indicates the allocation result of another reference cloud server, which is related to s. i The comparison highlights the differences between servers. j -s i ) indicates the reference cloud server s j Compared to s i The distance; L(s, θ) represents the service offset, used to preserve the difference, L(s, θ) = s -(1+θ) θ is the offset configured by the system, s is the task acceptance qualification score preset by the dynamic system, which can be determined according to the processing capacity of each reference server; φ is the weighting coefficient of the service offset.
[0155] It should be noted that formula (18) represents updating the allocation result. During the update process, the result is first updated using the fit difference, and then updated using the service offset difference. After these two updates, the final target cloud server is obtained. Based on the target fit f(C) p ), and select servers with good compatibility, while combining For servers with small differences and high adaptability, the allocation result s i Prioritize tasks that yield larger increments. Secondly, update service offset differences using φL(s, θ), proactively creating allocation differences through the service offset function L(s, θ). During the first update, substitute the target fit degree f(C) of each reference cloud server. p Distance, difference parameters Wait, calculate Updates i Initial screening identified reference cloud servers with high adaptability and better suitability for the task. Second update (service offset driven): Substituting service offset parameters φ, s, θ, etc., φL(s, θ) is calculated, and s is updated again. i Adjust the allocation results. Finally, determine the target cloud server and compare the updated s values of all servers. i Select s i The largest reference cloud server serves as the target cloud server, ultimately responsible for handling user tasks.
[0156] In this embodiment of the invention, by obtaining a reference quantity, calculating the target fit, and combining processing capability for screening, the problem of decision-making with the same matching degree is solved, making the screening more refined; at the same time, based on processing capability, the efficient execution of tasks is guaranteed, resource mismatch is avoided, scheduling accuracy and cloud service quality are improved, adapting to multi-server competition scenarios, and enhancing system stability and task processing efficiency.
[0157] See Figure 5 , Figure 5 This is a structural block diagram of a cloud service resource allocation device 100 provided in an embodiment of the present invention. The cloud service resource allocation device 100 includes:
[0158] User request receiving module 11 is used to receive user requests sent by terminal devices;
[0159] User task generation module 12 is used to generate at least one user task according to the user request.
[0160] Task information determination module 13 is used to determine the task information of the user task;
[0161] The target provider determination module 14 is used to determine the target provider based on the trust assessment parameters of each cloud service provider when there are at least two cloud service providers.
[0162] The basic parameter acquisition module 15 is used to acquire the basic parameters of all candidate cloud servers corresponding to the target provider;
[0163] The target cloud server filtering module 16 is used to filter the corresponding target cloud server from the candidate cloud servers for each user task based on the task information and the basic parameters.
[0164] The cloud server allocation module 17 is used to allocate the target cloud server to the corresponding user task.
[0165] It is worth noting that the working process of each module in the cloud service resource allocation device 100 described in the embodiments of the present invention can refer to the working process of the cloud service resource allocation method described in the above embodiments, and will not be repeated here.
[0166] See Figure 6 , Figure 6 This is a structural block diagram of a cloud service resource allocation device 200 provided in an embodiment of the present invention. The cloud service resource allocation device 200 includes a processor 21, a memory 22, and a computer program stored in the memory 22 and executable on the processor 21. When the processor 21 executes the computer program, it implements the steps in the above-described embodiments of the various cloud service resource allocation methods, such as steps S1 to S6.
[0167] For example, the computer program may be divided into one or more modules / units, which are stored in the memory 22 and executed by the processor 21 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the cloud service resource allocation device 200.
[0168] The cloud service resource allocation device 200 may include, but is not limited to, a processor 21 and a memory 22. Those skilled in the art will understand that the schematic diagram is merely an example of the cloud service resource allocation device 200 and does not constitute a limitation on the cloud service resource allocation device 200. It may include more or fewer components than illustrated, or combine certain components, or different components. For example, the cloud service resource allocation device 200 may also include input / output devices, network access devices, buses, etc.
[0169] The processor 21 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor 21 is the control center of the cloud service resource allocation device 200, connecting all parts of the cloud service resource allocation device 200 via various interfaces and lines.
[0170] The memory 22 can be used to store the computer programs and / or modules. The processor 21 implements various functions of the cloud service resource allocation device 200 by running or executing the computer programs and / or modules stored in the memory 22 and calling the data stored in the memory 22. The memory 22 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 22 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0171] If the modules / units integrated in the cloud service resource allocation device 200 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by the processor 21, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0172] Furthermore, the present invention also provides a computer program product, including a computer program / instruction that, when executed by a processor, implements the cloud service resource allocation method as described in any of the above embodiments.
[0173] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A cloud service resource allocation method, characterized in that, include: Receive user requests sent by terminal devices; At least one user task is generated based on the user request, and the task information of the user task is determined; When there are at least two cloud service providers, the target provider is determined based on the trust assessment parameters of each cloud service provider. Obtain the basic parameters of all candidate cloud servers corresponding to the target provider; For each user task, a corresponding target cloud server is selected from the candidate cloud servers based on the task information and the basic parameters. Assign the target cloud server to the corresponding user task.
2. The cloud service resource allocation method as described in claim 1, characterized in that, The trust assessment parameters include the following information: Historical trust scores for each cloud service provider; The reputation reference value and quantity of all cloud servers corresponding to each cloud service provider.
3. The cloud service resource allocation method as described in claim 2, characterized in that, The process of determining the target provider based on the trust assessment parameters of each cloud service provider includes: An initial trust score for each cloud service provider is determined based on the aforementioned trust assessment parameters; For each cloud service provider, a final trust score is determined based on the initial trust score and the reputation reference value. The cloud service provider corresponding to the maximum value in the final trust score is selected as the target provider.
4. The cloud service resource allocation method as described in claim 1, characterized in that, The task information includes task identification information, task attribute information, and task processing feature information; wherein, the task attribute information includes at least one of task size, task arrival time, and task memory requirements; and the task processing feature information includes at least one of task cost, task scheduling efficiency, and task weight.
5. The cloud service resource allocation method as described in claim 1, characterized in that, The basic parameters include electrical parameters.
6. The cloud service resource allocation method as described in claim 1, characterized in that, The step of selecting a target cloud server from the candidate cloud servers based on the task information and the basic parameters includes: Based on the task information and the basic parameters, determine the energy consumption parameters and attribute parameters of each candidate cloud server; Based on the task information, the energy consumption parameters, and the attribute parameters, calculate the matching degree value between each candidate cloud server and the user task; When all matching degree values are different, the candidate cloud server corresponding to the maximum value among the matching degree values is selected as the target cloud server.
7. The cloud service resource allocation method as described in claim 6, characterized in that, The method further includes: When at least two identical matching degree values exist, obtain the reference number of reference cloud servers with the same matching degree value; Calculate the target fit based on the same matching degree value and the reference quantity; Based on the target adaptability and the processing capacity of each reference cloud server, the target cloud server is selected from the reference cloud servers.
8. A cloud service resource allocation device, characterized in that, include: The user request receiving module is used to receive user requests sent by terminal devices. The user task generation module is used to generate at least one user task based on the user request. The task information determination module is used to determine the task information of the user task; The target provider determination module is used to determine the target provider based on the trust assessment parameters of each cloud service provider when there are at least two cloud service providers. The basic parameter acquisition module is used to acquire the basic parameters of all candidate cloud servers corresponding to the target provider. The target cloud server filtering module is used to filter the corresponding target cloud server from the candidate cloud servers for each user task based on the task information and the basic parameters. The cloud server allocation module is used to allocate the target cloud server to the corresponding user task.
9. A cloud service resource allocation device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the cloud service resource allocation method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the cloud service resource allocation method as described in any one of claims 1 to 7.
11. A computer program product, characterized in that, Includes a computer program / instruction that, when executed by a processor, implements the cloud service resource allocation method as described in any one of claims 1 to 7.