A micro-service dynamic governance method and system for a distributed computing power network call chain

By configuring service assurance levels, data collection, and risk prediction, and implementing service governance, the service scheduling problem when resources are insufficient in distributed computing networks is solved, ensuring the normal operation of core services and improving the accuracy of service quality and business adaptability.

CN119718670BActive Publication Date: 2026-11-20CHINA TOWER CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411938904.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2026-11-20
Estimated Expiration
2044-12-26

AI Technical Summary

Technical Problem

In a distributed computing network, how can we balance resource usage while ensuring the normal operation of microservices, especially when resources are insufficient, and rationally schedule and evict low-priority services to protect the normal operation of core services?

Method used

By configuring service assurance levels, collecting and preprocessing performance and resource data, conducting risk prediction, implementing service governance, and restoring services when necessary, including flow control and circuit breaker mechanisms, the normal operation of core services can be ensured.

Benefits of technology

It enables the protection of critical business activities during periods of resource scarcity, improves the accuracy of service quality, and facilitates a smooth transition through tiered governance, adapting to the uncertainties of business scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718670B_ABST
    Figure CN119718670B_ABST
Patent Text Reader

Abstract

The application provides a micro-service dynamic management method and system for a distributed computing power network call chain, the method comprising: initialization, that is, configuring a service guarantee level and setting a service management trigger condition; data collection and preprocessing; risk prediction according to the preprocessed data; service management according to the risk prediction result; service recovery after the service management is completed; and the system uses the above method to realize the micro-service dynamic management of the distributed computing power network call chain. The application fully uses real data of the system itself to correct the algorithm in a positive and negative feedback manner, improves the accuracy of service quality, accurately calculates by using a data analysis algorithm, and gradually and gradiently manages the service in a period of time. That is, the system misjudgment caused by the uncertainty factors of the business scene and the customer action is compatible, and the goal of smooth transition is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method and system for dynamic governance of microservices, and more particularly to a method and system for dynamic governance of microservices using a distributed computing power network call chain. Background Technology

[0002] This section provides only background information relevant to this disclosure and is not necessarily prior art.

[0003] In recent years, microservice architecture, with its decentralized, highly autonomous, and automated characteristics, has further decoupled system architecture and is more compatible with agile iteration and DevOps culture. It can meet the needs of enterprise software development architecture development at a lower cost and improve development efficiency. Especially with the rise of Kubernetes-native cloud technology and its widespread adoption in computing power and network virtualization, and with all software systems becoming increasingly microservice-oriented and containerized, the number of containers is increasing. How to manage containers, perform continuous integration, and orchestrate them has become a problem. To solve containerization and orchestration issues, Kubernetes was introduced to uniformly schedule and maintain containers and resources in the cluster. The overall status of the cluster and the corresponding service monitoring are crucial. However, there is a problem between the infinite elastic scaling of business and the balance between resources. It is very important to ensure that microservices under the entire computing power network system can work normally while resources are insufficient. This way, when a cluster node pod is evicted, services with high weight coefficients can continue to work normally, thereby ensuring that the core services of the system are not affected. For example, payment services, product SPU services, system monitoring services, and logging services. When the cluster eviction occurs, it is desirable to evict the logging service and system monitoring service while retaining the core payment, SPU and other core services.

[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] Purpose of the invention: The technical problem to be solved by the present invention is to provide a microservice dynamic governance method and system for distributed computing power network call chain, which addresses the shortcomings of the existing technology.

[0006] To address the aforementioned technical problems, this invention discloses a microservice dynamic governance method and system for distributed computing power network call chains, wherein the system includes the following steps:

[0007] Step 1, Initialization, which involves configuring the service assurance level and setting the service governance trigger conditions;

[0008] Step 2: Data acquisition and preprocessing;

[0009] Step 3: Based on the preprocessed data, perform risk prediction;

[0010] Step 4: Conduct service governance based on the risk prediction results;

[0011] Step 5: After completing the service governance, perform service recovery to realize the microservice dynamic governance of the distributed computing power network call chain.

[0012] Furthermore, the configuration service assurance level mentioned in step 1 includes:

[0013] The protection level of the microservices in the distributed computing network call chain is divided into 3 levels, and a label is configured for each microservice to obtain service protection level label data; the label data includes: level type, running unit name, number of replicas, namespace and business name; wherein, the level type includes: low level, medium level and high level.

[0014] Furthermore, the service governance triggering conditions mentioned in step 1 include:

[0015] The maximum number of failed calls to the microservices that meet the preset level is greater than the failure count threshold.

[0016] The average latency of the API call is greater than the time threshold.

[0017] The CPU utilization and memory utilization of the computing nodes are greater than the preset thresholds.

[0018] Furthermore, the data collection described in step 2 includes:

[0019] Using a service operation tool, service performance data of all microservices in the distributed computing network are collected at preset time intervals, including: service call running status, number of call failures, and interface call latency.

[0020] Resource monitoring tools are used to collect resource performance data of all nodes in the distributed computing network at the same preset time intervals, including CPU utilization, memory utilization and storage utilization.

