Micro-service resource management method and device, medium and program product

By combining robust cycle detection and time series analysis algorithms with long sequence deep learning networks, the problems of lag and prediction accuracy in microservice resource management are solved, achieving more stable and efficient resource management that can adapt to complex and ever-changing load scenarios.

CN120973538APending Publication Date: 2025-11-18INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511132097.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-13
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

In existing technologies, microservice resource management suffers from lag and limited predictive accuracy. It cannot respond to load fluctuations in a timely manner and cannot accurately capture complex time patterns, resulting in less precise, timely, and efficient elastic scaling decisions.

Method used

Robust period detection and robust time series analysis algorithms are used to decompose historical time series data. Combined with long sequence deep learning networks, microservice resource requirements are predicted. By obtaining historical time series data of microservice-related resources, trend components, periodic components, and residual components are obtained. The residual prediction results are output using long sequence deep learning networks to determine resource prediction results and manage them.

Benefits of technology

It improves the stability and robustness of microservice resource prediction, avoids service degradation due to insufficient resources, and achieves more timely and efficient resource management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120973538A_ABST
    Figure CN120973538A_ABST
Patent Text Reader

Abstract

The invention discloses a micro-service resource management method and device, a medium and a program product, and the method comprises the steps: obtaining historical time series data of a micro-service associated resource, and carrying out the prediction of the historical time series data through employing a robust period detection algorithm, and obtaining a single-period prediction result; decomposing the historical time sequence data by adopting a robust time sequence analysis algorithm to obtain a trend component sequence, a periodic component sequence and a residual component sequence; inputting the residual component sequence into a long sequence deep learning network, and outputting a residual prediction result through the long sequence deep learning network; and determining a resource prediction result corresponding to the micro-service according to the single-cycle prediction result, the trend component sequence, the periodic component sequence and the residual prediction result, and managing resources associated with the micro-service according to the resource prediction result. According to the technical scheme of the embodiment of the invention, the precision of a micro-service resource prediction result can be improved, and a reliable basis is provided for an elastic scaling decision.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of cloud computing, and particularly relates to a micro-service resource management method, device, medium and program product. BACKGROUND

[0002] With the continuous expansion of financial business systems and the wide application of micro-service architecture, how to efficiently and dynamically manage micro-service resources has become a key challenge faced by cloud computing platforms.

[0003] In the prior art, resource elasticity scaling decisions are usually triggered according to preset resource thresholds, that is, the number of micro-service instances is automatically adjusted according to real-time resource usage and preset thresholds to ensure service quality and optimize costs; or the future resource usage of micro-services is predicted based on traditional time series models, and then resource elasticity scaling decisions are triggered according to the prediction results.

[0004] However, the real-time adjustment of micro-service instances using resource thresholds has a lag and cannot respond to load mutations in a timely manner; the prediction using traditional time series models has limited prediction accuracy for micro-service resource usage indicators with complex nonlinear patterns, multiple seasonality and noise interference, and cannot accurately capture complex time patterns, resulting in inaccurate, timely and efficient elasticity scaling decisions. SUMMARY

[0005] The present application provides a micro-service resource management method, device, medium and program product, which can improve the accuracy of micro-service resource prediction results, while ensuring the quality of micro-services and minimizing operating costs.

[0006] According to an aspect of the present application, a micro-service resource management method is provided, the method comprising:

[0007] obtaining historical time series data of micro-service associated resources, using a robust cycle detection algorithm to predict the historical time series data, and obtaining a single-cycle prediction result corresponding to the historical time series data;

[0008] using a robust time series analysis algorithm to decompose the historical time series data, and obtaining a trend component sequence, a periodic component sequence and a residual component sequence;

[0009] inputting the residual component sequence into a long sequence deep learning network, and outputting a residual prediction result through the long sequence deep learning network;

