Container capacity adjustment task generation method, device, equipment and readable medium
By generating and utilizing indicator data to predictive models to automatically adjust container capacity, the problems of delays in manual adjustments and insufficient historical data analysis are solved, thereby improving the stability and resource utilization of the container system.
Patent Information
- Application Number
- CN202310198166.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-27
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-02-27
AI Technical Summary
In existing technologies, manual adjustment of container capacity is delayed, resulting in low stability of the container system and waste of resources. Furthermore, insufficient analysis of historical data by humans leads to low accuracy in expansion or contraction, and reduced resource utilization.
By generating target container metric configuration information and metric prediction information, using metric data prediction models to determine differences, and automatically adjusting container capacity, the container can be expanded before the load increases and reduced when the load is low.
It improves the stability of container systems, reduces resource waste, and increases the utilization rate of container resources.
Smart Images

Figure CN116302415B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of this disclosure relate to the field of computer technology, and more specifically to a method, apparatus, device, and readable medium for generating container capacity adjustment tasks. Background Technology
[0002] In the context of the internet, fine-tuning container capacity is a crucial issue. Currently, container capacity is mainly adjusted manually by expanding or shrinking the container.
[0003] However, the inventors discovered that when adjusting the container capacity using the above method, the following technical problems often arise:
[0004] First, there is a certain delay when manually scaling up or down containers. When the container load is too high, the delay in scaling up leads to lower stability of the container system. When the container load is low, the delay in scaling down leads to a waste of container resources.
[0005] Second, insufficient analysis of historical data on container capacity by human personnel results in a low accuracy rate in estimating the capacity to be expanded or reduced when adjusting the capacity of containers, leading to a decrease in container resource utilization.
[0006] The information disclosed in this background section is only intended to enhance the understanding of the background of the inventive concept, and therefore may contain information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0007] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.
[0008] Some embodiments of this disclosure provide methods, apparatus, electronic devices, and computer-readable media for container capacity adjustment tasks to address one or more of the technical problems mentioned in the background section above.
[0009] In a first aspect, some embodiments of this disclosure provide a method for generating a container capacity adjustment task. The method includes: generating indicator configuration information for a target container in a target period, wherein the indicator configuration information includes indicator configuration data for the target container corresponding to each preset time period in the target period; generating indicator prediction information for the target container in the target period using an indicator data prediction model, wherein the indicator prediction information includes indicator prediction data for the target container corresponding to each preset time period in the target period; determining whether there is a difference between the indicator prediction information and the indicator configuration information; and, in response to determining that there is a difference between the indicator prediction information and the indicator configuration information, generating a container capacity adjustment task corresponding to the target container and the target period based on the indicator prediction information and the indicator configuration information.
[0010] Secondly, some embodiments of this disclosure provide a container capacity adjustment task generation apparatus, the apparatus comprising: a first generation unit configured to generate indicator configuration information of a target container in a target period, wherein the indicator configuration information includes indicator configuration data of the target container corresponding to each preset time period in the target period; a second generation unit configured to generate indicator prediction information of the target container in the target period through an indicator data prediction model, wherein the indicator prediction information includes indicator prediction data of the target container corresponding to each preset time period in the target period; a determination unit configured to determine whether there is a difference between the indicator prediction information and the indicator configuration information; and a third generation unit configured to, in response to determining that there is a difference between the indicator prediction information and the indicator configuration information, generate a container capacity adjustment task corresponding to the target container and the next period based on the indicator prediction information and the indicator configuration information.
[0011] Thirdly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.
[0012] Fourthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in any of the implementations of the first aspect above.
[0013] The above embodiments of this disclosure have the following beneficial effects: the container capacity adjustment task generation method of some embodiments of this disclosure improves the stability of the container system and reduces the waste of container resources. Specifically, the reasons for container instability and waste of container resources are: when manually expanding or shrinking the container, there is a certain delay. When the container load is too high, the delay in expansion leads to low stability of the container system. When the container load is low, the delay in shrinking leads to waste of container resources. Based on this, the container capacity task generation method of some embodiments of this disclosure: First, generate indicator configuration information of the target container in the target period, wherein the indicator configuration information includes indicator configuration data of the target container corresponding to each preset time period in the target period. Thus, the indicator configuration information can characterize the indicator configuration data of the target container in the target period. Then, through the indicator data prediction model, generate indicator prediction information of the target container in the target period, wherein the indicator prediction information includes indicator prediction data of the target container corresponding to each preset time period in the target period. Thus, the indicator data prediction model can be used to predict the indicator prediction data of the target container in the target period. Next, it is determined whether there is a discrepancy between the aforementioned indicator prediction information and the aforementioned indicator configuration information. This allows it to determine whether the predicted indicator data in the aforementioned indicator prediction information is greater than or less than the configured indicator data in the aforementioned indicator configuration information, serving as the basis for adjusting the target container capacity. Subsequently, in response to the determination that a discrepancy exists between the aforementioned indicator prediction information and the aforementioned indicator configuration information, a container capacity adjustment task corresponding to the aforementioned target container and the aforementioned target period is generated based on the aforementioned indicator prediction information and the aforementioned indicator configuration information. Therefore, if it is determined that the predicted indicator data in the aforementioned indicator prediction information is greater than the configured indicator data in the aforementioned indicator configuration information, or if it is determined that the predicted indicator data in the aforementioned indicator prediction information is less than the configured indicator data in the aforementioned indicator configuration information, a container capacity adjustment task corresponding to the aforementioned target container and the aforementioned target period can be generated. Because it enables automatic adjustment of container capacity, it can automatically expand container capacity before container load increases and automatically shrink container capacity when container load is low, improving the stability of the container system and reducing the waste of container resources. Attached Figure Description
[0014] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.
[0015] Figure 1 This is a flowchart of some embodiments of the container capacity adjustment task generation method according to this disclosure;
[0016] Figure 2 This is a schematic diagram of the structure of some embodiments of the container capacity adjustment task generation apparatus according to the present disclosure;
[0017] Figure 3 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Implementation
[0018] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0019] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.
[0020] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0021] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0022] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0023] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0024] Figure 1 A flow 100 of some embodiments of a container capacity adjustment task generation method according to the present disclosure is shown. The container capacity adjustment task generation method includes the following steps:
[0025] Step 101: Generate the target container's indicator configuration information for the target period.
[0026] In some embodiments, the execution entity (e.g., a computing device) of the container capacity adjustment task generation method can generate indicator configuration information for the target container during the target period. The target container can be any container using the automatic container capacity adjustment function. The indicator configuration information can represent the resource indicator configuration data of the target container within the target period. The indicator configuration information can include indicator configuration data for the target container corresponding to each preset time period within the target period. The target period can be a time period. For example, the target period can be from 1:00 AM to 1:00 AM the next day. Each preset time period can be a time period divided into 10-minute intervals within the target period. For example, 1:00-1:10, 1:10-1:20. The indicators included in the indicator configuration data can include, but are not limited to, at least one of the following: CPU utilization, memory utilization, disk I / O, and network I / O. In practice, the execution entity can set up a scheduled task to obtain the indicator configuration information from the target container at a specified time.
[0027] In some optional implementations of certain embodiments, the execution entity may generate the target container's metric configuration information for the target period through the following steps:
[0028] The first step is to obtain a set of historical indicator configuration data sequences for the target container within the target period. This set of historical indicator configuration data sequences can be a collection of historical indicator configuration data sequences for the target container at each of the preset time periods within the target period. In practice, the executing entity can obtain this set of historical indicator configuration data sequences from the target container using an indicator monitoring tool, such as Prometheus.
[0029] The second step involves generating indicator configuration information based on the aforementioned historical indicator configuration data sequence set. In practice, for each historical indicator configuration data sequence and its corresponding indicator in the set, the executing entity can select the largest indicator value from the historical indicator configuration sequence. Then, the selected indicator values corresponding to the historical indicator configuration data sequence can be determined as indicator configuration data. Finally, the determined indicator configuration data can be defined as the indicator configuration information.
[0030] Step 102: Generate indicator prediction information for the target container in the target period through the indicator data prediction model.
[0031] In some embodiments, the executing entity can generate indicator prediction information for the target container during the target period using an indicator data prediction model. The indicator data prediction model characterizes the correspondence between preset numerical indicator configuration data of the target container before the target period and the indicator prediction information. The indicator prediction information characterizes the resource indicator configuration of the target container during the target period as predicted by the indicator data prediction model.
[0032] In some optional implementations of certain embodiments, the aforementioned execution entity may generate indicator prediction information for the target container in the target period based on an indicator data prediction model according to the following steps:
[0033] The first step is to obtain a preset number of indicator configuration data for the target container before the target period. Since the indicator configuration data has a weekly periodicity, the preset number can be a multiple of the number of indicator configuration data points within a week. For example, the number of indicator configuration data points within a week could be 7 × 144. In practice, the executing entity can obtain the preset number of indicator configuration data for the target container before the target period using indicator monitoring tools.
[0034] The second step involves inputting the aforementioned preset number of indicator configuration data into the aforementioned indicator data prediction model to obtain the aforementioned preset number of indicator prediction data as an indicator prediction data sequence. This indicator prediction data sequence can represent the aforementioned preset number of indicator prediction data. The aforementioned indicator prediction data can represent the indicator data predicted by the aforementioned indicator data prediction model.
[0035] The third step is to select the indicator prediction data that meets the target period condition from the above indicator prediction data sequence as the indicator prediction information. The indicator prediction data in the above indicator prediction data sequence may include the time period corresponding to the indicator prediction data. The above target period condition can be that the time period corresponding to the indicator prediction data is within the target period.
[0036] In some optional implementations of certain embodiments, the aforementioned indicator data prediction model may be trained by the aforementioned execution subject or other execution subjects used to train the aforementioned indicator data prediction model through the following steps:
[0037] The first step is to obtain a sample set, where the samples in the sample set may include sample indicator configuration data and corresponding label information. The label information may be a preset number of indicator configuration data that have a continuous temporal relationship with the sample indicator configuration data.
[0038] The second step involves performing the following training steps based on the sample set:
[0039] The first training step involves inputting the sample indicator configuration data of at least one sample in the sample set into an initial neural network to obtain indicator prediction configuration information corresponding to each of the at least one sample. The initial neural network can be any type of neural network capable of obtaining indicator prediction data based on the indicator configuration data. Examples include LSTM networks and GRU networks.
[0040] The second training step involves comparing the indicator prediction configuration information corresponding to each sample with the label information corresponding to each sample.
[0041] The third training step determines whether the initial neural network has achieved the preset optimization objective based on the comparison results. For example, when the difference between the indicator prediction configuration information corresponding to a sample and the corresponding sample label information is less than a preset difference threshold, the indicator prediction configuration information is considered accurate. In this case, the aforementioned optimization objective could mean that the accuracy of the indicator prediction configuration information generated by the initial neural network is greater than a preset accuracy threshold.
[0042] In the fourth training step, in response to determining that the initial neural network has achieved the above optimization objective, the initial neural network can be identified as the trained indicator data prediction model.
[0043] Optionally, the steps for training the above-mentioned indicator data prediction model may also include the following steps:
[0044] In response to the determination that the initial neural network has not achieved the optimization objective, the network parameters of the initial neural network can be adjusted, and an unused sample set can be used to form a sample set to continue the training steps. As an example, the back propagation algorithm (BP algorithm) and gradient descent methods (such as mini-batch gradient descent) can be used to adjust the network parameters of the initial neural network.
[0045] In some optional implementations of certain embodiments, the sample set for training the above-mentioned indicator data prediction model can be generated through the following steps:
[0046] The first step is to obtain the indicator configuration data sequence of the target container within a preset period. This preset period can be a historical timeframe, such as seven weeks prior to the current time. The indicator configuration data sequence can be a sequence composed of multiple indicator configuration data with a temporal relationship. In practice, the executing entity can obtain the indicator configuration data sequence of the target container within the preset period from the target container using indicator monitoring tools.
[0047] The second step involves heterogeneously processing the aforementioned indicator configuration data sequence to obtain a heterogeneous configuration data sequence. This heterogeneous configuration data sequence characterizes the heterogeneously processed indicator configuration data sequence. In practice, the executing entity can split and recombine the aforementioned indicator configuration data sequence to obtain the heterogeneous configuration data sequence.
[0048] The third step involves performing feature engineering on the aforementioned heterogeneous configuration data sequence to obtain a feature-engineered data sequence. This feature-engineered data sequence characterizes the indicator configuration data sequence after heterogeneous and feature engineering processing. The feature engineering process may include discretization, normalization, and invalid value handling. In practice, the executing entity can perform discretization, normalization, and invalid value handling on the aforementioned heterogeneous configuration data sequence to obtain the feature-engineered data sequence.
[0049] The fourth step involves generating a target data sequence set based on the aforementioned feature-engineered data sequence and the first preset time interval. The first preset time interval can be a preset number of days, for example, one day. The target data sequence set can be a set of target data sequences selected from the aforementioned feature-engineered data sequence according to the first preset time interval. The target data sequence can be a sequence fragment selected from the aforementioned feature-engineered data sequence. In practice, firstly, the executing entity can select a second preset number of consecutive feature-engineered data points from the aforementioned feature-engineered data sequence every first preset number of feature-engineered data points as the target data sequence. The first preset number can represent the number of feature-engineered data points contained within one day. The second preset number can represent a multiple of the number of feature-engineered data points contained within one week. Then, the selected target data sequences are defined as the aforementioned target data sequence set.
[0050] Fifth, for each target data sequence in the aforementioned set of target data sequences, generate label information corresponding to the target data sequence based on the next target data sequence corresponding to the target data sequence. The label information can represent another target data sequence that has a temporal relationship with the target data sequence. This temporal relationship can be a continuous relationship in time. In practice, the executing entity can choose the next target data sequence corresponding to the target data sequence as the label information for the target data sequence.
[0051] The sixth step is to determine each target data sequence and its corresponding label information in the above target data sequence set as the sample set for the above indicator data prediction model.
[0052] In some optional implementations of certain embodiments, the execution entity may perform heterogeneous processing on the above-mentioned indicator configuration data sequence through the following steps to obtain the heterogeneously processed indicator configuration data sequence as the heterogeneous configuration data sequence:
[0053] The first step is to generate a set of indicator configuration data sequences based on the aforementioned indicator configuration data sequences and the second preset time interval. The indicator configuration data sequences in this set include each indicator and its corresponding configuration data. The second preset time interval can be 10 minutes. In practice, the executing entity can first divide the indicator configuration data in the aforementioned indicator configuration data sequences into multiple indicator configuration data sequences according to the second preset time interval. Then, these multiple divided indicator configuration data sequences can be used to determine the aforementioned set of configuration data sequences.
[0054] The second step involves generating heterogeneous configuration data corresponding to each indicator configuration data sequence in the aforementioned indicator configuration data sequence set. This heterogeneous configuration data can represent the data composed of the indicator values of each indicator selected from the aforementioned indicator configuration data sequences. In practice, for each indicator configuration data sequence in the aforementioned indicator configuration data sequence set and for each indicator corresponding to that indicator, the executing entity can select the largest indicator value corresponding to that indicator from the aforementioned indicator configuration sequence. Then, the selected indicator values corresponding to the aforementioned indicator configuration data sequence can be defined as the heterogeneous configuration data.
[0055] The third step is to determine the generated heterogeneous configuration data into a heterogeneous configuration data sequence.
[0056] In some optional implementations of certain embodiments, the execution entity may perform feature engineering on the heterogeneous configuration data sequence through the following steps to obtain the feature-engineered heterogeneous configuration data sequence as the feature-engineered data sequence:
[0057] The first step is to discretize the aforementioned heterogeneous configuration data sequence to obtain a discretized configuration data sequence. In practice, the executing entity can segment each heterogeneous configuration data in the above heterogeneous configuration data sequence to obtain segmented data as the discretized configuration data sequence. For example, the data in the interval [21, 30] can be assigned to 30, and the data in the interval [31, 40] can be assigned to 40.
[0058] The second step is to normalize the above discretized configuration data sequence to obtain a normalized discretized configuration data sequence. In practice, the executing entity can normalize each discretized configuration data in the above discretized configuration data sequence to a preset numerical range. For example, the preset numerical range can be [0,1].
[0059] The third step is to identify invalid data within each normalized configuration data set in the above normalized configuration data sequence. Invalid data can be anomalous data. For example, a CPU utilization rate of -10% is considered invalid.
[0060] The fourth step is to remove invalid data from each of the above normalized configuration data sets, obtaining the normalized configuration data sets after removing invalid data as the feature engineering data sequence. In practice, the execution entity can replace the invalid data with regular data after identifying the invalid data in each of the above normalized configuration data sets, obtaining the normalized configuration data sets after removing invalid data as the feature engineering data sequence.
[0061] The above-described technical solution, as an inventive point of this disclosure, addresses the second technical problem mentioned in the background: "Insufficient analysis of historical data on container capacity by humans leads to low accuracy in estimating capacity expansion or contraction during container expansion or contraction adjustments, resulting in reduced container resource utilization." Factors leading to low container resource utilization often include: insufficient analysis of historical data on container capacity by humans, resulting in inaccurate estimation of capacity expansion or contraction during container expansion or contraction adjustments. Solving these factors can improve container resource utilization. To achieve this, this disclosure introduces historical information on container indicator configurations as training data for a neural network. By performing heterogeneous processing and feature engineering on the historical information on container indicator configurations, effective features can be obtained from the historical information, resulting in a better performance of the trained indicator data prediction model. This improved performance of the indicator data prediction model also improves the accuracy of the indicator prediction data, enabling more accurate estimation of the target container's capacity expansion or contraction, thereby improving container resource utilization.
[0062] Step 103: Determine whether there is a discrepancy between the above indicator prediction information and the above indicator configuration information.
[0063] In some embodiments, the executing entity can determine whether there is a discrepancy between the indicator prediction information and the indicator configuration information. The indicator prediction data included in the indicator prediction information corresponds one-to-one with the indicator configuration data included in the indicator configuration information. In practice, the executing entity can determine the magnitude of the indicator configuration data corresponding to each indicator prediction data in the indicator prediction information to determine whether there is a discrepancy between the indicator prediction information and the indicator configuration information.
[0064] Step 104: In response to the discrepancy between the indicator prediction information and the indicator configuration information, generate a container capacity adjustment task for the corresponding target container and target period based on the indicator prediction information and the indicator configuration information.
[0065] In some embodiments, the executing entity may, in response to determining a difference between the indicator prediction information and the indicator configuration information, generate a container capacity adjustment task corresponding to the target container and the target period, based on the indicator prediction information and the indicator configuration information. The container capacity adjustment task may be a task to expand or shrink the target container. The indicator prediction information may include time information corresponding to the indicator prediction data. The indicator configuration information may include time information corresponding to the indicator configuration data.
[0066] In some optional implementations of certain embodiments, the execution entity may perform the following steps for each indicator prediction data included in the indicator prediction information:
[0067] The first step is to select indicator configuration data from the above indicator configuration information that has the same time information as the above indicator prediction data.
[0068] The second step involves generating a scaling-down task for the target container within the target period, in response to the determination that the predicted data for the aforementioned indicator is less than the configured data. This time information can be a time interval. In practice, in response to the determination that the predicted data for the aforementioned indicator is less than the configured data, the executing entity can set up a timed scaling-down task. This task scales down the target container according to the predicted data at the beginning of the time interval corresponding to the predicted data and ends at the end of the time interval.
[0069] The third step involves generating a target container expansion task based on the time information corresponding to the predicted data of the aforementioned indicator within the target period, in response to the determination that the predicted data of the aforementioned indicator is greater than the configured data. In practice, in response to the determination that the predicted data of the aforementioned indicator is greater than the configured data, firstly, the executing entity can expand the time interval corresponding to the predicted data of the aforementioned indicator to obtain the expanded time interval as the target time information. For example, 9:00-9:10 can be expanded to 8:55-9:15. The target time information can represent the time interval for executing the expansion task. Then, a timed expansion task can be set up to expand the target container according to the predicted data of the aforementioned indicator at the start time corresponding to the target time information, and to end the expansion of the target container at the end time corresponding to the target time information.
[0070] The above embodiments of this disclosure have the following beneficial effects: the container capacity adjustment task generation method of some embodiments of this disclosure improves the stability of the container system and reduces the waste of container resources. Specifically, the reasons for container instability and waste of container resources are: when manually expanding or shrinking the container, there is a certain delay. When the container load is too high, the delay in expansion leads to low stability of the container system. When the container load is low, the delay in shrinking leads to waste of container resources. Based on this, the container capacity task generation method of some embodiments of this disclosure: First, generate indicator configuration information of the target container in the target period, wherein the indicator configuration information includes indicator configuration data of the target container corresponding to each preset time period in the target period. Thus, the indicator configuration information can characterize the indicator configuration data of the target container in the target period. Then, through the indicator data prediction model, generate indicator prediction information of the target container in the target period, wherein the indicator prediction information includes indicator prediction data of the target container corresponding to each preset time period in the target period. Thus, the indicator data prediction model can be used to predict the indicator prediction data of the target container in the target period. Next, it is determined whether there is a discrepancy between the aforementioned indicator prediction information and the aforementioned indicator configuration information. This allows it to determine whether the predicted indicator data in the aforementioned indicator prediction information is greater than or less than the configured indicator data in the aforementioned indicator configuration information, serving as the basis for adjusting the target container capacity. Subsequently, in response to the determination that a discrepancy exists between the aforementioned indicator prediction information and the aforementioned indicator configuration information, a container capacity adjustment task corresponding to the aforementioned target container and the aforementioned target period is generated based on the aforementioned indicator prediction information and the aforementioned indicator configuration information. Therefore, if it is determined that the predicted indicator data in the aforementioned indicator prediction information is greater than the configured indicator data in the aforementioned indicator configuration information, or if it is determined that the predicted indicator data in the aforementioned indicator prediction information is less than the configured indicator data in the aforementioned indicator configuration information, a container capacity adjustment task corresponding to the aforementioned target container and the aforementioned target period can be generated. Because it enables automatic adjustment of container capacity, it can automatically expand container capacity before container load increases and automatically shrink container capacity when container load is low, improving the stability of the container system and reducing the waste of container resources.
[0071] Further reference Figure 2 As an implementation of the methods shown in the above figures, this disclosure provides some embodiments of a container capacity adjustment task generation apparatus, which are similar to... Figure 1 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0072] like Figure 2As shown, a container capacity adjustment task generation device 200 in some embodiments includes: a first generation unit 201, a second generation unit 202, a determination unit 203, and a third generation unit 204. The first generation unit 201 is configured to generate indicator configuration information for a target container in a target period, wherein the indicator configuration information includes indicator configuration data for the target container corresponding to each preset time period in the target period. The second generation unit 202 is configured to generate indicator prediction information for the target container in the target period using an indicator data prediction model, wherein the indicator prediction information includes indicator prediction data for the target container corresponding to each preset time period in the target period. The determination unit 203 is configured to determine whether there is a difference between the indicator prediction information and the indicator configuration information. The third generation unit 204 is configured to, in response to determining that there is a difference between the indicator prediction information and the indicator configuration information, generate a container capacity adjustment task corresponding to the target container and the target period based on the indicator prediction information and the indicator configuration information.
[0073] It is understandable that the units described in the device 200 are related to the reference. Figure 1 The steps in the described method correspond to each other. Therefore, the operations, features, and beneficial effects described above for the method also apply to the device 200 and the units contained therein, and will not be repeated here.
[0074] The following is for reference. Figure 3 It shows a schematic diagram of the structure of an electronic device (e.g., a computing device) 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.
[0075] like Figure 3 As shown, the electronic device 300 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. The RAM 303 also stores various programs and data required for the operation of the electronic device 300. The processing unit 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0076] Typically, the following devices can be connected to I / O interface 305: input devices 306 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 307 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 308 including, for example, magnetic tapes, hard disks, etc.; and communication devices 309. Communication device 309 allows electronic device 300 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 3 An electronic device 300 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 3 Each box shown can represent a device or multiple devices as needed.
[0077] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 309, or installed from storage device 308, or installed from ROM 302. When the computer program is executed by processing device 301, it performs the functions defined in the methods of some embodiments of this disclosure.
[0078] It should be noted that, in some embodiments of this disclosure, the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0079] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0080] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: generate indicator configuration information for a target container in a target period, wherein the indicator configuration information includes indicator configuration data for the target container corresponding to each preset time period in the target period; generate indicator prediction information for the target container in the target period using an indicator data prediction model, wherein the indicator prediction information includes indicator prediction data for the target container corresponding to each preset time period in the target period; determine whether there is a difference between the indicator prediction information and the indicator configuration information; and, in response to determining that there is a difference between the indicator prediction information and the indicator configuration information, generate a container capacity adjustment task corresponding to the target container and the target period based on the indicator prediction information and the indicator configuration information.
[0081] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0082] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0083] The units described in some embodiments of this disclosure can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor may be described as including a first generation unit, a second generation unit, a determining unit, and a third generation unit. The names of these units do not necessarily limit the specific unit; for example, the first generation unit may also be described as "a unit that generates indicator configuration information for a target container in a target period."
[0084] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0085] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. A method for generating container capacity adjustment tasks, comprising: Based on the acquired set of historical indicator configuration data sequences, indicator configuration information of the target container in the target period is generated, wherein the indicator configuration information includes the indicator configuration data of the target container in each preset time period in the target period; The indicator prediction model generates indicator prediction information for the target container in the target period through the indicator data prediction model. The indicator prediction information includes indicator prediction data of the target container in each preset time period in the target period. The indicator data prediction model represents the correspondence between the target container and the indicator prediction information in a preset number of indicator configuration data before the target period. The preset number is set as a multiple of the number of indicator configuration data in a week. Determine whether there is a difference between the indicator prediction information and the indicator configuration information, wherein the indicator prediction data contained in the indicator prediction information corresponds one-to-one with the indicator configuration data contained in the indicator configuration information; In response to the determination that there is a difference between the indicator prediction information and the indicator configuration information, a container capacity adjustment task corresponding to the target container and the target period is generated based on the indicator prediction information and the indicator configuration information. The container capacity adjustment task includes an expansion task, and generating the expansion task includes: expanding the time interval corresponding to the indicator prediction data to obtain an expanded time interval as target time information, the target time information representing the time interval for executing the expansion task; setting a timed expansion task to expand the target container according to the indicator prediction data at the start time corresponding to the target time information; and ending the expansion of the target container at the end time corresponding to the target time information.
2. The method according to claim 1, wherein, The generation of the target container's metric configuration information for the target period includes: Obtain the set of historical indicator configuration data sequences for the target container during the target period; Based on the set of historical indicator configuration data sequences, indicator configuration information is generated.
3. The method according to claim 1, wherein, The step of generating indicator prediction information for the target container in the target period through an indicator data prediction model includes: Obtain the preset numerical values of indicator configuration data of the target container before the target period; The preset number of indicator configuration data are input into the indicator data prediction model to obtain the preset number of indicator prediction data as the indicator prediction data sequence. Select the indicator prediction data that meets the target period condition from the indicator prediction data sequence as the indicator prediction information.
4. The method according to claim 3, wherein, The indicator data prediction model is trained through the following steps: Obtain a sample set, wherein the samples in the sample set include sample indicator configuration data and sample corresponding label information; Perform the following training steps based on the sample set: The sample indicator configuration data of at least one sample in the sample set is input into the initial neural network to obtain the indicator prediction configuration information corresponding to each sample in the at least one sample. Compare the indicator prediction configuration information corresponding to each sample with the label information corresponding to each sample; Based on the comparison results, determine whether the initial neural network has achieved the preset optimization objective; In response to determining that the initial neural network has achieved the optimization objective, the initial neural network is identified as the trained indicator data prediction model.
5. The method according to claim 4, wherein, The steps for training the indicator data prediction model also include: In response to the determination that the initial neural network has not achieved the optimization objective, the network parameters of the initial neural network are adjusted, and a sample set is formed using unused samples. The adjusted initial neural network is then used as the initial neural network, and the training steps are performed again.
6. The method according to claim 5, wherein, The sample set for training the indicator data prediction model is generated through the following steps: Obtain the indicator configuration data sequence of the target container within a preset period; The indicator configuration data sequence is subjected to heterogeneous processing to obtain a heterogeneous indicator configuration data sequence as a heterogeneous configuration data sequence. The heterogeneous configuration data sequence is subjected to feature engineering processing to obtain the feature-engineered heterogeneous configuration data sequence as the feature-engineered data sequence. Generate a target data sequence set based on the feature engineering data sequence and the first preset time interval; For each target data sequence in the target data sequence set, generate label information corresponding to the target data sequence based on the next target data sequence corresponding to the target data sequence; Each target data sequence and its corresponding label information in the target data sequence set are determined as the sample set of the indicator data prediction model.
7. The method according to claim 6, wherein, The indicator prediction information includes indicator prediction data, which includes the time information corresponding to the indicator prediction data; and In response to determining a difference between the indicator prediction information and the indicator configuration information, the step of generating a container capacity adjustment task corresponding to the target container and the target period based on the indicator prediction information and the indicator configuration information includes: For each indicator prediction data included in the indicator prediction information, perform the following steps: Select indicator configuration data that has the same time information as the indicator prediction data from the indicator configuration information, wherein the indicator configuration data in the indicator configuration information includes the time information corresponding to the indicator configuration data; In response to determining that the indicator prediction data is less than the indicator configuration data, a shrinking task of a target container is generated to generate time information of the indicator prediction data within the target period; In response to determining that the indicator prediction data is greater than the indicator configuration data, a target container expansion task is generated to generate time information corresponding to the indicator prediction data within the target period.
8. A container capacity adjustment task generation device, comprising: The first generation unit is configured to generate indicator configuration information of the target container in the target period based on the acquired set of historical indicator configuration data sequences, wherein the indicator configuration information includes the indicator configuration data of the target container in each preset time period in the target period. The second generation unit is configured to generate indicator prediction information for the target container in the target period through an indicator data prediction model. The indicator prediction information includes indicator prediction data for the target container in each preset time period in the target period. The indicator data prediction model represents the correspondence between the target container and the indicator prediction information in a preset number of indicator configuration data before the target period. The preset number is set as a multiple of the number of indicator configuration data within a week. The determining unit is configured to determine whether there is a difference between the indicator prediction information and the indicator configuration information, wherein the indicator prediction data contained in the indicator prediction information corresponds one-to-one with the indicator configuration data contained in the indicator configuration information. The third generation unit is configured to, in response to determining a difference between the indicator prediction information and the indicator configuration information, generate a container capacity adjustment task corresponding to the target container and the target period based on the indicator prediction information and the indicator configuration information. The container capacity adjustment task includes an expansion task, and generating the expansion task includes: expanding the time interval corresponding to the indicator prediction data to obtain an expanded time interval as target time information, the target time information representing the time interval for executing the expansion task; setting a timed expansion task to expand the target container according to the indicator prediction data at the start time corresponding to the target time information; and ending the expansion of the target container at the end time corresponding to the target time information.
9. An electronic device, comprising: One or more processors; Storage device, on which one or more programs are stored, When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.
10. A computer-readable medium having a computer program stored thereon, wherein, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Load balancing method and device
CN105577729A
Server capacity adjustment method and device, computer equipment and storage medium
CN113791909A
Container resource adjustment method and device, electronic equipment and storage medium
CN115167980A