[0021] Furthermore, the preprocessing described in step 2 includes:

[0022] The service performance data and resource performance data are then merged, as follows:

[0023] Read the service performance data and resource performance data within the preset time period respectively; according to the principle of similar time, merge the resource performance data of nodes with the same start and end time within the preset time period with the service performance data of each microservice in that node;

[0024] Binning is performed on the merged data time column to generate time sequence numbers;

[0025] The merged data includes:

[0026] Service execution time, sequence number, running unit name, service status type, number of failures, waiting time, CPU utilization, memory utilization, and storage utilization.

[0027] Furthermore, the risk prediction described in step 3 includes:

[0028] Step 3-1: When the maximum number of service call failures in the merged data exceeds the failure count threshold, the average time of interface call latency exceeds the time threshold, and the CPU utilization or memory utilization of the node exceeds the threshold, proceed to step 3-2 to perform risk prediction.

[0029] Step 3-2: Read the merged data for the most recent hour from this node and write it to a temporary file;

[0030] Step 3-3: Extract the m data with the smallest time sequence number from the temporary file, and use the time sequence number of the remaining data, the corresponding service performance data and resource performance data within each time sequence number as the input data for the prediction model to predict risks;

[0031] Steps 3-4: The prediction model scores the input data;

[0032] Steps 3-5: Filter out data with scores lower than the preset score and save the remaining data as the final risk prediction result.

[0033] Furthermore, the prediction model described in steps 3-4 scores the input data, including:

[0034] Step 3-4-1: Parse the input data and find the time sequence number corresponding to the median of CPU utilization, memory utilization, and storage utilization, as well as the time sequence number corresponding to the maximum value of CPU utilization, memory utilization, and storage utilization.

[0035] Step 3-4-2: If the medians of CPU utilization, memory utilization, and storage utilization are not in the same time period, then continue to check if the medians of CPU utilization and memory utilization are in the same time period. If they are, then take this time period and the next median array, for a total of 2 sets of data; if the medians of CPU utilization and memory utilization are not in the same time period, then take the median index of CPU utilization, memory utilization, and storage utilization and the CPU utilization, memory utilization, and storage utilization value closest to this median, respectively, store the above data in a medium data table, and reverse map the time period to the time value, and add the corresponding timestamp to all data.

[0036] Step 3-4-3: Using the same method as step 3-4-2, create a high-level data table based on the time sequence number corresponding to the maximum value of CPU utilization, memory utilization, and storage utilization.

[0037] Step 3-4-4: Calculate the mean squared error between the time in the intermediate data table and the time in the advanced data table, and compare it with the preset risk value λ. If it is less than λ, set the timing time to the minimum time in the advanced data table, and trigger the microservice governance based on this timing.

[0038] Furthermore, the service governance described in step 4 includes:

[0039] Step 4-1: Read the resource performance data and microservice list used by the current node;

[0040] Step 4-2: Using the resource performance data and the data corresponding to the minimum time sequence value in the medium data table, calculate the mean squared error (Vmse) of CPU utilization and memory utilization. If the mean squared error (Vmse) is greater than the first flow control threshold, stop service governance. If the mean squared error (Vmse) is less than the first flow control threshold, proceed to step 4-3.

[0041] Step 4-3, perform the first level of service flow control, as follows:

[0042] Using the resource performance data and the data corresponding to the minimum time sequence value in the medium data table, calculate the mean squared error (Vmse) of CPU utilization and memory utilization. If the mean squared error (Vmse) is greater than or equal to the second flow control threshold, stop service governance; otherwise, continue collecting data for one cycle and use the method in step 4-2 to calculate the mean squared error (Vmse) of CPU utilization and memory utilization. If the mean squared error (Vmse) is greater than or equal to the first flow control threshold and less than the third flow control threshold, flow control is applied to microservices of the low level; otherwise, proceed to step 4-4.

[0043] Step 4-4, the second level of service flow control, is as follows:

[0044] Collect resource performance data for two or more preset periods. Use the resource performance data and the data corresponding to the minimum time sequence value in the medium data table to calculate the mean squared error (Vmse) of CPU utilization and memory utilization. If the mean squared error (Vmse) is greater than or equal to the second flow control threshold and less than the third flow control threshold, then flow control is applied to microservices of the medium level. Otherwise, proceed to steps 4-5.

[0045] Steps 4-5, first-level service circuit breaker, are as follows:

[0046] Wait for more than two preset periods, then collect resource performance data again. Use the resource performance data and the data corresponding to the minimum time sequence value in the medium data table to calculate the mean squared error (Vmse) of CPU utilization and memory utilization. If the Vmse is greater than or equal to the second flow control threshold and less than the third flow control threshold, then continue to maintain the second level of service flow control. If the Vmse is less than the second flow control threshold, then use the resource performance data and the high data table to calculate the Vmse again. If the Vmse is greater than or equal to the second flow control threshold and less than the third flow control threshold, then continue to maintain the second level of service flow control. If the Vmse is less than the second flow control threshold, then circuit breaking is performed on microservices of the low level, and proceed to steps 4-6.

