Resource allocation method based on micro-service system, electronic equipment and storage medium
By acquiring and utilizing the resource utilization rate and performance parameters of the business server to estimate the demand and adjusting the operation resource allocation, the problem of low resource utilization rate in the existing technology is solved, and more efficient resource matching is achieved.
Patent Information
- Application Number
- CN202411333022.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-01-03
AI Technical Summary
In the prior art, the operation resource allocation method based on preset configuration information is difficult to adapt to rapidly changing business needs, resulting in low operating resource utilization.
By obtaining the operating resource utilization and performance parameters of the target business server, use these parameters to estimate the demand for the operating resources, and adjust the resource allocation according to the demand, including calculating the demand using preset models or formulas, and adjusting the resources Deviations and preset thresholds are taken into account when allocating to ensure system stability.
It achieves more accurately matching the resource requirements of the business server, improves the utilization rate of operating resources, and avoids the problem of low resource utilization.
Smart Images

Figure CN119248493A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a resource allocation method, electronic device, and storage medium based on a microservice system. Background Art
[0002] In the field of enterprise application development and deployment, microservice systems have become mainstream. In a microservice system, the service end is configured as a central server and multiple business servers. The central server is used to allocate operating resources to each business server, so that each business server can process related businesses based on the operating resources allocated by the central server. Therefore, how the central server allocates operating resources is crucial.
[0003] Currently, the central server usually allocates operating resources to each business server based on preset configuration information. Specifically, the preset configuration information is pre-set by relevant personnel, so that the central server can allocate operating resources based on the preset configuration information.
[0004] However, this operating resource allocation method based on preset configuration information is often difficult to adapt to rapidly changing business needs. For example, when the business volume of certain business servers changes significantly, this operating resource allocation method based on preset configuration information is difficult to adjust the allocation ratio of operating resources in a timely manner, which can easily lead to the problem of low operating resource utilization. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a resource allocation method, an electronic device and a storage medium based on a microservice system, so as to solve the problem of low operating resource utilization in the prior art.
[0006] A first aspect of an embodiment of the present application provides a resource allocation method based on a microservice system, comprising:
[0007] Obtain the operating resource utilization and performance parameters of the target business server;
[0008] Using the operating resource usage rate and the performance parameter, estimating the demand for operating resources of the target service server;
[0009] Allocate operating resources to the target service server according to the demand.
[0010] Preferably, using the operating resource usage rate and the performance parameter to estimate the demand for operating resources by the target service server specifically includes:
[0011] The operating resource utilization rate and the performance parameter are input into an operating resource demand estimation model to obtain an output of the resource demand estimation model, and the output is used as the estimated demand.
[0012] Preferably, the method further comprises: pre-generating the operation resource demand estimation model.
[0013] Preferably, the operating resource utilization rate and the performance parameter are used to estimate the demand for operating resources of the target business server, specifically including: substituting the operating resource utilization rate and the performance parameter into a preset calculation formula to estimate the demand.
[0014] Preferably, the preset calculation formula specifically includes: Q=a×P1-b×P2;
[0015] Among them, Q is the calculated demand; P1 is the operating resource utilization rate; P2 is the performance parameter; a and b are both preset parameters, and a and b are both greater than 0.
[0016] Preferably, the operating resource utilization rate and performance parameters of the target business server specifically include: the operating resource utilization rate and performance parameters of the target business server in this cycle; and
[0017] The demand of the target business server for operating resources specifically includes: the demand of the target business server for operating resources in the next cycle.
[0018] Preferably, allocating operating resources to the target service server according to the demand specifically includes:
[0019] Determine a deviation between a current allocation of operating resources of the target service server and the required amount, wherein the deviation is an absolute value of a difference between the current allocation and the required amount;
[0020] Determining whether the deviation is greater than a preset threshold;
[0021] If not, adjusting the operating resources of the target service server from the current allocated amount to the required amount; or,
[0022] If so, the security requirement is determined according to the current allocation and the preset threshold, and the operating resources of the target service server are adjusted from the current allocation to the security requirement.
[0023] Preferably, adjusting the operating resources of the target service server from the current allocated amount to the required amount specifically includes:
[0024] Adjusting the operating resources of the target service server from a current allocation to an intermediate amount at a first rate, wherein the intermediate amount is a value between the current allocation and the demand;
[0025] The operating resources of the target service server are adjusted from the intermediate amount to the required amount at a second rate, wherein the second rate is greater than the first rate.
[0026] A second aspect of an embodiment of the present application provides an electronic device, including:
[0027] Memory for storing computer programs;
[0028] A processor is used to execute any one of the methods described in the method embodiments of the present application.
[0029] A third aspect of an embodiment of the present application provides a storage medium, including: a program, which, when executed on an electronic device, enables the electronic device to execute any one of the methods in the method embodiments of the present application.
[0030] The method provided by the embodiment of the present application includes first obtaining the operating resource usage rate and performance parameters of the target business server, then using the operating resource usage rate and the performance parameters to estimate the target business server's demand for operating resources, and then allocating operating resources to the target business server based on the demand. In this method, since the target business server's demand for operating resources is estimated using its operating resource usage rate and performance parameters, the operating resources allocated to the target business server based on the demand can more accurately match the actual needs of the target business server, thereby solving the problems in the prior art and improving the utilization of operating resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0032] Figure 1 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application;
[0033] Figure 2 A schematic diagram of the structure of a microservice system provided in one embodiment of the present application;
[0034] Figure 3 A schematic diagram of a specific process of a resource allocation method based on a microservice system provided in an embodiment of the present application;
[0035] Figure 4 A schematic diagram of the specific structure of a resource allocation device based on a microservice system provided in one embodiment of the present application. DETAILED DESCRIPTION
[0036] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. In the description of the present application, terms such as "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance or sequence.
[0037] As mentioned above, currently the central server usually allocates operating resources to each business server based on preset configuration information. However, this operating resource allocation method based on preset configuration information is often difficult to adapt to rapidly changing business needs, and thus is prone to low operating resource utilization.
[0038] In view of this, the embodiments of the present application provide a resource allocation method, device, electronic device and storage medium based on a microservice system, which can be used to solve the technical problem. Figure 1 FIG. 1 is a schematic diagram of a specific structure of an electronic device provided in this embodiment. The electronic device 1 includes: at least one processor 11 and a memory 12. Figure 1 A processor is taken as an example. The processor 11 and the memory 12 may be connected via a bus 10, and the memory 12 stores instructions executable by the processor 11, and the instructions are executed by the processor 11, so that the electronic device 1 can execute all or part of the process of the method in the embodiment of the present application.
[0039] The electronic device 1 may be a mobile phone, a computer, or a cluster deployed with computers, mobile phones, etc. The specific form of the electronic device 1 is not limited here.
[0040] For the convenience of subsequent description, the structure of the microservice system in the embodiment of the present application can be described here first, such as Figure 2 The figure shows a specific structural diagram of the microservice system. The microservice system 20 includes a central server 21 and multiple business servers 22. The central server 21 can be used to allocate operating resources to each business server 22. The operating resources may be, for example, storage resources, computing resources, bandwidth resources, etc.; each business server 22 can process related businesses based on the operating resources allocated by the central server 21. In actual reference, depending on the type of enterprise business, the business processed by the business server 22 may be, for example, sales business, accounting business, customer service business, etc. The business processed by the business server 22 is not specifically limited here.
[0041] like Figure 3The following is a schematic diagram of a specific process of a resource allocation method based on a microservice system provided in an embodiment of the present application. The method can be performed by Figure 1 The electronic device 1 shown here, for example, only uses the electronic device 1 as Figure 2 The method is illustrated by using the central server 21 in the microservice system 20 to execute the method. In this case, the method includes the following steps:
[0042] Step S31: Obtain the operating resource usage and performance parameters of the target service server.
[0043] The target service server can be Figure 2 In the microservice system 20 shown, any business server 22 may also be a designated business server 22 in the microservice system 20 .
[0044] During the process of business processing, the target business server needs to be allocated operating resources by the central server to support the business processing of the target business server, wherein the amount of operating resources currently allocated by the central server to the target business server can be referred to as the current allocation. At this time, the current allocation and actual usage of the operating resources of the target business server can be obtained, and then the ratio of the actual usage to the current allocation can be calculated as the utilization rate of the operating resources. Among them, there can be many types of operating resources allocated by the central server to the target business server, such as bandwidth resources, storage resources, computing resources, etc., and the type of the operating resources is not specifically limited here, that is, for any type of operating resources allocated by the central server to the target business server, the operating resources can be allocated by the method provided in the embodiment of the present application.
[0045] The performance parameter reflects the performance of the target service server when processing services with the currently allocated operating resources, such as response speed, delay, disconnection rate, etc. For example, the higher the performance parameter, the better the performance of the target service server when processing services with the currently allocated operating resources, and accordingly, the faster the response speed, and the lower the delay and disconnection rate. Conversely, the lower the performance parameter, the worse the performance of the target service server when processing services with the currently allocated operating resources.
[0046] In actual applications, relevant monitoring tools may be pre-installed in the central server, for example, the monitoring tool may be Prometheus, etc., and the operating resource usage and performance parameters of the target business server may be obtained through the monitoring tool.
[0047] Step S32: using the operating resource usage rate and the performance parameter, estimating the demand for operating resources of the target business server.
[0048] After the operating resource usage rate and performance parameters of the target business server are obtained through the above step S31, in step S32, the operating resource usage rate and the performance parameters can be used to estimate the demand for operating resources of the target business server.
[0049] Among them, in actual applications, there can be many specific implementation methods for step S32. For example, the first method is to use a large model (called an operating resource demand estimation model) to predict the demand. At this time, the operating resource utilization rate and the performance parameters can be input into the operating resource demand estimation model to obtain the output of the resource demand estimation model, and the output is used as the estimated demand.
[0050] For example, the operating resource demand estimation model can be generated in advance by training the pre-trained model, and then the operating resource usage rate and the performance parameter are input into the operating resource demand estimation model to obtain the output of the operating resource demand estimation model. The pre-trained model can be a neural network model. Specifically, for example, samples can be generated from relevant historical data, and then the samples are input into the neural network model for model training, so as to generate the operating resource demand estimation model in advance.
[0051] A second implementation of step S32 may be to substitute the operating resource utilization rate and performance parameters into a preset calculation formula to estimate the demand, wherein the preset calculation formula may specifically include: Q=a×P1-b×P2.
[0052] In the preset calculation, Q is the calculated demand; P1 is the operating resource utilization rate; P2 is the performance parameter; a and b are both preset parameters, and a and b are both greater than 0. Therefore, after obtaining the operating resource utilization rate P1 and the performance parameter P2 of the target business server through the above step S31, the resource utilization rate P1 and the performance parameter P2 can be substituted into the preset calculation to calculate the demand Q.
[0053] It is important to note that, since the preset parameters a and b have a significant impact on the calculated demand Q, further explanation can be given on how to determine the preset parameters a and b. In practical applications, the preset parameter a is used as an amplification factor of the operating resource utilization rate P1, which essentially reflects the degree of influence of the operating resource utilization rate P1 on the demand Q. Similarly, the preset parameter b is used as an amplification factor of the performance parameter P2, which essentially reflects the degree of influence of the performance parameter P2 on the demand Q. Therefore, the preset parameters a and b can usually be determined through load testing experiments.
[0054] For example, the operating resource utilization rate P1 can be set in a specified interval (for example, the specified interval can be 70%-75%), wherein the difference between the upper and lower limits of the specified interval needs to be small. In this way, during the load testing experiment, the value of the operating resource utilization rate P1 can be considered to be roughly unchanged, and then the amount of operating resources allocated to the target business server is continuously adjusted (small adjustments can be made multiple times) to obtain the performance parameters corresponding to each operating resource amount, and then the preset parameter b is calculated through each operating resource amount and the corresponding performance parameters. For example, it can be approximately considered that the influence of the operating resource amount on the performance parameter is a linear relationship. At this time, the preset parameter b can be obtained by linear fitting.
[0055] Similarly, the performance parameter P2 can also be set in a smaller second specified interval, and the difference between the upper and lower limits of the second specified interval also needs to be smaller, so that during the load test experiment, the value of the performance parameter P2 can be considered to be roughly unchanged. Then, by continuously adjusting (it can also be adjusted in small increments multiple times) the amount of operating resources allocated to the target business server, the operating resource utilization rate P1 corresponding to each operating resource amount can be obtained, and then the preset parameter a can be calculated through each operating resource amount and the corresponding operating resource utilization rate P1. At this time, it can also be approximately considered that the influence of the operating resource amount on the operating resource utilization rate P1 is a linear relationship, so the preset parameter a can also be obtained by linear fitting.
[0056] Step S33: Allocate operating resources to the target service server according to the demand.
[0057] After the demand for operating resources of the target service server is estimated in the above step S32, in the step S33, the operating resources can be allocated to the target service server according to the demand.
[0058] For example, one approach is to directly adjust the operating resources of the target service server from the current allocated amount to the required amount, thereby achieving resource allocation to the target service server.
[0059] However, in actual applications, when there are drastic changes in business volume, the deviation between the current allocation and the demand may be large. For example, the demand may be much larger than the current allocation. If the adjustment is made directly at this time, it may easily lead to insufficient operating resources for other business servers in the microservice system, thereby causing instability in the microservice system. The deviation is the absolute value of the difference between the current allocation and the demand.
[0060] Therefore, for step S33, another implementation method may be to first determine the deviation between the current allocated amount and the demand amount, and then determine whether the deviation is greater than a preset threshold. If not (that is, the deviation is less than or equal to the preset threshold), it means that the adjustment range from the current allocated amount to the demand amount is not large and will not affect the stability of the microservice system. Therefore, the operating resources of the target business server can be adjusted from the current allocated amount to the demand amount.
[0061] On the contrary, if (that is, the deviation is greater than the preset threshold), it means that the adjustment range from the current allocation to the demand is large, which may affect the stability of the microservice system. Therefore, the operating resources of the target business server cannot be adjusted from the current allocation to the demand, and other processing methods are needed. In an embodiment of the present application, the safety demand can be determined based on the current allocation and the preset threshold, and the operating resources of the target business server can be adjusted from the current allocation to the safety demand.
[0062] For example, if the deviation is greater than the preset threshold, and the current allocation is less than the demand, it means that the amount of operating resources of the target business server needs to be greatly increased. At this time, the current allocation can be added to the preset threshold to obtain the safety demand, and then the operating resources of the target business server are adjusted from the current allocation to the safety demand. Obviously, in this method, the safety demand is less than the demand. By adjusting the operating resources of the target business server from the current allocation to the safety demand, the adjustment range is less than that of adjusting to the demand, which can reduce the impact on the stability of the microservice system.
[0063] It should be emphasized that, for the preset threshold mentioned above, since its role is to improve the stability of the microservice system by using the preset threshold, its size can usually be set in combination with the characteristics of the microservice system itself. Specifically, the preset threshold can usually be set in the following way, for example, 0.5%-2% of the total resources of the microservice system can be set as the preset threshold, for example, the preset threshold can be 0.5%, 0.7%, 1%, 1.5%, 2% or other values between 0.5%-2% of the total resources of the microservice system. At this time, taking 0.5% as an example, if the deviation (for example, the deviation is 0.8%) is greater than 0.5% of the total resources of the microservice system, it means that the adjustment range from the current allocation to the demand is large, which is easy to cause instability of the microservice system. Therefore, the current allocation plus 0.5% of the total resources of the microservice system can be used as the safety demand, and then the operating resources of the target business server are adjusted from the current allocation to the safety demand.
[0064] Since the preset threshold is set to improve the stability of the microservice system, when setting the preset threshold, in addition to considering the total amount of microservice system resources (such as 0.5%-2% of the total amount of microservice system resources), the number of business servers in the microservice system can also be considered. For example, the more business servers there are, on average, the proportion of operating resources allocated to each business server will be relatively lower, and relatively speaking, the size of the preset threshold will be smaller. For example, when the number of business servers is greater than 1000, the preset threshold can usually be 0.5%-1% of the total amount of microservice system resources.
[0065] It should be further explained that two implementation methods of step S33 are mentioned above. For example, the first method directly adjusts the operating resources of the target business server from the current allocation to the demand, and the second method is to first determine whether the deviation between the current allocation and the demand is greater than a preset threshold, and if it is less than or equal to, then adjust the operating resources of the target business server from the current allocation to the demand. However, for the adjustment rate in these two methods, the operating resources of the target business server can be adjusted from the current allocation to the demand at a fixed rate, thereby preventing the current allocation from being directly modified to the demand, which affects the stability of the microservice system.
[0066] In addition, in order to further improve the stability and adjustment rate of the microservice system, in actual applications, the operating resources of the target business server can be adjusted from the current allocation to the intermediate amount at a first rate, and then the operating resources of the target business server can be adjusted from the intermediate amount to the required amount at a second rate. In this method, the intermediate amount is a value between the current allocation and the required amount, and the second rate is greater than the first rate. Therefore, in this method, the operating resources are first adjusted from the current allocation to the intermediate amount at a relatively small first rate, and then the operating resources are adjusted from the intermediate amount to the required amount at a relatively large second rate, wherein the intermediate value can be a weighted average of the current allocation and the required amount, such as the intermediate value P = a×P1+b×P2.
[0067] In the formula, P is the intermediate quantity; P1 is the current allocation quantity; P2 is the demand quantity; a and b are weights, where the sum of a and b is 1, b∈(0, 0.5], for example, a can be 0.3, 0.4 or 0.5.
[0068] The method provided by the embodiment of the present application includes first obtaining the operating resource usage rate and performance parameters of the target business server, then using the operating resource usage rate and the performance parameters to estimate the target business server's demand for operating resources, and then allocating operating resources to the target business server based on the demand. In this method, since the target business server's demand for operating resources is estimated using its operating resource usage rate and performance parameters, the operating resources allocated to the target business server based on the demand can more accurately match the actual needs of the target business server, thereby solving the problems in the prior art and improving the utilization of operating resources.
[0069] The above is a specific description of the method provided in the embodiment of the present application. In practical applications, the resource allocation process can usually be divided into multiple cycles, such as 5 minutes, 10 minutes, 15 minutes, 1 hour, 12 hours, etc. The size of the cycle can be set according to actual needs. In this way, the method provided in the embodiment of the present application is used to allocate resources for the next cycle.
[0070] At this time, in this method, the operating resource utilization rate and performance parameters of the target business server in step S31 can specifically be the average operating resource utilization rate and average performance parameters of the target business server in this period, the average operating resource utilization rate is the average value of the operating resource utilization rate in this period, and the average performance parameter is the average value of the performance parameter in this period.
[0071] Thus, in the above step S32, the demand for operating resources of the target business server obtained is specifically the demand for operating resources of the target business server in the next cycle. Thus, in the above step S33, in the next operating cycle, operating resources are allocated to the target business server according to the demand for operating resources of the target business server in the next cycle.
[0072] Based on the same inventive concept as the resource allocation method based on a microservice system provided in the embodiment of the present application, the embodiment of the present application also provides a resource allocation device based on a microservice system. If there is any unclear point, please refer to the corresponding content of the method embodiment. Figure 4 FIG. 4 is a schematic diagram of a specific structure of the device 40, which includes: an acquisition unit 401, an estimation unit 402 and an allocation unit 403, wherein:
[0073] The acquisition unit 401 is used to acquire the operating resource usage and performance parameters of the target service server;
[0074] An estimation unit 402, configured to estimate the demand for operating resources of the target service server by using the operating resource utilization rate and the performance parameter;
[0075] The allocation unit 403 is configured to allocate operating resources to the target service server according to the demand.
[0076] The device 40 provided in the embodiment of the present application is adopted. Since the device 40 adopts the same inventive concept as the method provided in the embodiment of the present application, on the premise that the method can solve the technical problem, the device 40 can also solve the technical problem, which will not be repeated here.
[0077] The estimating the demand for operating resources by the target service server by using the operating resource utilization rate and the performance parameter may specifically include:
[0078] The operating resource utilization rate and the performance parameter are input into an operating resource demand estimation model to obtain an output of the resource demand estimation model, and the output is used as the estimated demand.
[0079] The device 40 may also include a model generation unit, which is used to pre-generate the operation resource demand estimation model.
[0080] Among them, using the operating resource utilization rate and the performance parameter to estimate the demand for operating resources of the target business server can also specifically include: substituting the operating resource utilization rate and the performance parameter into a preset calculation formula to estimate the demand.
[0081] Wherein, the preset calculation formula may specifically include: Q=a×P1-b×P2;
[0082] Among them, Q is the calculated demand; P1 is the operating resource utilization rate; P2 is the performance parameter; a and b are both preset parameters, and a and b are both greater than 0.
[0083] The operating resource utilization rate and performance parameters of the target service server may specifically include: the operating resource utilization rate and performance parameters of the target service server in this cycle; and
[0084] The demand amount of the target business server for operating resources may specifically include: the demand amount of the target business server for operating resources in the next cycle.
[0085] The allocating of operating resources to the target service server according to the demand may specifically include:
[0086] Determine a deviation between a current allocation of operating resources of the target service server and the required amount, wherein the deviation is an absolute value of a difference between the current allocation and the required amount;
[0087] Determining whether the deviation is greater than a preset threshold;
[0088] If not, adjusting the operating resources of the target service server from the current allocated amount to the required amount; or,
[0089] If so, the security requirement is determined according to the current allocation and the preset threshold, and the operating resources of the target service server are adjusted from the current allocation to the security requirement.
[0090] The step of adjusting the operating resources of the target service server from the current allocated amount to the required amount may specifically include:
[0091] Adjusting the operating resources of the target service server from a current allocation to an intermediate amount at a first rate, wherein the intermediate amount is a value between the current allocation and the demand;
[0092] The operating resources of the target service server are adjusted from the intermediate amount to the required amount at a second rate, wherein the second rate is greater than the first rate.
[0093] The embodiment of the present invention further provides a storage medium, including: a program, which, when running on an electronic device, enables the electronic device to execute all or part of the process of the method in the above embodiment. The storage medium may be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD). The storage medium may also include a combination of the above types of memories.
[0094] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A resource allocation method based on a microservice system, characterized in that: include: Obtain the operating resource utilization and performance parameters of the target business server; Using the operating resource usage rate and the performance parameter, estimating the demand for operating resources of the target service server; Allocate operating resources to the target service server according to the demand.
2. The method according to claim 1, characterized in that Using the operating resource usage rate and the performance parameter, estimating the demand for operating resources by the target service server specifically includes: The operating resource utilization rate and the performance parameter are input into an operating resource demand estimation model to obtain an output of the resource demand estimation model, and the output is used as the estimated demand.
3. The method according to claim 2, characterized in that The method further includes: pre-generating the operation resource demand estimation model.
4. The method according to claim 1, characterized in that The operating resource utilization rate and the performance parameter are used to estimate the demand for operating resources by the target business server, specifically including: substituting the operating resource utilization rate and the performance parameter into a preset calculation formula to estimate the demand.
5. The method according to claim 4, characterized in that The preset calculation formula specifically includes: Q=a×P1-b×P2; Among them, Q is the calculated demand; P1 is the operating resource utilization rate; P2 is the performance parameter; a and b are both preset parameters, and a and b are both greater than 0.
6. The method according to claim 1, characterized in that The operating resource utilization rate and performance parameters of the target business server specifically include: the average operating resource utilization rate and average performance parameters of the target business server in this period; and The demand of the target business server for operating resources specifically includes: the demand of the target business server for operating resources in the next cycle.
7. The method according to claim 1, characterized in that Allocating operating resources to the target service server according to the demand specifically includes: Determine a deviation between a current allocation of operating resources of the target service server and the required amount, wherein the deviation is an absolute value of a difference between the current allocation and the required amount; Determining whether the deviation is greater than a preset threshold; If not, adjusting the operating resources of the target service server from the current allocated amount to the required amount; or, If so, the security requirement is determined according to the current allocation and the preset threshold, and the operating resources of the target service server are adjusted from the current allocation to the security requirement.
8. The method according to claim 7, characterized in that Adjusting the operating resources of the target service server from the current allocated amount to the required amount specifically includes: Adjusting the operating resources of the target service server from a current allocation to an intermediate amount at a first rate, wherein the intermediate amount is a value between the current allocation and the demand; The operating resources of the target service server are adjusted from the intermediate amount to the required amount at a second rate, wherein the second rate is greater than the first rate.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the method according to any one of claims 1 to 8.
10. A storage medium, characterized in that: The invention comprises: a program, which, when running on an electronic device, enables the electronic device to execute the method as claimed in any one of claims 1 to 8.
