Resource scheduling method, device and equipment, computer program product and storage medium
By obtaining the resource type and delay standard of the service request, screening is performed according to the service delay and resource dependency between the service request and the resource pool, and resource scheduling is optimized. This solves the problem of inaccurate resource scheduling in the existing technology and improves the system response speed and service quality.
Patent Information
- Application Number
- CN202410305039.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-18
- Publication Date
- 2025-09-19
AI Technical Summary
Existing resource scheduling methods lack a clear scheduling basis, resulting in suboptimal resource scheduling results and affecting the overall service quality. Especially in the case of multiple resource pools, the scheduling results are inaccurate, resulting in slow system response.
By obtaining the resource type and latency standard of the service request, screening is performed based on the service latency and resource dependency between the service request and the resource pool, and the resource pool with the highest latency score is obtained as the target resource pool. The latency standard and resource dependency are used as the scheduling basis to optimize resource scheduling.
It improves system response speed, enhances overall service quality, ensures stable performance of key resources, and reduces resource management complexity and data transmission costs.
Smart Images

Figure CN120670126A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer cloud computing, and in particular to a resource scheduling method, apparatus, device, computer program product, and storage medium. Background Art
[0002] With the development of cloud computing, distributed cloud technology is becoming increasingly mature. Distributed cloud technology can provide a rich set of service nodes and ample resources, while also providing services to users and avoiding resource bottlenecks. Furthermore, distributed cloud pools, being closer to user terminals, offer lower network latency. Consequently, distributed cloud technology is gradually gaining a dominant position. However, in real-world applications, backend services are often built from numerous microservices, creating resource dependencies between them. If a dependent resource experiences significant response latency, the entire system will experience slower response times, impacting overall service quality. Existing solutions rely on the experience of operations and maintenance personnel and manual exploration to determine resource pools.
[0003] However, the existing solutions do not have a clear scheduling basis, resulting in scheduling results that are often not optimal, making the entire system respond slowly and affecting the overall service quality.
[0004] Therefore, there is an urgent need for a method to optimize resource scheduling. Summary of the Invention
[0005] The present application provides a resource scheduling method, apparatus, device, computer program product, and storage medium to solve the technical problem of poor resource scheduling results.
[0006] In a first aspect, the present application provides a resource scheduling method, comprising:
[0007] Acquiring service requirement information, the service requirement information including a type of resource required to complete at least one service request and a latency standard for each service request for the resource of that type;
[0008] According to the resource type required by each service request, obtaining the service latency between the service request and the resource corresponding to the resource type in at least one resource pool;
[0009] At least one resource pool is screened based on the degree of deviation between the service delay corresponding to each service request and the delay standard and the resource dependence degree corresponding to each service request to obtain a target resource pool, wherein the target resource pool is a single resource pool, or a combination of at least one resource pool, and the resource dependence degree is negatively correlated with the delay length corresponding to the delay standard.
[0010] In one possible design, screening at least one resource pool to obtain a target resource pool based on the degree of deviation between the service delay corresponding to each service request and the delay standard and the resource dependency corresponding to each service request includes:
[0011] For each resource type required by the service request, obtaining a delay fluctuation range for the resource type according to the resource dependency and the delay standard, wherein a fluctuation value of the delay fluctuation range relative to the delay standard is negatively correlated with the resource dependency;
[0012] When the service delay is within the delay fluctuation range, obtaining a delay score for the resource of this type according to a degree of deviation between the service delay and the delay standard, wherein the delay score is negatively correlated with the degree of deviation;
[0013] At least one resource pool is screened according to a latency score of a type of resource required by each service request to obtain a target resource pool.
[0014] In one possible design, screening at least one resource pool according to the latency score of the type of resource required by each service request to obtain a target resource pool includes:
[0015] According to the resource type required by each service request, determining whether there is a first candidate resource pool that meets the resource type required by the at least one service request;
[0016] If so, for each first candidate resource pool, obtain the total latency score of each candidate resource pool according to the latency score and corresponding latency weight of the resource type required for each service request; wherein the latency weight is positively correlated with the resource dependency level;
[0017] According to the total latency score of each first candidate resource pool, the first candidate resource pool with the highest total latency score is used as the target resource pool.
[0018] In one possible design, if there is no first candidate resource pool that satisfies the resource type required by the at least one service request, screening at least one resource pool according to the latency score of each service request for the required resource type to obtain a target resource pool further includes:
[0019] Screening the resource pool according to the resource type required by the service request to obtain at least one second candidate resource pool; wherein the second candidate resource pool includes at least one type of resource but does not include all types of resources;
[0020] According to the resource dependency level corresponding to each service request, in descending order of resource dependency, the target resource with the highest latency score is obtained from multiple second candidate resource pools at each resource dependency level;
[0021] The target resource pool is obtained according to the second candidate resource pool where the target resource with the highest delay score is located.
[0022] In one possible design, after selecting at least one resource pool based on the degree of deviation between the service delay corresponding to each service request and the delay standard and the resource dependency corresponding to each service request to obtain the target resource pool, the method further includes:
[0023] detecting the time delay between the service request and the target resource pool according to a preset period;
[0024] When the service delays of a preset number of resources exceed their corresponding delay fluctuation ranges, the target resource pool is reacquired.
[0025] In one possible design, the service requirement information further includes location information, and obtaining, based on the resource type required for each service request, a service latency between the service request and a resource corresponding to the resource type in at least one resource pool includes:
[0026] Obtain the service area based on the client's location information;
[0027] Obtaining a delay database corresponding to the service area, wherein the delay database stores periodically obtained delays between the service area and each type of resource in at least one resource pool;
[0028] According to the delay database and the resource type required by each service request, a service delay between the service request and a resource corresponding to the resource type in at least one resource pool is obtained.
[0029] In a second aspect, the present application provides a resource scheduling device, comprising:
[0030] A parsing module, configured to obtain service requirement information, wherein the service requirement information includes a type of resource required to complete at least one service request and a latency standard for each service request for the resource of that type;
[0031] an acquisition module, configured to acquire, based on the resource type required by each service request, a service delay between the service request and a resource corresponding to the resource type in at least one resource pool;
[0032] A screening module is configured to screen at least one resource pool based on the degree of deviation between the service delay corresponding to each service request and the delay standard and the resource dependency corresponding to each service request to obtain a target resource pool, wherein the target resource pool is a single resource pool or a combination of at least one resource pool, and the resource dependency is negatively correlated with the delay length corresponding to the delay standard.
[0033] In a third aspect, the present application provides a resource scheduling device, comprising: a processor, and a memory communicatively connected to the processor;
[0034] The memory stores computer-executable instructions;
[0035] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the resource scheduling method as described in the first aspect and various possible designs of the first aspect.
[0036] In a fourth aspect, the present application provides a computer program product comprising instructions for implementing the resource scheduling method described in the first aspect and various possible designs of the first aspect.
[0037] In a fifth aspect, the present application provides a computer-readable storage medium, which stores computer-executable instructions. When a processor executes the computer-executable instructions, it implements the resource scheduling method described in the first aspect and various possible designs of the first aspect.
[0038] The resource scheduling method, apparatus, device, computer program product, and storage medium provided by the present application can obtain the resource type required to complete the service request and the delay standard of the service request for the resource type by obtaining service demand information, and then obtain the service delay of the resource corresponding to the resource type in the resource pool according to the resource type required by the service request, and screen the resources in multiple resource pools according to the degree of deviation between the service delay of the resource required to complete the service request and the delay standard of the resource type corresponding to the service request and the resource dependence of the service request on the required resources, thereby obtaining a target resource pool with good performance. In addition, the resource dependence of the service request is negatively correlated with the delay length corresponding to the delay standard, so that when scheduling resources, the delay standards of different resource types can be used as the scheduling basis, and then a scheduling scheme that meets the delay standard of the resource type required by the service request can be obtained, thereby improving the system response speed and improving the overall service quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0040] Figure 1 This is a system architecture diagram of an embodiment of the present application;
[0041] Figure 2 Resource scheduling method process provided in this application embodiment Figure 1 ;
[0042] Figure 3 Resource scheduling method process provided in this application embodiment Figure 2 ;
[0043] Figure 4 Resource scheduling method process provided in this application embodiment Figure 3 ;
[0044] Figure 5 Schematic diagram of the structure of the resource scheduling device provided in the embodiment of the present application Figure 1 ;
[0045] Figure 6 A hardware diagram of the resource scheduling device provided in an embodiment of the present application.
[0046] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0047] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0048] In the prior art, when providing services to users through distributed cloud technology, backend services are often built from multiple microservices, meaning that fulfilling service requests requires invoking multiple resource pools. These microservices have resource dependencies. If the response latency of a dependent resource is significant, the overall system response will be slow, thereby impacting the overall service quality. However, current resource scheduling methods lack a clear scheduling basis and are based solely on the experience and manual detection of operations personnel. As a result, the scheduling solutions obtained by operations personnel are often suboptimal and experience lags. In particular, when a service request requires invoking multiple resource pools, schedulers cannot simultaneously retrieve multiple optimal resource pools that meet the service requirements. During the process of obtaining the optimal resource pool, the latency between the confirmed optimal resource pool and the optimal resource pool to be confirmed may vary, leading to inaccurate scheduling results, slowing the overall system response, and impacting the overall service quality.
[0049] In order to optimize the resource scheduling method of service requests, the present invention designs a resource scheduling method, which can obtain the resource type required to complete the service request and the delay standard of the service request for the type of resource according to the service demand information of the service request when receiving a service request. Then, the service delay between the service request and multiple resources is obtained in multiple resource pools with resources of this type, and the degree of deviation is obtained according to the service delay and delay standard between the service request and multiple resources. Then, the delay scores of multiple resources are obtained through the degree of deviation and the resource dependence degree of the service request on the required resource type, and the resource pool corresponding to the resource with the highest delay score is used as the target resource pool. The resource scheduling method of the present invention can quantitatively evaluate the resource pool where the resources that can complete the service request are located based on the service delay, delay standard, and resource dependence degree between the service request and each resource, and use the resource pool where the resource with the smallest deviation between the service delay and the delay standard is located as the target resource pool, thereby improving the response speed of the entire system and improving the overall service quality.
[0050] Figure 1 This is the system architecture diagram of the embodiment of the present application, combined with Figure 1 This paper introduces the system architecture of this application. Figure 1As shown, the system of the present application includes a resource scheduling system 101. The resource scheduling system 101 of the present application includes a parsing module, an acquisition module and a screening module. Among them, the parsing module can pre-acquire service demand information, that is, the resource type required to complete the service request and the delay standard of each service request for this type of resource and the resource dependence degree corresponding to each service request. When performing resource scheduling for the service request of the client 102, the acquisition module can obtain the service delay of the service request and the required resources in multiple resource pools according to the resource type required for each service request. The screening module can obtain the degree of deviation between the service delay and the delay standard corresponding to each service request based on the service demand information obtained by the parsing module and the service delay between the service request and the required resources obtained by the acquisition module, and screen at least one resource pool that can complete the service request according to the degree of deviation between the service delay and the delay standard and the resource dependence degree corresponding to each service request to obtain the target resource pool.
[0051] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0052] Figure 2 Resource scheduling method process provided in this application embodiment Figure 1 .like Figure 2 As shown, the execution subject of this embodiment can be the above Figure 1 In the resource scheduling system 101 of the embodiment, the method includes:
[0053] S201: Obtain service demand information, where the service demand information includes the type of resources required to complete at least one service request and the delay standard of each service request for the resource of this type.
[0054] Specifically, the type of resources required to complete a service request is determined by the service type. Service types can include storage services, computing services, message queue services, and the like. For example, the type of resources required to complete a storage service request is a storage resource; the type of resources required to complete a computing service request is a computing resource; and the type of resources required to complete a message queue service request is a message queue resource. The above resource types can be aggregated and summarized in the same resource pool, or the above resource types can be distributed across multiple resource pools. A resource pool can contain not only a single type of resource, but also multiple different types of resources. The various resources in a resource pool determine the properties and purpose of the resource pool. Combined Figure 1 Explain the distribution of the above resource types, such as Figure 1As shown, resource pool 1 can simultaneously contain resources A, B, and C, while resources A, B, and C can also exist in resource pool 2 and resource pool 3, respectively. Furthermore, resource A can be a storage resource, resource B can be a computing resource, and resource C can be a message queue resource. If service request A requires three types of resources: resource A, resource B, and resource C, resource scheduling system 101 can schedule resource pool 1 to complete the service request, or resource scheduling system 101 can schedule resource pool 2 and resource pool 3 to complete the service request.
[0055] On the other hand, the latency standard for each service request for that type of resource can refer to the response time standard set for different types of resources in the service request. This latency standard can be used to measure the response speed and performance of the resource pool to service requests. For example, the latency standard for storage service requests is 10ms; the latency standard for computing service requests is 20ms; and the latency standard for message queue service requests is 50ms.
[0056] S202: Obtain, according to the resource type required by each service request, a service delay between the service request and a resource corresponding to the resource type in at least one resource pool.
[0057] In a specific implementation, the service latency can be the response latency of various resources in a resource pool. Obtaining the service latency between a service request and a resource corresponding to the resource type in at least one resource pool can involve obtaining the response latency of the resource type corresponding to the service request in each of multiple resource pools containing the resource type required by the service request, and using the response latency of the resource type corresponding to the service request as the service latency.
[0058] If the resource type required by the service request is a single type of resource, the service latency of obtaining the resources required by the service request from multiple resource pools is calculated. Figure 1 As shown, if the resource type required by the service request is resource A, a resource pool containing resource A is obtained from multiple resource pools: resource pool 1 and resource pool 2. The service delay of resource A in resource pool 1 and the service delay of resource A in resource pool 2 are obtained respectively.
[0059] If the resource type required by the service request is multiple types of resources, multiple service delays of multiple resources required by the service request are obtained in one resource pool, or multiple service delays of multiple resources required by the service request are obtained in multiple resource pools. Figure 1As shown, if the resource types required by the service request are resource A, resource B, and resource C, the service delays of resource A, resource B, and resource C are obtained in resource pool 1 respectively, or the service delays of resource A and resource B are obtained in resource pool 2 respectively, and the service delay of resource C is obtained in resource pool 3, or the service delay of resource A is obtained in resource pool 2 respectively, and the service delays of resource B and resource C are obtained in resource pool 3.
[0060] S203. Screen at least one resource pool based on the degree of deviation between the service delay corresponding to each service request and the delay standard and the resource dependence degree corresponding to each service request to obtain a target resource pool, wherein the target resource pool is a single resource pool or a combination of at least one resource pool, and the resource dependence degree is negatively correlated with the delay length corresponding to the delay standard.
[0061] Specifically, the service demand information also includes the resource dependence degree of the service request on various types of resources. The resource dependence degree can be divided according to the contribution and influence of various resources on the service request, and can be divided into high dependence and moderate dependence. If the resource dependence degree of the service request on a certain resource is high, then when completing the service request, the service delay of this type of resource needs to be forced to meet the delay standard of this type of resource. Forced satisfaction means that the degree of deviation between the service delay of this type of resource and the delay standard does not exceed the preset delay fluctuation range of high dependence. If the resource dependence degree of the service request on a certain resource is moderate, then when completing the service request, the service delay of this type of resource needs to meet the delay standard of this type of resource as much as possible. Try to meet means that the degree of deviation between the service delay of this type of resource and the delay standard does not exceed the preset delay fluctuation range of moderate dependence. Among them, the preset delay fluctuation range range of high dependence is smaller than the preset delay fluctuation range of moderate dependence.
[0062] In addition, the degree of resource dependence is negatively correlated with the delay length corresponding to the delay standard. The shorter the delay length corresponding to the delay standard, the greater the impact of the resource on the service request. That is, the service request is more dependent on the resource with a shorter delay length corresponding to the delay standard, and the preset delay fluctuation range of this type of resource is smaller.
[0063] The resource scheduling method provided in this embodiment can obtain the resource type required to complete the service request and the delay standard of the service request for this type of resource by obtaining service demand information. Then, based on the resource type required by the service request, the service delay of the resource corresponding to the resource type in the resource pool is obtained. Based on the degree of deviation between the service delay of the resource required to complete the service request and the delay standard of the resource type corresponding to the service request, as well as the resource dependence of the service request on the required resources, the resources in multiple resource pools are screened to obtain a target resource pool with good performance. In addition, the resource dependence of the service request is negatively correlated with the delay length corresponding to the delay standard. Therefore, when scheduling resources, the delay standards of different resource types can be used as the scheduling basis, and a scheduling solution that meets the delay standard of the resource type required by the service request can be obtained, thereby improving the response speed of the entire system and improving the overall service quality.
[0064] Figure 3 Resource scheduling method process provided in this application embodiment Figure 2 In this embodiment, Figure 2 Based on the embodiment, the process of obtaining the service delay of the resource corresponding to the resource type of each service request in at least one resource pool and the process of obtaining the delay score of the resource type required by each service request are described in detail. Figure 3 As shown, the method includes:
[0065] S301: Obtain service requirement information, where the service requirement information includes the type of resources required to complete at least one service request and the latency standard of each service request for the resource of that type.
[0066] Specifically, the service demand information also includes location information, and the location information can be the location information of the client where the service request is sent.
[0067] S302: Obtain the service area of the client according to its location information.
[0068] In a possible design, the service area can be divided according to prefecture-level cities, and the prefecture-level city where the client is located is obtained based on the client's location information.
[0069] S303: Acquire a delay database corresponding to the service area, wherein the delay database stores periodically acquired delays between the service area and each type of resource in at least one resource pool.
[0070] Specifically, the latency period for acquiring each type of resource in the service area and at least one resource pool can be adjusted based on actual service needs. For time-sensitive services, the latency period can be shorter. For example, a 5-minute acquisition period can be used. Alternatively, the acquisition period can be adaptively adjusted based on the frequency of resource performance changes in the service area and resource pool. For example, if the performance of each resource in the resource pool changes slowly, a longer acquisition period can be used, specifically, a 30-minute acquisition period.
[0071] During the specific implementation process, the resource scheduling system periodically obtains the delay between each prefecture-level city and each resource in each resource pool, and stores the obtained delay data in the delay database. A suitable data model and table structure are established through the relational database to store the delay information between different service areas and different resource types.
[0072] S304: Obtain, according to the delay database and the resource type required by each service request, the service delay between the service request and the resource corresponding to the resource type in at least one resource pool.
[0073] Specifically, according to the resource type required by the service request, at least one resource pool with the above resource type is obtained, and the service delay between the above resource type in each resource pool and the service request is obtained in the delay database according to the above resource pool. Figure 1 As shown, if the resource type required by the service request is resource A, at least one resource pool having resource A is obtained based on the resource type required by the service request: resource pool 1 and resource pool 2. The service delay of resource A in resource pool 1 and the service delay of resource A in resource pool 2 are obtained respectively based on the delay database.
[0074] S305. For each resource type required by the service request, obtain the delay fluctuation range of the resource type according to the resource dependency and the delay standard, wherein the fluctuation value of the delay fluctuation range relative to the delay standard is negatively correlated with the resource dependency.
[0075] Specifically, the latency fluctuation range is the service latency deviation of the required resource type that the service request can accept, provided that the service request can be resolved. If the service latency of a resource type required by the service request exceeds the latency fluctuation range of that resource type, the resource pool containing that resource type is determined to not meet the screening criteria.
[0076] In combination with the above embodiments, the degree of resource dependence is negatively correlated with the delay length corresponding to the delay standard, and the fluctuation value of the delay fluctuation interval relative to the delay standard is negatively correlated with the degree of resource dependence, then the delay fluctuation interval is positively correlated with the delay length corresponding to the delay standard. Furthermore, the shorter the delay length corresponding to the delay standard, the shorter the delay fluctuation interval, the higher the resource dependence of the service request on this type of resource, that is, the greater the impact of this type of resource on the service request. For example, the resource dependence degree of the storage service is highly dependent and the delay standard of the storage service is 10ms, and the delay fluctuation interval of the storage type resource is 9-11ms. The resource dependence degree of the computing service is moderately dependent and the delay standard of the storage service is 20ms, and the delay fluctuation interval of the storage type resource is 15-25ms.
[0077] In this way, through the relationship between latency standards, latency fluctuation ranges, and resource dependence levels, resource types with shorter latency corresponding to latency standards can be defined as resources with a high degree of dependence on service requests, and their latency fluctuation ranges can be set relatively small. This ensures that these critical resources can always provide stable and consistent performance, helping to maintain high-quality operation of the overall service.
[0078] S306 : When the service delay is within the delay fluctuation range, obtain a delay score for the resource of this type based on the degree of deviation between the service delay and the delay standard, wherein the delay score is negatively correlated with the degree of deviation.
[0079] In one possible design, a delay score can be obtained based on the degree of deviation between the service delay and the delay standard. The smaller the difference between the service delay and the delay standard, the higher the delay score.
[0080] S307: Screen at least one resource pool according to the latency score of the resource type required by each service request to obtain a target resource pool.
[0081] In the specific implementation process, if the resource type required by the service request is a single resource type, at least one resource pool can be screened according to at least one latency score of the resource of that type to obtain a target resource pool with a single resource pool. If the resource type required by the service request is multiple resource types, at least one resource pool can be screened according to multiple latency scores of the multiple resource types, and the resource pool with the resource type with the highest latency score is used as the target resource pool to obtain a target resource pool with a single resource pool or multiple resource pools. For example, in combination Figure 1As shown in the figure, if the resource types required by the service request are resource A and resource B, the latency score A1 for resource A and the latency score B1 for resource B in resource pool 1 can be obtained. The latency score A2 for resource A and the latency score B2 for resource B in resource pool 2 can also be obtained. If A1 and B1 are greater than A2 and B2, the target resource pool is resource pool 1. If A1 is greater than A2 and B1 is less than B2, the target resource pools are resource pools 1 and 2.
[0082] The resource scheduling method provided in this embodiment, by leveraging the relationship between latency standards, latency fluctuation ranges, and resource dependency, can define resource types with shorter latency corresponding to the latency standards as highly dependent on service requests, and set their latency fluctuation ranges to be relatively small. This ensures that these critical resources consistently provide stable and consistent performance, helping to maintain high-quality overall service operation. Furthermore, the method can distinguish and prioritize critical and non-critical resources, helping to reduce the complexity of resource management and making system management clearer and more efficient.
[0083] Figure 4 Resource scheduling method process provided in this application embodiment Figure 3 In this embodiment, Figure 3 Based on the embodiment, the process of screening at least one resource pool according to the latency score of each service request for the required resource type and obtaining the target resource pool is described in detail. Figure 4 As shown, the method includes:
[0084] S401: Obtain service requirement information, where the service requirement information includes the type of resources required to complete at least one service request and a delay standard for each service request for resources of this type.
[0085] S402: Obtain, according to the resource type required by each service request, a service delay between the service request and a resource corresponding to the resource type in at least one resource pool.
[0086] Steps S401-S402 and Figure 2 Steps S201-S202 in the embodiment are similar and are not described in detail in this embodiment.
[0087] S403 . Determine, based on the resource type required by each service request, whether there is a first candidate resource pool that meets the resource type required by at least one service request. If so, execute S404 ; if not, execute S406 .
[0088] Specifically, the first candidate resource pool can be a resource pool that includes all resource types required for the service request.
[0089] S404. For each first candidate resource pool, obtain the total latency score of each candidate resource pool according to the latency score and corresponding latency weight of the resource type required for each service request; wherein the latency weight is positively correlated with the degree of resource dependence.
[0090] Specifically, the total delay score can be obtained by summing the product of the delay score of each resource type and the corresponding delay weight. Furthermore, the difference between the service delay and the delay standard of the resource type required for the service request is obtained respectively, and the delay weight is obtained according to the resource dependence of the service request on this type of resource, wherein the delay weight of high dependence is greater than the delay weight of moderate dependence. For example, the delay weight of high dependence is 70%, and the delay weight of moderate dependence is 30%. The delay score of each resource type is obtained by multiplying the delay score of each resource type and the corresponding delay weight, and the delay scores of all resource types required for the service request in the candidate resource pool are added to obtain the total delay score of the candidate resource pool.
[0091] S405 . Based on the total latency scores of each first candidate resource pool, select the first candidate resource pool with the highest total latency score as the target resource pool.
[0092] S406: Filter the resource pool according to the resource type required by the service request to obtain at least one second candidate resource pool; wherein the second candidate resource pool includes at least one type of resource, but does not include all types of resources.
[0093] Specifically, in combination with the above embodiments, if the resource types required for the service request are multiple resource types, and there is no first candidate resource pool that meets the resource types required by at least one service request, then at least one resource pool can be screened according to multiple latency scores of multiple resource types to obtain at least one second candidate resource pool.
[0094] S407 . According to the resource dependency level corresponding to each service request, in descending order of resource dependency, obtain the target resource with the highest latency score from multiple second candidate resource pools at each resource dependency level.
[0095] S408 . Obtain a target resource pool according to the second candidate resource pool where the target resource with the highest latency score is located.
[0096] Based on the above embodiment, a target resource pool can be obtained, and after obtaining the target resource pool, the above embodiment can also detect the delay between the service request and the target resource pool according to a preset period. The detection period can be the same as the delay acquisition period.
[0097] When the service delay of a preset number of resources exceeds the corresponding delay fluctuation range, the target resource pool is re-acquired, wherein the preset number may be a number that meets the most basic performance requirements of the service request.
[0098] The resource scheduling method provided in this embodiment determines whether a first candidate resource pool exists that meets the resource type required by at least one service request. If a first candidate resource pool that meets the requirements exists, resources within the same resource pool are preferentially scheduled. This avoids resource fragmentation and makes resource utilization more efficient. Furthermore, the number of resource pools to be scheduled can be reduced, thereby lowering data transmission costs and shortening data transmission time, thereby improving overall system performance and responsiveness.
[0099] Figure 5 Schematic diagram of the structure of the resource scheduling device provided in the embodiment of the present application Figure 1 .like Figure 5 As shown, the resource scheduling device 50 includes: a parsing module 501 , an acquisition module 502 , and a screening module 503 .
[0100] The parsing module 501 is configured to obtain service requirement information, where the service requirement information includes the type of resources required to complete at least one service request and the latency standard of each service request for resources of this type.
[0101] The acquisition module 502 is configured to acquire, according to the resource type required by each service request, a service delay between the service request and a resource corresponding to the resource type in at least one resource pool.
[0102] The screening module 503 is used to screen at least one resource pool based on the degree of deviation between the service delay corresponding to each service request and the delay standard and the resource dependence degree corresponding to each service request to obtain a target resource pool, wherein the target resource pool is a single resource pool, or a combination of at least one resource pool, and the resource dependence degree is negatively correlated with the delay length corresponding to the delay standard.
[0103] In one possible design, the acquisition module 502 is further configured to:
[0104] Obtain the service area based on the client's location information;
[0105] Obtaining a delay database corresponding to the service area, wherein the delay database stores periodically obtained delays between the service area and each type of resource in at least one resource pool;
[0106] According to the latency database and the resource type required by each service request, a service latency between the service request and a resource corresponding to the resource type in at least one resource pool is obtained.
[0107] In one possible design, the screening module 503 is further configured to:
[0108] For each resource type required by a service request, obtain the latency fluctuation range of that type of resource based on the resource dependency and latency standard. The fluctuation value of the latency fluctuation range relative to the latency standard is negatively correlated with the resource dependency.
[0109] When the service delay is within the delay fluctuation range, the delay score of the resource type is obtained based on the deviation between the service delay and the delay standard. The delay score is negatively correlated with the deviation.
[0110] At least one resource pool is screened according to a latency score of a type of resource required by each service request to obtain a target resource pool.
[0111] In one possible design, the screening module 503 is further configured to:
[0112] According to the resource type required by each service request, determining whether there is a first candidate resource pool that meets the resource type required by at least one service request;
[0113] If so, for each first candidate resource pool, the total latency score of each candidate resource pool is obtained based on the latency score and corresponding latency weight of the resource type required for each service request; where the latency weight is positively correlated with the degree of resource dependence;
[0114] According to the total latency score of each first candidate resource pool, the first candidate resource pool with the highest total latency score is selected as the target resource pool.
[0115] In one possible design, the screening module 503 is further configured to:
[0116] Screening the resource pool according to the resource type required by the service request to obtain at least one second candidate resource pool; wherein the second candidate resource pool includes at least one type of resource but does not include all types of resources;
[0117] According to the resource dependency level corresponding to each service request, in descending order of resource dependency, the target resource with the highest latency score is obtained from multiple second candidate resource pools at each resource dependency level;
[0118] The target resource pool is obtained according to the second candidate resource pool where the target resource with the highest latency score is located.
[0119] In one possible design, the screening module 503 is further configured to:
[0120] Detect the delay between the service request and the target resource pool according to the preset period;
[0121] When the service delays of a preset number of resources exceed their corresponding delay fluctuation ranges, the target resource pool is reacquired.
[0122] Figure 6 This is a hardware diagram of the resource scheduling device provided in the embodiment of the present application. Figure 6 As shown, the resource scheduling device 60 provided in this embodiment includes: at least one processor 601 and a memory 602. The device 60 also includes a communication component 603. The processor 601, the memory 602 and the communication component 603 are connected via a bus 604.
[0123] During the specific implementation process, at least one processor 601 executes the computer-executable instructions stored in the memory 602, so that the at least one processor 601 executes the above resource scheduling method.
[0124] The specific implementation process of the processor 601 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.
[0125] The present application also provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor, the memory storing computer-executable instructions, and the processor executing the computer-executable instructions stored in the memory to implement the above-mentioned resource scheduling method.
[0126] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above-mentioned resource scheduling method is implemented.
[0127] The present application also provides a computer program product comprising instructions for implementing the resource scheduling method described above. In the above embodiments, implementation can be achieved in whole or in part through software, hardware, firmware, or any combination thereof. When implemented using software, implementation can be achieved in whole or in part in the form of a computer program product. The computer program product comprises one or more computer programs or instructions. When the computer programs or instructions are loaded and executed on a computer, the processes or functions of the embodiments of the present application are performed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server or data center that integrates one or more available media. Available media can be magnetic media, such as floppy disks, hard disks, or magnetic tapes; optical media, such as digital video disks; or semiconductor media, such as solid-state drives.
[0128] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all optional embodiments, and the actions and modules involved are not necessarily required by this application.
[0129] It should be further noted that, although the various steps in the flowchart are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps may be performed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily performed at the same time, but may be performed at different times. The execution order of these sub-steps or stages is not necessarily to be performed in sequence, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0130] It should be understood that the above-described device embodiments are merely illustrative, and the device of the present application may also be implemented in other ways. For example, the division of units / modules in the above-described embodiments is merely a logical functional division, and actual implementations may employ other division methods. For example, multiple units, modules, or components may be combined or integrated into another system, or some features may be omitted or not implemented.
[0131] In addition, unless otherwise specified, the functional units / modules in the various embodiments of the present application may be integrated into a single unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The aforementioned integrated units / modules may be implemented in the form of hardware or software program modules.
[0132] If the integrated unit / module is implemented in hardware, the hardware may be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor may be any appropriate hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC. Unless otherwise specified, the storage unit may be any appropriate magnetic storage medium or magneto-optical storage medium, such as resistive random access memory (RRAM), dynamic random access memory (DRAM), static random access memory (SRAM), enhanced dynamic random access memory (EDRAM), high-bandwidth memory (HBM), hybrid memory cube (HMC), etc.
[0133] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes a number of instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0134] In the above embodiments, the description of each embodiment has its own focus. For parts not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0135] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0136] It should be understood that the present application is not limited to the exact structure described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A resource scheduling method, characterized in that: The method comprises: Acquiring service requirement information, the service requirement information including a type of resource required to complete at least one service request and a latency standard for each service request for the resource of that type; According to the resource type required by each service request, obtaining the service latency between the service request and the resource corresponding to the resource type in at least one resource pool; At least one resource pool is screened based on the degree of deviation between the service delay corresponding to each service request and the delay standard and the resource dependence degree corresponding to each service request to obtain a target resource pool, wherein the target resource pool is a single resource pool, or a combination of at least one resource pool, and the resource dependence degree is negatively correlated with the delay length corresponding to the delay standard.
2. The method according to claim 1, characterized in that The step of screening at least one resource pool according to the degree of deviation between the service delay corresponding to each service request and the delay standard and the resource dependency degree corresponding to each service request to obtain a target resource pool includes: For each resource type required by the service request, obtaining a delay fluctuation range for the resource type according to the resource dependency and the delay standard, wherein a fluctuation value of the delay fluctuation range relative to the delay standard is negatively correlated with the resource dependency; When the service delay is within the delay fluctuation range, obtaining a delay score for the resource of this type according to a degree of deviation between the service delay and the delay standard, wherein the delay score is negatively correlated with the degree of deviation; At least one resource pool is screened according to a latency score of a type of resource required by each service request to obtain a target resource pool.
3. The method according to claim 2, characterized in that The step of screening at least one resource pool according to the latency score of the resource type required by each service request to obtain a target resource pool includes: According to the resource type required by each service request, determining whether there is a first candidate resource pool that meets the resource type required by the at least one service request; If so, for each first candidate resource pool, obtain the total latency score of each candidate resource pool according to the latency score and corresponding latency weight of the resource type required for each service request; wherein the latency weight is positively correlated with the resource dependency level; According to the total latency score of each first candidate resource pool, the first candidate resource pool with the highest total latency score is used as the target resource pool.
4. The method according to claim 3, characterized in that If there is no first candidate resource pool that satisfies the resource type required by the at least one service request, the method further includes: Screening the resource pool according to the resource type required by the service request to obtain at least one second candidate resource pool; wherein the second candidate resource pool includes at least one type of resource but does not include all types of resources; According to the resource dependency level corresponding to each service request, in descending order of resource dependency, the target resource with the highest latency score is obtained from multiple second candidate resource pools at each resource dependency level; The target resource pool is obtained according to the second candidate resource pool where the target resource with the highest delay score is located.
5. The method according to claim 3, characterized in that After screening at least one resource pool based on the deviation between the service delay corresponding to each service request and the delay standard and the resource dependency corresponding to each service request to obtain the target resource pool, the method further includes: detecting the time delay between the service request and the target resource pool according to a preset period; When the service delays of a preset number of resources exceed their corresponding delay fluctuation ranges, the target resource pool is reacquired.
6. The method according to claim 1, characterized in that The service requirement information further includes location information. The acquiring, based on the resource type required by each service request, a service latency between the service request and a resource corresponding to the resource type in at least one resource pool includes: Obtain the service area based on the client's location information; Obtaining a delay database corresponding to the service area, wherein the delay database stores periodically obtained delays between the service area and each type of resource in at least one resource pool; According to the delay database and the resource type required by each service request, a service delay between the service request and a resource corresponding to the resource type in at least one resource pool is obtained.
7. A resource scheduling device, characterized in that: include: A parsing module, configured to obtain service requirement information, wherein the service requirement information includes a type of resource required to complete at least one service request and a latency standard for each service request for the resource of that type; an acquisition module, configured to acquire, based on the resource type required by each service request, a service delay between the service request and a resource corresponding to the resource type in at least one resource pool; A screening module is configured to screen at least one resource pool based on the degree of deviation between the service delay corresponding to each service request and the delay standard and the resource dependency corresponding to each service request to obtain a target resource pool, wherein the target resource pool is a single resource pool or a combination of at least one resource pool, and the resource dependency is negatively correlated with the delay length corresponding to the delay standard.
8. An electronic device, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 6.
9. A computer program product, characterized in that The computer program product comprises instructions for implementing the method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.