[0047] Steps 4-6, the second level of service circuit breaker, are as follows:

[0048] Collect resource performance data for two preset periods. Use the resource performance data and the data corresponding to the minimum time sequence value in the advanced data table to calculate the mean squared error (Vmse) of CPU utilization and memory utilization. If the mean squared error (Vmse) is greater than or equal to the fourth flow control threshold and less than the third flow control threshold, then continue to perform the second level of service flow control.

[0049] Wait for two preset periods, collect resource performance data, and use this resource performance data to calculate the mean squared error (Vmse) of CPU utilization and memory utilization, corresponding to the data with the minimum time sequence value in the advanced data table. If the mean squared error Vmse is greater than or equal to the fourth flow control threshold and less than the third flow control threshold, then the current service governance strategy remains unchanged; if the mean squared error Vmse is less than the fourth flow control threshold, then circuit breaking is applied to microservices of the medium level.

[0050] Furthermore, the service restoration described in step 5 includes:

[0051] Service restoration will proceed in reverse chronological order, as follows:

[0052] Level 2 service circuit breaker recovery, Level 1 service circuit breaker recovery, Level 2 service flow control, and Level 1 service flow control.

[0053] This invention also proposes a microservice dynamic governance system for distributed computing power network call chains to implement the aforementioned method, comprising:

[0054] The configuration module is used to configure the service assurance level and set the service governance trigger conditions;

[0055] The data acquisition module is used to acquire data and preprocess it.

[0056] The risk prediction module is used to predict risks based on the preprocessed data output by the data acquisition module.

[0057] The service governance module performs service governance based on risk prediction results and restores services after the service governance is completed.

[0058] Beneficial effects:

[0059] 1. This invention links computing node services with commercial systems to ensure that users' key business activities can operate normally when computing resources are insufficient.

[0060] 2. This invention fully utilizes the system's own real data to perform positive feedback correction on the algorithm, thereby improving the accuracy of service quality.

[0061] 3. This invention employs data analysis algorithms for precise calculations, providing progressively layered governance services over a period of time. This addresses the potential for system misjudgments due to uncertainties in business scenarios and customer actions, achieving a smooth transition. Attached Figure Description

[0062] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments, and the advantages of the present invention in the above and / or other aspects will become clearer.

[0063] Figure 1 This is a schematic diagram of the overall process of the present invention.

[0064] Figure 2 This is a schematic diagram of the service governance process in this invention.

[0065] Figure 3 This is a diagram illustrating the service level label.

[0066] Figure 4 This is a schematic diagram of the merged data structure. Detailed Implementation

[0067] This invention provides a method and system for dynamic governance of microservices in distributed computing power network business applications. The overall approach is to perform microservice governance on a unit-by-unit basis, such as... Figure 1 As shown, the process consists of five steps: first, classifying application services by manual means; second, monitoring the performance of microservices running in the computing power network cluster and collecting data on service operation status, number of failed calls, interface call latency, and computing power node resource usage performance; third, cleaning and organizing the performance data; fourth, using the collected data as input parameters to detect high-risk services through an AI model; and fifth, degrading or circuit breaking high-risk, non-core, and low-security business services to ensure the normal operation of critical business services and to issue anomaly alerts.

[0068] In this method, the data acquisition module periodically collects and stores performance data. Service runtime performance data comes from the Elastic Search APM performance monitoring tool, and edge computing node resource runtime performance data comes from PrometheusNode Export. The microservice runtime risk discovery model includes two algorithms: the "Random Forest" algorithm is used for runtime data prediction, and the "Anomaly Standard Score" algorithm is used for risk monitoring and anomaly detection.

[0069] The technical solution of the present invention is as follows:

[0070] This invention provides a method for dynamic governance of microservices in distributed computing network business applications, and the system serves distributed computing network clusters.

[0071] The service operation performance data collection tools and computing node resource monitoring data collection tools mentioned in this invention are not covered in this method, nor are the underlying algorithms involved in the microservice risk discovery AI model covered in this patent method. This method focuses on: 1) hierarchical management of application systems; 2) cleaning and transformation of service operation data and resource monitoring; and 3) governance and alerting of application services in the computing cluster.

[0072] In the computing network involved in this method, the computing network consists of multiple sub-clusters and a main cluster management center node. Data collection and data cleaning and transformation, automatic AI risk identification and service governance are deployed and run as public services within the cluster on a cluster-by-cluster basis. Sub-clusters uniformly send alarms to the service risk alarm and service governance result notification to the main cluster management center node. The central management node completes the service governance alarm and notification to the application clients.

[0073] The main process of the method of the present invention is as follows:

[0074] The execution steps are as follows:

[0075] S1: Application Service Assurance Level Label Configuration and Service Governance Trigger Condition Settings

[0076] S1-1: Service assurance level configuration, for example, the service assurance level is configured as 3 levels, namely Level 1 core business system, Level 2 critical business system service, and Level 3 general business system;

