Digital Base Computing Power Resource Elastic Scaling Method and System
By dividing the time and correcting the abnormal cycle of the digital base, combined with real-time adjustment of the message queue data volume, the problem of inaccurate scaling of the digital base computing power resources is solved, and high-quality dynamic scaling and stability guarantee is achieved.
Patent Information
- Application Number
- CN202411172053.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2044-08-26
AI Technical Summary
The prior art is difficult to accurately determine the scaling amount of digital base computing resources at the target time, resulting in improper deployment of computing resources, inability to meet application needs or waste of resources.
By dividing time into one or more cycles, obtaining the actual computing power resources for multiple consecutive historical cycles, judging and correcting the abnormal cycles, estimating the basic requirements of the computing power units to be deployed in the target cycle, and adjusting the computing power resources in real time based on the amount of message data waiting in the message queue.
It realizes high-quality dynamic scaling of digital base computing resources, avoids large scaling within the cycle, ensures the availability and stability of digital bases, and reduces resource and cost consumption.
Smart Images

Figure CN118964039B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and particularly to a method and system for elastic scaling of computing power resources of a digital base. Background Art
[0002] A digital base is the core connection layer that aggregates various digital technologies and transforms the physical world into the digital world. It encompasses the basic network required for digital development, sensing neurons, and a series of platforms with data processing and intelligent capabilities. Currently, digital bases are widely used in various fields such as government, enterprises, and cities. For example, in the government field, digital bases can support the construction of digital governments and improve the intelligent level of government governance; in the enterprise field, digital bases can support the digital transformation and intelligent upgrade of enterprises; in the city field, digital bases can support the construction and development of smart cities.
[0003] With the continuous construction and popularization of digitalization in various fields, the users and functions of digital bases are continuously expanding, which leads to large fluctuations in the demand for computing power resources of digital bases. This poses a problem for the deployment of computing power resources of digital bases. If the deployed computing power resources are low, they cannot meet the application requirements, while if the deployed computing power resources are high, it will cause waste of computing power resources. Currently, related technologies have proposed measures to scale the computing power resources of digital bases, that is, to increase or reduce computing power resources in a timely manner to solve the above problems. However, how to relatively accurately determine the scaling amount of computing power resources at the target time remains an unsolved problem. In related technologies, complex machine learning models are used to pre-estimate the scaling amount of computing power resources, which not only has complex algorithms and large delays, but also has relatively low accuracy. Summary of the Invention
[0004] To solve the above technical problems, the present invention provides a method and system for elastic scaling of computing power resources of a digital base, which can accurately determine the basic number of computing power units in each period, avoid large-scale scaling within a period, and can accurately determine the scaling amount of computing power resources at each moment, so as to achieve high-quality dynamic scaling of computing power resources of the digital base, and effectively ensure the availability and stability of the digital base while consuming less resources and costs.
[0005] The technical solution adopted by the present invention is as follows:
[0006] A method for elastic scaling of computing power resources of a digital base, comprising the following steps: dividing time into one or more types of cycles according to the time characteristics of the application of the digital base; obtaining the actual computing power resources of the digital base in multiple consecutive historical cycles, where the multiple historical cycles belong to the same type of cycle, and the actual computing power resources of each historical cycle are the average number of computing units actually deployed within that historical cycle; judging whether there are abnormal cycles in the multiple consecutive historical cycles according to the actual computing power resources of the digital base in the multiple consecutive historical cycles, and if so, correcting the abnormal cycles; estimating the basic demand quantity of the computing units to be deployed by the digital base in the target cycle according to the actual computing power resources of the corrected multiple consecutive historical cycles, where the target cycle belongs to the same type of cycle as the multiple historical cycles; deploying computing units with the basic demand quantity at the start time of the target cycle; collecting in real time the data volume of the messages waiting in the message queue of the digital base; according to k the moment and k the data volume of the messages waiting in the message queue at the -1 moment, estimating the scaling quantity of the computing units to be deployed at the k +1 moment, where k the moment is any moment from the start time to the moment before the end time within the target cycle; at the k +1 moment, deploying computing units with the quantity of the computing units actually deployed at the k moment and the scaling quantity of the computing units to be deployed at the k +1 moment.
[0007] Judging whether there are abnormal cycles in the multiple consecutive historical cycles according to the actual computing power resources of the digital base in the multiple consecutive historical cycles specifically includes: obtaining the median of the actual computing power resources of the multiple consecutive historical cycles; judging whether the actual computing power resources of each historical cycle are greater than n times the median, or less than 1 / n of the median, where n is a preset value; if the actual computing power resources of a certain historical cycle are greater than n times the median, or less than 1 / n of the median, then determining that this historical cycle is the abnormal cycle, otherwise determining that this historical cycle is a normal cycle.
[0008] Correct the abnormal periods, specifically including: determining whether both the previous period and the next period of each abnormal period are normal periods; if so, deleting the actual computing power resources of the abnormal period, and using the average of the actual computing power resources of the previous period and the actual computing power resources of the next period of the abnormal period as the corrected actual computing power resources of the abnormal period; if not, deleting the actual computing power resources of the abnormal period, and obtaining the corrected actual computing power resources of the abnormal period through linear regression.
[0009] n Take [2, 5].
[0010] Estimated k The scaling amount of the computing power unit to be deployed at the +1 moment is:
[0011]
[0012] Where N is the scaling amount, N being positive indicates an increase in the number of computing power units, N being negative indicates a reduction in the number of computing power units, N being 0 indicates that the number of computing power units remains unchanged, D k represents k the data volume of the messages waiting in the message queue at the D k-1 represents k the data volume of the messages waiting in the message queue at the -1 moment, H represents the computing power of each computing power unit, R max represents the upper limit of the computing power occupancy rate of each computing power unit, λ represents the influence coefficient of the data change volume of the messages waiting in the message queue on the computing power occupancy rate of the digital base, 、 respectively represent M rounding up and rounding down.
[0013] A digital base computing power resource elastic scaling system, comprising: a division module for dividing time into one or more types of cycles according to the time characteristics of the application of the digital base; an acquisition module for acquiring the actual computing power resources of the digital base in multiple consecutive historical cycles, where the multiple historical cycles belong to the same type of cycle, and the actual computing power resource of each historical cycle is the average number of computing units actually deployed within that historical cycle; a correction module for judging whether there are abnormal cycles in the multiple consecutive historical cycles according to the actual computing power resources of the digital base in the multiple consecutive historical cycles, and if so, correcting the abnormal cycles; a first estimation module for estimating the basic demand quantity of the computing units to be deployed by the digital base in the target cycle according to the actual computing power resources of the corrected multiple consecutive historical cycles, where the target cycle belongs to the same type of cycle as the multiple historical cycles; a deployment module for deploying computing units with the basic demand quantity at the start time of the target cycle; a collection module for real-time collecting the data volume of the messages waiting in the message queue of the digital base; a second estimation module for estimating the scaling quantity of the computing units to be deployed at k +1 time according to the data volume of the messages waiting in the message queue at k time and k -1 time, where k time is any time from the start time to the previous time of the end time within the target cycle; the deployment module is further configured to deploy computing units with the scaling quantity of the computing units to be deployed at k +1 time and the number of computing units actually deployed at k time at k +1 time. k time and k -1 time, for k +1 time to estimate the scaling quantity of the computing units to be deployed, where k time is any time from the start time to the previous time of the end time within the target cycle; the deployment module is further configured to at k +1 time, with k the number of computing units actually deployed at time and k +1 time to estimate the scaling quantity of the computing units to be deployed to deploy computing units.
[0014] The correction module is specifically configured to: obtain the median of the actual computing power resources of the multiple consecutive historical cycles; judge whether the actual computing power resource of each historical cycle is greater than n times the median, or less than 1 / n of the median, where n is a preset value; if the actual computing power resource of a certain historical cycle is greater than n times the median, or less than 1 / n of the median, then determine that this historical cycle is the abnormal cycle, otherwise determine that this historical cycle is a normal cycle.
[0015] The correction module is specifically configured to: determine whether the previous cycle and the next cycle of each abnormal cycle are both normal cycles; if so, delete the actual computing power resources of the abnormal cycle, and use the average value of the actual computing power resources of the previous cycle and the actual computing power resources of the next cycle of the abnormal cycle as the corrected actual computing power resources of the abnormal cycle; if not, delete the actual computing power resources of the abnormal cycle, and obtain the corrected actual computing power resources of the abnormal cycle through linear regression.
[0016] n Take [2, 5].
[0017] The second prediction module predicts k The scaling amount of the computing power unit to be deployed at the +1 moment is:
[0018]
[0019] Where N is the scaling amount, N being positive means the number of computing power units increases, N being negative means the number of computing power units decreases, N being 0 means the number of computing power units remains unchanged, D k represents k the data volume of the messages waiting in the message queue at the D k-1 represents k the data volume of the messages waiting in the message queue at the -1 moment, H represents the computing power of each computing power unit, R max represents the upper limit of the computing power occupancy rate of each computing power unit, λ represents the influence coefficient of the data change volume of the messages waiting in the message queue on the computing power occupancy rate of the digital base, and respectively represent M rounding up and rounding down.
[0020] The beneficial effects of the present invention:
[0021] By classifying time periods and performing elastic scaling of computing power resources for the digital base based on the same type of periods, higher accuracy can be achieved; by correcting abnormal periods and estimating the basic required quantity of computing power units to be deployed in the target period according to the actual computing power resources of multiple historical periods after correction, combined with the strategies of the same type of periods, the basic quantity of computing power units in each period can be accurately determined, avoiding large-scale scaling within a single period and ensuring the stability of the digital base operation; by estimating the data volume of messages waiting in the message queue, the scaling amount of computing power resources at each moment can be accurately determined. Thus, high-quality dynamic scaling of the digital base's computing power resources can be achieved, effectively ensuring the availability and stability of the digital base while incurring lower resources and costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 is a flowchart of the method for elastic scaling of computing power resources of the digital base according to an embodiment of the present invention;
[0023] Figure 2 is a block diagram of the system for elastic scaling of computing power resources of the digital base according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0024] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0025] As Figure 1 shown, the method for elastic scaling of computing power resources of the digital base according to an embodiment of the present invention is characterized by including the following steps:
[0026] S1. Divide time into one or more types of periods according to the time characteristics of the application of the digital base.
[0027] In an embodiment of the present invention, a cycle can be one day, one week, half a day, etc., or it can be from a certain time to a certain time every day that is pre-defined. The classification of cycles means dividing the relationship between the frequency of application of the digital base and time, and dividing the time periods corresponding to different frequencies into different types of cycles. For example, for the digital base in the enterprise field, if it is significantly applied a large amount on weekdays and a small amount or basically not used on non-working days, then each working day can be used as a cycle and classified into the working day category, and each non-working day can be used as a cycle and classified into the non-working day category. For another example, the cycles corresponding to a certain digital base can be divided into a daytime category and a nighttime category; for another example, the cycles corresponding to a certain digital base can be divided into the category from 22:00 to 6:00 the next day, the category from 6:00 to 11:00, the category from 11:00 to 16:00, and the category from 16:00 to 22:00.
[0028] S2. Obtain the actual computing power resources of the digital base in multiple consecutive historical cycles, where the multiple historical cycles belong to the same type of cycle, and the actual computing power resources of each historical cycle are the average number of computing power units actually deployed within that historical cycle.
[0029] In the embodiments of the present invention, multiple consecutive historical cycles of the same type only refer to the continuity of this type of cycle, rather than the absolute continuity of time. For example, for the working day type of cycle, last Friday and this Monday belong to consecutive cycles.
[0030] In an embodiment of the present invention, the computing power unit can be a server instance, a container, or a pod. The calculation formula for the average number of computing power units actually deployed within each historical cycle is as follows:
[0031]
[0032] Among them, represents the average number of computing power units actually deployed within that historical cycle, A and t A respectively represent the number of computing power units actually deployed within that historical cycle and the total continuous time for deploying that number, T represents that historical cycle, and Σ represents the sum of all A calculated and then summed up.
[0033] S3. According to the actual computing power resources of the digital base in multiple consecutive historical cycles, determine whether there are abnormal cycles in the multiple consecutive historical cycles. If there are, correct the abnormal cycles.
[0034] In an embodiment of the present invention, an abnormal period refers to a period in which the actual computing power resources have a sharp increase or decrease compared to the normal situation. In an embodiment of the present invention, the median of the actual computing power resources of multiple consecutive historical periods can be obtained, and it is determined whether the actual computing power resources of each historical period are greater than n times the median, or less than 1 / n of the median, where n is a preset value. If the actual computing power resources of a certain historical period are greater than n times the median, or less than 1 / n , then it is determined that the historical period is an abnormal period, otherwise it is determined that the historical period is a normal period. In a specific embodiment of the present invention, n can take [2, 5].
[0035] The sharp increase or decrease in actual computing power resources may be caused by a certain special event and should not be used as the basis for subsequent computing power resource estimation. Therefore, it needs to be corrected. In an embodiment of the present invention, first, it can be determined whether the previous period and the next period of each abnormal period are both normal periods; if so, the actual computing power resources of the abnormal period are deleted, and the average of the actual computing power resources of the previous period and the next period of the abnormal period is used as the corrected actual computing power resources of the abnormal period; if not, the actual computing power resources of the abnormal period are deleted, and the corrected actual computing power resources of the abnormal period are obtained through linear regression.
[0036] It should be noted that if the abnormal period is the last or the first period among multiple consecutive historical periods, it can be determined whether its previous or next period is a normal period. If so, the actual computing power resources of the normal period are used as the corrected actual computing power resources of the abnormal period; if not, the corrected actual computing power resources of the abnormal period can also be obtained through linear regression.
[0037] S4. Based on the corrected actual computing power resources of multiple consecutive historical periods, estimate the basic required quantity of computing power units to be deployed by the digital base in the target period, where the target period and the multiple historical periods belong to the same type of period.
[0038] In an embodiment of the present invention, the basic required quantity of computing power units to be deployed by the digital base in the target period can be estimated through linear regression.
[0039] S5. At the start moment of the target period, deploy computing power units according to the basic required quantity.
[0040] S6. Real-time collect the data volume of the messages waiting in the message queue of the digital base.
[0041] S7. According to k moment andk- The data volume of messages waiting in the message queue at time 1 is used to estimate k the scaling amount of computing power units to be deployed at time +1, where k the time is any time from the start time to the previous time of the end time within the target cycle.
[0042] k Time -1 is k the previous time of the time, k Time +1 is k the next time of the time. In an embodiment of the present invention, the estimated k scaling amount of computing power units to be deployed at time +1 is:
[0043]
[0044] Where N is the scaling amount, N being positive indicates an increase in the number of computing power units, N being negative indicates a reduction in the number of computing power units, N being 0 indicates that the number of computing power units remains unchanged, D k represents k the data volume of messages waiting in the message queue at time, D k-1 represents k the data volume of messages waiting in the message queue at time -1, H represents the computing power of each computing power unit, R max represents the upper limit of the computing power occupancy rate of each computing power unit, λ represents the influence coefficient of the change in the data volume of messages waiting in the message queue on the computing power occupancy rate of the digital base. When the data volume increases by 1, the computing power occupancy rate of the digital base increases λ , , respectively represent M rounding up and rounding down.
[0045] It should be noted that the objects of the computing power and computing power occupancy rate in the embodiments of the present invention can be the CPU, memory, or disk. In the above calculation formula of the scaling amount N , for the specific objects of the computing power and computing power occupancy rate, the computing power short board of the digital base can be selected, such as the CPU; or N can be calculated for each object, and then the largest N is taken as k the scaling amount of computing power units to be deployed at time +1.
[0046] S8, atk At the +1 moment, based on k the number of computing power units actually deployed at the moment and k the scaling amount of the computing power units to be deployed at the +1 moment, deploy the computing power units.
[0047] Based on k the number of computing power units actually deployed at the moment plus the scaling amount N , that is k the number of computing power units to be deployed at the +1 moment.
[0048] According to the method for elastic scaling of digital base computing power resources according to the embodiments of the present invention, by classifying time periods and performing elastic scaling of digital base computing power resources based on the same type of periods, higher accuracy can be achieved; by correcting abnormal periods and estimating the basic required quantity of computing power units to be deployed in the target period according to the actual computing power resources of multiple corrected historical periods, combined with the strategies of the same type of periods, the basic quantity of computing power units in each period can be accurately determined, avoiding large-scale scaling within one period and ensuring the stability of the digital base operation; by estimating the data volume of messages waiting in the message queue, the scaling amount of computing power resources at each moment can be accurately determined. Thus, high-quality dynamic scaling of digital base computing power resources can be realized, effectively ensuring the availability and stability of the digital base while consuming less resources and costs.
[0049] Corresponding to the method for elastic scaling of digital base computing power resources in the above embodiments, the present invention also proposes a system for elastic scaling of digital base computing power resources.
[0050] As Figure 2As shown in the figure, the elastic scaling system for computing power resources of the digital base in the embodiment of the present invention includes a division module 10, an acquisition module 20, a correction module 30, a first estimation module 40, a deployment module 50, a collection module 60, and a second estimation module 70. The division module 10 is used to divide time into one or more types of cycles according to the time characteristics of the digital base being applied; the acquisition module 20 is used to acquire the actual computing power resources of the digital base in multiple consecutive historical cycles, where the multiple historical cycles belong to the same type of cycle, and the actual computing power resources of each historical cycle are the average number of computing units actually deployed within that historical cycle; the correction module 30 is used to determine whether there are abnormal cycles in the multiple consecutive historical cycles according to the actual computing power resources of the digital base in the multiple consecutive historical cycles, and if so, correct the abnormal cycles; the first estimation module 40 is used to estimate the basic demand quantity of the computing units to be deployed by the digital base in the target cycle according to the actual computing power resources of the corrected multiple consecutive historical cycles, where the target cycle belongs to the same type of cycle as the multiple historical cycles; the deployment module 50 is used to deploy computing units with the basic demand quantity at the start time of the target cycle; the collection module 60 is used to collect in real time the data volume of the messages waiting in the message queue of the digital base; the second estimation module 70 is used to k the time and k the data volume of the messages waiting in the message queue at -1 moment, estimate the scaling quantity of the computing units to be deployed at k +1 moment, where k the moment is any moment from the start time to the moment before the end time within the target cycle; the deployment module 50 is further used to, at k +1 moment, deploy computing units with the number of computing units actually deployed at k the moment and the scaling quantity of the computing units to be deployed at k +1 moment.
[0051] In an embodiment of the present invention, a cycle can be one day, one week, half a day, etc., or it can be a pre-defined time period from a certain point to a certain point every day. The classification of types refers to dividing the time periods corresponding to different frequencies of the digital base being applied into different types of cycles according to the relationship between the application frequency of the digital base and time. For example, for the digital base in the enterprise field, if it is significantly applied a large amount on weekdays and a small amount or basically not used on non-working days, then each working day can be used as a cycle and classified into the working day type, and each non-working day can be used as a cycle and classified into the non-working day type. For another example, the cycles corresponding to a certain digital base can be divided into a daytime type and a nighttime type; for another example, the cycles corresponding to a certain digital base can be divided into the type from 22:00 to 6:00 the next day, the type from 6:00 to 11:00, the type from 11:00 to 16:00, and the type from 16:00 to 22:00.
[0052] In the embodiments of the present invention, multiple consecutive historical cycles of the same type only refer to the continuity of this type of cycle, rather than absolute continuity in time. For example, for working day cycles, last Friday and this Monday belong to consecutive cycles.
[0053] In one embodiment of the present invention, the computing power unit can be a server instance, a container, or a pod. The calculation formula for the average number of computing power units actually deployed within each historical cycle is as follows:
[0054]
[0055] Where, represents the average number of computing power units actually deployed within this historical cycle, A and t A respectively represent the number of computing power units actually deployed within this historical cycle and the total continuous time for deploying this quantity, T represents this historical cycle, and Σ represents the sum of all A calculated within this historical cycle.
[0056] In the embodiments of the present invention, an abnormal cycle means that the actual computing power resources in this cycle have a sharp increase or decrease compared to the normal situation. In one embodiment of the present invention, the correction module 30 is specifically configured to: obtain the median of the actual computing power resources of multiple consecutive historical cycles, and determine whether the actual computing power resources of each historical cycle are greater than n times the median, or less than 1 / n of the median, where n is a preset value; if the actual computing power resources of a certain historical cycle are greater than n times the median, or less than 1 / n of the median, then determine that this historical cycle is an abnormal cycle, otherwise determine that this historical cycle is a normal cycle. In a specific embodiment of the present invention, n can take [2, 5].
[0057] The sharp increase or decrease in actual computing power resources may be caused by a certain special event and is not suitable as the basis for subsequent computing power resource estimation. Therefore, it needs to be corrected. In one embodiment of the present invention, the correction module 30 is specifically configured to: determine whether the previous cycle and the next cycle of each abnormal cycle are both normal cycles; if so, delete the actual computing power resources of this abnormal cycle, and use the average of the actual computing power resources of the previous cycle and the next cycle of this abnormal cycle as the corrected actual computing power resources of this abnormal cycle; if not, delete the actual computing power resources of this abnormal cycle, and obtain the corrected actual computing power resources of this abnormal cycle through linear regression.
[0058] It should be noted that if the abnormal period is the last or the first period among multiple consecutive historical periods, it can be determined whether the previous or the next period is a normal period. If so, the actual computing power resources of this normal period are used as the corrected actual computing power resources of this abnormal period; if not, the corrected actual computing power resources of this abnormal period can also be obtained through linear regression.
[0059] In an embodiment of the present invention, the first estimation module 40 can estimate the basic required quantity of computing power units to be deployed by the digital base in the target period through linear regression.
[0060] k The moment at -1 is k the previous moment of the moment k The moment at +1 is k the next moment of the moment. In an embodiment of the present invention, the scaling amount of the computing power units to be deployed at the moment k at +1 estimated by the second estimation module 70 is:
[0061]
[0062] where N is the scaling amount, N being positive indicates an increase in the number of computing power units, N being negative indicates a reduction in the number of computing power units, N being 0 indicates that the number of computing power units remains unchanged, D k represents k the data volume of the messages waiting in the message queue at the moment D k-1 represents k the data volume of the messages waiting in the message queue at the moment at -1, H represents the computing power size of each computing power unit, R max represents the upper limit of the computing power occupancy rate of each computing power unit, λ represents the influence coefficient of the change in the data volume of the messages waiting in the message queue on the computing power occupancy rate of the digital base. When the data volume increases by 1, the computing power occupancy rate of the digital base increases λ , , respectively represent M rounding up and rounding down for
[0063] It should be noted that the objects of the computing power size and the computing power occupancy rate in the embodiments of the present invention can be the CPU, memory, or disk. In the above calculation formula of the scaling amount N , for the specific objects of the computing power size and the computing power occupancy rate, the computing power short board of the digital base, such as the CPU, can be selected; or theN , and then take the largest N as k the scaling amount of the computing power unit to be deployed at the
[0064] time of k the number of actually deployed computing power units at a certain N time plus the scaling amount k is the number of computing power units to be deployed at the
[0065] According to the digital base computing power resource elastic scaling system of the embodiments of the present invention, by classifying time periods, the elastic scaling of digital base computing power resources based on the same type of periods has higher accuracy; by correcting abnormal periods and estimating the basic required quantity of the computing power units to be deployed in the target period according to the actual computing power resources of multiple corrected historical periods, combined with the strategies of the same type of periods, the basic quantity of computing power units in each period can be accurately determined, avoiding large-scale scaling within one period and ensuring the stability of the digital base operation; by estimating the data volume of the messages waiting in the message queue, the scaling amount of computing power resources at each moment can be accurately determined. Thus, high-quality dynamic scaling of digital base computing power resources can be achieved, effectively ensuring the availability and stability of the digital base while consuming fewer resources and costs.
[0066] In the description of the present invention, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. The meaning of "a plurality" is two or more unless otherwise specifically defined.
[0067] In the present invention, unless otherwise clearly specified and limited, the terms such as "installed", "connected", "connected to", "fixed" and the like should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or integrated; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the internal communication of two components or the interaction relationship between two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.
[0068] In the present invention, unless otherwise clearly defined or limited, the first feature being "on" or "under" the second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, the first feature being "above", "over" and "on top of" the second feature may mean that the first feature is directly above or obliquely above the second feature, or simply indicates that the horizontal height of the first feature is higher than that of the second feature. The first feature being "under", "beneath" and "underneath" the second feature may mean that the first feature is directly below or obliquely below the second feature, or simply indicates that the horizontal height of the first feature is less than that of the second feature.
[0069] In the description of this specification, the description with reference to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0070] Any process or method description shown in a flowchart or described in other ways herein can be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a specific logical function or process, and the scope of the preferred embodiments of the present invention includes additional implementations, where the functions may be executed in a manner that is not shown or discussed, including in a substantially simultaneous manner or in a reverse order according to the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention pertain.
[0071] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a definitional sequence list of executable instructions for implementing logical functions, which can be embodied specifically in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or used in conjunction with these instruction execution systems, apparatus, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection portion having one or more wirings (electronic device), a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or other suitable processing as necessary, and then stored in a computer memory.
[0072] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having suitable combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
[0073] Those of ordinary skill in the art of this technology can understand that all or part of the steps carried by the method of the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.
[0074] In addition, each functional unit in various embodiments of the present invention may be integrated into a processing module, may exist separately physically for each unit, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0075] Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for elastically scaling computing power resources of a digital base, characterized in that: The following steps are involved: According to the time characteristics of the digital base being applied, the time is divided into one or more types of periods; Acquire the actual computing power resources of the digital base in multiple consecutive historical periods, wherein the multiple historical periods belong to the same type of period, and the actual computing power resources of each historical period are the average number of computing power units actually deployed in the historical period; According to the actual computing power resources of the digital base in multiple consecutive historical periods, determine whether there are abnormal periods in the multiple consecutive historical periods, and if so, correct the abnormal period, wherein the abnormal period refers to a surge or a sharp decrease in the actual computing power resources of the period compared with the normal situation; According to the actual computing power resources of the corrected multiple continuous historical periods, estimating the basic required number of computing power units to be deployed by the digital base in the target period, wherein the target period and the multiple historical periods belong to the same type of period; At the start time of the target period, deploy computing units with the basic required number; Collecting in real time the data volume of messages waiting in the message queue of the digital base; According to the data volume of the messages waiting in the message queue at time k and time k-1, the scaling amount of the computing power unit to be deployed at time k+1 is estimated, where time k is any time from the start time to the time before the end time within the target period; At time k+1, computing units are deployed based on the number of computing units actually deployed at time k and the scaling amount of computing units to be deployed at time k+1.
2. The method for elastically scaling computing power resources of a digital base according to claim 1, characterized in that: According to the actual computing power resources of the digital base in multiple consecutive historical periods, determining whether there is an abnormal period in the multiple consecutive historical periods specifically includes: Obtaining the median of the actual computing power resources of the multiple consecutive historical periods; Determine whether the actual computing power resources of each of the historical periods are greater than n times the median, or less than 1 / n of the median, where n is a preset value; If the actual computing power resources of a certain historical period are greater than n times the median, or less than 1 / n of the median, then the historical period is determined to be the abnormal period; otherwise, the historical period is determined to be a normal period.
3. The method for elastically scaling computing power resources of a digital base according to claim 2, characterized in that: Correct the abnormal cycle, including: Determine whether the previous cycle and the next cycle of each abnormal cycle are both normal cycles; If yes, the actual computing power resources of the abnormal period are deleted, and the average of the actual computing power resources of the previous period and the actual computing power resources of the next period is used as the actual computing power resources after correction of the abnormal period; If not, the actual computing power resources of the abnormal period are deleted, and the actual computing power resources corrected for the abnormal period are obtained through linear regression.
4. The method for elastically scaling digital base computing resources according to claim 2, characterized in that: n is [2, 5].
5. The method for elastically scaling digital base computing resources according to claim 1, characterized in that: The estimated scaling of the computing power units to be deployed at time k+1 is: Where N is the expansion amount, a positive N indicates an increase in the number of computing units, a negative N indicates a decrease in the number of computing units, and a 0 N indicates that the number of computing units remains unchanged. k represents the amount of data of messages waiting in the message queue at time k, D k-1 represents the amount of data waiting in the message queue at time k-1, H represents the computing power of each computing unit, and R max represents the upper limit of the computing power utilization rate of each computing power unit, λ represents the influence coefficient of the data change amount of the message waiting in the message queue on the computing power utilization rate of the digital base, They represent rounding up and rounding down of M respectively.
6. A digital base computing resource elastic expansion system, characterized in that: include: A division module, used for dividing time into one or more periods according to the time characteristics of the digital base being applied; An acquisition module, used to acquire actual computing power resources of the digital base in multiple consecutive historical periods, wherein the multiple historical periods belong to the same type of period, and the actual computing power resources of each historical period are the average number of computing power units actually deployed in the historical period; A correction module, used for judging whether there is an abnormal period in the multiple continuous historical periods according to the actual computing power resources of the digital base in the multiple continuous historical periods, and if so, correcting the abnormal period, wherein the abnormal period refers to a surge or a sharp decrease in the actual computing power resources of the period compared with the normal situation; A first estimation module is used to estimate the basic required number of computing units to be deployed by the digital base in a target period according to the actual computing resources of the corrected multiple continuous historical periods, wherein the target period and the multiple historical periods belong to the same type of period; A deployment module, configured to deploy computing units with the basic required number at the start time of the target period; A collection module, used for collecting data volume of messages waiting in the message queue of the digital base in real time; The second estimation module is used to estimate the scaling amount of the computing unit to be deployed at time k+1 according to the data amount of the messages waiting in the message queue at time k and time k-1, wherein time k is any time from the start time to the time before the end time in the target period; The deployment module is also used to deploy computing units at time k+1 based on the number of computing units actually deployed at time k and the scaling amount of computing units to be deployed at time k+1.
7. The digital base computing resource elastic expansion system according to claim 6, characterized in that: The correction module is specifically used for: Obtaining the median of the actual computing power resources of the multiple consecutive historical periods; Determine whether the actual computing power resources of each of the historical periods are greater than n times the median, or less than 1 / n of the median, where n is a preset value; If the actual computing power resources of a certain historical period are greater than n times the median, or less than 1 / n of the median, then the historical period is determined to be the abnormal period; otherwise, the historical period is determined to be a normal period.
8. The digital base computing power resource elastic expansion system according to claim 7, characterized in that: The correction module is specifically used for: Determine whether the previous cycle and the next cycle of each abnormal cycle are both normal cycles; If yes, the actual computing power resources of the abnormal period are deleted, and the average of the actual computing power resources of the previous period and the actual computing power resources of the next period is used as the actual computing power resources after correction of the abnormal period; If not, the actual computing power resources of the abnormal period are deleted, and the actual computing power resources corrected for the abnormal period are obtained through linear regression.
9. The digital base computing power resource elastic expansion system according to claim 7, characterized in that: n is [2, 5].
10. The digital base computing power resource elastic expansion system according to claim 6, characterized in that: The second estimation module estimates the scaling amount of the computing power unit to be deployed at time k+1 as: Where N is the expansion amount, a positive N indicates an increase in the number of computing units, a negative N indicates a decrease in the number of computing units, and a 0 N indicates that the number of computing units remains unchanged. k represents the amount of data of messages waiting in the message queue at time k, D k-1 represents the amount of data waiting in the message queue at time k-1, H represents the computing power of each computing unit, and R max represents the upper limit of the computing power utilization rate of each computing power unit, λ represents the influence coefficient of the data change amount of the message waiting in the message queue on the computing power utilization rate of the digital base, They represent rounding up and rounding down of M respectively.
Citation Information
Patent Citations
System and method for adjusting telescopic capacity of container cloud
CN117527613A
Low-voltage distribution network reliability partition prediction method and device, terminal and medium
CN117910647A