[0010] determining a resource prediction result corresponding to the micro-service according to the single-cycle prediction result, the trend component sequence, the periodic component sequence and the residual prediction result, and managing the resources associated with the micro-service according to the resource prediction result.

[0011] According to another aspect of the present application, there is provided a microservice resource management apparatus, the apparatus comprising:

[0012] a data acquisition module configured to acquire historical time series data of a microservice-associated resource, and to predict the historical time series data using a robust period detection algorithm to obtain a single-period prediction result corresponding to the historical time series data;

[0013] a data decomposition module configured to decompose the historical time series data using a robust time series analysis algorithm to obtain a trend component sequence, a period component sequence, and a residual component sequence;

[0014] a residual prediction module configured to input the residual component sequence into a long sequence deep learning network, and to output a residual prediction result through the long sequence deep learning network;

[0015] a resource prediction module configured to determine a resource prediction result corresponding to the microservice according to the single-period prediction result, the trend component sequence, the period component sequence, and the residual prediction result, and to manage the resource associated with the microservice according to the resource prediction result.

[0016] According to another aspect of the present application, there is provided an electronic device, the electronic device comprising:

[0017] at least one processor; and

[0018] a memory communicatively connected to the at least one processor; wherein

[0019] the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the microservice resource management method according to any one of the embodiments of the present application.

[0020] According to another aspect of the present application, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the microservice resource management method according to any one of the embodiments of the present application when executed by the processor.

[0021] According to another aspect of the present application, there is provided a computer program product comprising a computer program for implementing the microservice resource management method according to any one of the embodiments of the present application when executed by a processor.

[0022] The technical scheme provided by the embodiment of the application comprises the following steps: obtaining historical time sequence data of a microservice associated resource, predicting the historical time sequence data by using a robust cycle detection algorithm to obtain a single cycle prediction result corresponding to the historical time sequence data, decomposing the historical time sequence data by using a robust time sequence analysis algorithm to obtain a trend component sequence, a cycle component sequence and a residual component sequence, inputting the residual component sequence into a long sequence deep learning network, outputting a residual prediction result by using the long sequence deep learning network, determining a resource prediction result corresponding to the microservice according to the single cycle prediction result, the trend component sequence, the cycle component sequence and the residual prediction result, and managing the resource associated with the microservice according to the resource prediction result. The technical scheme can adjust the microservice resource in advance, avoid service degradation caused by insufficient resources, and improve the stability and robustness of the resource prediction result.

[0023] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the application, nor is it used to limit the scope of the application. Other features of the application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiments description. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can also be obtained by those skilled in the art without creative labor on the basis of these drawings.

[0025] Figure 1 is a flow chart of a microservice resource management method according to an embodiment of the application;

[0026] Figure 2 is a flow chart of another microservice resource management method according to an embodiment of the application;

[0027] Figure 3 is a structural schematic diagram of a microservice resource management device according to an embodiment of the application;

[0028] Figure 4 is a structural schematic diagram of an electronic device for implementing the microservice resource management method according to an embodiment of the application. DETAILED DESCRIPTION

[0029] In the following, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by a person of ordinary skill in the art without creative work should belong to the protection scope of the present application.

[0030] It should be noted that the terms "first", "second" and the like in the description and claims of the present application and the above drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in other than the order illustrated or described herein. In addition, the terms "comprise" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0031] Figure 1 A flowchart of a microservice resource management method provided by an embodiment of the present application, the embodiment can be applicable to the case of predicting the resources used by the microservice architecture in a financial business system and managing the resources according to the prediction result. The method can be executed by a microservice resource management device, which can be realized in the form of hardware and / or software. The device can be configured on a cloud computing platform, such as Figure 1 As shown in the figure, the method comprises:

[0032] In step 110, historical time series data of microservice associated resources is acquired, and a robust cycle detection algorithm is used to predict the historical time series data to obtain a single-cycle prediction result corresponding to the historical time series data.