[0077] S1-2: Tagging services by level. Because a single function provided by an application system may be completed collaboratively by multiple microservices, each level will contain multiple services. During configuration, these services are tagged by level and the data is recorded in the database. The database structure includes {service level, corresponding business system name, service name, resource information required by the service, minimum number of concurrent services}; for example... Figure 3 As shown, the data storage format is as follows: id (representing the primary key); level (representing the level type); service_name (representing the name of the running unit); replicas (representing the number of replicas); namespace (representing the namespace); business_name (representing the business name).

[0078] S1-3: Set service governance conditions to meet the maximum average number of service call failures and average interface call latency for high-level application systems;

[0079] S2: Regularly collect, clean, and merge service performance data and resource performance monitoring data.

[0080] S2-1: The service operation tool collects all service operation data in the cluster every m minutes. The performance indicators include service call running status, number of call failures, and interface call latency.

[0081] S2-2: The resource monitoring tool collects resource usage data for all nodes every m minutes, including real-time data on CPU utilization, memory utilization, and storage utilization.

[0082] S2-3: Data Merging Processing: Retrieve the most recent hour's real-time data for both types of data from the database. Then, based on the principle of time proximity, calculate resource statistics for nodes within the same m-minute timeframe with the same start and end times. Merge this data with the service performance data of each node. The length of the merged data is equal to the length of the service performance data but greater than the length of the resource performance data, because multiple services are running at each time point. Time is binned according to a step size of m. After processing, all services within the same m-minute timeframe have the same execution sequence number.

[0083] like Figure 4 As shown, the merged data structure is as follows:

[0084] `id` represents the primary key; `timestamp` represents the service execution time; `bin_number` represents the sequence number; `pod_name` represents the name of the running unit; `unit_status` represents the service status type; `failed_account` represents the number of failures; `wait_time` represents the waiting time; `node_cpu_used_rate` represents the CPU utilization rate; `node_mempry_used_rate` represents the memory utilization rate; `node_storage_used_rate` represents the storage utilization rate.

[0085] When the monitoring service detects that the number of service calls exceeds the threshold or the interface call time exceeds the threshold, and the CPU utilization of the preset node exceeds cpu_rate and the memory utilization exceeds memory_rate, risk prediction will be triggered.

[0086] S3: Risk Prediction

[0087] S3-1: Read the merged data from the most recent hour and write it to a temporary file.

[0088] S3-2: Extract the m data points with the smallest sequence numbers from the temporary file. Use the remaining data time sequence numbers as input data for the risk prediction module to begin risk prediction. Write the predicted data to the prediction.csv file. The data volume in the budget result equals the data volume of sequence number n * the number of service data points running per minute. The predicted data includes the time sequence number and the service performance and resource usage within the corresponding time sequence number.

[0089] S3-3: Predicted Data Scoring: The algorithm model automatically takes the output prediction.csv as input and uses the scoring model to score the data.

[0090] S3-4: Filter out data with scores less than 0.7, and output data with scores greater than 0.7 as the final risk prediction result, prediction_scoring.csv.

[0091] S4: Predictive Data Analysis

[0092] Parse the data in prediction_scoring.csv and find the index of the median of CPU, memory, and storage; and the index of the maximum value of CPU, memory, and storage.

[0093] S4-1: If the medians of CPU, memory, and storage are not in the same time interval, continue checking if CPU and memory are in the same time interval. If they are, take this time interval and the next median array, for a total of two sets of data. If the medians of CPU and memory are not in the same time interval, take the median of CPU, memory, and storage, and the CPU, memory, and storage values ​​near the median, respectively. Store this data in the `median_dataset` table, and reverse-map the time intervals to time values, adding a timestamp to all data.

[0094] S4-2: Using a similar method, find the service data records within time indices n and n-1 when CPU, memory, and storage all reach their maximum values ​​and store them in the high_dataset table.

[0095] S4-3: Calculate the mean squared error between the times in `median_dataset` and `high_dataset`, and compare it with the preset risk value λ (Lambda). If the mean squared error is less than λ, it indicates that a scheduled task needs to be started, with the scheduled time being the minimum time in `high_dataset`. The scheduled task triggers microservice governance actions.

[0096] S5: Service governance, such as Figure 2 As shown.

[0097] The service governance process is illustrated using a user-configured three-level system as an example. The three levels are ranked from high to low as high / medium / low. The service governance reference value for each level is the mean squared error of Vmse (V:value,mse:Mean Squared Error). Vmse is calculated by using the implementation data and the corresponding CPU / memory data in the media_dataset or high_dataset dataset.

[0098] The service governance service requires pre-setting or configuring four types of VMSE thresholds and triggering conditions, which are as follows:

[0099] failed_account: The number of times the call failed.

[0100] wait_time: API call time

[0101] cpu_rate: CPU utilization

[0102] memory_rate: Memory utilization rate

[0103] Vmse_low_fc: Low-level service flow control threshold

[0104] Vmse_medium_fc: medium-level service traffic control threshold

[0105] Vmse_low_cb: low-level service circuit breaker

[0106] Vmse_medium_cb: medium-level service circuit breaker

[0107] Vmse_low_fc>Vmse_medium_fc>Vmse_medium_cb>Vmse_medium_cb

