Microservice isolation operation method, medium and system for productivity middle platform
By collecting and decomposing microservice operation index data, building resource matrix and calling map, and dynamic adjustment using resource allocation equation sets, the problem of inaccurate allocation of microservice resources in the existing technology is solved, and efficient and stable resource management and service performance are achieved.
Patent Information
- Application Number
- CN202510168185.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2045-02-17
AI Technical Summary
In the prior art, the microservice resource allocation and isolation mechanism cannot be accurately and dynamically adjusted, resulting in problems such as low resource utilization efficiency and fluctuations in service performance.
By collecting microservice operation indicator data, performing decomposition operations to obtain basic load and dynamic load, building a benchmark resource matrix and dynamic resource matrix, calculating competition indicators, building a microservice call map and association matrix, using resource allocation equations to solve resource allocation schemes, determining resource usage threshold values and dividing resource units, monitoring load indicators and performing microservice isolation operations.
It realizes refined and intelligent adjustment of microservice resource allocation, accurately captures the operation characteristics of microservices and the correlation between services, and significantly improves resource utilization efficiency, service performance stability and overall operation quality.
Smart Images

Figure CN120123047A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electronic digital data processing. Specifically, it relates to a method, medium and system for isolated operation of microservices in a productivity middleware platform. Background Art
[0002] As a key technology for modern distributed systems, the microservice architecture has been widely applied in fields such as cloud computing, Internet services, and fintech. Traditional microservice resource management mainly relies on static resource allocation models, and resource scheduling is carried out through manual configuration or simple load balancing algorithms. This method has significant limitations in terms of resource utilization and service performance, and cannot effectively cope with dynamically changing business loads and complex service dependency relationships.
[0003] Traditional microservice resource allocation techniques mainly include methods such as static resource reservation, balanced allocation based on average load, and simple resource threshold monitoring. These methods are difficult to accurately capture the real-time operation characteristics of microservices, and resource allocation often has lag and inaccuracy. Especially in high-concurrency and variable business scenarios, the static resource allocation model will lead to problems such as low resource utilization efficiency and service performance fluctuations.
[0004] The core technical challenge faced by the existing technology is the lack of a comprehensive technical solution that can dynamically, accurately, and intelligently allocate and isolate microservice resources. Traditional methods cannot effectively balance service performance, resource utilization, and system stability, and are difficult to meet the dynamic resource scheduling requirements in complex microservice environments. That is to say, there is a technical problem in the existing technology that the microservice resource allocation and isolation mechanism cannot be accurately and dynamically adjusted. Summary of the Invention
[0005] In view of this, the present invention provides a method, medium and system for isolated operation of microservices in a productivity middleware platform, which can solve the technical problem that the microservice resource allocation and isolation mechanism in the existing technology cannot be accurately and dynamically adjusted.
[0006] The present invention is implemented as follows: In the first aspect of the present invention, a method for isolated operation of microservices in a productivity middleware platform is provided. It collects microservice operation index data, performs decomposition operations on the microservice operation index data to obtain basic load values and dynamic load values, constructs a benchmark resource matrix and a dynamic resource matrix, calculates a competition index based on the benchmark resource matrix and the dynamic resource matrix, constructs a microservice call graph, establishes a microservice association matrix, transforms the microservice grouping into a multi-dimensional constrained knapsack problem, and uses a resource allocation equation set including a utility calculation equation, a correlation degree calculation equation, a load balancing equation, and a migration cost equation to solve the resource allocation scheme. Based on the resource balance constraint index, it determines the resource usage threshold value and divides resource units, monitors the resource unit load index, and performs microservice isolation operations.
[0007] Among them, the microservice operation metric data includes processor occupancy rate, memory occupancy rate, network throughput, disk read / write rate, service response latency, service call frequency, data exchange volume, and environmental parameter data. A microservice priority metric is generated based on the microservice operation metric data.
[0008] Among them, the competition metrics include instantaneous competition metrics and persistent competition metrics. The instantaneous competition metrics are calculated based on the dynamic resource matrix, and the persistent competition metrics are calculated based on the benchmark resource matrix. A resource request vector is generated by combining the instantaneous competition metrics and the persistent competition metrics.
[0009] Among them, path optimization operations are used to analyze the correlation strength metrics between microservices, and the microservice correlation matrix is established.
[0010] Among them, the resource allocation equation system includes a utility calculation equation, a correlation degree calculation equation, a load balancing equation, and a migration cost equation.
[0011] Among them, the input of the utility calculation equation includes the resource request vector, the resource unit capacity data, and the microservice priority metric, and the output is the microservice utility allocation matrix; the input of the correlation degree calculation equation includes the service call frequency, the data exchange volume, the correlation strength metric, and the service response latency, and the output is the microservice correlation matrix.
[0012] Among them, the input of the load balancing equation includes the resource unit load metric, the load change record, the microservice priority metric, and the resource usage threshold, and the output is the resource balance constraint metric; the input of the migration cost equation includes the state migration data volume, the network channel occupancy rate, the migration operation time, and the service impact degree, and the output is the migration cost metric.
[0013] Among them, when the resource unit load metric exceeds the resource usage threshold, a migration execution path is determined based on the state migration data volume, the network channel occupancy rate, the migration operation time, and the service impact degree, and the microservice isolation operation is completed.
[0014] The second aspect of the present invention provides a computer-readable storage medium. Program instructions are stored in the computer-readable storage medium. When the program instructions run on a computer, they are used to execute the above-mentioned microservice isolation operation method for a productivity middle platform.
[0015] The third aspect of the present invention provides a microservice isolation operation system for a productivity middle platform, which includes the above-mentioned computer-readable storage medium. The system can be any one of a computer, a server, and a single-chip microcomputer. The computer-readable storage medium is set inside the system, and a microprocessor for executing program instructions stored in the computer-readable storage medium is set inside the system.
[0016] Compared with the prior art, the present invention provides a microservice resource isolation operation method, medium, and system. The present invention proposes a microservice resource isolation operation method based on multi-dimensional dynamic analysis. By constructing an intelligent and accurate resource allocation model, it revolutionizes the microservice resource management technology. This method breaks through the limitations of the traditional static resource allocation mode and introduces an intelligent resource scheduling mechanism based on load characteristics, service correlation, and dynamic competition.
[0017] The core innovation of the method lies in establishing a multi-level and self-adaptive resource analysis and allocation system. Through multi-dimensional data collection, complex mathematical modeling, and dynamic optimization algorithms, it realizes the refined and intelligent adjustment of microservice resource allocation. The method can not only accurately capture the operation characteristics of microservices but also dynamically evaluate the correlation between services and the resource competition situation.
[0018] Compared with the traditional technology, the technical solution of the present invention fundamentally solves the problems of dynamics, accuracy, and adaptability of microservice resource allocation. By introducing advanced mathematical models and intelligent algorithms, it significantly improves the resource utilization efficiency, service performance stability, and overall operation quality of the distributed system. Brief Description of the Drawings
[0019] Figure 1 It is a flowchart of the method of the present invention.
[0020] Figure 2 It is a radar chart of multi-dimensional performance indicators of the financial management microservice in Embodiment 2.
[0021] Figure 3 It is a load decomposition and priority analysis chart in Embodiment 2.
[0022] Figure 4 It is a competition index and correlation analysis chart in Embodiment 2.
[0023] Figure 5 It is a utility function surface chart in Embodiment 2.
[0024] Figure 6 It is a migration decision threshold analysis chart in Embodiment 2. Detailed Embodiment
[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0026] As Figure 1 shown, it is a flowchart of a method for isolating and running microservices in a productivity middle platform provided by the first aspect of the present invention. This method includes the following steps:
[0027] S10. Collect microservice operation index data, including processor occupancy rate, memory occupancy rate, network throughput, disk read / write rate, service response latency, service call frequency, data exchange volume, and environmental parameter data, and generate microservice priority indicators;
[0028] S20. Perform decomposition operations on the microservice operation index data to obtain basic load values and dynamic load values, and record the dynamic load values to form a load change record;
[0029] S30. Establish a benchmark resource matrix based on the basic load values, establish a dynamic resource matrix based on the dynamic load values, and generate resource unit capacity data according to the benchmark resource matrix;
[0030] S40. Calculate an instantaneous competition index based on the dynamic resource matrix, calculate a persistent competition index based on the benchmark resource matrix, and generate a resource request vector by combining the instantaneous competition index and the persistent competition index;
[0031] S50. Construct a microservice call graph, analyze the association strength index between microservices using path optimization operations, and establish a microservice association matrix;
[0032] S60. Based on the microservice association matrix, the instantaneous competition index, and the persistent competition index, construct a resource allocation equation set to solve the resource allocation scheme and obtain a resource balance constraint index;
[0033] S70. Use an optimized binary algorithm to determine a resource usage threshold based on the resource balance constraint index, and divide resource units according to the resource usage threshold;
[0034] S80. Monitor the resource unit load index. When the resource unit load index exceeds the resource usage threshold, calculate the state migration data volume, network channel occupancy rate, migration operation time, and service impact degree, determine the migration execution path, and complete the microservice isolation operation.
[0035] The resource allocation equation set includes a utility calculation equation, an association degree calculation equation, a load balance equation, and a migration cost equation;
[0036] The utility calculation equation is used to calculate the utility metrics of microservices in resource units. The inputs include the resource request vector, the resource unit capacity data, and the microservice priority metrics, and the output is the microservice utility allocation matrix;
[0037] The correlation degree calculation equation is used to evaluate the correlation degree between microservices. The inputs include the service call frequency, the data exchange volume, the correlation strength metrics, and the service response latency, and the output is the microservice correlation matrix;
[0038] The load balancing equation is used to ensure the balance of resource allocation. The inputs include the resource unit load metrics, the load change record, the microservice priority metrics, and the resource usage threshold, and the output is the resource balance constraint metrics;
[0039] The migration cost equation is used to calculate the overhead of migration operations. The inputs include the state migration data volume, the network channel occupancy rate, the migration operation time, and the service impact degree, and the output is the migration cost metrics.
[0040] The following describes the specific implementation manners of the above steps in detail. The specific implementation manner of step S10 is to collect microservice operation metric data through an advanced distributed monitoring system. First, a comprehensive metric collection framework is constructed, and lightweight monitoring agents are deployed in the microservice operation environment to capture underlying resource metrics such as processor occupancy rate, memory occupancy rate, network throughput, and disk read / write rate in real time. The monitoring agents adopt non-intrusive data collection technologies and obtain accurate resource usage conditions through operating system interfaces and container monitoring interfaces. For service response latency and service call frequency, tracking components are implanted in the service call link to record key information such as the time, input parameters, and output parameters of each service call. The data exchange volume is accurately counted by the network traffic monitoring module for the actual data transmission size between services. The environmental parameter data is collected by a sensor array deployed in the server computer room, including physical metrics such as temperature, humidity, and air pressure.
[0041] Based on the collection of metric data, it is necessary to perform standardization and normalization processing on the collected raw data to eliminate the influence of different metric dimensions. The principal component analysis dimensionality reduction method is adopted to compress multi-dimensional metric data into a lower dimension while retaining the main information features of the data. A calculation model for microservice priority metrics is constructed, and machine learning algorithms are introduced, especially ensemble learning methods such as gradient boosting decision trees. The model is trained according to historical operation data to adaptively determine the weights of each metric. The reference value range of the priority metrics is between 0 and 1, and the closer to 1, the more important the microservice. For the influence of environmental parameters, a non-linear mapping function is designed to convert environmental factors into correction coefficients for resource performance. This method can comprehensively and accurately depict the operation characteristics and importance of microservices.
[0042] The specific implementation of step S20 is to perform complex decomposition operations on the microservice operation metric data. Using time series decomposition theory, the total load is divided into a trend term, a seasonal term, and a random disturbance term. The extraction of the base load is achieved through the exponential moving average algorithm, which performs a weighted average on historical data, giving higher weights to recent data. The calculation of the dynamic load introduces wavelet transform technology, which can effectively separate short-term fluctuation components. The error term introduces a Gaussian white noise model, with its standard deviation controlled within the range of 0.01 to 0.05, ensuring the randomness and smoothness of the decomposition process.
[0043] During the decomposition process, first, the original load data is preprocessed to remove outliers and spikes. The median removal method and box plot method are used to identify and eliminate extreme data points. For time series data, a difference transformation is used to eliminate the non-stationarity of the data. The Holt exponential smoothing method is used to extract the base load, which can well capture the long-term trend. The extraction of the dynamic load uses the multi-scale decomposition technology of wavelet transform. By selecting appropriate wavelet basis functions, the short-term fluctuation components can be accurately separated. The introduction of the error term can not only improve the numerical accuracy of the decomposition but also simulate the tiny disturbances that cannot be measured in the actual system. This multi-level and multi-scale decomposition method can maximize the revelation of the internal structural characteristics of the microservice load.
[0044] The specific implementation of step S30 is to construct a resource matrix with multi-dimensional semantics. The construction of the benchmark resource matrix uses tensor decomposition theory to map multi-dimensional heterogeneous data into a low-dimensional semantic space. First, the collected original metric data is preprocessed for standardization to eliminate the dimensional differences between different metrics. The principal component analysis method is used for dimensionality reduction, retaining the main components with an explained variance contribution rate exceeding 95%. The rows of the matrix represent microservice instances, the columns represent different resource dimensions, and the value of each cell reflects the base load characteristics of the corresponding microservice on a specific resource.
[0045] The construction of the dynamic resource matrix introduces a dynamic tensor decomposition method, which can capture the time evolution characteristics of resource loads. The CANDECOMP / PARAFAC (CP) decomposition algorithm in tensor decomposition is used to decompose multi-dimensional data into a low-rank core tensor and factor matrices. Each element in the matrix not only reflects the current resource load but also contains trend information on load changes. To enhance the semantic expression ability of the matrix, context-aware feature engineering technology is introduced, and implicit dependencies between microservices are mined through association analysis. For sparse or missing data, a matrix completion algorithm is used for intelligent filling to ensure the integrity and consistency of the matrix. This multi-dimensional semantic resource matrix provides rich semantic information for subsequent resource allocation decisions.
[0046] The specific implementation method of step S40 is to calculate the competition index through complex statistical and information theory methods. The calculation of instantaneous competition index introduces the coefficient of variation and entropy weight theory, which not only considers the absolute load size of the resource, but also pays attention to the uniformity of the load distribution. The weight allocation method based on Shannon entropy is adopted to adaptively determine the importance of each resource dimension. The calculation of persistent competition index combines long-term sequence analysis and probability density estimation technology, and characterizes the distribution characteristics of the basic load through the kernel density estimation method.
[0047] In the calculation of competition indicators, the original data is first tested for stationarity using the extended augmented unit root test (ADF) method. For each resource dimension, the coefficient of variation is calculated to measure the discreteness of the load. The Shannon entropy weight method is introduced to automatically calculate the weight of each resource dimension based on the discreteness of the data. The larger the weight, the higher the uncertainty of the dimension. The calculation of the persistent competition indicator uses Gaussian kernel density estimation, which can smoothly reconstruct the probability density function of the basic load. The selection of the adjustment coefficient ensures the robustness of the competition indicator calculation through cross-validation and grid search methods. This multi-dimensional and multi-level competition indicator calculation method can comprehensively and accurately characterize the resource contention characteristics of microservices.
[0048] The specific implementation method of step S50 is to construct a microservice call graph. Using complex network analysis theory, the call relationship between microservices is abstracted into a directed weighted graph. First, the detailed metadata of inter-service calls, including call frequency, data exchange volume and response delay, is collected through a distributed tracking system (such as OpenTelemetry). The community detection algorithm in graph theory is used to identify closely related clusters between microservices. Complex network centrality indicators such as PageRank and betweenness centrality are introduced to quantify the importance of microservices in the entire system architecture. The association strength calculation adopts the mutual information theory in information theory, which comprehensively considers the call frequency and data exchange characteristics between services. When constructing the association matrix, compression storage technology is used for sparse matrices to improve the computational efficiency of large-scale service networks. The high-dimensional service association relationship is mapped to a low-dimensional semantic space through graph embedding technology to provide topological semantic information for subsequent resource allocation decisions.
[0049] The specific implementation of step S60 is to construct a resource allocation equation system. By using multi-objective optimization theory, the resource allocation problem is transformed into a Pareto optimal problem under constraints. The utility calculation equation introduces the concept of utility function in game theory, considering the priority, resource request, and time decay factors of microservices. The correlation calculation equation uses the mutual information and entropy theory in information theory to quantify the dependency relationship between microservices. The load balancing equation adopts the stochastic process theory and introduces the Markov chain model to describe the stationarity and transition probability of load changes. The migration cost equation integrates decision theory and risk assessment methods to construct a multi-dimensional weighted cost model. When solving the equation system, an improved particle swarm optimization algorithm and a simulated annealing algorithm are used to find the global optimal solution in a complex constraint space. By introducing the Lagrangian duality theory, the complex multi-objective optimization problem is transformed into an equivalent dual problem, improving the numerical stability and computational efficiency of the solution.
[0050] The specific implementation of step S70 is to use the optimized binary search algorithm to determine the resource usage threshold. By adopting the binary search strategy in optimization theory and combining information entropy and coefficient of variation theory, the threshold is dynamically adjusted. The initial threshold is set to 80% of the resource capacity as a reference point. An adaptive adjustment mechanism is introduced to dynamically correct the threshold according to the real-time change of the load balancing degree. The coefficient of variation is used to evaluate the dispersion degree of resource load, and the entropy weight method is used to calculate the uncertainty of resource allocation. During the binary search process, the load balancing index and resource utilization rate are calculated in each iteration, gradually converging to the optimal threshold. The convergence threshold is set to 0.05, that is, the search stops when the change of the threshold between two adjacent iterations is less than 5%. For complex multi-dimensional resource scenarios, a multi-dimensional binary search strategy is adopted to optimize the thresholds of different resource dimensions in parallel. A random perturbation term and a bootstrap sampling technique are introduced to enhance the robustness and global search ability of the algorithm.
[0051] The specific implementation of step S80 is to perform microservice isolation operations. A real-time monitoring and migration system based on event-driven is constructed, and complex event processing (CEP) technology is used to continuously monitor the load of resource units. When the load exceeds the preset threshold, a multi-stage migration decision-making process is triggered. First, the Monte Carlo simulation method is used to evaluate the migration cost, considering the amount of state migration data, network channel occupancy rate, migration time, and service impact degree. The Markov decision process (MDP) model is introduced to model the migration problem as a sequential decision optimization problem. The Q-learning algorithm in reinforcement learning is used to learn the optimal migration strategy. The migration execution path is selected based on the microservice correlation matrix and the minimum cost path algorithm in graph theory. A smooth migration mechanism based on container orchestration technology is designed to ensure zero-downtime migration of services. By introducing dynamic thresholds and fault tolerance mechanisms, the migration cost and service performance are effectively balanced, realizing fine-grained resource isolation and dynamic scheduling of microservices.
[0052] In a second aspect of the present invention, there is provided a computer-readable storage medium storing program instructions which, when running on a computer, are used to execute the above-mentioned method for isolated operation of microservices in a productivity middleware platform.
[0053] In a third aspect of the present invention, there is provided a system for isolated operation of microservices in a productivity middleware platform, including the above-mentioned computer-readable storage medium. The system can be any one of a computer, a server, and a single-chip microcomputer. The computer-readable storage medium is provided inside the system, and a microprocessor for executing the program instructions stored in the computer-readable storage medium is provided inside the system.
[0054] Specifically, the principle of the present invention is as follows: The technical solution of the present invention is based on the complex system dynamic equilibrium theory, and a multi-dimensional and multi-level resource analysis and scheduling model is constructed. The core principles include cutting-edge technologies such as multi-scale load feature decomposition, dynamic resource matrix construction, resource competition index quantification, and in-depth analysis of service correlation.
[0055] The solution accurately depicts the resource consumption characteristics of microservices by introducing mathematical tools such as information entropy and coefficient of variation. Advanced algorithms such as tensor decomposition and wavelet transform are used to achieve multi-dimensional and high-precision modeling of the resource behavior of complex distributed systems. By constructing a dynamic and adaptive resource allocation equation set, precise and real-time regulation of microservice resources is realized.
[0056] The core logic of the technical solution is to transform the microservice resource allocation problem into a quantifiable and dynamically optimizable system engineering problem. By establishing a resource management model based on big data and artificial intelligence, the technical bottleneck of traditional static resource allocation is broken through, and intelligent, precise, and dynamic adaptation of resource allocation is realized.
[0057] A specific Embodiment 1 of the present invention is provided below, and the specific implementation manners of each step in this Embodiment 1 are described in detail as follows.
[0058] The specific implementation manner of step S10 is to comprehensively obtain microservice operation index data through a multi-dimensional and high-precision index acquisition system. The data acquisition process follows the principles of hierarchical acquisition and intelligent filtering. For the processor occupancy rate and memory occupancy rate, an accurate sampling method based on hardware performance counters is adopted, and specifically, the processor clock cycle and memory allocation situation are captured in real time through the underlying interface of the operating system. The monitoring of network throughput and disk read / write rate adopts the tracking technology of the underlying network protocol stack and storage subsystem, which can accurately obtain the instantaneous rate of data transmission and storage. The statistics of service response latency and service call frequency rely on the distributed tracing system. By implanting lightweight tracing components in the service call link, key information such as the timestamp, input parameters, and output parameters of each service call is recorded.
[0059] The precise measurement of data exchange volume requires the design of a dedicated statistical model. The data exchange volume statistical model is defined as follows:
[0060]
[0061] Among them, V ij represents the data exchange volume between service i and service j, S ik represents the data size sent by service i, R jk represents the data size received by service j, and n is the number of exchanges within the statistical period.
[0062] The environmental parameter data is collected by a multi-sensor array deployed in the server computer room, including physical indicators such as temperature, humidity, and air pressure. The deployment of the sensor array follows the principle of uniform spatial distribution to ensure the representativeness and accuracy of the data. For the collected original indicator data, standardization and normalization processing are required to eliminate the influence of different indicator dimensions.
[0063] The calculation of the microservice priority indicator adopts a multi-level analysis method. The priority calculation model is constructed as follows:
[0064] P i = ω 1 ·ρ i + v 2 ·γ i + ω 3 ·η i ;
[0065] Among them, P i is the priority indicator of microservice i, ρ i is the service importance coefficient, γ i is the service load contribution coefficient, η i is the service environment adaptability coefficient, ω 1 , ω 2 , ω 3 are the corresponding weight coefficients, and satisfy ω 1 + ω 2 + ω 3 = 1. The weight coefficients are determined by the Analytic Hierarchy Process (AHP), and the reference value range is 0.3 to 0.4.
[0066] The specific implementation of step S20 is to perform complex decomposition operations on the microservice operation index data using the time series decomposition theory. Based on the given decomposition formula:
[0067] L total = L base + L dynamic + ∈;
[0068] Among them, the value range of the error term ∈ is from 0.01 to 0.05. The decomposition process uses the multi-scale wavelet transform theory to decompose the total load signal into sub-signals of different scales and frequencies. The basic load L base The extraction adopts the improved Holt exponential smoothing method, which can effectively remove short-term fluctuations and capture long-term trends. Define the basic load extraction model as follows:
[0069] L base(t) = α·L total(t) +(1 - α)·L base(t-1) ;
[0070] Among them, α is the smoothing coefficient, and its value range is from 0.1 to 0.3. t represents the discrete time point. The dynamic load L dynamic is extracted by using the multi-scale decomposition technology of wavelet transform. Select a suitable wavelet basis function (such as Haar wavelet), and obtain the short-term fluctuation components through multi-level decomposition.
[0071] Define the dynamic load extraction model:
[0072] L dynamic(t) = L total(t) - L base(t) ;
[0073] To improve the robustness of the decomposition, an outlier detection mechanism based on kernel density estimation is introduced. Preprocess the original load data, and use the Gaussian kernel density estimation method to identify and remove extreme data points.
[0074] The specific implementation of step S30 is to construct a resource matrix with multi-dimensional semantics. The benchmark resource matrix M base is constructed using tensor decomposition theory to map multi-dimensional heterogeneous data to a low-dimensional semantic space. Based on the given matrix expression:
[0075]
[0076] Among them, r ij represents the basic load value of the i-th microservice on the j-th resource. m is the number of microservices, and n is the number of resource types. The principal component analysis (PCA) method is used for dimensionality reduction, and the main components with an explained variance contribution rate exceeding 95% are retained. Define the PCA dimensionality reduction model:
[0077]
[0078] Subject to:
[0079] Among them, λ j is the eigenvalue, and k is the number of principal components retained.
[0080] The dynamic resource matrix Mdynamic The construction introduces the dynamic tensor decomposition method. Based on the given matrix expression:
[0081]
[0082] The CANDECOMP / PARAFAC (CP) decomposition algorithm is adopted to decompose the multi-dimensional data into a low-rank core tensor and factor matrices. Define the CP decomposition model:
[0083]
[0084] where, X is the input tensor, λ r is the weight coefficient, a r , b r , c r are factor matrices, R is the rank of decomposition, represents the Kronecker product.
[0085] The specific implementation of step S40 is to calculate the competition index through complex statistical and information theory methods. Based on the given competition index calculation formula:
[0086]
[0087]
[0088] The instantaneous competition index C instant calculation introduces the coefficient of variation and Shannon entropy theory. Define the coefficient of variation calculation model:
[0089]
[0090] Shannon entropy weight calculation model:
[0091]
[0092] where, is the normalized probability.
[0093] The persistent competition index C persist calculation adopts the kernel density estimation method. Define the Gaussian kernel density estimation model:
[0094]
[0095] where, K is the Gaussian kernel function, h is the bandwidth parameter, usually taking 1.06 times of the empirical standard deviation. The value ranges of the adjustment coefficients α, β, γ, δ are from 0 to 1, and the optimal values can be determined by cross-validation and grid search methods.
[0096] The specific implementation of step S50 is to construct a microservice call graph, and abstract the call relationship between services into a directed weighted graph using complex network analysis theory. The process of constructing the call graph is divided into multiple key sub-steps. First, data collection is carried out, and detailed metadata of calls between microservices is collected through a distributed tracing system (such as OpenTelemetry). The service correlation calculation model is defined as follows:
[0097]
[0098] Among them, A ij represents the correlation degree between microservices i and j, f ij represents the service call frequency, v ij is the data exchange volume, t ij represents the service response delay, s ij is the correlation strength index, and ξ is the noise coefficient. The calculation of the correlation strength s ij introduces the complex network centrality theory:
[0099]
[0100] When constructing the correlation matrix, a compressed storage technology is adopted for efficient storage of sparse matrices. Graph embedding technology is introduced to map high-dimensional service correlation relationships to a low-dimensional semantic space. Specifically, a random walk algorithm (such as DeepWalk) is used to learn the distributed representation of service nodes and capture the topological structure and semantic relationships between services.
[0101] The specific implementation of step S60 is to construct a resource allocation equation system, and transform the resource allocation problem into a Pareto optimal problem using multi-objective optimization theory. The utility calculation equation combines the theories of game theory and information theory:
[0102]
[0103] Among them, U ij is the utility index of microservice i in resource unit j, P i is the microservice priority, R ij is the resource request vector, C j is the resource unit capacity, λ is the time decay coefficient, κ is the resource change rate weight, and μ is the random perturbation term.
[0104] The equation is solved using an improved particle swarm optimization algorithm, combined with simulated annealing technology to search for the global optimal solution. The Lagrange duality theory is introduced to transform the complex multi-objective optimization problem into an equivalent dual problem. The specific solution process includes: randomly generating the initial population, fitness evaluation, updating the particle velocity and position, and searching for local and global optimal solutions, etc.
[0105] The specific implementation of step S70 is to use an optimized binary algorithm to determine the resource usage threshold. The algorithm design is based on the theory of optimization and the theory of information entropy. The initial threshold is set to 80% of the resource capacity, and an adaptive adjustment mechanism is introduced:
[0106] T j =T 0 ·(1±δ) k ;
[0107] where T j is the adjusted threshold, T 0 is the initial threshold, δ is the adjustment step size, and k is the number of iterations. The coefficient of variation and the entropy weight theory are introduced to evaluate the balance of resource load distribution. Specifically, the standard deviation and information entropy of the load are calculated to dynamically adjust the threshold.
[0108] The convergence criterion is that the change in the threshold between two adjacent iterations is less than 5%. The algorithm also introduces random perturbation and bootstrap sampling techniques to enhance the global search ability. For the multi-dimensional resource scenario, a parallel multi-dimensional binary search strategy is adopted to synchronously optimize the thresholds of different resource dimensions.
[0109] The specific implementation of step S80 is to perform microservice isolation operations. A real-time monitoring and migration system based on complex event processing (CEP) technology is constructed. A migration cost calculation model is defined:
[0110]
[0111] where M cost is the migration cost index, D is the amount of state migration data, W is the network channel occupancy rate, T is the migration time, I is the service impact degree, θ 1 ,θ 2 ,θ 3 are weight coefficients, and η is the risk factor.
[0112] The migration decision is comprehensively evaluated through the Markov decision process (MDP) and the Monte Carlo simulation method. The Q-learning algorithm in reinforcement learning is used to learn the optimal migration strategy. The migration execution path selection is based on the microservice association matrix and the minimum cost path algorithm. A smooth migration mechanism based on container orchestration technology is designed to ensure zero-downtime migration of services. Through dynamic thresholds and fault tolerance mechanisms, the migration cost and service performance are balanced to achieve fine-grained resource isolation and dynamic scheduling of microservices.
[0113] To better understand and implement the present invention, the following provides Example 2 of a specific application scenario of the present invention: A certain enterprise is using the productivity middle platform architecture for digital transformation and has deployed a large number of microservice-based application systems. With the rapid expansion of the business scale, the number of microservices deployed in the enterprise's productivity middle platform has exceeded 1000, covering multiple fields such as financial management, human resources, and supply chain collaboration. To ensure the stable operation of key businesses, the enterprise urgently needs to achieve automated isolation management of these microservices.
[0114] Based on this, the enterprise decides to adopt the microservice isolation operation method for the productivity middle platform proposed by the present invention. Taking the implementation situation of this enterprise as an example, the following details the specific application process of this method.
[0115] First, the enterprise's IT operation and maintenance team collected the operation metric data of all microservices. Through the monitoring system, the IT team collected the real-time load conditions of each microservice in dimensions such as CPU, memory, network, and disk. Taking a certain financial management microservice as an example, the metric data within the past 7 days is shown in Table 1.
[0116] Table 1 Operation metric data of a certain financial management microservice within 7 days
[0117]
[0118]
[0119] Figure 2 Shows the performance metrics of the financial management microservice in multiple dimensions such as CPU occupancy rate, memory occupancy rate, network throughput, disk read and write rate, response latency, and call frequency. The radar chart form is used to visually display the relative levels of each metric. Based on these metric data, the operation and maintenance team calculated the comprehensive priority metric P i = 0.8. This metric comprehensively considers factors such as the performance performance, importance, and environment of this microservice, and reflects the status of this microservice in the entire productivity middle platform.
[0120] Then, the operation and maintenance team decomposed and calculated the operation metric data of all microservices. First, the total load L total of each microservice was divided into a basic load L base and a dynamic load L dynamic two parts. Taking the above-mentioned financial management microservice as an example, after analyzing its metric data within 7 days, it was obtained that L base = 49%, L dynamic = 3%, and ∈ = 0.02. This indicates that 49% of the resource requirements of this microservice are stable basic requirements, 3% of the requirements are dynamically fluctuating, and the overall load fluctuation is within 2%. Figure 3The combined bar chart and line chart show the base load, dynamic load, and priority metrics of different microservices.
[0121] Based on the above load decomposition results, the operations and maintenance team constructed a benchmark resource matrix M base and a dynamic resource matrix M dynamic . Taking CPU resources as an example, the data of a certain row in M base is shown in Table 2 below:
[0122] Table 2 Partial data of M base
[0123] Microservices CPU Basic Load Financial Management 49% HR Management 42% Supply Chain 55% Project Management 38% … …
[0124] While the data of this row in M dnamic is shown in Table 3 below:
[0125] Table 3 Partial data of M dynamic
[0126]
[0127]
[0128] By constructing these two matrices, the operations and maintenance team comprehensively characterized the load characteristics of each microservice in different resource dimensions.
[0129] Next, the operations and maintenance team calculated the instantaneous competition index C instant and the persistent competition index C persist of each microservice. Taking CPU resources as an example, assuming the resource weight coefficient w i = 0.4, adjustment coefficients α = 0.6, β = 0.4, γ = 0.5, δ = 0.5, then:
[0130] CPU instantaneous competition index C instant = 1.45;
[0131] CPU persistent competition index C persist = 3.29;
[0132] Similarly, the operations and maintenance team calculated the competition indices in other resource dimensions. Figure 4 The relationship between the instantaneous competition index and the correlation degree of each microservice is shown through a scatter plot. The figure includes specific values such as C_{instant} = 1.45 calculated in the embodiments, and results such as A_{ij} = 6.77 obtained from the correlation degree calculation equation. These indices comprehensively reflect the degree of resource contention of each microservice in the short term and long term, providing a basis for subsequent resource allocation decisions.
[0133] Based on the above analysis results of microservice resource characteristics, the operation and maintenance team constructed a resource allocation equation system.
[0134] First, the utility calculation equation U ij is used to evaluate the utility index of microservices in different resource units:
[0135]
[0136] where R ij is the request value of the i-th microservice on the j-th resource, C j is the capacity of the j-th resource unit, and t is the running time. This equation takes into account factors such as microservice priority, timeliness, and dynamics of resource usage, and can more accurately evaluate the resource requirements of microservices. Figure 5 The relationship among the running time, resource request ratio, and utility index in the utility calculation equation U ij is shown through a three-dimensional surface.
[0137] The correlation degree calculation equation A ij is used to evaluate the correlation degree between microservice i and microservice j: A ij = 6.77;
[0138] where 1200 is the microservice call frequency, 500 is the data exchange volume, 150 is the service response delay, 0.8 is the correlation strength index, and 0.1 is the noise coefficient. This equation balances the influence of multiple performance indicators and more comprehensively describes the correlation relationship between microservices.
[0139] The load balancing equation B j is used to ensure the balance of resource allocation:
[0140]
[0141] where L ij is the load index of the i-th microservice on the j-th resource unit, H j is the load change record of the j-th resource unit, and σ is the standard deviation function. This equation comprehensively considers the resource usage intensity, load fluctuation, and load change trend, and can effectively maintain the balance of resource allocation.
[0142] Finally, the migration cost equation M cost is used to evaluate the overhead of microservice migration: M cost = 59.78;
[0143] where 500 is the amount of state migration data, 90 is the network channel occupancy rate, 180 is the migration time, 2 is the service impact degree, and 0.05 is the risk factor. This equation comprehensively evaluates the various overheads in the migration process and provides a basis for migration decisions.Figure 6 It shows the changes in the migration cost of microservices with different priorities under different resource utilization rates, and marks the resource usage threshold \(T_{CPU}=75\%\) determined in the embodiment.
[0144] By solving the above resource allocation equations, the operation and maintenance team obtained a resource allocation plan that satisfies the correlation and load balancing among microservices. Next, the IT team used an optimized binary algorithm to determine a reasonable resource usage threshold \(T\). j . Taking CPU resources as an example, initially set \(T\). CPU \( = 80\%\), and then through iterative optimization, finally determine \(T\). CPU \( = 75\%\).
[0145] After having the resource allocation plan and reasonable usage thresholds, the operation and maintenance team began to monitor the load conditions of each resource unit in real time. For those resource units whose load exceeds the threshold, the team calculates the migration cost \(M\) of the microservice. cost , and selects a suitable target resource unit for migration according to the microservice correlation matrix \(A\).
[0146] Taking a certain monitoring as an example, it is found that the load of the CPU resource unit exceeds \(75\%\), and after calculation \(M\). cost \( = 59.78\) meets the expected requirements. So the team decided to migrate the financial management microservice from this resource unit to another resource unit with a lower load. Through this dynamic isolation operation, the operation and maintenance team can timely relieve the resource bottleneck and ensure the stable operation of key business services.
[0147] In the subsequent operation and maintenance process, the enterprise's IT team continuously monitors the resource usage of the productivity middle platform, and adjusts the resource allocation and usage thresholds in a timely manner. At the same time, the IT team is also observing the load change trends of each microservice, and optimizing the parameters of the resource allocation equations in a timely manner to improve the accuracy of resource management.
[0148] For example, with the seasonal fluctuations of the business, the dynamic load of some microservices has increased significantly. According to the historical data analysis, the operation and maintenance team found that the time decay coefficient \(\lambda\) of such microservices should be appropriately reduced to increase the weight of their short-term resource requirements. At the same time, the IT team also appropriately increased the weight coefficient \(\varphi\) of the load change acceleration in the load balancing equation to enhance the early warning ability for severe fluctuations.
[0149] Through continuous optimization, the microservice isolation operation plan of the enterprise's productivity middle platform is continuously improved, and the resource utilization efficiency and service stability are also continuously enhanced. At present, the enterprise has basically achieved the automated isolation management of microservices, and the average availability of key business services has reached \(99.9\%\), far higher than the previous level. The IT team has thus received high recognition from the senior management and contributed an important force to the enterprise's digital transformation.
[0150] It should be noted that the detailed explanations of the variables involved in the present invention are shown in Table 4 below.
[0151] Table 4 Variable Explanation Table
[0152]
[0153]
[0154] The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention.
Claims
1. A method for isolating and operating microservices in a productivity platform, characterized in that: Collect microservice operation indicator data, decompose the microservice operation indicator data to obtain basic load values and dynamic load values, construct a benchmark resource matrix and a dynamic resource matrix, calculate competition indicators based on the benchmark resource matrix and the dynamic resource matrix, construct a microservice call graph, establish a microservice association matrix, convert microservice grouping into a knapsack problem with multi-dimensional constraints, and use a resource allocation equation group including utility calculation equations, association calculation equations, load balancing equations, and migration cost equations to solve the resource allocation plan, determine the resource usage threshold value based on the resource balancing constraint indicator and divide the resource unit, monitor the resource unit load indicator and perform microservice isolation operations.
2. The method for isolating and operating microservices in a productivity platform according to claim 1 is characterized in that: The microservice operation indicator data includes processor occupancy, memory occupancy, network throughput, disk read and write rate, service response delay, service call frequency, data exchange volume, and environmental parameter data. The microservice priority indicator is generated through the microservice operation indicator data.
3. The productivity middle platform microservice isolation operation method according to claim 1 is characterized in that: The competition index includes an instantaneous competition index and a persistent competition index. The instantaneous competition index is calculated based on the dynamic resource matrix, and the persistent competition index is calculated based on the reference resource matrix. The resource request vector is generated by combining the instantaneous competition index and the persistent competition index.
4. The method for isolating and operating microservices in a productivity platform according to claim 1 is characterized in that: The path optimization operation is used to analyze the correlation strength index between microservices and establish the microservice correlation matrix.
5. The productivity middle platform microservice isolation operation method according to claim 1 is characterized in that: The resource allocation equation group includes a utility calculation equation, a correlation calculation equation, a load balancing equation, and a migration cost equation.
6. The productivity middle platform microservice isolation operation method according to claim 5 is characterized in that: The input of the utility calculation equation includes the resource request vector, the resource unit capacity data, and the microservice priority index, and the output is the microservice utility allocation matrix; the input of the association calculation equation includes the service call frequency, the data exchange volume, the association strength index, and the service response delay, and the output is the microservice association matrix.
7. The method for isolating and operating microservices in a productivity platform according to claim 5 is characterized in that: The input of the load balancing equation includes the resource unit load indicator, the load change record, the microservice priority indicator, and the resource usage threshold value, and the output is the resource balancing constraint indicator; the input of the migration cost equation includes the state migration data volume, the network channel occupancy rate, the migration operation time, and the service impact degree, and the output is the migration cost indicator.
8. The productivity middle platform microservice isolation operation method according to claim 1 is characterized in that: When the resource unit load indicator exceeds the resource usage threshold, the migration execution path is determined based on the state migration data volume, the network channel occupancy rate, the migration operation time, and the service impact degree to complete the microservice isolation operation.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program instructions, and when the program instructions are executed in a computer, they are used to execute the productivity middle-end microservice isolation operation method described in any one of claims 1-8.
10. A productivity middle platform microservice isolation operation system, characterized in that: The system comprises the computer-readable storage medium as claimed in claim 9, wherein the system is any one of a computer, a server, and a single-chip microcomputer, the computer-readable storage medium is arranged in the system, and the system is provided with a microprocessor for executing program instructions stored in the computer-readable storage medium.
Citation Information
Patent Citations
Micro-service resource scheduling method and system
CN111158895A
Industrial park management system driven by cloud computing
CN117891606A
Virtualization server load response model establishment method, medium and system
CN119225907A
Distributed interface defect detection method and system for micro-service architecture
CN119248632A
Micro-service resource adaptive adjustment method based on hyper-heuristic algorithm
CN119356801A
Cited By
Efficient edge computing and cloud collaborative data scheduling system
CN121070565A
Dynamically constrained multi-resource scheduling method and system based on decision threshold
CN121900950A