[0033] In the embodiment, the microservice is an architecture for building an application system in the form of developing small independent services. Each service runs in an independent process and cooperates through a lightweight communication mechanism. Each service can be developed, tested and deployed independently, and supports on-demand scaling.

[0034] The historical time series data Y={Y1,Y2,Y3,…,Y N} can be a plurality of resource demand data with time series characteristics of the microservice in a historical time period, such as central processing unit (CPU) utilization, memory occupancy data, network resource usage data, request volume, etc.

[0035] For financial business systems, the numerical curves corresponding to microservice resource usage may exhibit periodic fluctuations, such as higher request volumes during holidays and weekends, and lower request volumes late at night on weekdays. Robust periodicity detection algorithms can achieve multi-period detection through robust time-frequency mining methods. Specifically, after obtaining historical time-series data of microservice-related resources, this algorithm can be used to detect multiple possible periodic patterns from complex time-series data. Based on the deep feature information of resource usage data, the main period of historical time-series data (i.e., single-period prediction results) can be determined from among the multiple possible periodic patterns.

[0036] Wherein, the single-cycle prediction result P robust It can represent the most significant period in historical time series data. For example, for historical time series data Y, if the time span of a single data point is 1 hour, and P... robust =24, which means the significant period is 24 hours.

[0037] Step 120: Decompose the historical time series data using a robust time series analysis algorithm to obtain trend component series, periodic component series, and residual component series.

[0038] In this embodiment, the robust time series analysis algorithm is a robust decomposition algorithm for time series data. By employing a robust time series analysis algorithm, based on minimum absolute bias loss and sparse regularization processing, the long-term trend of historical time series data can be effectively captured, thereby obtaining the trend component sequence T = {T1, T2, T3, ..., T...}. N Even if sudden trend fluctuations or outliers exist in the data, the accuracy of the decomposition results can still be maintained. Furthermore, robust time series analysis algorithms can be used to perform non-local seasonal filtering on historical time series data, identifying and separating periodic fluctuations (such as daily, weekly, and monthly seasonal patterns) in the time series to obtain the periodic component sequence S = {S1, S2, S3, ..., S}. N After removing the trend component sequence and the periodic component sequence, the residual component sequence R = {R1, R2, R3, ..., R} can be obtained. N Specifically, at time t, Y t =T t +S t +R t .

[0039] Step 130: Input the residual component sequence into a long sequence deep learning network, and output the residual prediction result through the long sequence deep learning network.

[0040] In this embodiment, the long sequence deep learning network is used to combine gating mechanisms to selectively retain and forget information, maintain the transmission of key information across multiple time steps, thereby efficiently processing time-series data and capturing long-term dependencies.

[0041] In this step, specifically, the residual component sequence R = {R1, R2, R3, ..., R...} can be... N The input is a long sequence deep learning network, which models the residual component sequence to capture the complex nonlinear dynamic data and random fluctuations in the residual component sequence, predicts the values ​​of the residual component sequence at future times, and finally outputs the residual prediction result R. t+1 .

[0042] Step 140: Based on the single-cycle prediction results, trend component sequence, periodic component sequence, and residual prediction results, determine the resource prediction results corresponding to the microservice, and manage the resources associated with the microservice based on the resource prediction results.

[0043] In this step, the single-cycle prediction results, trend component sequences, periodic component sequences, and residual prediction results can be combined and calculated to obtain the resource prediction results corresponding to the microservice.