[0108] Recovery waiting interval wait_period; at least greater than one data collection cycle

[0109] S5-1: Read current system resource usage data and service list

[0110] S5-2: Calculate the mean square deviation of CPU and memory using the latest real-time resource data and the resource data corresponding to the minimum time sequence number in the median_dataset. If the mean square deviation Vmse is greater than Vmse_low_fc, stop service governance; if the mean square deviation is less than Vmse_low_fc, proceed to S5-2-1

[0111] S5-2-1: Low-level service traffic control. Calculate the mean square deviation of CPU and memory using real-time data and the resource data corresponding to the maximum time sequence number in the median_dataset. If the final Vmse>=Vmse_low_cb, stop service governance; if Vmse<Vmse_low_cb, proceed to S5-2-2

[0112] S5-2-2: Continue to collect data for 1 cycle, and calculate the mean square deviation of CPU and memory pairs using the method in 5-2. If Vmse_low_fc<=Vmse<Vmse_medium_fc, perform traffic control on services with low service level

[0113] S5-3: Medium-level service traffic control. For at least 2 collection data cycles, execute S5-2-2 using the latest real-time data. If Vmse_low_cb<=Vmse<Vmse_medium_fc, perform traffic control on services with medium service level;

[0114] S5-4: Low-level service circuit breaking. Wait for real-time data of at least 2 data cycles, continue to perform mean square error calculation using the most recently collected real-time data and the median_dataset. If Vmse_low_cb<=Vmse<Vmse_medium_fc, maintain the medium data flow control. If Vmse<Vmse_low_cbc, continue to calculate the mean square error using this real-time data and the high_dataset. If Vmse_low_cb<=Vmse<Vmse_medium_fc, continue to perform flow control on the medium-level service. If Vmse<Vmse_low_cb, perform circuit breaking processing on the low-level service; then proceed to S5-4-1

[0115] S5-5: Medium-level service circuit breaking. Collect resource performance data twice, and calculate the mean square error using the data with the smaller sequence number and the high_dataset data. If Vmse_medium_cb<=Vmse<Vmse_medium_fc, continue to perform flow control on the medium service. Wait for at least 2 data collection cycles, calculate the mean square error using the real-time resource performance data and the high_dataset data. If Vmse_medium_cb<=Vmse<Vmse_medium_fc, keep the service policy governance policy unchanged. If Vmse<Vmse_medium_cb, perform circuit breaking processing on the medium service

[0116] S6: Service recovery

[0117] Service recovery is triggered after the circuit-broken service runs for wait_period cycles and the CPU and memory usage conditions are met. Then calculate the Vmse value, and gradually restore the flow-limited or circuit-broken services according to the Vmse value. The recovery sequence is: medium service -> low service -> medium service flow control -> low service flow control.

[0118] S6-1: Medium-level service circuit breaking recovery. When Vmse>=Vmse_medium_cb, restore the operation of the medium-level service, and perform flow control on the medium-level service at the same time, wait for the wait_period time and then continue to calculate the Vmse value

[0119] S6-2: Low-level service circuit breaking recovery. When Vmse_low_cb<=Vmse<Vmse_medium_fc, restore the operation of the low-level service, and perform flow control on the low-level service at the same time. Wait for the wait_period time and then continue to calculate the Vmse value

[0120] S6-3: Medium-level service flow control recovery. When Vmse_medium_fc ≤ Vmse < Vmse_low_fc, the medium-level service flow control is canceled, and the Vmse value is continuously calculated after waiting for the wait_period time

[0121] S6-4: Medium-level service flow control recovery. When Vmse_low_fc ≤ Vmse, the low-level service flow control is canceled.

[0122] Embodiment:

[0123] Taking a specific implementation scenario as an example: In a property information digital management platform of an industrial park, there are multiple digital services, such as a parking lot service system, an elevator monitoring system, a charging pile management system, a property office OA system, a property charging system, a fire control room large screen service, an access control monitoring system, a video surveillance system, an alarm system, and a platform service management system. The above service systems run in a container cluster, and there are multiple computing power nodes in the cluster.

[0124] To verify the effectiveness of this method, resource-consuming service systems are deployed on each computing power node respectively. These services call each other and frequently write disk data, occupying a large amount of network bandwidth, CPU and memory; services with call response delay and random call failure are added to the high-level application system services, and the services are started as multiple replicas;

[0125] The implementation process is as follows:

[0126] Step S001: Application system level configuration

[0127] High: Parking lot service system, alarm system, video surveillance system, resource consumption system

[0128] Medium: Fire control room large screen service, elevator monitoring system, access control monitoring system

[0129] Low: Charging pile management system, property office OA system, property charging system,

[0130] Step S011: Configure governance thresholds

[0131] failed_account=1000;

[0132] wait_time=2s

[0133] Low-level service flow control threshold, Vmse_low_fc=0.55

[0134] Low-level service circuit breaker, Vmse_low_cb=0.375

[0135] Medium-level service flow control threshold, Vmse_medium_fc = 0.125

[0136] Medium-level service circuit breaker, Vmse_medium_cb = 0.1

