A cloud server control method and system
By real-time monitoring and analysis of the order transaction volume, response time and network speed data of the supermarket server system, combined with the operating parameters of the cloud server, the server excellence and computing resource utilization rate of the target system are calculated, the precise and elastic expansion of the cloud server is achieved, and the problems of low control accuracy and poor efficiency in the existing technology are solved, and the system performance and resource utilization efficiency are improved.
Patent Information
- Application Number
- CN202411880109.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-19
AI Technical Summary
The elastic expansion control accuracy of cloud servers is low, resulting in poor expansion efficiency and being unable to effectively cope with the complexity of changes in order transaction volume in supermarket server systems.
By obtaining the target system's order transaction volume data, order processing response time data, network speed data and cloud server operating parameters, the real-time server excellence and computing resource utilization rate of the target system are calculated, and then the computing resource trends expanded or released by the cloud server are calculated, and the cloud server is elastically expanded or released based on these data.
It improves the elastic expansion control accuracy and efficiency of cloud servers, can more accurately regulate the number of cloud servers, reduces the cost of redundant computing resources, and improves system performance.
Smart Images

Figure CN119322685B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and in particular to a cloud server control method and system. Background Art
[0002] A cloud server is a virtualized computing resource based on cloud computing technology, which is provided to users through the Internet. Users can access and manage virtualized computing resources such as computing power, storage space, and network resources through the network. Cloud servers are flexible, scalable, and highly available, and are widely used in various enterprise and personal business scenarios. The scalability of a cloud server refers to the ability to adaptively choose to expand and release server computing resources according to business needs, thereby reducing redundancy costs.
[0003] In the application scenario of large supermarkets, fixed high and low thresholds are preset for the operating parameters such as the memory and central processing unit (CPU) of the existing servers in the supermarket server system. When any of the operating parameters exceeds the high threshold, the supermarket server system is expanded with cloud servers. When all the items in the operating parameters are less than the low threshold, the cloud servers are released, thereby achieving elastic expansion of the number of cloud servers. However, in actual situations, the order transaction volume in the supermarket server system varies complexly. For different orders, the computing resources that the cloud server system should provide vary. If the elastic expansion of the cloud server is controlled only according to the memory and CPU of the existing servers in the supermarket server system, the control accuracy is low, resulting in poor elastic expansion efficiency of the cloud server. Summary of the invention
[0004] In order to solve the technical problems of low control accuracy and poor elastic expansion efficiency of cloud servers, the present invention aims to provide a cloud server control method and system. The technical solutions adopted are as follows:
[0005] In a first aspect, an embodiment of the present invention provides a cloud server control method, comprising: obtaining order transaction volume data of a target system within a predetermined time period, order processing response time data of each order, network speed data of the target system, and operating parameters of the cloud servers configured in the target system; determining the real-time server excellence of the target system according to the order transaction volume data within the predetermined time period, the order processing response time data of each order, and the network speed data; determining the real-time computing resource utilization rate of the configured cloud servers using the operating parameters and the server excellence; calculating a first computing resource tendency degree when the cloud terminal area expands N cloud servers in the target system according to the real-time computing resource utilization rate, and calculating a second computing resource tendency degree when the cloud terminal area releases N cloud servers in the target system, where N is a natural number not less than 1; when the first computing resource tendency degree or the second computing resource tendency degree exceeds a first threshold, N cloud servers are expanded in the target system or N cloud servers are released from the target system to obtain an elastically expanded target system; and allocating the current task among the cloud servers in the elastically expanded target system.
[0006] Optionally, determining the real-time server excellence of the target system based on the order transaction volume data within the predetermined time period, the order processing response time data of each order and the network speed data includes: determining the real-time business busyness of the target system based on the order transaction volume data within the predetermined time period; determining the real-time server adaptation performance of the target system based on the order processing response time data of each order and the network speed data; determining the real-time server excellence of the target system based on the business busyness and the server adaptation performance.
[0007] Optionally, determining the real-time business busyness of the target system based on the order transaction volume data within the predetermined time period includes: segmenting the order transaction volume data within the predetermined time period at predetermined time intervals, and regarding the order transaction volume data within the most recent segment as the real-time order transaction volume data of the real-time segment; determining the real-time order transaction density of the target system based on the maximum value between the real-time order transaction volume data and the order transaction volume data in each segment; drawing an order transaction volume curve with time as the horizontal axis and the order transaction volume data of each segment within the predetermined time period as the vertical axis; determining from the order transaction volume curve a first slope average of the order transaction volume data of multiple segments closest to the real-time segment and a second slope average of the order transaction volume data of all segments in the order transaction volume curve; determining the real-time transaction congestion of the target system based on the first slope average, the second slope average and the real-time order transaction density; determining the real-time business busyness of the target system based on the transaction congestion of each segment and the real-time transaction congestion.
[0008] Optionally, determining the real-time transaction congestion level of the target system based on the first slope average, the second slope average and the real-time order transaction density includes: calculating a first ratio between the first slope average and the second slope average, and a first product between the first ratio and the real-time order transaction density; and normalizing the first product to obtain the real-time transaction congestion level of the target system.
[0009] Optionally, determining the real-time server adaptation performance of the target system based on the order processing response time data and the network speed data of each of the orders includes: calculating a first duration mean of each of the order processing response time data and a second duration mean of the order processing response time data in the real-time segment; calculating the real-time transaction response lag of the target system based on the first duration mean and the second duration mean; drawing a network speed change curve with time as the horizontal axis and the network speed data as the vertical axis; segmenting the network speed change curve at the predetermined time intervals, and regarding the most recent segment as a real-time segment; calculating the standard deviation of the network speed change curve corresponding to the real-time segment and the maximum value of the standard deviation of the network speed change curve corresponding to each segment; determining the real-time server adaptation performance of the target system based on the standard deviation, the maximum value of the standard deviation and the transaction response lag.
[0010] Optionally, determining the real-time server adaptation performance degree of the target system based on the standard deviation, the maximum value of the standard deviation and the transaction response lag degree includes: calculating a second ratio between the standard deviation and the maximum value of the standard deviation, and a second product between the second ratio and the transaction response lag degree, to obtain the real-time server adaptation performance degree of the target system.
[0011] Optionally, using the operating parameters and the server excellence to determine the real-time computing resource usage of the configured cloud server includes: taking the highest usage value among the operating parameters as the operating parameter usage of the target system; and determining the third product of the operating parameter usage and the server excellence as the real-time computing resource usage of the configured cloud server.
[0012] Optionally, calculating the first computing resource tendency of the cloud terminal area in the case where N cloud servers are expanded in the target system according to the real-time computing resource utilization rate includes: determining a first number of configured cloud servers in the cloud terminal area in a real-time segment, and calculating a superposition value of real-time computing resource utilization rates and a first computing resource utilization average of all configured cloud servers in the cloud terminal area; if the first computing resource utilization average is higher than a second threshold, expanding N cloud servers in the target system, and calculating a third ratio of the superposition value of the first computing resource utilization rate to the first sum of the first number and N after expanding N cloud servers, and using the third ratio as a second computing resource utilization average after expanding N cloud servers in the target system; calculating the first computing resource tendency of the cloud terminal area in the case where N cloud servers are expanded in the target system according to the first computing resource utilization average and the second computing resource utilization average.
[0013] Optionally, calculating the second computing resource trend of the cloud terminal area when N cloud servers are released in the target system includes: determining a first number of configured cloud servers in the cloud terminal area in real-time segmentation, and calculating a real-time computing resource usage superposition value and a first computing resource usage average of all configured cloud servers in the cloud terminal area; if the first computing resource usage average is not higher than a second threshold, releasing N cloud servers from the configured cloud servers in the target system, and calculating a fourth ratio of the first computing resource usage superposition value to a first difference between the first number and N after releasing N cloud servers, and using the fourth ratio as a third computing resource usage average after releasing N cloud servers in the target system; calculating the second computing resource trend of the cloud terminal area when N cloud servers are released in the target system based on the first computing resource usage average and the third computing resource usage average.
[0014] In a second aspect, an embodiment of the present invention provides a cloud server control system, comprising: a processor and a memory; wherein the memory is used to store computer programs that can be run on the processor; and the processor is used to execute the program stored in the memory to implement the steps of the cloud server control method mentioned in the first aspect.
[0015] The present invention has the following beneficial effects: firstly, the order transaction volume data of the target system within a predetermined time period, the order processing response time data of each order, the network speed data of the target system and the operating parameters of the configured cloud server in the target system are obtained; then, the real-time server excellence of the target system is determined according to the order transaction volume data within the predetermined time period, the order processing response time data of each order and the network speed data; secondly, the real-time computing resource utilization rate of the configured cloud server is determined by using the operating parameters and the server excellence; and according to the real-time computing resource utilization rate, a first computing resource tendency degree is calculated when the cloud terminal area expands N cloud servers in the target system, and a second computing resource tendency degree is calculated when the cloud terminal area releases N cloud servers in the target system, where N is a natural number not less than 1; when the first computing resource tendency degree or the second computing resource tendency degree exceeds a first threshold, N servers are expanded in the target system or N servers are released from the target system to obtain an elastically expanded target system; finally, the current task is allocated among the cloud servers in the elastically expanded target system.
[0016] In this way, the embodiment of the present invention can determine the real-time server excellence of the target system based on the order transaction volume data, the order processing response time and the network speed data, and then obtain the first computing resource trend and the second computing resource trend of the cloud server in combination with the server excellence and the real-time computing resource utilization rate of the configured cloud server. Finally, the cloud server is expanded or released according to the first computing resource trend and the second resource trend. Compared with the prior art, the embodiment of the present invention can combine the changes in the order transaction volume of the supermarket, the adaptation performance of the cloud server and the operating parameters to obtain a more accurate regulation of the number of cloud servers, thereby reducing the cost of redundant computing resources while ensuring performance, and improving the elastic expansion efficiency of the cloud server. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 A flow chart of a cloud server control method provided by one embodiment of the present invention;
[0019] Figure 2 A schematic diagram of the structure of a cloud server system of a target system provided by an embodiment of the present invention;
[0020] Figure 3 A schematic diagram of the structure of a cloud server control system provided for one embodiment of the present invention. DETAILED DESCRIPTION
[0021] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of a cloud server control method and system proposed by the present invention, its specific implementation, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0022] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0023] The specific scheme of a cloud server control method and system provided by the present invention is described in detail below with reference to the accompanying drawings.
[0024] Embodiment 1:
[0025] See also Figure 1 , which shows a flow chart of a cloud server control method provided by an embodiment of the present invention, including:
[0026] S101, obtaining order transaction volume data of a target system within a predetermined time period, order processing response time data of each order, network speed data of the target system, and operating parameters of a configured cloud server in the target system.
[0027] Specifically, the target system can be a cloud server system of a large supermarket. The traffic volume in a large supermarket varies greatly at different times, and there are many types of internal department windows, which causes the cloud server system of the large supermarket to frequently handle high-concurrency tasks. In order to cope with business needs with high performance requirements, large supermarkets often use cloud server systems. Compared with traditional physical servers, cloud server systems abandon redundant hardware support and use virtualization technology to provide large supermarkets with CPU, memory and other computing resources.
[0028] For example, Figure 2 As shown, Figure 2A schematic diagram of the structure of a cloud server system of a target system provided for an embodiment of the present invention. The cloud server system adopts an integrated VPC network system, in which each computing resource exists in each elastic computing cloud server (Elastic Compute Service, ESC), wherein the VPC network system is a virtual private cloud network system, which is a cloud computing service that allows users to create an isolated virtual network in a cloud environment. Each ESC cloud server 201 is responsible for multiple cloud terminals 202 to achieve distributed resource utilization. The biggest advantage of the ESC cloud server is the elastic expansion of computing resources. That is, when the supermarket business demand is high in certain periods, a single cloud server cannot achieve better computing resource application for the multiple cloud terminals in charge. At this time, the control center adds a cloud server to the cloud terminal area. Then, through load balancing, the same computing resources are allocated between multiple cloud servers, thereby improving the equipment performance during the peak period of supermarket business demand. Similarly, the redundant cloud servers are released during the trough period of business demand, reducing the operating cost.
[0029] Furthermore, the predetermined time period can be determined according to actual conditions, and in the embodiment of the present invention, it can be 24 hours of the cloud server system of the supermarket. The order transaction volume data refers to the order transaction volume that occurs per minute in the predetermined time period in the cloud server system of the supermarket. The order processing response time data refers to the time from the order request to the order completion response.
[0030] Furthermore, the network speed data of the timeout is read through the network detection module, and the operating parameters of the supermarket's cloud server system are read through the server monitoring module, including the CPU usage and memory usage of the configured cloud server.
[0031] S102, determining the real-time server excellence of the target system according to the order transaction volume data within a predetermined time period, the order processing response time data of each order, and the network speed data.
[0032] Specifically, the server excellence represents the effect of the configured servers in the supermarket's target system on the response to business needs. The larger the value of the server excellence, the better the response effect of the configured cloud servers in the supermarket's target system on business needs.
[0033] Furthermore, when determining the real-time server excellence of the target system, as an optional embodiment of the present invention, the real-time business busyness of the target system is first determined based on the order transaction volume data within a predetermined time period; then the real-time server adaptation performance of the target system is determined based on the order processing response time data and network speed data of each order; finally, the real-time server excellence of the target system is determined based on the business busyness and the server adaptation performance.
[0034] Specifically, considering the complex changes in the order transaction volume data of the supermarket's target system, the supermarket's traffic has a certain periodicity in the time domain, such as high traffic during specific time periods such as weekends or rush hours after get off work. At this time, the cloud server needs to process more order transaction volume data than usual, so it is necessary to indicate that the real-time supermarket business also requires the cloud server to provide more computing resources. At the same time, since the supermarket traffic has a certain periodicity in the time domain, such as high traffic during specific time periods such as weekends or rush hours after get off work, the cloud server needs to process more order transaction data than usual, so the real-time business busyness of the supermarket's cloud server system is further evaluated in combination with the periodic time domain characteristics of the supermarket's order transaction volume data. Among them, if the order transaction volume data shows a higher amplitude performance and a stronger upward trend performance in the adjacent time period, it means that the supermarket's transaction business may be more crowded at this time, indicating that more cloud server computing resources may be needed at this time. Therefore, the real-time business busyness of the target system can be calculated by calculating the real-time order transaction density and real-time transaction congestion of the target system.
[0035] Further, when determining the real-time business busyness of the target system, as an optional embodiment of the present invention, first, the order transaction volume data within a predetermined time period is segmented at predetermined time intervals, and the order transaction volume data within the most recent segment is regarded as the real-time order transaction volume data of the real-time segment; then, the real-time order transaction density of the target system is determined according to the maximum value of the real-time order transaction volume data and the order transaction volume data in each segment; then, an order transaction volume curve is drawn with time as the horizontal axis and the order transaction volume data of each segment within the predetermined time period as the vertical axis; secondly, the first slope average of the order transaction volume data of multiple segments closest to the real-time segment and the second slope average of the order transaction volume data of all segments in the order transaction volume curve are determined from the order transaction volume curve; and the real-time transaction congestion of the target system is determined according to the first slope average, the second slope average and the real-time order transaction density; finally, the real-time business busyness of the target system is determined according to the transaction congestion of each segment and the real-time transaction congestion.
[0036] Specifically, the predetermined time interval can be determined according to actual conditions. In the embodiment of the present invention, the value is 1 minute. The predetermined time period is segmented at intervals of 1 minute, and the order transaction volume data within the most recent minute is regarded as the real-time segmented real-time order transaction volume data. In the embodiment of the present invention, the real-time segmented real-time order transaction volume data is recorded as , and record the maximum value of the order transaction volume data within a single minute in the predetermined time period as If the real-time order transaction volume is greater, it means that it is more likely to be in the order transaction peak period, so the real-time order transaction density of the supermarket is calculated. When calculating the order transaction density in the embodiment of the present invention, the following formula is used for calculation:
[0037]
[0038] In the above formula, Indicates the order transaction density. Represents real-time order volume data for the real-time segment. Indicates the maximum value of order transaction volume data within a single minute in the predetermined time period.
[0039] Further, the order transaction volume curve is drawn with time as the horizontal coordinate and order transaction volume data as the vertical coordinate. The first slope mean of the order transaction volume data of the multiple segments closest to the real-time segment is calculated. The number of multiple segments can be determined according to the actual situation. In the embodiment of the present invention, the value is 3 segments. The second slope mean of the order transaction volume data of all segments is calculated. If the upward trend of the order transaction volume data in the real-time segment of the supermarket is significant, it means that the order transaction demand in the next segment of the real-time segment may be higher, and it also means that the order transaction density reflects the effectiveness of the order transaction demand. Therefore, the real-time transaction congestion degree of the supermarket is obtained according to the order transaction density of the real-time segment combined with the rising trend of the order transaction. When determining the real-time transaction congestion degree of the target system, as an optional embodiment of the present invention, the first ratio between the first slope mean and the second slope mean, and the first product between the first ratio and the real-time order transaction density are calculated, and the first product is normalized to obtain the real-time transaction congestion degree of the target system.
[0040] Specifically, the real-time transaction congestion degree of the target system refers to the transaction congestion degree of the target system in the real-time segment. The embodiment of the present invention can use the following formula to calculate the real-time transaction congestion degree of the target system:
[0041]
[0042] In the above formula, Indicates the real-time transaction congestion level of the target system. represents the first slope mean. represents the second slope mean. Indicates the order transaction density. Represents the normalization function, which is used to Perform normalization.
[0043] Furthermore, the trading congestion level of each segment is determined. Multiple segments at the same time in each week are defined as corresponding time periods. The segments corresponding to the real-time segments in each week in the order transaction volume curve are extracted. Calculate the transaction congestion of the real-time segment in each week during the predetermined time period, where the transaction congestion of the segment corresponding to the real-time segment in the ith week is recorded as . And calculate the average transaction congestion level of the real-time segment and all corresponding segments Finally, if the transaction congestion degree of the supermarket in real-time segmentation is higher than the transaction congestion degree of the corresponding time period in each week, the smaller the difference between the transaction congestion degree of the real-time time period and the transaction congestion degree of each corresponding time period, the more likely the supermarket is in the transaction peak period in real-time period. Therefore, the embodiment of the present invention adopts the following formula to calculate the real-time business busyness of the target system in the real-time period:
[0044]
[0045] In the above formula, Indicates the real-time business busyness of the target system in the real-time period. Indicates the segments in the order volume curve that correspond to the real-time segments in each week. Indicates the real-time transaction congestion level of the target system. Indicates the trading congestion level of the segment corresponding to the real-time segment in the i-th week. It represents the average trading congestion level of the real-time segment and all corresponding segments. Represents the normalization function, which is used to Perform normalization.
[0046] Further, when the supermarket has configured cloud servers that do not handle real-time supermarket business well, it may cause the real-time order transaction response time to slow down, and the network speed to fluctuate, so the server adaptation performance degree reflected by the transaction response time and network speed characteristics. When the computing resources of the supermarket's configured cloud servers cannot adapt to business needs well, it will cause the supermarket equipment to slow down the response time of order processing, and may also cause network fluctuations. Therefore, the embodiment of the present invention uses order processing response time data and network speed data to determine the real-time server adaptation performance degree of the target system. Among them, as an optional embodiment of the present invention, firstly, the first duration mean of each order processing response duration data and the second duration mean of the order processing response duration data in the real-time segment are calculated; then, the real-time transaction response lag degree of the target system is calculated according to the first duration mean and the second duration mean; then, a network speed change curve is drawn with time as the horizontal axis and the network speed data as the vertical axis; secondly, the network speed change curve is segmented at predetermined time intervals, and the most recent segment is regarded as a real-time segment; and the standard deviation of the network speed change curve corresponding to the real-time segment and the maximum value of the standard deviation of the network speed change curve corresponding to each segment are calculated; finally, the real-time server adaptation performance degree of the target system is determined according to the standard deviation, the maximum value of the standard deviation and the transaction response lag degree.
[0047] Specifically, the order processing response time data of all orders within the predetermined time period is obtained and the average is calculated to obtain the first time average. Then calculate the second duration mean of all order processing response duration data in the real-time segment When the configured cloud server cannot adapt to the real-time high business demand, it will cause the time for the target system's equipment to respond to the transaction to become slower. Therefore, the embodiment of the present invention uses the following formula to calculate the real-time transaction response lag of the target system:
[0048]
[0049] In the above formula, Indicates the degree of lag in the target system's real-time transaction response. Indicates the second average duration of all order processing response duration data in the real-time segment. Indicates the first duration mean of the order processing response duration data for all orders within a predetermined time period.
[0050] Furthermore, a network speed change curve is drawn with time as the horizontal axis and network speed data as the vertical axis. The network speed change curve is also segmented by minute, and each segment corresponds to the segment of the order transaction volume curve. The standard deviation of the network speed data in the network speed change curve corresponding to the real-time segment is calculated. , and the maximum value of the standard deviation of the network speed data in all segmented network speed change curves corresponding to the network speed change curve within the predetermined time period .
[0051] Furthermore, if the standard deviation of the night time in the real-time period is larger, it means that the network speed fluctuation in the real-time segment is larger. At the same time, if the transaction response lag in the real-time segment is higher, it means that the cloud service adaptation degree of the target system is poor. When determining the real-time server adaptation performance degree of the target system, as an optional embodiment of the present invention, a second ratio between the standard deviation and the maximum value of the standard deviation, and a second product between the second ratio and the transaction response lag are calculated to obtain the real-time server adaptation performance degree of the target system.
[0052] Specifically, the embodiment of the present invention uses the following formula to calculate the real-time server adaptation performance of the target system:
[0053]
[0054] In the above formula, Indicates the real-time server adaptation performance of the target system. Indicates the standard deviation of the network speed data in the network speed change curve corresponding to the real-time segment. Indicates the maximum value of the standard deviation of the network speed data in all segmented network speed change curves corresponding to the network speed change curve within a predetermined time period. Indicates the degree of lag in the target system's real-time transaction response.
[0055] Furthermore, when the target system is in real time, the real-time business busyness of the target system The lower the value, the better the real-time adaptability of the cloud server. The higher the value, the better the response effect of the configured servers in the target system to the business needs. Therefore, the embodiment of the present invention uses the following formula to calculate the real-time server excellence of the target system:
[0056]
[0057] In the above formula, Indicates the real-time server excellence of the target system. Indicates the real-time server adaptation performance of the target system. Indicates the real-time business busyness of the target system in the real-time period. Represents the normalization function, which is used to Perform normalization.
[0058] S103, determining the real-time computing resource usage of the configured cloud server using the operating parameters and the server excellence.
[0059] Specifically, the cloud server's operating parameters such as CPU usage and memory usage can intuitively reflect the cloud server's computing resource performance. Based on the server's excellence and combined with the cloud server's operating parameters, the cloud server's elastic expansion direction and computing resource trend can be obtained.
[0060] Furthermore, when determining the real-time computing resource utilization of the configured cloud server, as an optional embodiment of the present invention, the highest utilization value among the operating parameters is used as the operating parameter utilization of the target system; and the third product of the operating parameter utilization and the server excellence is determined as the real-time computing resource utilization of the configured cloud server.
[0061] Specifically, if any of the CPU usage and memory usage has performance anomalies, it will affect the overall performance of the cloud server. Therefore, the highest usage value of the CPU usage and memory usage is used as the operating parameter usage of the cloud server. . Then set the cloud server's operating parameter utilization rate Server excellence with real-time segmentation The multiplication results in the real-time computing resource utilization of the cloud server in the real-time segment.
[0062] S104, calculating a first computing resource trend when the cloud terminal area expands N cloud servers in the target system according to the real-time computing resource usage rate, and calculating a second computing resource trend when the cloud terminal area releases N cloud servers in the target system.
[0063] Wherein, N is a natural number not less than 1.
[0064] Specifically, in a cloud server system of a large supermarket, one or more cloud servers form a group, and a cloud server group manages a group of cloud terminals in the same area. The cloud terminal groups in each area are numbered and marked. In the embodiment of the present invention, the j-th cloud terminal area is taken as an example, and the first number of cloud servers configured in the cloud terminal area is read. , and calculate the superposition value of computing resource usage of all cloud servers in the cloud terminal area within the real-time segment and the first computing resource usage average .
[0065] In the embodiment of the present invention, the number of cloud servers expanded or released in each segment is taken as 1, so there are three cases for the number of cloud servers configured in the j-th cloud terminal area real-time segment in the next segment, which are: , , .in, It means that in the next segment, the number of cloud servers in the target system remains the same as the number of cloud servers in the real-time segment. Indicates that in the next segment, the number of cloud servers in the target system is increased by 1 based on the real-time segment. Indicates that in the next segment, the number of cloud servers in the target system is reduced by 1 based on the real-time segment.
[0066] Further, when determining the first computing resource trend, as an optional embodiment of the present invention, first determine the first number of configured cloud servers in the cloud terminal area in the real-time segmentation, and calculate the real-time computing resource utilization superposition value and the first computing resource utilization average of all configured cloud servers in the cloud terminal area; if the first computing resource utilization average is higher than the second threshold, expand N cloud servers in the target system, and calculate the third ratio of the first computing resource utilization superposition value to the first sum of the first number and N after expanding N cloud servers, and use the third ratio as the second computing resource utilization average after expanding N cloud servers in the target system; finally, based on the first computing resource utilization average and the second computing resource utilization average, calculate the first computing resource trend of the cloud terminal area when N cloud servers are expanded in the target system.
[0067] Specifically, in the embodiment of the present invention, the number of cloud servers to be expanded or released in each segment is taken as 1, that is, N is taken as 1. Furthermore, in the embodiment of the present invention, the second threshold value can be determined according to actual conditions. In the embodiment of the present invention, the second threshold value is taken as 50% of all computing resources of the cloud servers configured in the target system. If the CPU usage rate is selected as the operating parameter usage rate in the above embodiment, the second threshold value is 50% of all CPU resources of the configured server. If the memory usage rate is selected as the operating parameter usage rate in the above embodiment, the second threshold value is 50% of all memory resources of the configured server. When the average value of the first computing resource usage rate is higher than the second threshold value, it means that the computing resource usage rate of the cloud servers of the target system exceeds half. At this time, it can be considered to expand 1 cloud server in the target system. At this time, the elastic expansion direction is the direction of the number plus 1, and the computing resource usage rates of all configured cloud servers in the j cloud terminal area real-time segments are superimposed. and Make a ratio and get the next segment The average computing resource usage under , which is the average utilization rate of the second computing resource.
[0068] Furthermore, if the second computing resource usage average Compared with the first computing resource utilization average The smaller the value, the better the performance of the cloud server after expansion. The embodiment of the present invention uses the following formula to calculate the first computing resource tendency when N cloud servers are expanded in the target system:
[0069]
[0070] In the above formula, Indicates the first computing resource trend when N cloud servers are expanded in the target system. Indicates the average usage rate of the first computing resource. Indicates the average usage rate of the second computing resource. Represents the normalization function, which is used to Perform normalization.
[0071] Further, when determining the second computing resource trend, as an optional embodiment of the present invention, first determine the first number of configured cloud servers in the cloud terminal area in the real-time segment, and calculate the real-time computing resource utilization superposition value and the first computing resource utilization average of all configured cloud servers in the cloud terminal area; if the first computing resource utilization average is not higher than the second threshold, release N cloud servers from the configured cloud servers in the target system, and calculate the fourth ratio of the first computing resource utilization superposition value and the first difference between the first number and N after releasing N cloud servers, and use the fourth ratio as the third computing resource utilization average after releasing N cloud servers in the target system; finally, based on the first computing resource utilization average and the third computing resource utilization average, calculate the second computing resource trend of the cloud terminal area when N cloud servers are released in the target system.
[0072] Specifically, in the embodiment of the present invention, the number of cloud servers expanded or released in each segment is taken as 1, that is, N is 1. Furthermore, in the embodiment of the present invention, the second threshold value can be determined according to actual conditions. In the embodiment of the present invention, the second threshold value is 50% of all computing resources of the cloud servers configured in the target system. If the CPU usage rate is selected as the operating parameter usage rate in the above embodiment, the second threshold value is 50% of all CPU resources of the configured server. If the memory usage rate is selected as the operating parameter usage rate in the above embodiment, the second threshold value is 50% of all memory resources of the configured server. When the average value of the first computing resource usage rate is not higher than the second threshold value, it means that the computing resource usage rate of the cloud server of the target system is less than half. At this time, it can be considered to release 1 cloud server in the target system. At this time, the elastic expansion direction is the direction of the number minus 1, and the computing resource usage rate of all configured cloud servers in the real-time segments of the j cloud terminal areas is superimposed. and Make a ratio and get the next segment The average computing resource usage under , which is the mean utilization rate of the third computing resource.
[0073] Furthermore, if the third computing resource usage average Compared with the first computing resource utilization average The smaller the value, the better the performance of the cloud server after expansion. The present invention adopts the following formula to calculate the second computing resource tendency when N cloud servers are released in the target system:
[0074]
[0075] In the above formula, Indicates the second computing resource tendency when N cloud servers are released in the target system. Indicates the average usage rate of the first computing resource. Indicates the average usage rate of the third computing resource. Represents the normalization function, which is used to Perform normalization.
[0076] It is worth noting that when the average utilization rate of the first computing resource is not higher than the second threshold or the average utilization rate of the first computing resource is higher than the second threshold, the number of cloud servers in the target system can also be maintained at the number of configured cloud servers in the real-time segment, that is, the cloud servers are not expanded and the cloud servers are not released, and the computing resources of the configured servers can meet the resource requirements of the next segment.
[0077] S105, when the first computing resource trend degree or the second computing resource trend degree exceeds the first threshold, N cloud servers are expanded in the target system or N cloud servers are released from the target system to obtain an elastically expanded target system.
[0078] Specifically, the first threshold value can be set according to actual conditions, and in the embodiment of the present invention, the value is 0.8. For any cloud terminal area, if the first computing resource tendency or the second computing resource tendency in the elastic expansion direction of the configured cloud server in the real-time segment exceeds 0.8, N cloud servers are added or released in the corresponding cloud server system. The elastic expansion target system is obtained.
[0079] S106, allocating the current task to the cloud servers in the elastic expansion target system.
[0080] Specifically, cloud server expansion is used in scenarios where the target system is busy. When the target system's cloud server system has insufficient computing resources, a new cloud server is expanded based on the existing cloud server, and all tasks are evenly distributed to the newly expanded cloud server system, which is called elastic expansion of the target system. Cloud server release is used in the target system's slow business period. The cloud server system has abundant computing resources. At this time, a cloud server is released from the existing cloud server system, and all tasks are evenly distributed to the newly released cloud server system, which is called elastic expansion of the target system.
[0081] Furthermore, the cloud server system of the target system can also be regulated, such as updating the data acquisition system in real time according to the latest order transaction volume data, order processing response time data, network speed data, and cloud server operation configuration parameter data. The data acquisition system controls the elastic expansion of the number of cloud servers in real time through data analysis. If the cloud server system of the target system performs quantity expansion operations within 8 consecutive segments, the cloud server quantity expansion step mode is updated to adjust 2 cloud servers at a time. After adjusting the cloud server quantity expansion step, if the cloud server system of the target system is still performing quantity expansion operations within 8 consecutive segments, the expansion step will continue to be increased by 1.
[0082] The embodiment of the present invention can determine the real-time server excellence of the target system based on the order transaction volume data, the order processing response time and the network speed data, and then obtain the first computing resource trend and the second computing resource trend of the cloud server in combination with the server excellence and the real-time computing resource utilization rate of the configured cloud server. Finally, the cloud server is expanded or released according to the first computing resource trend and the second resource trend. Compared with the prior art, the embodiment of the present invention can combine the changes in the order transaction volume of the supermarket, the adaptation performance of the cloud server and the operating parameters to obtain a more accurate regulation of the number of cloud servers, thereby reducing the cost of redundant computing resources while ensuring performance, and improving the elastic expansion efficiency of the cloud server.
[0083] Embodiment 2:
[0084] Corresponding to the cloud server control method provided in the above embodiment, based on the same technical concept, an embodiment of the present invention further provides a cloud server control system, which is used to execute the above cloud server control method. Figure 3 A schematic diagram of a cloud server control system provided by an embodiment of the present invention is shown in FIG. Figure 3The cloud server control system may have relatively large differences due to different configurations or performances, and may include one or more processors 301 and memory 302, the memory 302 is used to store computer programs that can be run on the processor 301, and the processor 301 is used to execute the programs stored in the memory 302 to achieve the above Figure 1 The various steps in the method embodiment. Among them, the memory 302 can be a temporary storage or a permanent storage. The application stored in the memory 302 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the cloud server control system.
[0085] Furthermore, the processor 301 can be configured to communicate with the memory 302 to execute a series of computer executable instructions in the memory 302 on the cloud server control system. The cloud server control system can also include one or more power supplies 303, one or more wired or wireless network interfaces 304, one or more input and output interfaces 305, and one or more keyboards 306.
[0086] Specifically in this embodiment, the cloud server control system includes a processor, a communication interface, a memory and a communication bus; wherein the processor, the communication interface and the memory communicate with each other through the bus; the memory is used to store computer programs; the processor is used to execute the programs stored in the memory to achieve the above Figure 1 The various steps in the method embodiment are similar to those in the method embodiment, and have the beneficial effects of the above method embodiments. To avoid repetition, the embodiments of the present invention will not be described in detail here.
[0087] It should be noted that the cloud server control system provided by the embodiment of the present invention and the cloud server control method provided by the embodiment of the present invention are based on the same application concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned cloud server control method, and has the same or similar beneficial effects, and the repeated parts will not be repeated.
[0088] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0089] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A cloud server control method, characterized in that: The cloud server control method comprises: Obtaining order transaction volume data of the target system within a predetermined time period, order processing response time data of each order, network speed data of the target system, and operating parameters of the configured cloud server in the target system; Determine the real-time server excellence of the target system according to the order transaction volume data within the predetermined time period, the order processing response time data of each order, and the network speed data; Determine the real-time computing resource usage of the configured cloud server using the operating parameters and the server excellence; Calculating, according to the real-time computing resource usage rate, a first computing resource tendency degree when the cloud terminal region expands N cloud servers in the target system, and calculating a second computing resource tendency degree when the cloud terminal region releases N cloud servers in the target system, where N is a natural number not less than 1; When the first computing resource tendency degree or the second computing resource tendency degree exceeds a first threshold, N cloud servers are expanded in the target system or N cloud servers are released from the target system to obtain an elastically expanded target system; Allocate the current task among the cloud servers in the elastic expansion target system; Determining the real-time server excellence of the target system according to the order transaction volume data within the predetermined time period, the order processing response time data of each order, and the network speed data includes: Determine the real-time business busyness of the target system according to the order transaction volume data within the predetermined time period; Determine the real-time server adaptation performance of the target system according to the order processing response time data of each order and the network speed data; Determine the real-time server excellence of the target system according to the business busyness and the server adaptation performance; Determining the real-time business busyness of the target system according to the order transaction volume data within the predetermined time period includes: The order transaction volume data within the predetermined time period is segmented at predetermined time intervals, and the order transaction volume data within the most recent segment is regarded as the real-time order transaction volume data of the real-time segment; Determine the real-time order transaction density of the target system according to the maximum value of the real-time order transaction volume data and the order transaction volume data in each segment; Draw an order transaction volume curve with time as the horizontal axis and the order transaction volume data of each segment within the predetermined time period as the vertical axis; Determine, from the order-trading-volume curve, a first slope average of order-trading-volume data of a plurality of segments closest to the real-time segment and a second slope average of order-trading-volume data of all segments in the order-trading-volume curve; Determining the real-time transaction congestion degree of the target system according to the first slope average, the second slope average, and the real-time order transaction density; Determine the real-time business busyness of the target system according to the transaction congestion degree of each segment and the real-time transaction congestion degree; Determining the real-time transaction congestion degree of the target system according to the first slope average, the second slope average, and the real-time order transaction density degree includes: Calculating a first ratio between the first slope average and the second slope average, and a first product between the first ratio and the real-time order transaction density; The first product is normalized to obtain the real-time transaction congestion level of the target system.
2. The cloud server control method according to claim 1, characterized in that: Determining the real-time server adaptation performance of the target system according to the order processing response time data of each order and the network speed data includes: Calculate a first duration average of each of the order processing response duration data and a second duration average of the order processing response duration data in the real-time segment; Calculate the real-time transaction response lag of the target system according to the first duration average and the second duration average; Draw a network speed change curve with time as the horizontal axis and the network speed data as the vertical axis; Segmenting the network speed change curve at the predetermined time intervals, and considering the most recent segment as a real-time segment; Calculate the standard deviation of the network speed change curve corresponding to the real-time segment and the maximum value of the standard deviation of the network speed change curve corresponding to each segment; The real-time server adaptation performance degree of the target system is determined according to the standard deviation, the maximum value of the standard deviation and the transaction response lag degree.
3. The cloud server control method according to claim 2, characterized in that: Determining the real-time server adaptation performance degree of the target system according to the standard deviation, the maximum value of the standard deviation and the transaction response lag degree includes: A second ratio between the standard deviation and the maximum value of the standard deviation, and a second product between the second ratio and the transaction response lag degree are calculated to obtain the real-time server adaptation performance degree of the target system.
4. The cloud server control method according to claim 1, characterized in that: The determining the real-time computing resource usage of the configured cloud server by using the operating parameters and the server excellence comprises: The highest usage value among the operating parameters is used as the operating parameter usage of the target system; A third product of the operating parameter usage rate and the server excellence is determined as the real-time computing resource usage rate of the configured cloud server.
5. The cloud server control method according to claim 1, characterized in that: The calculating, according to the real-time computing resource usage rate, the first computing resource tendency of the cloud terminal area when N cloud servers are expanded in the target system comprises: Determine a first number of cloud servers configured in a real-time segment in a cloud terminal area, and calculate a real-time computing resource utilization superposition value and a first computing resource utilization average value of all configured cloud servers in the cloud terminal area; If the first computing resource usage average is higher than a second threshold, N cloud servers are expanded in the target system, and a third ratio of the first computing resource usage superposition value after the N cloud servers are expanded to the first sum of the first number and N is calculated, and the third ratio is used as the second computing resource usage average after the N cloud servers are expanded in the target system; A first computing resource tendency degree of the cloud terminal area when N cloud servers are expanded in the target system is calculated according to the first computing resource usage average value and the second computing resource usage average value.
6. The cloud server control method according to claim 1, characterized in that: The calculating of the second computing resource tendency of the cloud terminal area when N cloud servers are released in the target system includes: Determine a first number of cloud servers configured in a real-time segment in a cloud terminal area, and calculate a real-time computing resource utilization superposition value and a first computing resource utilization average value of all configured cloud servers in the cloud terminal area; If the first computing resource usage average is not higher than the second threshold, N cloud servers are released from the configured cloud servers in the target system, and a fourth ratio of the first computing resource usage superposition value after the N cloud servers are released to the first difference between the first number and N is calculated, and the fourth ratio is used as the third computing resource usage average after the N cloud servers are released in the target system; A second computing resource tendency degree of the cloud terminal area when N cloud servers are released in the target system is calculated according to the first computing resource usage average value and the third computing resource usage average value.
7. A cloud server control system, characterized in that: The cloud server control system includes: a processor and a memory; wherein the memory is used to store computer programs that can be run on the processor; the processor is used to execute the program stored in the memory to implement the steps of the cloud server control method as described in any one of claims 1-6.
Citation Information
Patent Citations
System resource dynamic capacity expanding and shrinking method and device, computer device and storage medium
CN109766182A