[0044] The technical solution provided by this invention obtains historical time-series data of resources associated with microservices, uses a robust period detection algorithm to predict the historical time-series data, obtains single-period prediction results corresponding to the historical time-series data, and uses a robust time-series analysis algorithm to decompose the historical time-series data to obtain trend component sequences, periodic component sequences, and residual component sequences. The residual component sequences are input into a long-sequence deep learning network, and the long-sequence deep learning network outputs residual prediction results. Based on the single-period prediction results, trend component sequences, periodic component sequences, and residual prediction results, the resource prediction results corresponding to the microservices are determined, and the resources associated with the microservices are managed based on the resource prediction results. Compared with the existing technology of adjusting microservice instances in real time using resource thresholds, this method can adjust microservice resources in advance, avoiding service degradation due to insufficient resources, and adapting to the complex and ever-changing load scenarios in microservice architectures. Compared with the method of using traditional time-series models for prediction, this embodiment uses robust period detection algorithms and robust time-series analysis algorithms to resist the interference of abnormal fluctuations in data, producing more stable and reliable decomposition results and period estimates, thereby improving the stability and robustness of resource prediction results.

[0045] Figure 2 A flowchart of another microservice resource management method provided in an embodiment of the present invention is shown below. Figure 2 As shown, the method includes:

[0046] Step 210: Obtain the original time series data of the microservice-related resources within the historical time period, and preprocess the original time series data to obtain historical time series data.

[0047] In this embodiment, the raw time-series data X = {X1, X2, X3, ..., X} of the microservice-related resources within a historical time period can be collected. N Then, for the original time series data X = {X1, X2, X3, ..., X}, N Preprocessing (e.g., noise reduction, filtering, removing invalid data) yields historical time series data Y = {Y1, Y2, Y3, ..., Y}. N}

[0048] The advantage of this setup is that by preprocessing the collected raw time series data, the time spent by subsequent algorithms on processing invalid data can be saved, thereby improving prediction efficiency while ensuring the accuracy of subsequent prediction results.

[0049] In this embodiment, optionally, the preprocessing includes at least one of the following: removing outliers, filling in missing values, and data normalization. Filling in missing values ​​includes: obtaining the adjacent sequence data corresponding to the missing value, and filling in the missing value using a linear interpolation algorithm based on the adjacent sequence data.

[0050] The advantage of this setup is that it can process raw time series data in different formats into standard format time series data, thereby improving the efficiency of subsequent algorithms in processing time series data and the reliability of resource prediction results.

[0051] Step 220: Use a trend filtering algorithm to process the historical time series data to obtain the periodic component data corresponding to the historical time series data.

[0052] In this embodiment, the trend filtering algorithm is used to separate the long-term trend component and the short-term periodic component in historical time series data, and to highlight the basic trend of the data by eliminating short-term fluctuations.

[0053] Specifically, a trend filtering algorithm can be used to remove short-term noise from historical time series data by minimizing the objective function, generate a smooth trend curve, and eliminate trend changes in historical time series data based on the trend curve to obtain periodic component data.

[0054] Step 230: Use a multi-period decomposition algorithm to decompose the periodic component data, and then perform single-period detection on the decomposition results based on the robust regression loss function and the autocorrelation function to obtain the single-period prediction results corresponding to the historical time series data.

[0055] In this embodiment, a multi-period decomposition algorithm can be used to decompose the input periodic component data into multiple wavelet components of different scales (such as high-frequency detail components and low-frequency approximation components). Each component corresponds to a specific frequency range. Finally, the decomposition results are subjected to single-period detection based on the robust regression loss function and the autocorrelation function to obtain the single-period prediction result.

[0056] The advantage of this setup is that it can effectively handle historical time series data containing nonlinear trends, multiple or irregular periodicity, and random noise. For microservice resource usage indicators with complex nonlinear patterns, multiple seasonalities, and noise interference, it can improve the accuracy of resource prediction results.

[0057] Step 240: Decompose the historical time series data using a robust time series analysis algorithm to obtain trend component series, periodic component series, and residual component series.

[0058] Step 250: Input the residual component sequence into a long sequence deep learning network, and output the residual prediction result through the long sequence deep learning network.

[0059] In one embodiment of this example, the residual component sequence is input into a long sequence deep learning network, and the residual prediction result is output through the long sequence deep learning network. This includes: inputting the residual component sequence into the input gate, forget gate, update gate and output gate of the long sequence deep learning network in sequence; outputting the hidden state corresponding to the residual component sequence through the output gate, and determining the residual prediction result based on the hidden state.