[0137] The governance recovery waiting period is 7 seconds.

[0138] Cpu_rate:50%,memory_=70%

[0139] S012: Data Acquisition. Data acquisition is performed periodically and continuously after the service starts running. Service monitoring data collects service performance parameters every 3 minutes and stores the data; resource monitoring data collects system resource usage performance parameters every 3 minutes and stores the data in an HBase database.

[0140] If, in five consecutive data collections, the total number of service failures in the business system exceeds 1000, the average latency exceeds 2 seconds, CPU utilization exceeds 50%, and memory utilization exceeds 70%, then the data service governance process will be triggered.

[0141] S002: Raw data processing;

[0142] Read the service monitoring metrics data and resource monitoring metrics data for the most recent hour, respectively, since real-time data is stored as unstructured data. After reading the data, merge the data. Since the two collection methods have the same interval, the results are the same. Find the time point where the two data overlaps or the time difference is less than 1 minute and start merging the data at that time point. See the solution section for specific data structure.

[0143] The merged data is binned with a step size of 3 minutes, and the data within each 3-minute period is labeled in reverse chronological order; the maximum time label is n.

[0144] S003: Retain all data when marked as 1, use all service data of the service system marked as 2 to n as input data, call the prediction model, and obtain the model output results;

[0145] S004: Analysis of Prediction Results;

[0146] The predicted results show that the median number of calls to all application system services is equal to the total number of calls, and the average latency of interface calls is 1.08 seconds. The median CPU utilization of containers is 58%, and the number of memory locations is 69%, corresponding to time numbers 18 and 19, which are mapped to the time period from 18:30:00 to 19:30:00. This data is recorded as medium_dataset. Similarly, the high_dataset is mapped to data between 8:30 and 9:30.

[0147] S005: Service Governance;

[0148] S051: The first-level service governance collects real-time data for two performance parameters, set as the data for minute 0. It calculates the mean squared error of each performance parameter compared to the same parameters in the medium_dataset. Finally, it calculates the mean squared error of all parameters, and then calculates the service failure count, service latency, and VMSE value for memory utilization.

[0149] Vmse_callfaild = 0.373,

[0150] Vmse_delaytime = 0.451

[0151] Vmse_cpu = 0.350

[0152] Vmse_memory = 0.344

[0153] Continue to increase resource consumption in systems with abnormal resource consumption. Calculate Vmse using data from the 3rd minute's medium_dataset, calculating up to...

[0154] Vmse_callfaild = 0.373,

[0155] Vmse_delaytime = 0.331

[0156] Vmse_cpu = 0.316

[0157] Vmse_memory = 0.344

[0158] All values ​​less than 0.375 indicate that flow control is being implemented for low-level applications such as charging pile management systems, property office OA systems, and property fee collection systems; access latency to the OA system is severe.

[0159] S052 Second-Tier Service Governance: Continue to increase the service call count and resource consumption frequency of systems with abnormal resource consumption; calculate the Vmse values ​​using data from the 6th and 9th minutes and data from the medium_dataset:

[0160] Vmse_callfaild = 0.224,

[0161] Vmse_delaytime = 0.256

[0162] Vmse_cpu = 0.259

[0163] Vmse_memory = 0.277

[0164] Wait_period = 3min

[0165] The system continues to perform flow control on medium-level application systems.

[0166] S053 continues to acquire data from the 12th and 15th minutes, calculates its Vms value with high_dataset, and finds both to be less than 0.375, thus stopping the low-level service.

[0167] Continue to increase the data on the number of abnormal system services in operation;

[0168] S054: Continue to acquire data from the 18th and 21st minutes, calculate their Vms values ​​with high_dataset, both are less than 0.125, degrade the medium service; reduce the number of medium service replicas.

[0169] S055: Continue acquiring data from the 24th and 27th minutes, calculate their Vms values ​​with high_dataset, and if both are less than 0.1, apply circuit breaker processing to the median service;

[0170] Reduce the number of abnormal system services running, and wait for the time to pass.

[0171] S055: Continue acquiring data from minutes 33 and 36, calculate the Vmse value between the data and the high_dataset (0.125 > Vmse > 0.1), and gradually restore the service data of the medium-level application systems; restore one application system at a time, and restoring the services of 3 application systems will take 9 minutes.

[0172] Reduce the number and frequency of abnormal system services running, and wait for the time to pass.

[0173] S056, continue acquiring monitoring indicator data at minutes 48 and 52, calculate their Vmse values ​​relative to the high_dataset, Vmse > 0.125, gradually restore low-level application system services; total 9 minutes.

[0174] Stop the interference from the abnormal service system, and resume flow control after the specified time has elapsed.

[0175] S057, continue to acquire monitoring indicator data at the 64th and 67th minutes, calculate its Vmse value relative to high_medium, Vmse>0.45, gradually restore the number of replicas of medium-level application system services at 3 intervals, and cancel flow control for medium-level services;

[0176] Stop the interference from the abnormal service system, and resume flow control after the specified time has elapsed.

[0177] S058, continue to acquire monitoring indicator data at the 79th and 82nd minutes, calculate their Vmse value relative to high_medium, Vmse>0.55, and gradually restore the number of replicas of low-level application system services at 3 intervals;

