Service and hardware resource matching method and device and electronic equipment
By obtaining the resource usage and availability target values of the service, calculating the target resource usage, and matching the hardware resource configuration from the resource pool, the problem of insufficient or over-configuration of hardware resource allocation when the user scale changes is solved, and the service availability and hardware cost are achieved.
Patent Information
- Application Number
- CN202311094561.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-28
- Publication Date
- 2025-02-28
AI Technical Summary
The prior art is difficult to effectively solve the problem of insufficient or over-configuration of hardware resources when the user scale changes, resulting in difficult to take into account both service availability and hardware costs.
By obtaining the resource usage and availability target values within the service unit duration, determining the baseline usage of the resource, and calculating the target resource usage based on the predicted resource usage and benchmark usage, thereby obtaining the target hardware resource configuration that matches the service.
Improve service availability, ensuring that services can save hardware costs while achieving availability target values and avoid resource waste.
Smart Images

Figure CN119536963A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of capacity planning, and in particular to a method, device, electronic device and storage medium for matching services with hardware resources. Background Art
[0002] Computer services running on servers consume certain hardware resources, but as time goes by, the scale of service users keeps changing, and the initial hardware configuration can no longer meet service needs. Currently, hardware resource configurations are still selected based on the utilization of hardware resources, which is prone to over-configuration or under-configuration. Summary of the invention
[0003] The present application provides a method, device, electronic device, computer-readable storage medium and computer program product for matching services with hardware resources to solve the problem that matching hardware resources cannot be configured for services. The technical solution of the present application is as follows:
[0004] According to a first aspect of an embodiment of the present application, a method for matching services and hardware resources is provided, including: obtaining a first resource usage of N types of resources and an availability target value of the service within a service unit duration, wherein N is an integer greater than or equal to 1; for any type of resource among the N types of resources, based on the first resource usage and the availability target value of the any type of resource, determining a baseline resource usage of the any type of resource; predicting a first resource predicted usage of the service for the any type of resource at the current moment, and a second resource predicted usage at the next moment; obtaining a target resource usage of the service for the any type of resource based on the first resource predicted usage, the second resource predicted usage and the baseline resource usage; and obtaining a target hardware resource configuration matching the service based on the target resource usage of the N types of resources.
[0005] In one embodiment of the present application, determining a baseline resource usage of any one category of resources based on the first resource usage and the availability target value of any one category of resources includes: obtaining a resource buffer coefficient; obtaining candidate resource usage of any one category of resources based on the first resource usage and the availability target value of any one category of resources; and correcting the candidate resource usage of any one category of resources based on the resource buffer coefficient to obtain a baseline resource usage of any one category of resources.
[0006] In one embodiment of the present application, the acquiring of the resource buffer coefficient includes: acquiring the level of the service, and determining the resource buffer coefficient according to the level of the service.
[0007] In one embodiment of the present application, the target resource usage of the service for any one type of resource is obtained based on the first resource predicted usage, the second resource predicted usage and the benchmark resource usage, including: obtaining a resource magnification factor based on the first resource predicted usage and the second resource predicted usage; and obtaining the target resource usage of the service for any one type of resource based on the resource magnification factor and the benchmark resource usage.
[0008] In one embodiment of the present application, before predicting the first resource usage of the service for any type of resource at the current moment and the second resource usage at the next moment, it also includes: obtaining the historical resource usage of the service for any type of resource over a set period of time; fitting the historical resource usage to obtain a resource prediction function for any type of resource, wherein the resource prediction function is used to predict the resource usage of the service for any type of resource at different moments.
[0009] In one embodiment of the present application, the target resource usage based on the N types of resources is used to obtain the target hardware resource configuration that matches the service, including: obtaining a candidate hardware resource configuration and the configuration resource usage of the N types of resources included in the candidate hardware resource configuration; for each candidate hardware resource configuration, based on the target resource usage and the configuration resource usage of the N types of resources, determining the configuration screening coefficient of the candidate hardware resource configuration; based on the configuration screening coefficient, determining the target hardware resource configuration that matches the service from the candidate hardware resource configurations.
[0010] In one embodiment of the present application, determining the target hardware resource configuration matching the service from the candidate hardware resource configurations based on the configuration screening coefficient includes: selecting the candidate hardware configuration with the smallest configuration screening coefficient as the target hardware configuration.
[0011] In one embodiment of the present application, the configuration screening coefficient of the candidate hardware resource configuration is determined based on the target resource usage and the configuration resource usage of the N types of resources, including: for any type of resource in the N types of resources, based on the target resource usage and the configuration resource usage of any type of resource, obtaining the usage difference of any type of resource; normalizing the usage difference of any type of resource to obtain a normalized usage difference; based on the usage difference of the N types of resources, determining the Euclidean distance between the target resource usage and the candidate hardware resource configuration as the configuration screening coefficient of the candidate hardware resource configuration.
[0012] In one embodiment of the present application, the step of obtaining a candidate hardware resource configuration and the configuration resource usage of N types of resources included in the candidate hardware resource configuration includes: obtaining a first hardware resource configuration from a resource pool, and determining the configuration resource usage of N types of resources in the first hardware resource configuration; and selecting, from the first hardware resource configuration, a hardware resource configuration in which the configuration resource usage of each type of resource is greater than the target resource usage as the candidate hardware resource configuration.
[0013] According to a second aspect of an embodiment of the present application, a device for matching services and hardware resources is provided, including: an acquisition module, used to acquire a first resource usage of N types of resources and an availability target value of the service within a service unit time, wherein N is an integer greater than or equal to 1; a first determination module, used to determine, for any one of the N types of resources, a baseline resource usage of any one of the N types of resources based on the first resource usage and the availability target value of the any one type of resources; a prediction module, used to predict the first resource predicted usage of the service for the any one type of resources at the current moment, and the second resource predicted usage at the next moment; a second determination module, used to obtain a target resource usage of the service for the any one type of resources based on the first resource predicted usage, the second resource predicted usage and the baseline resource usage; a matching module, used to acquire a target hardware resource configuration matching the service based on the target resource usage of the N types of resources.
[0014] According to a third aspect of an embodiment of the present application, there is provided an electronic device, comprising a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to implement the steps of the method of the first aspect of the embodiment of the present application.
[0015] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the method of the first aspect of the embodiment of the present application are implemented.
[0016] According to a fifth aspect of an embodiment of the present application, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor of an electronic device, the steps of the method of the first aspect of the embodiment of the present application are implemented.
[0017] The technical solution provided by the embodiments of the present application brings at least the following beneficial effects: by obtaining the actual usage of N types of resources of the service within a unit time as the first resource usage, and obtaining the availability target value of the service. Based on the first resource usage and the availability target value of the service, the baseline resource usage of any type of resource can be determined. According to the predicted resource usage of any type of resource, the target resource usage of any type of resource is determined, and the availability of the service can be improved by predicting the future resource usage of the service. Obtaining the target hardware resource configuration that matches the service from the resource pool can ensure that while the service reaches the availability target value, hardware costs are saved and waste of resources is avoided.
[0018] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] 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 application.
[0020] Figure 1 The present invention is a flowchart of a method for matching services with hardware resources according to an exemplary embodiment.
[0021] Figure 2 The present invention is a flow chart of a method for matching services with hardware resources according to another exemplary embodiment.
[0022] Figure 3 The present invention is a flow chart of a method for matching services with hardware resources according to another exemplary embodiment.
[0023] Figure 4 is a schematic diagram of a resource prediction function according to an exemplary embodiment.
[0024] Figure 5 The present invention is a flowchart of a method for matching services with hardware resources according to another exemplary embodiment.
[0025] Figure 6 The present invention is a flowchart of a method for matching services with hardware resources according to another exemplary embodiment.
[0026] Figure 7 The figure is a schematic diagram showing a matching process between candidate hardware resource configurations and target resource usage according to an exemplary embodiment.
[0027] Figure 8 The present invention is a structural block diagram of a device for matching services with hardware resources according to an exemplary embodiment.
[0028] Fig. 9It is a block diagram of an electronic device according to an exemplary embodiment.
[0029] Fig.10 The present invention is a structural block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0030] In order to enable ordinary persons in the art to better understand the technical solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.
[0032] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0033] Figure 1 is a flow chart of a method for matching services with hardware resources according to an exemplary embodiment. Figure 1 As shown, the method for matching services and hardware resources in an embodiment of the present application includes the following steps:
[0034] S101, obtaining a first resource usage of N types of resources and a target value of service availability within a service unit duration, where N is an integer greater than or equal to 1.
[0035] It should be noted that the execution subject of the method for matching services with hardware resources in the embodiment of the present application is an electronic device, which can be a server with the ability to match hardware resources, or a computer, a user terminal and other intelligent devices. Optionally, the server can be a cloud server, a server of a distributed system, or a server combined with a blockchain, etc. Optionally, the user terminal includes but is not limited to a mobile phone, a computer, an intelligent voice interaction device, etc. The embodiment of the present application is not specifically limited.
[0036] It is understandable that the service running on the server will consume certain server resources, and N types of resources refer to a variety of different resource types. Optionally, N types of resources may include but are not limited to: central processing unit (CPU), memory, disk, bandwidth, network card, etc.
[0037] In some implementations, the actual resource usage of N types of resources within a service unit duration can be collected as the first resource usage. Optionally, the actual resource usage of N types of resources can be collected within a set unit duration by monitoring the service in real time. The unit duration can be one month, one quarter, or one half year. Optionally, the actual resource usage of N types of resources can be periodically collected within a unit time. For example, the actual resource usage of N types of resources can be collected at intervals of 1 minute, that is, for any type of resource, 1440 relevant values of the any type of resource can be collected every day.
[0038] Optionally, the resource usage of the N types of resources includes, but is not limited to: the number of CPU cores, the used capacity of memory, the used space of the disk, the network bandwidth, the network traffic, etc.
[0039] It is understandable that the availability of a service can indicate the effectiveness, efficiency and efficiency of the service. In the Internet industry, the availability of a service refers to the percentage of time that the service can use network resources normally within a given period of time without being affected by unexpected failures or other technical problems. High availability means that the service has little interruption time and can quickly recover from any failure, ensuring that users can always access and use the service. For example, a service availability of 99.9% means that the service will only be interrupted for about 0.1% of the time each year.
[0040] In some implementations, the target value of service availability can be determined based on the service's external service availability commitment. For example, if the service is promised to be 99.9% available, the target value of service availability is 99.9%. The target value of service availability can also be determined based on the level of the service. The more important the service, the higher the level of the service, and the larger the target value of service availability. Optionally, the target value of service availability can be determined based on the user's expectations for service availability, the cost required to improve service availability, such as hardware configuration cost, maintenance cost, etc., and the risk of assessing service interruption, etc., taking into account a variety of factors.
[0041] S102: For any resource of the N resource types, determine a baseline resource usage of the resource based on a first resource usage and an availability target value of the resource.
[0042] It is understandable that the baseline resource usage refers to the minimum resource usage required for a service to maintain normal operation of the service. The baseline resource usage of any type of resource can be determined based on the first resource usage and availability target value of any type of resource.
[0043] In some implementations, there may be a certain difference between the actual resource usage of the service and the availability target value. In order to take into account both resource balancing and service performance, the baseline resource usage of any type of resource can be determined based on the first resource usage and the availability target value of any type of resource.
[0044] Optionally, the baseline resource usage of any type of resource may be calculated based on the percentile value of the first resource usage of any type of resource. For example, if the percentile value is 99.95, the 99.95th percentile of the first resource usage of any type of resource is calculated and used as the baseline resource usage of any type of resource.
[0045] It can be understood that the percentile value refers to the value corresponding to a certain percentage of values in a set of data. The percentile value is used to measure the distribution of data and can reflect the range of data. Calculating the baseline resource usage based on the percentile value can avoid over-allocation or under-allocation of resources.
[0046] S103, the prediction service predicts the usage of a first resource of any type of resource at the current moment, and predicts the usage of a second resource at the next moment.
[0047] In some implementations, the resource usage of any type of resource at the current moment can be predicted based on historical resource usage to obtain a first predicted resource usage, and the resource usage of any type of resource at the next moment can be predicted to obtain a second predicted resource usage.
[0048] It can be understood that the current moment refers to the current time point, and the next moment refers to the time point after a unit time length. For example, the unit time length is 1 quarter, the historical resource usage refers to the resource usage of the previous quarter (January-March), the current moment is the current time point, such as the time point of April 3, and the next moment refers to the end time point of the next quarter (April-June), such as the time point of June 30.
[0049] As an example, the resource usage of any type of resource can be predicted every quarter. For any type of resource, the first resource predicted usage of the resource at the current moment is predicted, and the second resource predicted usage of the resource at the next moment, that is, the next quarter, is predicted.
[0050] S104, obtaining a target resource usage of the service for any type of resource based on the first resource prediction usage, the second resource prediction usage and the benchmark resource usage.
[0051] In some implementations, the growth trend of resource usage of any type of resource can be determined based on the first resource prediction usage and the second resource prediction usage. For example, the growth trend can be divided into positive growth and negative growth. Further, in order to adapt to the demand of the service for resource usage and ensure that the service reaches the availability target value, the baseline resource usage of any type of resource can be corrected based on the growth trend of any type of resource to obtain the target resource usage of the service for any type of resource.
[0052] Optionally, the ratio of the second resource predicted usage to the first resource predicted usage is obtained, and the ratio can be used to reflect the growth trend of resource usage of any type of resource. Further, the benchmark resource usage is corrected based on the ratio to obtain the target resource usage of the service for any type of resource.
[0053] Optionally, if the ratio of the second resource predicted usage to the first resource predicted usage is greater than 1, and it is determined that the growth trend of resource usage of any type of resource is positive growth, the ratio of the second resource predicted usage to the first resource predicted usage is multiplied by the benchmark resource usage to obtain the target resource usage of the service for any type of resource.
[0054] Optionally, if the ratio of the second resource predicted usage to the first resource predicted usage is less than 1, and it is determined that the growth trend of the resource usage of any type of resource is negative growth, the benchmark resource usage is multiplied by 1 to obtain the target resource usage of the service for any type of resource. In other words, if the growth trend of the resource usage of any type of resource is negative growth, in order to ensure the quality of the service and respond to possible emergencies, such as a surge in resource usage demand in certain time periods, the target resource usage of the resource is maintained to be the same as the benchmark resource usage in the embodiment of the present application.
[0055] S105: Based on the target resource usage of the N types of resources, obtain a target hardware resource configuration that matches the service.
[0056] In some implementations, the hardware resource configuration required for the service can be determined based on the target resource usage of N types of resources, and then matched with the candidate hardware resource configurations in the resource pool according to the hardware resource configuration required for the service to obtain the target hardware resource configuration that matches the service.
[0057] Optionally, hardware resource configurations whose resource usage is greater than the target resource usage are screened from the resource pool as candidate hardware resource configurations.
[0058] It is understandable that the hardware resource configuration in the resource pool is composed of several fixed combinations. For example, if the N types of resources are the number of CPU cores, memory capacity, and disk capacity, then the hardware resource configuration in the resource pool is 1 core + 2GB memory + 10GB disk, or 24 cores + 128GB memory + 2TB disk, etc. The target resource usage is an arbitrary natural number, such as 7 cores + 49GB memory + 900GB disk, which cannot be directly matched with the hardware resource configuration.
[0059] In some implementations, an N-dimensional coordinate system may be established based on N types of resources, and then the position of the target resource usage of the N types of resources in the coordinate system and the position of the candidate hardware resource configuration in the coordinate system may be determined. By calculating and comparing the distance between the target resource usage and the candidate hardware resource configuration, the candidate hardware resource configuration with the smallest distance to the target resource usage is used as the target hardware resource configuration matching the service.
[0060] In the method for matching services and hardware resources provided in an embodiment of the present application, the actual usage of N types of resources in a service within a unit time period is obtained as the first resource usage, and the availability target value of the service is obtained. Based on the first resource usage and the availability target value of the service, the baseline resource usage of any type of resource can be determined. According to the predicted resource usage of any type of resource, the target resource usage of any type of resource is determined, and the availability of the service can be improved by predicting the future resource usage of the service. Obtaining the target hardware resource configuration that matches the service from the resource pool can ensure that while the service reaches the availability target value, hardware costs are saved and waste of resources is avoided.
[0061] Figure 2 is a flow chart of a method for matching services with hardware resources according to an exemplary embodiment. Figure 2 As shown, the method for matching services and hardware resources in an embodiment of the present application includes the following steps:
[0062] S201, obtaining a first resource usage of N types of resources and a target value of service availability within a service unit duration, where N is an integer greater than or equal to 1.
[0063] In the embodiment of the present application, the implementation method of step S201 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0064] S202: Obtain a resource buffer coefficient.
[0065] It can be understood that the resource buffer factor can reduce the quality risk of services caused by insufficient resources.
[0066] In some implementations, a correspondence between the resource buffer coefficient and the level of service can be established. After the level of service is determined, the resource buffer coefficient can be determined by querying the correspondence. Optionally, the level of service can be obtained based on the availability target value of the service, and the resource buffer coefficient can be determined according to the level of service. The higher the service level, the larger the resource buffer coefficient used, and the resource buffer coefficient is usually between 1.1 and 1.4.
[0067] For example, the service level corresponding to the availability target value of 99.99% is the first-level service, the service level corresponding to the availability target value of 99.95% is the second-level service, and the service level corresponding to the availability target value of 99.9% is the third-level service. The importance of the first-level service is greater than that of the second-level service, which is greater than that of the third-level service.
[0068] In the embodiment of the present application, the corresponding relationship between the resource buffer coefficient and the service level is shown in the following Table 1:
[0069] Table 1
[0070] Service Level Availability target value Resource buffer factor First-class service 99.99% 1.4 Secondary Services 99.95% 1.3 Level 3 Service 99.9% 1.2
[0071] For example, the target availability value of a service is 99.95%, and the service is determined to be a Level 2 service, and its corresponding resource buffer coefficient is 1.3.
[0072] S203: Obtain candidate resource usage of any type of resource based on the first resource usage and the availability target value of any type of resource.
[0073] In some implementations, based on the first resource usage of any type of resource, according to the availability target value of the service, the quantile value of the first resource usage can be calculated based on the quantile function, and used as the candidate resource usage of any type of resource. For example, if the availability target value of the service is 99.99%, the 99.99th quantile of the first resource usage is calculated based on the quantile function to obtain the candidate resource usage of any type of resource.
[0074] S204: Correct the candidate resource usage of any type of resources based on the resource buffer coefficient to obtain a benchmark resource usage of any type of resources.
[0075] In some implementations, in order to reduce the quality risk of services caused by insufficient resources, the candidate resource usage of any type of resources can be corrected based on the resource buffer coefficient to obtain the benchmark resource usage of any type of resources. The formula for calculating the benchmark resource usage of any type of resources is as follows:
[0076] bu=quantile(u,a)×b (1)
[0077] Among them, bu is the baseline resource usage, u is the first resource usage, a is the availability target value, b is the resource buffer coefficient, and quantile is the quantile function.
[0078] S205, the prediction service predicts the usage of a first resource of any type of resource at the current moment, and predicts the usage of a second resource at the next moment.
[0079] In the embodiment of the present application, the implementation method of step S205 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0080] S206: Obtain a target resource usage of the service for any type of resource based on the first resource prediction usage, the second resource prediction usage and the benchmark resource usage.
[0081] In the embodiment of the present application, the implementation method of step S206 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0082] S207: Based on the target resource usage of the N types of resources, obtain a target hardware resource configuration that matches the service.
[0083] In the embodiment of the present application, the implementation method of step S207 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0084] In the method for matching services and hardware resources provided in an embodiment of the present application, the actual usage of N types of resources in a service within a unit time is obtained as the first resource usage, and the availability target value of the service is obtained. Based on the first resource usage and the availability target value of the service, the baseline resource usage of any type of resource is determined. According to the predicted resource usage of any type of resource, the target resource usage of any type of resource is determined, and the availability of the service can be improved by predicting the future resource usage of the service. Obtaining the target hardware resource configuration that matches the service from the resource pool can ensure that while the service reaches the availability target value, hardware costs are saved and waste of resources is avoided.
[0085] Figure 3 is a flow chart of a method for matching services with hardware resources according to an exemplary embodiment. Figure 3 As shown, the method for matching services and hardware resources in an embodiment of the present application includes the following steps:
[0086] S301, obtaining a first resource usage of N types of resources and a target value of service availability within a service unit duration, where N is an integer greater than or equal to 1.
[0087] In the embodiment of the present application, the implementation method of step S301 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0088] S302: For any resource of the N resource types, determine a baseline resource usage of the resource based on a first resource usage and an availability target value of the resource.
[0089] In the embodiment of the present application, the implementation method of step S302 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0090] S303, obtaining the historical resource usage of any type of resource by the service within a set period of time.
[0091] In some implementations, the actual resource usage of any type of resource can be collected as historical resource usage within a set period of time by monitoring the service. For example, the historical resource usage of any type of resource in the past quarter can be collected.
[0092] S304, fitting the historical resource usage to obtain a resource prediction function for any type of resource, wherein the resource prediction function is used to predict the resource usage of the service for any type of resource at different times.
[0093] In some implementations, a linear fit can be performed on the historical resource usage of any type of resource to obtain a resource prediction function for any type of resource. Optionally, the historical resource usage can be preprocessed, such as removing outliers, filling missing values, etc., to improve the accuracy of the resource prediction function.
[0094] In some implementations, the historical resource usage can be linearly fitted with time based on the time feature to obtain a resource prediction function about time. In other words, the resource prediction function can be used to predict the resource usage of any type of resource at different times. The formula for fitting the historical resource usage is as follows:
[0095] fu=kt+n (2)
[0096] Among them, fu is the predicted resource usage corresponding to time t after linear fitting, k is the slope in linear fitting, n is a constant, and t is the time.
[0097] Furthermore, based on the resource prediction function, the predicted first resource usage of the service for any resource at the current moment and the predicted second resource usage at the next moment can be predicted.
[0098] like Figure 4The resource prediction function diagram is shown. The resource prediction function of any type of resource is obtained by collecting the historical resource usage of any type of resource in a quarter and performing linear fitting on the historical resource usage. According to the resource prediction function, the first resource prediction usage fu1 at the current moment can be predicted, and the resource usage for the next quarter can also be predicted, that is, the second resource prediction usage fu2 in June can be predicted.
[0099] S305: Obtain a target resource usage of the service for any type of resource based on the first resource prediction usage, the second resource prediction usage and the benchmark resource usage.
[0100] In the embodiment of the present application, the implementation method of step S305 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0101] S306: Based on the target resource usage of the N types of resources, obtain a target hardware resource configuration that matches the service.
[0102] In the embodiment of the present application, the implementation method of step S306 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0103] In the method for matching services and hardware resources provided in an embodiment of the present application, the actual usage of N types of resources in a service within a unit time is obtained as the first resource usage, and the availability target value of the service is obtained. Based on the first resource usage and the availability target value of the service, the baseline resource usage of any type of resource can be determined. By fitting the historical resource usage, the predicted resource usage of any type of resource can be obtained, and then the target resource usage of any type of resource can be determined. By predicting the future resource usage of the service, the availability of the service can be improved. Obtaining the target hardware resource configuration that matches the service from the resource pool can ensure that while the service reaches the availability target value, hardware costs are saved and waste of resources is avoided.
[0104] Figure 5 is a flow chart of a method for matching services with hardware resources according to an exemplary embodiment. Figure 5 As shown, the method for matching services and hardware resources in an embodiment of the present application includes the following steps:
[0105] S501: Obtain the first resource usage of N types of resources and the target value of service availability within a service unit duration, where N is an integer greater than or equal to 1.
[0106] In the embodiment of the present application, the implementation method of step S501 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0107] S502: For any resource of the N resource types, determine a baseline resource usage of any resource type based on a first resource usage and an availability target value of any resource type.
[0108] In the embodiment of the present application, the implementation method of step S502 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0109] S503, the prediction service predicts the usage of a first resource of any type of resource at the current moment, and predicts the usage of a second resource at the next moment.
[0110] In the embodiment of the present application, the implementation method of step S503 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0111] S504: Obtain a resource amplification factor based on the first resource predicted usage and the second resource predicted usage.
[0112] In some implementations, the ratio of the second resource predicted usage to the first resource predicted usage can be determined based on the first resource predicted usage and the second resource predicted usage, and then the resource magnification factor can be determined according to the ratio and 1. The formula for calculating the resource magnification factor is as follows:
[0113] α=max(fu2 / fu1,1) (3)
[0114] Wherein, α is the resource magnification factor, and the resource magnification factor is greater than or equal to 1. If the ratio of the second resource predicted usage to the first resource predicted usage is greater than 1, the value of the resource magnification factor is determined to be the ratio. If the ratio of the second resource predicted usage to the first resource predicted usage is less than 1, the value of the resource magnification factor is 1.
[0115] It can be understood that the resource amplification factor of any type of resource is determined based on the ratio of the second resource predicted usage to the first resource predicted usage of any type of resource, and the resource usage allocation can be adjusted according to the ratio to improve resource utilization and avoid waste of resources.
[0116] S505: Obtain the target resource usage of the service for any type of resource according to the resource amplification factor and the benchmark resource usage.
[0117] In some implementations, the target resource usage of a service for any type of resource can be obtained by multiplying the resource magnification factor by the baseline resource usage. Optionally, if the resource magnification factor is greater than 1, it means that the target resource usage of any type of resource is greater than the baseline resource usage, and the configuration of hardware resources needs to be improved. If the resource magnification factor is equal to 1, it means that the target resource usage of any type of resource is equal to the baseline resource usage, and the configuration of hardware resources should be maintained. The formula for calculating the target resource usage is as follows:
[0118] tu=α·bu=α·quantile(u,a)×b (4)
[0119] Among them, tu is the target resource usage, α is the resource amplification factor, bu is the benchmark resource usage, u is the first resource usage, a is the availability target value, b is the resource buffer coefficient, and quantile is the quantile function.
[0120] S506: Based on the target resource usage of the N types of resources, obtain a target hardware resource configuration that matches the service.
[0121] In the embodiment of the present application, the implementation method of step S506 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0122] In the method for matching services and hardware resources provided in an embodiment of the present application, the actual usage of N types of resources in a service within a unit time is obtained as the first resource usage, and the availability target value of the service is obtained. Based on the first resource usage and the availability target value of the service, the baseline resource usage of any type of resource can be determined. According to the predicted resource usage of any type of resource, the resource amplification factor of any type of resource is determined, and then the target resource usage is obtained. The allocation of resource usage can be adjusted according to the resource amplification factor to improve resource utilization and avoid wasting resources. By obtaining the target hardware resource configuration that matches the service from the resource pool, it can be ensured that while the service reaches the availability target value, hardware costs are saved and waste of resources is avoided.
[0123] Figure 6 is a flow chart of a method for matching services with hardware resources according to an exemplary embodiment. Figure 6 As shown, the method for matching services and hardware resources in an embodiment of the present application includes the following steps:
[0124] S601: Obtain the first resource usage of N types of resources and the target value of service availability within a service unit duration, where N is an integer greater than or equal to 1.
[0125] In the embodiment of the present application, the implementation method of step S601 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0126] S602: For any resource of the N resource types, determine a baseline resource usage of the resource based on a first resource usage and an availability target value of the resource.
[0127] In the embodiment of the present application, the implementation method of step S602 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0128] S603, the prediction service predicts the usage of a first resource of any type of resource at the current moment, and predicts the usage of a second resource at the next moment.
[0129] In the embodiment of the present application, the implementation method of step S603 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0130] S604: Obtain a target resource usage of the service for any type of resource based on the first resource prediction usage, the second resource prediction usage and the reference resource usage.
[0131] In the embodiment of the present application, the implementation method of step S604 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.
[0132] S605: Obtain candidate hardware resource configurations and configuration resource usages of N types of resources included in the candidate hardware resource configurations.
[0133] In some implementations, the resource pool includes several hardware resource configurations, and the configuration resource usages of the corresponding N types of resources are different. In order to meet the service's demand for hardware resource configuration, hardware resource configurations whose configuration resource usages of each type of resource are greater than the target resource usage can be obtained from the resource pool as candidate hardware resource configurations, and the target hardware resource configuration is determined from the candidate hardware resource configurations.
[0134] Optionally, the first hardware resource configuration may be obtained from the resource pool, and the configuration resource usage of the N types of resources in the first hardware resource configuration may be determined. For example, if the first hardware resource configuration is 4 cores + 64GB memory + 120GB disk, the configuration resource usage of the N types of resources is 4 cores of CPU, 64GB of memory, and 120GB of disk.
[0135] Furthermore, by comparing the resource usage of each type of the first hardware resource configuration with the target resource usage, a hardware resource configuration whose resource usage of each type of resource is greater than the target resource usage is selected from the first hardware resource configuration as a candidate hardware resource configuration.
[0136] S606: For each candidate hardware resource configuration, determine a configuration screening coefficient of the candidate hardware resource configuration based on the target resource usage and the configuration resource usage of the N types of resources.
[0137] It is understandable that the candidate hardware resource configurations in the resource pool are composed of several groups of fixed combinations, while the target resource usage is an arbitrary natural number, such as a 3.5-core CPU, 64GB of memory, and a 120GB disk. It is impossible to directly obtain the target hardware resource configuration that matches the service from the candidate hardware resource configurations.
[0138] Optionally, for any resource of the N resource types, based on the target resource usage and the configured resource usage of any resource type, the usage difference of any resource type can be obtained. The usage difference of any resource type is normalized to obtain a normalized usage difference, so as to convert resource usages of different units into a unified scale.
[0139] Furthermore, based on the normalized usage difference of N types of resources, the Euclidean distance between the target resource usage and the candidate hardware resource configuration can be determined as the configuration screening coefficient of the candidate hardware resource configuration. Taking the three types of resources, namely the number of CPU cores, memory capacity and disk capacity, as examples, the formula for calculating the configuration screening coefficient is as follows:
[0140]
[0141] Where pu is the configured resource usage, tu is the target resource usage, the subscripts CPU, mem, and disk are the number of CPU cores, memory capacity, and disk capacity, respectively, and the configured resource usage and target resource usage must satisfy: pu CPU ≥tu CPU ,pu mem ≥tu mem ,pu disk ≥tu disk .
[0142] S607: Determine a target hardware resource configuration matching the service from the candidate hardware resource configurations based on the configuration screening coefficient.
[0143] In some implementations, all candidate hardware resource configurations in the resource pool are traversed to calculate the configuration screening coefficient of each candidate hardware resource configuration one by one. By comparing the sizes of all configuration screening coefficients, the candidate hardware configuration with the smallest configuration screening coefficient is selected as the target hardware configuration.
[0144] like Figure 7 The matching process of the candidate hardware resource configuration and the target resource usage is shown, taking the number of CPU cores and memory capacity as an example, and the target resource usage is 10 CPU cores and 52 GB of memory. Figure 7 There are multiple hardware resource configurations in the figure. The configuration resource usage of each type of resource of the black hardware resource configurations A, B, and C located to the upper right of the dotted line is greater than the target resource usage, and they can be used as candidate hardware resource configurations. Based on the target resource usage and the configuration resource usage, the Euclidean distance between the target resource usage and the candidate hardware resource configuration is calculated to obtain the configuration screening coefficient β1 of the candidate hardware resource configuration A, the configuration screening coefficient β2 of the candidate hardware resource configuration B, and the configuration screening coefficient β3 of the candidate hardware resource configuration C. The configuration screening coefficients are compared, and the candidate hardware configuration with the smallest configuration screening coefficient is selected as the target hardware configuration.
[0145] In the embodiment of the present application, the corresponding relationship between the candidate hardware resource configuration, the configuration resource usage and the configuration screening coefficient is shown in Table 2 below:
[0146] Table 2
[0147]
[0148] It can be determined from Table 2 that the configuration screening coefficient β2 is the smallest, so the candidate hardware resource configuration B is determined as the target hardware configuration, and the target hardware configuration is 20 cores + 96GB memory.
[0149] In the method for matching services and hardware resources provided in an embodiment of the present application, the actual usage of N types of resources in a service within a unit time is obtained as the first resource usage, and the availability target value of the service is obtained. Based on the first resource usage and the availability target value of the service, the baseline resource usage of any type of resource can be determined. According to the predicted resource usage of any type of resource, the target resource usage of any type of resource is determined, and the availability of the service can be improved by predicting the future resource usage of the service. By matching with the candidate hardware resource configuration in the resource pool, a target hardware resource configuration that matches the service is obtained, which can ensure that while the service reaches the availability target value, hardware costs are saved and waste of resources is avoided.
[0150] This application Figure 8 is a structural block diagram of a device for matching services with hardware resources according to an exemplary embodiment. Figure 8 The device 800 for matching services and hardware resources in the embodiment of the present application includes: an acquisition module 801 , a first determination module 802 , a prediction module 803 , a second determination module 804 and a matching module 805 .
[0151] The acquisition module 801 is used to obtain the first resource usage of N types of resources and the availability target value of the service within a service unit time, where N is an integer greater than or equal to 1.
[0152] The first determination module 802 is used to determine, for any resource of the N resource types, a baseline resource usage of the any resource type based on the first resource usage and the availability target value of the any resource type.
[0153] The prediction module 803 is used to predict the predicted usage of the first resource of the service for any type of resource at the current moment, and the predicted usage of the second resource at the next moment.
[0154] The second determination module 804 is used to obtain the target resource usage of the service for any type of resource based on the first resource predicted usage, the second resource predicted usage and the benchmark resource usage.
[0155] The matching module 805 is used to obtain a target hardware resource configuration matching the service based on the target resource usage of the N types of resources.
[0156] In one embodiment of the present application, the first determination module 802 is also used to: obtain a resource buffer coefficient; obtain candidate resource usage of any one type of resources based on the first resource usage of any one type of resources and the availability target value; correct the candidate resource usage of any one type of resources based on the resource buffer coefficient to obtain a benchmark resource usage of any one type of resources.
[0157] In one embodiment of the present application, the first determination module 802 is further used to: obtain the level of the service, and determine the resource buffer coefficient according to the level of the service.
[0158] In one embodiment of the present application, the second determination module 804 is further used to: obtain a resource amplification factor based on the first resource predicted usage and the second resource predicted usage; and obtain a target resource usage of the service for any one type of resource based on the resource amplification factor and the benchmark resource usage.
[0159] In one embodiment of the present application, the prediction module 803 is also used to: obtain the historical resource usage of the service for any type of resource over a set period of time; fit the historical resource usage to obtain a resource prediction function for any type of resource, wherein the resource prediction function is used to predict the resource usage of the service for any type of resource at different times.
[0160] In one embodiment of the present application, the matching module 805 is also used to: obtain candidate hardware resource configurations and the configuration resource usage of N types of resources included in the candidate hardware resource configurations; for each candidate hardware resource configuration, determine the configuration screening coefficient of the candidate hardware resource configuration based on the target resource usage and the configuration resource usage of the N types of resources; based on the configuration screening coefficient, determine the target hardware resource configuration that matches the service from the candidate hardware resource configurations.
[0161] In one embodiment of the present application, the matching module 805 is further configured to: select the candidate hardware configuration with the smallest configuration screening coefficient as the target hardware configuration.
[0162] In one embodiment of the present application, the matching module 805 is further configured to: for any resource of the N resource types, based on the target resource usage and the configured resource usage of the resource type, obtain a usage difference of the resource type;
[0163] Normalizing the usage difference of any type of resources to obtain a normalized usage difference;
[0164] Based on the usage differences of the N types of resources, a Euclidean distance between the target resource usage and the candidate hardware resource configuration is determined as a configuration screening coefficient of the candidate hardware resource configuration.
[0165] In one embodiment of the present application, the matching module 805 is also used to: obtain a first hardware resource configuration from a resource pool, and determine the configuration resource usage of N types of resources in the first hardware resource configuration; from the first hardware resource configuration, select a hardware resource configuration in which the configuration resource usage of each type of resource is greater than the target resource usage as the candidate hardware resource configuration.
[0166] In the method for matching services and hardware resources provided in an embodiment of the present application, the actual usage of N types of resources in a service within a unit time period is obtained as the first resource usage, and the availability target value of the service is obtained. Based on the first resource usage and the availability target value of the service, the baseline resource usage of any type of resource can be determined. According to the predicted resource usage of any type of resource, the target resource usage of any type of resource is determined, and the availability of the service can be improved by predicting the future resource usage of the service. Obtaining the target hardware resource configuration that matches the service from the resource pool can ensure that while the service reaches the availability target value, hardware costs are saved and waste of resources is avoided.
[0167] Fig. 9 It is a block diagram of an electronic device according to an exemplary embodiment. Fig. 9The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0168] like Fig. 9 As shown, the electronic device 900 includes a processor 901, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 902 or the program loaded from the memory 906 to the random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the electronic device 900 are also stored. The processor 901, the ROM 902 and the RAM 903 are connected to each other through a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0169] The following components are connected to the I / O interface 905: a memory 906 including a hard disk, etc.; and a communication part 907 including a network interface card such as a local area network (LAN) card, a modem, etc., and the communication part 907 performs communication processing via a network such as the Internet; a drive 909 is also connected to the I / O interface 905 as needed.
[0170] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 907. When the computer program is executed by the processor 901, the above-mentioned functions defined in the method of the present application are executed.
[0171] In an exemplary embodiment, a storage medium including instructions is also provided, such as a memory including instructions, and the instructions can be executed by the processor 901 of the electronic device 900 to complete the above method. Optionally, the storage medium can be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0172] In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0173] Fig.10 The present invention is a structural block diagram of an electronic device according to an exemplary embodiment. Fig.10 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present application. Fig.10 As shown, the electronic device 1000 includes a processor 1001 and a memory 1002. The memory 1002 is used to store program codes, and the processor 1001 is connected to the memory 1002 to read the program codes from the memory 1002 to implement the matching method of the service and the hardware resources in the above embodiment.
[0174] Optionally, the number of processors 1001 may be one or more.
[0175] Optionally, the electronic device may further include an interface 1003, and the number of the interface 1003 may be multiple. The interface 1003 may be connected to an application program and may receive data from an external device such as a sensor.
[0176] 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 the present invention and include common knowledge or customary techniques in the art that are not disclosed in this application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0177] It should be understood that the present application is not limited to the precise structures that have been 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 method for matching services with hardware resources, characterized in that: The method comprises: Obtaining a first resource usage of N types of resources and an availability target value of the service within a service unit duration, where N is an integer greater than or equal to 1; For any resource of the N types of resources, determining a baseline resource usage of the resource of the type based on the first resource usage and the availability target value of the resource of the type; Predicting a predicted usage of a first resource of the service for any type of resource at a current moment, and a predicted usage of a second resource at a next moment; Obtaining a target resource usage of the service for any one of the resources based on the first resource prediction usage, the second resource prediction usage and the benchmark resource usage; Based on the target resource usage of the N types of resources, a target hardware resource configuration matching the service is obtained.
2. The method according to claim 1, characterized in that The determining, based on the first resource usage of the any type of resource and the availability target value, a baseline resource usage of the any type of resource comprises: Get resource buffer coefficient; Based on the first resource usage of any one type of resources and the availability target value, obtaining candidate resource usage of any one type of resources; The candidate resource usage of any one type of resource is corrected based on the resource buffer coefficient to obtain a benchmark resource usage of any one type of resource.
3. The method according to claim 2, characterized in that The obtaining of the resource buffer coefficient comprises: The service level is acquired, and the resource buffer coefficient is determined according to the service level.
4. The method according to any one of claims 1 to 3, characterized in that The obtaining, based on the first resource predicted usage, the second resource predicted usage and the reference resource usage, a target resource usage of the service for any type of resource includes: Obtaining a resource amplification factor based on the first resource predicted usage and the second resource predicted usage; According to the resource amplification factor and the benchmark resource usage, a target resource usage of the service for any type of resource is obtained.
5. The method according to any one of claims 1 to 3, characterized in that: Before predicting the first resource usage predicted by the service for any type of resource at the current moment and the second resource usage predicted at the next moment, the method further includes: Obtaining historical resource usage of any type of resource by the service over a set period of time; The historical resource usage is fitted to obtain a resource prediction function of any one type of resource, wherein the resource prediction function is used to predict the resource usage of the service for any one type of resource at different times.
6. The method according to any one of claims 1 to 3, characterized in that The acquiring a target hardware resource configuration matching the service based on the target resource usage of the N types of resources includes: Obtaining candidate hardware resource configurations and configuration resource usages of N types of resources included in the candidate hardware resource configurations; For each candidate hardware resource configuration, determining a configuration screening coefficient of the candidate hardware resource configuration based on the target resource usage and the configuration resource usage of the N types of resources; Based on the configuration screening coefficient, a target hardware resource configuration matching the service is determined from the candidate hardware resource configurations.
7. The method according to claim 6, characterized in that The step of determining a target hardware resource configuration matching the service from the candidate hardware resource configurations based on the configuration screening coefficient includes: The candidate hardware configuration with the smallest configuration screening coefficient is selected as the target hardware configuration.
8. The method according to claim 6, characterized in that The determining of the configuration screening coefficient of the candidate hardware resource configuration based on the target resource usage and the configuration resource usage of the N types of resources includes: For any resource of the N resource types, based on the target resource usage and the configured resource usage of the resource, obtaining a usage difference of the resource of the resource type; Normalizing the usage difference of any type of resources to obtain a normalized usage difference; Based on the usage differences of the N types of resources, a Euclidean distance between the target resource usage and the candidate hardware resource configuration is determined as a configuration screening coefficient of the candidate hardware resource configuration.
9. The method according to claim 6, characterized in that The obtaining of candidate hardware resource configurations and configuration resource usages of N types of resources included in the candidate hardware resource configurations includes: Acquire a first hardware resource configuration from a resource pool, and determine a configuration resource usage of N types of resources in the first hardware resource configuration; From the first hardware resource configurations, a hardware resource configuration in which the configured resource usage of each type of resource is greater than the target resource usage is selected as the candidate hardware resource configuration.
10. A device for matching services with hardware resources, characterized in that: The device comprises: An acquisition module, used to acquire a first resource usage of N types of resources and an availability target value of the service within a service unit duration, where N is an integer greater than or equal to 1; A first determination module is used to determine, for any resource of the N resource types, a baseline resource usage of the resource of the type based on the first resource usage and the availability target value of the resource of the type; A prediction module, used to predict the predicted usage of the first resource of the service for any type of resource at the current moment, and the predicted usage of the second resource at the next moment; A second determination module, configured to obtain a target resource usage of the service for any one type of resource based on the first resource prediction usage, the second resource prediction usage and the reference resource usage; The matching module is used to obtain a target hardware resource configuration matching the service based on the target resource usage of the N types of resources.
11. The method according to claim 10, characterized in that The first determining module is further used for: Get resource buffer coefficient; Based on the first resource usage of any one type of resources and the availability target value, obtaining candidate resource usage of any one type of resources; The candidate resource usage of any one type of resource is corrected based on the resource buffer coefficient to obtain a benchmark resource usage of any one type of resource.
12. The device according to claim 11, characterized in that The first determining module is further used for: The service level is acquired, and the resource buffer coefficient is determined according to the service level.
13. The device according to any one of claims 10 to 12, characterized in that The second determining module is further used for: Obtaining a resource amplification factor based on the first resource predicted usage and the second resource predicted usage; According to the resource amplification factor and the benchmark resource usage, a target resource usage of the service for any type of resource is obtained.
14. The device according to any one of claims 10 to 12, characterized in that The prediction module is further used for: Obtaining historical resource usage of any type of resource by the service over a set period of time; The historical resource usage is fitted to obtain a resource prediction function of any one type of resource, wherein the resource prediction function is used to predict the resource usage of the service for any one type of resource at different times.
15. The device according to any one of claims 10 to 12, characterized in that The matching module is further used for: Obtaining candidate hardware resource configurations and configuration resource usages of N types of resources included in the candidate hardware resource configurations; For each candidate hardware resource configuration, determining a configuration screening coefficient of the candidate hardware resource configuration based on the target resource usage and the configuration resource usage of the N types of resources; Based on the configuration screening coefficient, a target hardware resource configuration matching the service is determined from the candidate hardware resource configurations.
16. The device according to claim 15, characterized in that The matching module is further used for: The candidate hardware configuration with the smallest configuration screening coefficient is selected as the target hardware configuration.
17. The device according to claim 15, characterized in that The matching module is further used for: For any resource of the N resource types, based on the target resource usage and the configured resource usage of the resource, obtaining a usage difference of the resource of the resource type; Normalizing the usage difference of any type of resources to obtain a normalized usage difference; Based on the usage differences of the N types of resources, a Euclidean distance between the target resource usage and the candidate hardware resource configuration is determined as a configuration screening coefficient of the candidate hardware resource configuration.
18. The device according to claim 15, characterized in that The matching module is further used for: Acquire a first hardware resource configuration from a resource pool, and determine a configuration resource usage of N types of resources in the first hardware resource configuration; From the first hardware resource configurations, a hardware resource configuration in which the configured resource usage of each type of resource is greater than the target resource usage is selected as the candidate hardware resource configuration.
19. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to implement the steps of the method according to any one of claims 1 to 9.
20. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 9 are implemented.
Citation Information
Cited By
Service resource determination method and device, equipment and storage medium
CN120455397A