[0060] In one specific embodiment, the long sequence deep learning network processes data through input gates, forget gates, update gates and output gates, and can also store long-term information of sequence data through candidate memory units and update memory units, and dynamically adjust network training parameters. The candidate memory units and update memory units, in cooperation with the gating signals, jointly maintain the continuity and effectiveness of the memory state.

[0061] The forget gate in long sequence deep learning networks can be represented as:

[0062] f t =σ(W f ·[h t-1 ,l t ++b f )

[0063] Among them, W f h represents the weight of the forget gate. t-1 Indicates the output value at the previous time step, l t b represents the input value at the current moment.f This represents the bias parameter.

[0064] The input gate in a long sequence deep learning network can be represented as:

[0065] i t =σ(W i ·[h t-1 ,l t ++b i )

[0066] Among them, W i The weight of the input gate, b i This represents the bias parameter.

[0067] Candidate memory units can be represented as:

[0068] Among them, W c b represents the weight of the candidate memory unit. c This represents the bias parameter.

[0069] The output gate in a long sequence deep learning network can be represented as:

[0070]

[0071] Among them, W o b represents the weight of the output gate. o This represents the bias parameter.

[0072] Updating a memory unit can be represented as:

[0073]

[0074] Updating the hidden state can be represented as:

[0075]

[0076] The advantage of this setting is that it allows for the selective retention of key historical information for the residual component sequences and its transmission to subsequent time steps, effectively capturing long-distance dependencies in the sequences and improving the accuracy of residual prediction results.

[0077] Step 260: Determine the target period prediction result based on the periodic component sequence and the single period prediction result; determine the resource prediction result corresponding to the microservice based on the target period prediction result, the trend component sequence, and the residual prediction result.

[0078] In this step, specifically, the trend component sequence T can be analyzed. t By performing linear extrapolation based on the slope k of the corresponding curve, we obtain T. t+1 Then according to S t -Probust The target cycle prediction result S is calculated. t+1 Finally, the residual prediction result R t+1 T t+1 With S t+1 Add them together to get the resource prediction result Y. t+1 ,Right now:

[0079] Y t+1 =T t+1 +S t+1 +R t+1 .

[0080] The advantage of this setup is that by combining single-cycle prediction results, cycle component sequences, trend component sequences, and residual prediction results to jointly determine resource prediction results, the reliability of microservice resource prediction results can be improved, adapting to the complex and ever-changing load scenarios in microservice architectures.

[0081] Step 270: Based on the resource prediction results and multiple preset resource usage thresholds, determine the resource elastic scaling decision associated with the microservice, and use the elastic scaling decision to manage the resources associated with the microservice.

[0082] In a specific embodiment, taking the CPU utilization rate corresponding to a microservice as an example, if the predicted average CPU utilization rate in the resource prediction results exceeds the expansion threshold, CPU expansion can be triggered in advance; if the predicted average CPU utilization rate is lower than the reduction threshold, CPU reduction can be triggered in advance.

[0083] The advantage of this setup is that resource prediction results can provide a more reliable basis for elastic scaling decisions, thereby enabling more timely, efficient and stable microservice resource management and ensuring high-concurrency service scenarios for financial business systems.

[0084] The technical solution provided by this invention obtains the original time-series data of microservice-related resources within a historical time period, preprocesses the original time-series data to obtain historical time-series data, processes the historical time-series data using a trend filtering algorithm to obtain periodic component data, decomposes the periodic component data using a multi-period decomposition algorithm, and then detects the decomposition results based on a robust regression loss function and an autocorrelation function to obtain single-period prediction results. A robust time-series analysis algorithm is then used to decompose the historical time-series data to obtain trend component sequences, periodic component sequences, and residual component sequences. The residual component sequences are input into a long-sequence deep learning network, which outputs residual prediction results. Based on the periodic component sequences and single-period prediction results, a target period prediction result is determined. Finally, based on the target period prediction result, trend component sequences, and residual prediction results, the resource prediction result corresponding to the microservice is determined. This technical means of managing resources associated with microservices using elastic scaling decisions can adjust microservice resources in advance, avoiding service degradation due to insufficient resources and improving the stability and robustness of resource prediction results.

[0085] Figure 3 This is a schematic diagram of a microservice resource management device provided in an embodiment of the present invention. The device is applied in a cloud computing platform, such as... Figure 3 As shown, the device includes: a data acquisition module 310, a data decomposition module 320, a residual prediction module 330, and a resource prediction module 340.

[0086] The data acquisition module 310 is used to acquire historical time series data of microservice-related resources, and uses a robust period detection algorithm to predict the historical time series data to obtain the single-period prediction results corresponding to the historical time series data.

[0087] The data decomposition module 320 is used to decompose the historical time series data using a robust time series analysis algorithm to obtain trend component series, periodic component series and residual component series.

[0088] The residual prediction module 330 is used to input the residual component sequence into a long sequence deep learning network and output the residual prediction result through the long sequence deep learning network.

[0089] The resource prediction module 340 is used to determine the resource prediction result corresponding to the microservice based on the single-period prediction result, the trend component sequence, the periodic component sequence and the residual prediction result, and to manage the resources associated with the microservice based on the resource prediction result.

[0090] The technical solution provided by this invention obtains historical time-series data of resources associated with microservices, uses a robust period detection algorithm to predict the historical time-series data, obtains single-period prediction results corresponding to the historical time-series data, uses a robust time-series analysis algorithm to decompose the historical time-series data, obtains trend component sequences, periodic component sequences, and residual component sequences, inputs the residual component sequences into a long-sequence deep learning network, outputs residual prediction results through the long-sequence deep learning network, and determines the resource prediction results corresponding to the microservices based on the single-period prediction results, trend component sequences, periodic component sequences, and residual prediction results, and manages the resources associated with the microservices based on the resource prediction results. This technical means can adjust microservice resources in advance, avoid service degradation due to insufficient resources, and improve the stability and robustness of resource prediction results.

[0091] Based on the above embodiments, the data acquisition module 310 includes:

[0092] A data preprocessing unit is used to acquire the original time series data of microservice-related resources within a historical time period, and preprocess the original time series data to obtain the historical time series data; the preprocessing includes at least one of the following: removing outliers, filling in missing values, and data normalization.

[0093] A data filling unit is used to obtain adjacent sequence data corresponding to the missing value and fill the missing value using a linear interpolation algorithm based on the adjacent sequence data;

[0094] The trend filtering unit is used to process the historical time series data using a trend filtering algorithm to obtain the periodic component data corresponding to the historical time series data;

[0095] The single-period prediction unit is used to decompose the periodic component data using a multi-period decomposition algorithm, and then perform single-period detection on the decomposition results based on the robust regression loss function and the autocorrelation function to obtain the single-period prediction results corresponding to the historical time series data.

[0096] The residual prediction module 330 includes:

[0097] The residual component processing unit is used to sequentially input the residual component sequence into the input gate, forget gate, update gate and output gate of the long sequence deep learning network;

[0098] The residual prediction output unit is used to output the hidden state corresponding to the residual component sequence through the output gate, and to determine the residual prediction result based on the hidden state.

[0099] Resource prediction module 340 includes:

[0100] The merging calculation unit is used to determine the target period prediction result based on the periodic component sequence and the single period prediction result; and to determine the resource prediction result corresponding to the microservice based on the target period prediction result, the trend component sequence, and the residual prediction result.

[0101] The elastic scaling decision unit is used to determine the elastic scaling decision of the resources associated with the microservice based on the resource prediction results and multiple preset resource usage thresholds, and to manage the resources associated with the microservice using the elastic scaling decision.

[0102] The above-described apparatus can execute the methods provided in all the foregoing embodiments of the present invention, and has the corresponding functional modules and beneficial effects for executing the above methods. Technical details not described in detail in the embodiments of the present invention can be found in the methods provided in all the foregoing embodiments of the present invention.

[0103] Figure 4 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0104] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded into the RAM 13 from the storage unit 18. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0105] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0106] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processing (DSP) processors, and any suitable processor, controller, microcontroller, etc. Processor 11 executes the various methods and processes described above, such as microservice resource management methods.