[0178] Thus far, from the discovery of the anomaly to the final service restoration, the entire process took 82 minutes, during which the system completed the service governance process and the service restoration process.

[0179] In its specific implementation, this application provides a computer storage medium and a corresponding data processing unit. The computer storage medium is capable of storing a computer program, which, when executed by the data processing unit, can run the invention's content regarding a distributed computing power network call chain microservice dynamic governance method and system, as well as some or all of the steps in various embodiments. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0180] Those skilled in the art will clearly understand that the technical solutions in the embodiments of the present invention can be implemented using computer programs and their corresponding general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of computer programs, i.e., software products. These computer program software products can be stored in a storage medium and include several instructions to cause a device containing a data processing unit (which may be a personal computer, server, microcontroller, MCU, or network device, etc.) to execute the methods described in various embodiments or certain parts of the embodiments of the present invention.

[0181] This invention provides a method and system for dynamic governance of microservices in a distributed computing power network call chain. Many methods and approaches exist for implementing this technical solution; the above description is merely a preferred embodiment. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this invention, and these improvements and modifications should also be considered within the scope of protection of this invention. All components not explicitly stated in this embodiment can be implemented using existing technologies.

Claims

1. A microservice dynamic governance method for distributed computing power network call chains, characterized in that, Includes the following steps: Step 1, Initialization, which involves configuring the service assurance level and setting the service governance trigger conditions; Step 2: Data acquisition and preprocessing; Step 3: Based on the preprocessed data, perform risk prediction; The preprocessing includes determining the median and maximum values ​​of CPU utilization, memory utilization, and storage utilization. Step 4: Conduct service governance based on the risk prediction results; The aforementioned service governance includes: Step 4-1: Read the resource performance data and microservice list used by the current node; Step 4-2: Using the resource performance data and the data corresponding to the minimum time sequence value in the medium data table, calculate the mean squared error (Vmse) of CPU utilization and memory utilization. If the mean squared error (Vmse) is greater than the first flow control threshold, stop service governance. If the mean squared error (Vmse) is less than the first flow control threshold, proceed to step 4-3. The median data table includes the time sequence number corresponding to the median obtained in step 3, as well as the corresponding values ​​of CPU utilization, memory utilization, and storage utilization. Step 4-3, perform the first level of service flow control, as follows: Using the resource performance data and the data corresponding to the minimum time sequence value in the medium data table, calculate the mean squared error (Vmse) of CPU utilization and memory utilization. If the mean squared error (Vmse) is greater than or equal to the second flow control threshold, stop service governance; otherwise, continue collecting data for one cycle and calculate the mean squared error (Vmse) of CPU utilization and memory utilization using the method in step 4-2. If the mean squared error (Vmse) is greater than or equal to the first flow control threshold and less than the third flow control threshold, flow control is applied to microservices of the low level; otherwise, proceed to step 4-4. Step 4-4, the second level of service flow control, is as follows: Collect resource performance data for two or more preset periods. Use the resource performance data and the data corresponding to the minimum time sequence value in the medium data table to calculate the mean squared error (Vmse) of CPU utilization and memory utilization. If the mean squared error (Vmse) is greater than or equal to the second flow control threshold and less than the third flow control threshold, then flow control is applied to microservices of the medium level. Otherwise, proceed to steps 4-5. Steps 4-5, first-level service circuit breaker, are as follows: Wait for more than two preset periods, then collect resource performance data again. Use the resource performance data and the data corresponding to the minimum time sequence value in the medium data table to calculate the mean squared error (Vmse) of CPU utilization and memory utilization. If the Vmse is greater than or equal to the second flow control threshold and less than the third flow control threshold, then continue to maintain the second level of service flow control. If the Vmse is less than the second flow control threshold, then use the resource performance data and the high data table to calculate the Vmse again. If the Vmse is greater than or equal to the second flow control threshold and less than the third flow control threshold, then continue to maintain the second level of service flow control. If the Vmse is less than the second flow control threshold, then circuit breaking is performed on microservices of the low level, and proceed to steps 4-6. The advanced data table includes the time sequence number corresponding to the maximum value obtained by judging the maximum value in step 3, as well as the corresponding CPU utilization, memory utilization, and storage utilization values; Steps 4-6, the second level of service circuit breaker, are as follows: Collect resource performance data for two preset periods. Use the resource performance data and the data corresponding to the minimum time sequence value in the advanced data table to calculate the mean squared error (Vmse) of CPU utilization and memory utilization. If the mean squared error (Vmse) is greater than or equal to the fourth flow control threshold and less than the third flow control threshold, then continue to perform the second level of service flow control. Wait two preset periods, collect resource performance data, and use this resource performance data to calculate the mean squared error (Vmse) of CPU utilization and memory utilization, corresponding to the data with the minimum time sequence value in the advanced data table. If the mean squared error Vmse is greater than or equal to the fourth flow control threshold and less than the third flow control threshold, then the current service governance strategy remains unchanged; if the mean squared error Vmse is less than the fourth flow control threshold, then circuit breaking is applied to microservices of the medium level. Step 5: After completing the service governance, perform service recovery to realize the microservice dynamic governance of the distributed computing power network call chain.

2. The microservice dynamic governance method for distributed computing power network call chains according to claim 1, characterized in that, The configuration service assurance level mentioned in step 1 includes: The protection level of the microservices in the distributed computing network call chain is divided into 3 levels, and a label is configured for each microservice to obtain service protection level label data; the label data includes: level type, running unit name, number of replicas, namespace and business name; wherein, the level type includes: low level, medium level and high level.

3. The microservice dynamic governance method for distributed computing power network call chains according to claim 2, characterized in that, The service governance triggering conditions mentioned in step 1 include: The maximum number of failed calls to the microservices that meet the preset level is greater than the failure count threshold. The average latency of the API call is greater than the time threshold. The CPU utilization and memory utilization of the computing nodes are greater than the preset thresholds.

4. The microservice dynamic governance method for distributed computing power network call chains according to claim 3, characterized in that, The data acquisition described in step 2 includes: Using a service operation tool, service performance data of all microservices in the distributed computing network are collected at preset time intervals, including: service call running status, number of call failures, and interface call latency. Resource monitoring tools are used to collect resource performance data of all nodes in the distributed computing network at the same preset time intervals, including CPU utilization, memory utilization and storage utilization.

5. The microservice dynamic governance method for distributed computing power network call chains according to claim 4, characterized in that, The preprocessing described in step 2 includes: The service performance data and resource performance data are then merged, as follows: Read the service performance data and resource performance data within the preset time period respectively; according to the principle of similar time, merge the resource performance data of nodes with the same start and end time within the preset time period with the service performance data of each microservice in that node; Box the merged data time column to generate time sequence numbers; The merged data includes: Service execution time, sequence number, running unit name, service status type, number of failures, waiting time, CPU utilization, memory utilization, and storage utilization.

6. The microservice dynamic governance method for distributed computing power network call chains according to claim 5, characterized in that, Step 3, which involves risk prediction, includes: Step 3-1: When the maximum number of service call failures in the merged data exceeds the failure count threshold, the average time of interface call latency exceeds the time threshold, and the CPU utilization or memory utilization of the node exceeds the threshold, proceed to step 3-2 to perform risk prediction. Step 3-2: Read the merged data for the most recent hour from this node and write it to a temporary file; Step 3-3: Extract the m data with the smallest time sequence number from the temporary file, and use the time sequence number of the remaining data, the corresponding service performance data and resource performance data within each time sequence number as the input data for the prediction model to predict risks; Steps 3-4: The prediction model scores the input data; Steps 3-5: Filter out data with scores lower than the preset score and save the remaining data as the final risk prediction result.

7. The microservice dynamic governance method for a distributed computing power network call chain according to claim 6, characterized in that, The prediction model described in steps 3-4 scores the input data, including: Step 3-4-1: Parse the input data and find the time sequence number corresponding to the median of CPU utilization, memory utilization, and storage utilization, as well as the time sequence number corresponding to the maximum value of CPU utilization, memory utilization, and storage utilization. Step 3-4-2: If the medians of CPU utilization, memory utilization, and storage utilization are not in the same time period, then continue to check if the medians of CPU utilization and memory utilization are in the same time period. If they are, then take the medians of CPU utilization and memory utilization for that time period, for a total of 2 sets of data. If the medians of CPU utilization and memory utilization are not in the same time period, then take the median index of CPU utilization, memory utilization, and storage utilization, and the CPU utilization, memory utilization, and storage utilization value closest to that median, respectively. Store the above data in a medium data table, and reverse map the time period to the time value, giving all data the corresponding timestamp. Step 3-4-3: Using the same method as step 3-4-2, create a high-level data table based on the time sequence number corresponding to the maximum value of CPU utilization, memory utilization, and storage utilization. Step 3-4-4: Calculate the mean squared error between the time in the intermediate data table and the time in the advanced data table, and compare it with the preset risk value λ. If it is less than λ, set the timing time to the minimum time in the advanced data table, and trigger microservice governance based on this timing.

8. The microservice dynamic governance method for a distributed computing power network call chain according to claim 7, characterized in that, Step 5, which describes the service restoration process, includes: Service restoration will proceed in reverse chronological order, as follows: Level 2 service circuit breaker recovery, Level 1 service circuit breaker recovery, Level 2 service flow control, and Level 1 service flow control.

9. A microservice dynamic governance system for a distributed computing power network call chain, characterized in that, To implement the method of any one of claims 1-8, comprising: The configuration module is used to configure the service assurance level and set the service governance trigger conditions; The data acquisition module is used to acquire data and preprocess it. The risk prediction module is used to predict risks based on the preprocessed data output by the data acquisition module. The service governance module performs service governance based on risk prediction results and restores services after the service governance is completed.

Citation Information

Patent Citations

  • Problem prediction method for micro-service network, computer equipment and storage medium

    CN113824590A

  • Micro-service governance method and device and electronic equipment

    CN119109749A