[0107] In some embodiments, the microservice resource management method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the microservice resource management method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the microservice resource management method by any other suitable means (e.g., by means of firmware).

[0108] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chips (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0109] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0110] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, RAM, ROM, erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0111] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a cathode ray tube (CRT) or a liquid crystal display (LCD)) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0112] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via 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), blockchain networks, and the Internet.

[0113] A computing system can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system. It addresses the shortcomings of traditional physical hosts and Virtual Private Servers (VPS) in terms of management difficulty and weak business scalability.

[0114] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0115] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A microservice resource management method, characterized in that, The method includes: Obtain historical time-series data of microservice-related resources, use a robust period detection algorithm to predict the historical time-series data, and obtain the single-period prediction results corresponding to the historical time-series data; The historical time series data is decomposed using a robust time series analysis algorithm to obtain trend component series, periodic component series, and residual component series. The residual component sequence is input into a long sequence deep learning network, and the long sequence deep learning network outputs the residual prediction result. Based on the single-cycle prediction results, trend component sequences, periodic component sequences, and residual prediction results, the resource prediction results corresponding to the microservices are determined, and the resources associated with the microservices are managed according to the resource prediction results.

2. The method according to claim 1, characterized in that, Obtain historical time-series data of resources associated with microservices, including: Obtain the raw time-series data of microservice-related resources within a historical time period; The original time series data is preprocessed to obtain the historical time series data.

3. The method according to claim 2, characterized in that, The preprocessing includes at least one of the following: removing outliers, filling in missing values, and data normalization. The filling of missing values ​​includes: Obtain the adjacent sequence data corresponding to the missing value, and use a linear interpolation algorithm to fill the missing value based on the adjacent sequence data.

4. The method according to claim 1, characterized in that, A robust period detection algorithm is used to predict historical time series data, yielding single-period prediction results for the historical time series data, including: A trend filtering algorithm is used to process the historical time series data to obtain the periodic component data corresponding to the historical time series data; A multi-period decomposition algorithm is used to decompose the periodic component data. Then, based on the robust regression loss function and the autocorrelation function, single-period detection is performed on the decomposition results to obtain the single-period prediction results corresponding to the historical time series data.

5. The method according to claim 1, characterized in that, The residual component sequence is input into a long-sequence deep learning network, and the long-sequence deep learning network outputs residual prediction results, including: The residual component sequence is sequentially input into the input gate, forget gate, update gate and output gate of the long sequence deep learning network; The hidden state corresponding to the residual component sequence is output through the output gate, and the residual prediction result is determined based on the hidden state.

6. The method according to claim 1, characterized in that, Based on the single-cycle prediction results, trend component sequences, periodic component sequences, and residual prediction results, the resource prediction results corresponding to the microservices are determined, including: Based on the periodic component sequence and the single-period prediction result, the target period prediction result is determined; Based on the target period prediction results, trend component sequences, and residual prediction results, the resource prediction results corresponding to the microservices are determined.

7. The method according to claim 1, characterized in that, Based on the resource prediction results, manage the resources associated with the microservices, including: Based on the resource prediction results and multiple preset resource usage thresholds, a resource elastic scaling decision is determined for the microservices, and the elastic scaling decision is used to manage the resources associated with the microservices.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the microservice resource management method according to any one of claims 1-7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the microservice resource management method according to any one of claims 1-7.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the microservice resource management method according to any one of claims 1-7.