Cloud platform repairing method and device, equipment and medium
Through multi-logical area architecture and machine learning algorithm model, automatic repair and resource management of cloud platforms are realized, and resource saturation and performance bottlenecks under a single database architecture are solved, improving operation and maintenance efficiency and system stability.
Patent Information
- Application Number
- CN202411339569.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2024-12-27
AI Technical Summary
The existing cloud platform health inspection mechanisms are mostly single database architectures. When the data volume is large, resources are oversaturated or performance bottlenecks occur, making it difficult to effectively manage and maintain.
Using a multi-logical area architecture, we obtain information on various services, conduct health detection, and use machine learning algorithm models to predict resource usage trends and failure probability, realize cross-region resource allocation and internal repair, and automatically perform repair operations.
It improves the operation and maintenance efficiency of the cloud platform and the continuity of business processing, reduces the risk of single point failure, improves the scalability and performance of the system, and realizes efficient resource utilization and fault isolation.
Smart Images

Figure CN119201528A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud platform technology, and in particular to a cloud platform repair method, device, equipment and medium. Background Art
[0002] Currently, the cloud platform health check mechanism uses liveness probes and readiness probes to check whether the container is running normally, and makes corresponding decisions based on the test results, such as restarting unhealthy containers or removing them from the service list; cloud service providers include comprehensive health check and self-healing mechanisms, such as triggering system events of EC2 instances, generating AZ health status reports, and automatically replacing unhealthy instances; and monitoring tools support real-time health checks on various services and trigger alarms through custom rules;
[0003] However, the existing cloud platform inspection mechanisms are mostly single database architectures. When the amount of data is large, the resources will be over-saturated or performance will reach a bottleneck. Summary of the invention
[0004] In order to overcome the above technical defects, the purpose of this application is to provide a cloud platform repair method, device, equipment and medium, the method comprising: obtaining multiple service information of any logical area, wherein the services include computing coordination services, computing engine services, databases, and message queues; performing health checks on each service information of the logical area; predicting the resource usage trend and failure probability of the logical area based on the health check data of each service information of the logical area and a machine learning algorithm model; automatically repairing the logical area based on the prediction result type of the logical area, wherein the automatic repair includes resource allocation across logical areas and repair within the logical area. This application can greatly improve the operation and maintenance efficiency of the cloud platform and the continuity of business processing.
[0005] The specific technical solutions provided by the embodiments of this application are as follows:
[0006] In a first aspect, the present application provides a cloud platform repair method, the method being applied to a cloud platform distributed system, the system comprising a plurality of logical areas, the method comprising:
[0007] Acquire multiple service information of any logical area, wherein the services include computing coordination service, computing engine service, database, and message queue;
[0008] Performing health check on each service information of the logical area;
[0009] Predicting resource usage trends and failure occurrence probabilities of the logical area based on health detection data of each service information of the logical area and a machine learning algorithm model;
[0010] The logical area is automatically repaired according to the prediction result type of the logical area, wherein the automatic repair includes resource allocation across logical areas and repair within the logical area.
[0011] In one embodiment, before acquiring multiple service information of any logical area, the method includes:
[0012] Initialize and set the computing coordination service, computing engine service, database, and message queue objects.
[0013] In one embodiment, the performing health detection on each service information of the logical area includes:
[0014] Detecting the event execution time, service status, and computing node resource utilization rate of the computing engine service;
[0015] Detecting the event execution time of the computing coordination service;
[0016] Detecting the connection pool status and transaction log of the database;
[0017] The number of unprocessed messages in the message queue and the average delay time of message processing are detected.
[0018] In one embodiment, the machine learning algorithm model is a long short-term memory network model, which includes an input gate, a forget gate, an output gate, and a cell state. The prediction of the resource usage trend and the probability of failure of the logical area based on the health detection data of each service information of the logical area and the machine learning algorithm model includes:
[0019] Obtain health detection indicator data of each service information of the logical area;
[0020] A time series data set X=[x1, x2, ..., x t ], where x t is the feature vector at time step t;
[0021] Get the activation function σ, the weight matrix W of the input gate ix and W ih , the bias term b of the input gate i , the hidden state h of the previous time step t-1 , where Wix is the feature vector x corresponding to time step t t The input gate weight matrix, W ih is the hidden state h corresponding to the previous time step t-1 The input gate weight matrix of
[0022] By calculating the formula: t =σ(W ix x t +W ih h t-1 +b i ), calculate the input gate i t ;
[0023] Get the weight matrix W of the forget gate fx and W fh , forget the bias term b of the gate f , where W fx is the feature vector x corresponding to time step t t The forget gate weight matrix, W fh is the hidden state h corresponding to the previous time step t-1 The forget gate weight matrix;
[0024] By calculating the formula: t =σ(W fx x t +W fh h t-1 +b f ), calculate the forget gate f t ;
[0025] Get the weight matrix W of the candidate cell state cx and W ch , the bias term b of the candidate cell state c , where W cx is the feature vector x corresponding to time step t t The candidate cell state weight matrix, W ch is the hidden state h corresponding to the previous time step t-1 The candidate cell state weight matrix;
[0026] By calculating the formula: C t' =tanh(W cx x t +W ch h t-1 +b c ), calculate the candidate cell state value C t' ;
[0027] Get the cell state C at the previous time step t-1 ;
[0028] By calculating the formula: C t =f t ⊙C t-1 +i t ⊙C t' , calculate the cell state update value C t ;
[0029] Get the weight matrix W of the output gate ot and W oh , the bias term b of the output gate o , where W ot is the feature vector x corresponding to time step t t The output gate weight matrix, W oh is the hidden state h corresponding to the previous time step t-1 The output gate weight matrix of
[0030] By calculating the formula: t =σ(W ox x t +W oh h t-1 +b o ), calculate the output gate o t ;
[0031] By calculating the formula: h t =o t ⊙tanh(C t ) Calculate the hidden state value h t .
[0032] In one embodiment, after calculating the hidden state value, the following steps are performed:
[0033] Get the weight matrix W of the fully connected layer y , target variable bias term b y , hidden state value h t ;
[0034] By calculation formula: Compute the predicted target variable at time step t
[0035] The predicted target variables include resource usage trends and failure occurrence probabilities of the logic areas.
[0036] In one embodiment, automatically repairing the logic area according to the prediction result type of the logic area includes:
[0037] When it is predicted that the processor usage of the logical area is close to a first preset value or the memory space usage is close to a second preset value, resources are allocated between the logical areas or the computing nodes of the logical areas are expanded, and the expanded computing nodes are detected;
[0038] When it is predicted that the logical area will fail, data migration is performed across the logical areas or the failed service of the logical area is restarted;
[0039] When it is predicted that the processing quality of any logical area will be degraded, the number of process pool threads of the corresponding logical area is increased to improve the concurrency capability of the corresponding logical area.
[0040] In one of the embodiments, after automatically repairing the logic area according to the prediction result type of the logic area, the method includes:
[0041] Re-check the health of each service information of the logical area;
[0042] Determine the health check result of each service in the logical area;
[0043] The judging of the health re-detection result of each service in the logical area includes:
[0044] Determine whether the health re-test result of each service in the logical area meets the preset requirements;
[0045] In response to each service re-health detection result of the logic area meeting the preset requirements, the automatic repair result of the logic area is sent to the database;
[0046] In response to any service re-health check result of the logical area not meeting the preset requirements, a log of health check, predictive analysis and repair processing is recorded, an early warning is sent and a maintenance personnel is notified to manually process;
[0047] After automatically repairing the logic area according to the prediction result type of the logic area, the method further includes:
[0048] The cloud platform health detection, prediction and repair process is optimized based on the automatic repair results of the logical area.
[0049] In a second aspect, the present application further provides a cloud platform repair device, the device is applied to a cloud platform distributed system, the system includes multiple logical areas, and the device includes:
[0050] An acquisition module, used to acquire multiple service information of any logical area, wherein the services include computing coordination service, computing engine service, database, and message queue;
[0051] A detection module, used for performing health detection on each service information of the logical area;
[0052] A prediction module, used to predict the resource usage trend and failure probability of the logical area according to the health detection data of each service information of the logical area and the machine learning algorithm model;
[0053] A repair module is used to automatically repair the logic area according to the prediction result type of the logic area, wherein the automatic repair includes resource allocation across logic areas and repair within the logic area.
[0054] In a third aspect, a cloud platform repair device is also provided, including:
[0055] one or more processors;
[0056] A storage device for storing one or more programs;
[0057] When the one or more programs are executed by the one or more processors, the one or more processors implement the cloud platform repair method as described in any one of the first aspects.
[0058] In a fourth aspect, the present application further provides a computer device, the device comprising:
[0059] A memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the cloud platform repair method as described in any one of the first aspects.
[0060] In a fifth aspect, the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the cloud platform repair method described in any one of the first aspects.
[0061] In a sixth aspect, the present application further provides a computer storage medium, the medium comprising:
[0062] A computer program is stored thereon, and when the computer program is executed by a processor, the steps of the cloud platform repair method described in any one of the first aspects are implemented.
[0063] Compared with the prior art, the method described in the technical solution provided in the embodiment of the present application includes: obtaining multiple service information of any logical area, wherein the services include computing coordination services, computing engine services, databases, and message queues; performing health checks on each service information of the logical area; predicting the resource usage trend and failure probability of the logical area based on the health check data of each service information of the logical area and the machine learning algorithm model; and automatically repairing the logical area based on the prediction result type of the logical area, wherein the automatic repair includes resource allocation across logical areas and repair within the logical area. The present application can greatly improve the operation and maintenance efficiency of the cloud platform and the continuity of business processing.
[0064] The technical solution provided in the embodiments of the present application can improve the scalability and performance of the system and reduce the risk of single point failure of the entire system; by using a multi-cell (logical area) architecture, computing services can better meet the needs of large-scale deployment and improve the availability and stability of the system; at the same time, the multi-cell architecture is also conducive to management and maintenance, and each cell can be independently expanded and managed according to needs.
[0065] The technical solution provided in the embodiment of the present application can monitor the resource usage of each Cell in real time, including computing resources (CPU, memory), to ensure that resources are used efficiently and avoid over-saturation or idleness; the prediction service can predict future resource requirements based on historical data and real-time load conditions, and dynamically adjust resource allocation to achieve on-demand allocation and scaling of resources; at the same time, the multi-Cell architecture provides fault isolation capabilities, and the failure of a Cell will not directly affect other Cells, thereby improving the fault tolerance of the entire cloud environment; health checks combined with scheduling strategies can schedule new virtual machine instances to cells with sufficient resources and good health, achieving load balancing and avoiding hot spots.
[0066] The regular health check mechanism of the technical solution provided in the embodiment of the present application helps to timely discover potential faults, such as hardware failures, service process abnormalities, network interruptions, etc., so as to intervene at the beginning of the problem and reduce the risk of system downtime and business interruption; the automatic repair mechanism can be started immediately when a problem is detected, such as automatically migrating virtual machines online to computing nodes of healthy cells, restarting failed services, etc., to ensure service continuity; through automated health checks and repair services, the need for manual intervention is reduced, and the difficulty and labor costs of operation and maintenance are reduced; at the same time, predictive maintenance can plan resource changes in advance, reduce the cost of emergency response, and avoid the negative impact of sudden failures.
[0067] The technical solution provided in the embodiment of the present application ensures the performance and response time of cloud services, improves tenant experience and customer satisfaction through fine-grained control and management of resources and service status; at the same time, the multi-Cell environment can be more easily expanded horizontally, and new Cells can be seamlessly added to the existing architecture. Health checks and automatic repair mechanisms can also be expanded accordingly to ensure unified management in large-scale environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0069] Figure 1 A structural diagram of the cloud platform distributed system provided in Example 1 of the present application;
[0070] Figure 2 A first flow chart of the cloud platform repair method provided in Embodiment 1 of the present application;
[0071] Figure 3 A second flow chart of the cloud platform repair method provided in Embodiment 2 of the present application;
[0072] Figure 4 A structural diagram of a cloud platform repair device provided in Example 3 of the present application;
[0073] Figure 5 The exemplary system provided for Embodiment 7 of the present application can be used to implement the various embodiments described in the present application. DETAILED DESCRIPTION
[0074] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0075] It should be noted that, unless the context clearly requires otherwise, words such as “include”, “including” and similar words throughout the specification and claims should be interpreted as including rather than exclusive or exhaustive; that is, the meaning is “including but not limited to”.
[0076] Furthermore, in the description of the present application, unless otherwise specified, “plurality” means two or more.
[0077] In the multi-unit Cell architecture of the cloud platform, a sound health check, fault prediction and automatic repair mechanism is designed to ensure that each Cell in the entire cloud environment can operate normally, thereby improving the reliability of the entire system.
[0078] Resource monitoring and fault detection: In a cloud computing environment, it is crucial to monitor the status of services in each cell in real time, including but not limited to computing engine services, computing coordination services, databases, message queues, etc., to ensure that each service can respond to requests and process tasks normally;
[0079] Distributed system health check: The multi-cell architecture is a distributed system. The health check mechanism draws on common node health monitoring technologies in distributed systems, such as heartbeat detection, service status query, and performance indicator monitoring.
[0080] Automatic fault recovery: When a cell is detected to be unhealthy, the health check mechanism can respond quickly and start the fault recovery process, such as automatically restarting the service, migrating the virtual machine to a healthy cell, updating the service status, etc.
[0081] Embodiment 1
[0082] The present application embodiment provides a cloud platform repair method, such as Figure 1 , 2 As shown, the method is applied to a cloud platform distributed system, the system includes multiple logical areas, and the method includes:
[0083] Acquire multiple service information of any logical area, wherein the services include computing coordination service, computing engine service, database, and message queue;
[0084] Performing health check on each service information of the logical area;
[0085] Predicting resource usage trends and failure occurrence probabilities of the logical area based on health detection data of each service information of the logical area and a machine learning algorithm model;
[0086] The logical area is automatically repaired according to the prediction result type of the logical area, wherein the automatic repair includes resource allocation across logical areas and repair within the logical area.
[0087] Specifically, in the cloud platform scenario, Multi-cell is an architectural design used to solve the performance bottleneck problem of a single database and a single message queue during large-scale deployment. In the multi-cell architecture, the entire cloud environment is divided into multiple logical areas called "cells". Each cell includes its own database and message queue, as well as a group of computing nodes.
[0088] This application designs a component for health check, fault prediction, and automatic repair of multi-cell in the cloud platform. The component includes the following four basic services:
[0089] (1) Health check: Regularly check the core services in each cell, including the connection status, response time, and resource usage of computing coordination services, computing engine services, databases, message queues, etc.; obtain the detailed status of each service of the computing component through API calls, and combine the computing engine service in the cell to connect to the storage, and the computing engine service performs a health assessment of the host hardware status.
[0090] (2) Predictive analysis: Based on the historical report data and real-time monitoring indicators of the health check module, machine learning algorithms are used to analyze patterns and build predictive models to predict potential failure risks. For example, the quality of the computing sub-service is predicted to degrade, which means that the processing time of similar events on this service is getting longer and longer.
[0091] (3) Automatic repair and optimization: When an unhealthy state is detected in a Cell, the corresponding emergency repair actions are automatically triggered according to the preset strategy, such as restarting the service, migrating the virtual machine to other healthy Cells, etc.; if potential risks are predicted, defensive maintenance can be automatically performed according to the actual situation, such as expanding the capacity of computing nodes in advance, increasing the number of computing component workers, etc.
[0092] (4) Notification and logging: Real-time notification. When a health check finds a problem, an alert is immediately sent to the operation and maintenance team, providing a detailed diagnostic report and recommended action plan; recording relevant logs of all health checks, predictions, and repair activities to facilitate subsequent audits and fault analysis.
[0093] This application can combine the existing health detection methods with the resource organization form unique to the multi-cell architecture of cloud platform computing components to achieve cross-cell optimized resource allocation and autonomous repair within the cell, forming a set of solutions that are adaptable to the robustness and self-healing of large-scale distributed cloud computing environments.
[0094] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0095] This application can greatly improve the operation and maintenance efficiency of the cloud platform and the continuity of business processing.
[0096] The technical solution provided in the embodiments of the present application can improve the scalability and performance of the system and reduce the risk of single point failure of the entire system; by using a multi-cell (logical area) architecture, computing services can better meet the needs of large-scale deployment and improve the availability and stability of the system; at the same time, the multi-cell architecture is also conducive to management and maintenance, and each cell can be independently expanded and managed according to needs.
[0097] The technical solution provided in the embodiment of the present application can monitor the resource usage of each Cell in real time, including computing resources (CPU, memory), to ensure that resources are used efficiently and avoid over-saturation or idleness; the prediction service can predict future resource requirements based on historical data and real-time load conditions, and dynamically adjust resource allocation to achieve on-demand allocation and scaling of resources; at the same time, the multi-Cell architecture provides fault isolation capabilities, and the failure of a Cell will not directly affect other Cells, thereby improving the fault tolerance of the entire cloud environment; health checks combined with scheduling strategies can schedule new virtual machine instances to cells with sufficient resources and good health, achieving load balancing and avoiding hot spots.
[0098] Embodiment 2
[0099] The present application embodiment provides a cloud platform repair method, such as Figure 3 As shown, the method includes:
[0100] Step S01, initializing and setting the computing coordination service, computing engine service, database, and message queue objects.
[0101] Step S02, obtaining multiple service information of any logical area, wherein the services include computing coordination service, computing engine service, database, and message queue;
[0102] Perform health check on each service information of the logical area.
[0103] Step S02 also includes:
[0104] Step S021, detecting the event execution time, service status and computing node resource utilization rate of the computing engine service;
[0105] Detecting the event execution time of the computing coordination service;
[0106] Detecting the connection pool status and transaction log of the database;
[0107] The number of unprocessed messages in the message queue and the average delay time of message processing are detected.
[0108] Specifically, check the computing API service: check the API response time and concurrent processing capability, perform health checks on each Cell: obtain basic Cell information;
[0109] Check the Compute Engine service:
[0110] Record event execution time, check computing engine service status, and computing node resource utilization;
[0111] Check the compute coordination service:
[0112] Record the event execution time;
[0113] Check the message queue and database services:
[0114] Check the status of the database connection pool and the transaction log to confirm whether there are any uncommitted or unrolled transactions; query the number of unprocessed messages in the message queue and check the average delay from message sending to message processing.
[0115] The inspection results are stored in the database.
[0116] Step S03: predicting the resource usage trend and failure probability of the logical area based on the health detection data of each service information of the logical area and the machine learning algorithm model.
[0117] Specifically, the inspection results in the database are analyzed to predict resource usage trends:
[0118] Apply LSTM model (Long Short-Term Memory Network model) to predict future load;
[0119] Predict the probability of failure:
[0120] Apply LSTM model to make predictions based on historical fault data and current status.
[0121] Step S03 also includes:
[0122] Step S031, obtaining health detection indicator data of each service information of the logical area;
[0123] A time series data set X=[x1, x2, ..., x t ], where x t is the feature vector at time step t;
[0124] Get the activation function σ, the weight matrix W of the input gate ix and W ih , the bias term b of the input gate i , the hidden state h of the previous time stept-1 , where W ix is the feature vector x corresponding to time step t t The input gate weight matrix, W ih is the hidden state h corresponding to the previous time step t-1 The input gate weight matrix of
[0125] By calculating the formula: t =σ(W ix x t +W ih h t-1 +b i ), calculate the input gate i t ;
[0126] Get the weight matrix W of the forget gate fx and W fh , forget the bias term b of the gate f , where W fx is the feature vector x corresponding to time step t t The forget gate weight matrix, W fh is the hidden state h corresponding to the previous time step t-1 The forget gate weight matrix;
[0127] By calculating the formula: t =σ(W fx x t +W fh h t-1 +b f ), calculate the forget gate f t ;
[0128] Get the weight matrix W of the candidate cell state cx and W ch , the bias term b of the candidate cell state c , where W cx is the feature vector x corresponding to time step t t The candidate cell state weight matrix, W ch is the hidden state h corresponding to the previous time step t-1 The candidate cell state weight matrix;
[0129] By calculating the formula: C t' =tanh(W cx x t +W ch h t-1 +b c ), calculate the candidate cell state value C t' ;
[0130] Get the cell state C at the previous time stept-1 ;
[0131] By calculating the formula: C t =f t ⊙C t-1 +i t ⊙C t' , calculate the cell state update value C t ;
[0132] Get the weight matrix W of the output gate ot and W oh , the bias term b of the output gate o , where W ot is the feature vector x corresponding to time step t t The output gate weight matrix, W oh is the hidden state h corresponding to the previous time step t-1 The output gate weight matrix of
[0133] By calculating the formula: t =σ(W ox x t +W oh h t-1 +b o ), calculate the output gate o t ;
[0134] By calculating the formula: h t =o t ⊙tanh(C t ) Calculate the hidden state value h t .
[0135] Specifically, for the resource usage trend prediction and fault probability prediction in the multi-cell environment of cloud platform computing components, the LSTM long short-term memory network model is used here, which is good at handling time series prediction problems.
[0136] Collect a series of indicators related to the health evaluation of the multi-cell system, such as the database connection success rate, event processing time, API response time, message queue length, computing node CPU usage, memory usage, etc., and construct these data into a time series data set X = [x1, x2, ..., x t ], where x t It refers to the relevant indicators (or feature vectors) in time period t (or time step t); the LSTM model processes time series information through four main gating units (input gate, forget gate, output gate and cell state).
[0137] 1. Input Gate t):i t =σ(W ix x t +W ih h t-1 +b i )
[0138] Among them, σ is the Sigmoid function, which is used to determine how much new information will be stored in the cell state; W ix and W ih is the weight matrix of the input gate, b i is the bias term of the input gate, x t is the input of the current time, h t-1 It is the hidden state at the previous time.
[0139] Here, each cell is regarded as a memory unit in the LSTM model, and the health check service is the function of the input gate. It regularly checks various services in the cell (such as computing coordination services, computing engine services, database services, and message queues, etc.) and evaluates the health status, that is, it decides which information (that is, service status) is important and needs to be "remembered".
[0140] The "memory" here refers to recording status data that is useful for predicting system health. During the health check process, the input gate mechanism is reflected in selecting the most critical indicators for current and future predictions from a large amount of real-time monitoring data; for example, abnormal indicators such as a sudden increase in CPU usage and prolonged API response time may indicate changes in the health of the system and should be "closely concerned" (i.e., given a higher weight).
[0141] The weight matrix W of the input gate ix , W ih and the bias term b i These are rules that are constantly adjusted based on historical data and real-time feedback, which determine which indicators are most critical to assessing health status at a specific point in time. For example, historical data shows that during peak hours, message queue length is more important than usual, and the system should dynamically adjust to give this indicator more weight.
[0142] The concept of input gate can be understood as an intelligent screening and priority setting mechanism that can help the cloud platform quickly identify and respond to information that is critical to maintaining system health and performance in the complex environment of multi-cell architecture, thereby achieving efficient and proactive resource management and fault prevention.
[0143] 2. Forget Gate (ft): f t =σ(W fx x t +W fh h t-1+b f )
[0144] The parameters of the forget gate have the following meanings:
[0145] Input data (x t ): Input data of the current time step, which contains new information (database connection success rate in the most recent time step, event processing time, API response time, message queue length, computing node CPU usage, memory usage, etc.), which is used to update the state of the LSTM model unit.
[0146] The hidden state at the previous time step (h t-1 ): The LSTM output of the previous time step is used as one of the inputs of the current time step to help the model understand the context information of the sequence;
[0147] W fx : The forget gate weight matrix corresponding to the feature vector, which is used to convert the input data of the current time step into a forget-related signal;
[0148] W fh : The forget gate weight matrix corresponding to the hidden state is used to convert the hidden state of the previous time step into a signal related to forgetting;
[0149] b f : The bias term of the forget gate, which is a vector used to adjust the output of the forget gate.
[0150] Forget the door t ): Calculated by a sigmoid function, it ranges from 0 to 1 and indicates the degree to which each cell state unit retains the previous state.
[0151] In the LSTM model, the forget gate determines how much old information will be discarded from the cell state. Each cell is a memory unit in the LSTM model and needs to continuously evaluate and optimize the stored historical information. The resource management mechanism under the multi-cell architecture is designed to automatically "forget" resource status data that is no longer critical to avoid them misleading resource prediction and automatic repair decisions.
[0152] 3. Cell State Candidate, C t' ): C t' =tanh(W cx x t +W ch h t-1 +b c )
[0153] The candidate cell state is combined with the input data x at the current time step tand the hidden state h at the previous time step t-1 , after a series of linear transformations (here is the weight matrix W of the candidate cell state cx , W ch and the bias term b c multiplication) and nonlinear transformation (using tanh function); this process can be regarded as the process of creating new knowledge, where the tanh function ensures that the candidate state C t' The value range of is between (-1,1), representing the possible range of new information.
[0154] The candidate cell state is the "potential change" when the system health status is updated. Specifically, the resource usage data (such as CPU usage, memory usage, etc.) collected at each time step (such as every hour, every day) can be regarded as new information, which is equivalent to the "new knowledge" in the candidate cell state. These data reflect the immediate changes in the system state and need to be evaluated and integrated into the understanding of the system health status.
[0155] Finally, the candidate cell state value C t' represents the new information that the model thinks may need to be added to long-term memory at the current time step; however, whether and to what extent it is added to the actual cell state C t In the process, it is also necessary to pass the input gate i t And forget the door t is determined by the control.
[0156] 4. Cell State Update (Cell State, C t ): C t =f t ⊙C t-1 +i t ⊙C t'
[0157] Here ⊙ represents element-by-element multiplication, forget gate f t The cell state C at the previous time step t-1 Subtract after multiplication to achieve the forgetting of old information; and the input gate i t With the candidate cell state C t' Multiplication followed by addition enables the addition of new information.
[0158] 5. Output Gate t ): o t =σ(W ox x t +W oh h t-1 +b o )
[0159] The meanings of the parameters of the output gate are as follows:
[0160] o t represents the output of the output gate at time step t, which is a set of values between 0 and 1, determining which parts of the cell state should be used to generate the hidden state h of the current time step t ;
[0161] σ is the Sigmoid activation function, which maps the input to the (0,1) interval to generate the gating signal;
[0162] W ox , W oh is the weight matrix associated with the output gate, which determines the input x at the current time step t and the hidden state h at the previous time step t-1 How to convert to the signal of the output gate;
[0163] h t-1 Represents the hidden state value of the previous time step;
[0164] b o It is the bias term of the output gate, which is used to adjust the output of the output gate.
[0165] The output gate determines the cell state C t Which information should be output to the hidden state h t And pass it to the next step or as a prediction output; a series of values between 0 and 1 are calculated through the Sigmoid function, which represent the importance of the output of each dimension of information in the cell state; 0 means no output at all, and 1 means full output; in the resource management scenario of the multi-cell architecture, this is equivalent to dynamically determining which resource usage indicators (such as CPU usage, memory usage, API response time, etc.) are most critical to the system health prediction at the current time point. For example, if it is found that the API response time in the current period has a significant impact on the user experience, the related cell state information will be given a higher output weight.
[0166] 6. Hidden State,h t ):h t =o t ⊙tanh(C t )
[0167] Here, h t represents the hidden state value at the current time step t, o t is the output of the output gate, a vector between 0 and 1, which determines the cell state C t Which parts of C should be used to construct the current hidden state, ⊙ represents the element-by-element multiplication operation, tanh(C t) Change the cell state C t The hyperbolic tangent function is used to convert the cell state to a range between (-1, 1). The purpose is to compress the cell state value into a range suitable for calculation while retaining its relative difference.
[0168] That is, the hidden state value integrates the information of the cell state and is filtered through the output gate. It is the core part of the LSTM model and is used for the next step of calculation and the final prediction output.
[0169] Step S032, obtain the weight matrix W of the fully connected layer y , target variable bias term b y , hidden state value h t ;
[0170] By calculation formula: Compute the predicted target variable at time step t
[0171] The predicted target variables include resource usage trends and failure occurrence probabilities of the logic areas.
[0172] Specifically, for the prediction of database connection success rate, API response time, event execution time, message queue length or resource usage trend, the hidden state value h t Transformed through a fully connected layer (Dense Layer) to obtain the predicted value
[0173]
[0174] Among them, W y is the weight matrix of the fully connected layer, b y is the target variable bias term, Represents the prediction result at time step t.
[0175] During the training process, the learning model minimizes the predicted value With the actual value y t The difference between them (such as using mean square error MSE as the loss function) is used to learn the optimal values of the weight matrix and bias term, so as to achieve accurate prediction of time series data; when the model predicts that a certain indicator data exceeds the preset threshold, the early warning mechanism is triggered, the automatic processing procedure is started and the operation and maintenance personnel are notified.
[0176] In summary, the LSTM model is applied to learn and predict the time series trend of the health status of the multi-cell system of the cloud platform, so as to discover risk points in advance and guide the implementation of defensive measures.
[0177] Step S04: automatically repairing the logic area according to the prediction result type of the logic area, wherein the automatic repairing includes resource allocation across logic areas and repairing within the logic area.
[0178] Step S04 also includes:
[0179] Step S041, when it is predicted that the processor usage of the logical area is close to the first preset value or the memory space usage is close to the second preset value, resources are allocated between the logical areas or the computing nodes of the logical area are expanded, and the expanded computing nodes are detected;
[0180] When it is predicted that the logical area will fail, data migration is performed across the logical areas or the failed service of the logical area is restarted;
[0181] When it is predicted that the processing quality of any logical area will be degraded, the number of process pool threads of the corresponding logical area is increased to improve the concurrency capability of the corresponding logical area.
[0182] Specifically, make decisions based on the prediction results:
[0183] If the resource exhaustion of the logical area is predicted to be imminent:
[0184] Trigger the denial operation of the user's new virtual machine to the cell, and allocate the new virtual machine to the cell with lower load, so as to achieve more even resource allocation;
[0185] Or trigger the execution of dynamic adjustment of computing node expansion in the cell;
[0186] If a failure in the logical area is predicted to occur:
[0187] Triggering preventive measures: such as online migration of VMs across cells, restarting high-risk services, etc.
[0188] If a computing component is predicted to have service degradation:
[0189] Trigger execution to increase the number of workers of the corresponding computing component, that is, the number of threads in the process pool, to improve concurrency capabilities and increase the number of consumer workers to cope with message backlogs in the message queue.
[0190] Understandably, the criteria and process for determining resource exhaustion rely heavily on real-time monitoring and data analysis;
[0191] The criteria for judging resource exhaustion include: 1. CPU utilization rate CPU Utilization continues to be close to 100% (first preset value) and there is no downward trend for a period of time, which means that CPU resources are close to saturation; 2. Physical memory and virtual memory Memory Usage (such as swap) are close to 90% (second preset value), indicating that memory resources are exhausted; 3. Storage space utilization rate exceeds 95%, and the remaining space is insufficient to support daily operations and sudden data growth. Disk I / O latency increases by 25%, indicating that storage IO performance has declined;
[0192] The process of judging resource exhaustion and automatically handling it:
[0193] 1. Use Prometheus to regularly capture key indicators and visualize the resource usage in each Cell, and store the indicator data in a time series database for subsequent data analysis;
[0194] 2. When it is detected that any resource reaches the usage threshold of each indicator set in the criteria for judging resource exhaustion, an alarm is triggered and the specific time and context log are recorded;
[0195] 3. Trigger the denial operation of the user's new virtual machine to the cell, and allocate the virtual machine to the cell with lower load, so as to achieve more even resource allocation;
[0196] 4. Trigger the execution of dynamic adjustment of the computing node expansion in the cell, determine the number of computing nodes to be expanded based on the principle of maintaining load balancing among cells, select the computing nodes of different specifications, and allocate the required computing nodes from the backup host pool;
[0197] 5. Start the new node, configure network and security settings, install the necessary computing engine services and virtual machine console services, incorporate it into the corresponding cell, and participate in the creation of virtual machines. After the expansion is completed, perform a node health check to ensure that the new node is working properly.
[0198] Step S05, re-performing health check on each service information of the logical area;
[0199] Determine the health check result of each service in the logical area;
[0200] The judging of the health re-detection result of each service in the logical area includes:
[0201] Determine whether the health re-test result of each service in the logical area meets the preset requirements;
[0202] In response to each service re-health detection result of the logic area meeting the preset requirements, the automatic repair result of the logic area is sent to the database;
[0203] In response to any service re-health check result of the logical area not meeting the preset requirements, a log of health check, predictive analysis and repair processing is recorded, an early warning is sent and a maintenance personnel is notified to manually process;
[0204] After automatically repairing the logic area according to the prediction result type of the logic area, the method further includes:
[0205] The cloud platform health detection, prediction and repair process is optimized based on the automatic repair results of the logical area.
[0206] Specifically, after executing the repair operation, perform a health check again to verify whether the repair result meets expectations, and update the repair result and status back to the database. If the repair is unsuccessful or there are still problems, notify the operation and maintenance personnel to intervene.
[0207] The return cycle starts, waiting for a new round of health check, prediction and repair process, and optimizing the cloud platform health check, prediction and repair process according to the automatic repair result of the logic area.
[0208] The health check, fault prediction and automatic repair mechanism under the multi-cell architecture of the cloud platform in this application are mainly reflected in the following aspects:
[0209] Dynamic health check mechanism: A flexible and real-time health check mechanism is introduced to monitor the computing resource services of each Cell in real time to ensure the healthy operation of the entire cloud environment;
[0210] Predictive resource scheduling: This mechanism can be flexibly matched with advanced prediction algorithms to predict future resource requirements based on historical data and real-time load analysis, thereby achieving forward-looking resource scheduling and dynamic scaling, effectively avoiding resource bottlenecks and over-configuration;
[0211] Intelligent fault prediction: It can predict potential hardware failures, service interruptions, etc. in advance, significantly improving the system's predictability and self-healing capabilities;
[0212] Proactive fault response and repair: Based on the current status of the inspection, an automated repair process is designed, including but not limited to automatic migration of virtual machines, restart of services, load balancing, etc., which greatly shortens the fault recovery time, improves system reliability, and ensures user business continuity;
[0213] Combination of global optimization and local autonomy: At the global level, the computing scheduling service can perform optimal instance allocation across multiple cells; and within the cell, a certain degree of autonomy can be achieved. That is, when a cell fails, it can be repaired independently of other cells, maintaining the overall stability and flexibility of the entire cloud environment;
[0214] Adaptive optimization algorithm: Health check and repair strategies that are constantly improved in practice enable the entire platform to always maintain the best operating status when facing changing business needs and resource constraints;
[0215] This application greatly improves the scalability, availability and resource management efficiency of cloud platform computing components in large-scale cloud computing environments, providing users with a more robust and efficient cloud service infrastructure.
[0216] Therefore, the health check, prediction and automatic repair service technology solutions of cloud platform computing components in a multi-cell environment are crucial to building a stable, scalable and highly available cloud computing environment, which greatly improves the operation and maintenance efficiency and business continuity of the cloud platform.
[0217] In addition, the predicting of the resource usage trend and the probability of failure occurrence of the logic area by the machine learning algorithm model further includes:
[0218] Collect historical data about the cell, including past failure events and related information;
[0219] Remove missing values, outliers and duplicate data, and encode non-numeric data into numeric data;
[0220] Use correlation analysis and principal component analysis (PCA) to identify features that are helpful for prediction;
[0221] If the purpose is to predict resource usage trends, a regression model may be selected; if the purpose is to predict the probability of a failure, a classification model may be required, wherein the model includes linear regression, decision tree, random forest, support vector machine (SVM), neural network model;
[0222] Divide the dataset into training and test sets, use the training set to train the model, and use cross-validation to evaluate the model performance;
[0223] By evaluating the model on the test set;
[0224] Apply the trained model to predict future data;
[0225] Integrate into the production environment to monitor the status of cells in real time and make predictions;
[0226] Update the model regularly and retrain it using newly collected data to adapt to new changes.
[0227] Throughout the process, data security and privacy protection need to be ensured, especially when sensitive information is involved; in addition, given the dynamic nature of cell resource usage, the model needs to be updated regularly to maintain its accuracy.
[0228] In practical applications, such as in the operation and maintenance of data centers, by analyzing the challenges faced by traditional operation and maintenance and the opportunities brought by machine learning, an effective fault prediction model can be built, including data collection, feature engineering, model selection and evaluation.
[0229] As mentioned above, the machine learning algorithm model can be effectively used to predict the resource usage trend and failure probability of the cell, thereby improving the stability and efficiency of the system.
[0230] The cloud platform repair method provided in the embodiment of the present application may be further improved and optimized without departing from the technical solution of the present application, and these improvements and optimizations should also be regarded as within the scope of protection of the present application.
[0231] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0232] This application can greatly improve the operation and maintenance efficiency of the cloud platform and the continuity of business processing.
[0233] The technical solution provided in the embodiments of the present application can improve the scalability and performance of the system and reduce the risk of single point failure of the entire system; by using a multi-cell (logical area) architecture, computing services can better meet the needs of large-scale deployment and improve the availability and stability of the system; at the same time, the multi-cell architecture is also conducive to management and maintenance, and each cell can be independently expanded and managed according to needs.
[0234] The technical solution provided in the embodiment of the present application ensures the performance and response time of cloud services, improves tenant experience and customer satisfaction through fine-grained control and management of resources and service status; at the same time, the multi-Cell environment can be more easily expanded horizontally, and new Cells can be seamlessly added to the existing architecture. Health checks and automatic repair mechanisms can also be expanded accordingly to ensure unified management in large-scale environments.
[0235] Embodiment 3
[0236] This application provides a cloud platform repair device, such as Figure 4 As shown, the device includes a setting module, an acquisition module, a detection module, a prediction module, a repair module, and a post-processing module.
[0237] In this embodiment, the acquisition module is used to acquire multiple service information of any logical area, wherein the services include computing coordination service, computing engine service, database, and message queue;
[0238] A detection module, used for performing health detection on each service information of the logical area;
[0239] A prediction module, used to predict the resource usage trend and failure probability of the logical area according to the health detection data of each service information of the logical area and the machine learning algorithm model;
[0240] A repair module is used to automatically repair the logic area according to the prediction result type of the logic area, wherein the automatic repair includes resource allocation across logic areas and repair within the logic area.
[0241] In one of the embodiments, the setting module is used to initialize the computing coordination service, computing engine service, database, and message queue object.
[0242] In one of the embodiments, the detection module is used to detect the event execution time, service status and computing node resource utilization rate of the computing engine service;
[0243] Detecting the event execution time of the computing coordination service;
[0244] Detecting the connection pool status and transaction log of the database;
[0245] The number of unprocessed messages in the message queue and the average delay time of message processing are detected.
[0246] In one of the embodiments, the prediction module is used to obtain health detection indicator data of each service information of the logical area;
[0247] A time series data set X=[x1, x2, ..., x t ], where x t is the feature vector at time step t;
[0248] Get the activation function σ, the weight matrix W of the input gate ix and W ih , the bias term b of the input gate i , the hidden state h of the previous time step t-1 , where W ix is the feature vector x corresponding to time step t t The input gate weight matrix, W ih is the hidden state h corresponding to the previous time step t-1 The input gate weight matrix of
[0249] By calculating the formula: t =σ(W ix x t +W ih h t-1 +bi ), calculate the input gate i t ;
[0250] Get the weight matrix W of the forget gate fx and W fh , forget the bias term b of the gate f , where W fx is the feature vector x corresponding to time step t t The forget gate weight matrix, W fh is the hidden state h corresponding to the previous time step t-1 The forget gate weight matrix;
[0251] By calculating the formula: t =σ(W fx x t +W fh h t-1 +b f ), calculate the forget gate f t ;
[0252] Get the weight matrix W of the candidate cell state cx and W ch , the bias term b of the candidate cell state c , where W cx is the feature vector x corresponding to time step t t The candidate cell state weight matrix, W ch is the hidden state h corresponding to the previous time step t-1 The candidate cell state weight matrix;
[0253] By calculating the formula: C t' =tanh(W cx x t +W ch h t-1 +b c ), calculate the candidate cell state value C t' ;
[0254] Get the cell state C at the previous time step t-1 ;
[0255] By calculating the formula: C t =f t ⊙C t-1 +i t ⊙C t' , calculate the cell state update value C t ;
[0256] Get the weight matrix W of the output gate ot and W oh , the bias term b of the output gate o, where W ot is the feature vector x corresponding to time step t t The output gate weight matrix, W oh is the hidden state h corresponding to the previous time step t-1 The output gate weight matrix of
[0257] By calculating the formula: t =σ(W ox x t +W oh h t-1 +b o ), calculate the output gate o t ;
[0258] By calculating the formula: h t =o t ⊙tanh(C t ) Calculate the hidden state value h t .
[0259] In one embodiment, the prediction module is used to obtain the weight matrix W of the fully connected layer. y , target variable bias term b y , hidden state value h t ;
[0260] By calculation formula: Compute the predicted target variable at time step t
[0261] The predicted target variables include resource usage trends and failure occurrence probabilities of the logic areas.
[0262] In one embodiment, the repair module is used to allocate resources between the logical areas or expand the computing nodes of the logical areas when it is predicted that the processor usage of the logical area is close to a first preset value or the memory space usage is close to a second preset value, and detect the expanded computing nodes;
[0263] When it is predicted that the logical area will fail, data migration is performed across the logical areas or the failed service of the logical area is restarted;
[0264] When it is predicted that the processing quality of any logical area will be degraded, the number of process pool threads of the corresponding logical area is increased to improve the concurrency capability of the corresponding logical area.
[0265] In one of the embodiments, the post-processing module is used to re-perform health detection on each service information of the logical area;
[0266] Determine the health check result of each service in the logical area;
[0267] The judging of the health re-detection result of each service in the logical area includes:
[0268] Determine whether the health re-test result of each service in the logical area meets the preset requirements;
[0269] In response to each service re-health detection result of the logic area meeting the preset requirements, the automatic repair result of the logic area is sent to the database;
[0270] In response to any service re-health check result of the logical area not meeting the preset requirements, a log of health check, predictive analysis and repair processing is recorded, an early warning is sent and a maintenance personnel is notified to manually process;
[0271] After automatically repairing the logic area according to the prediction result type of the logic area, the method further includes:
[0272] The cloud platform health detection, prediction and repair process is optimized based on the automatic repair results of the logical area.
[0273] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0274] The technical solution provided in the embodiment of the present application can monitor the resource usage of each Cell in real time, including computing resources (CPU, memory), to ensure that resources are used efficiently and avoid over-saturation or idleness; the prediction service can predict future resource requirements based on historical data and real-time load conditions, and dynamically adjust resource allocation to achieve on-demand allocation and scaling of resources; at the same time, the multi-Cell architecture provides fault isolation capabilities, and the failure of a Cell will not directly affect other Cells, thereby improving the fault tolerance of the entire cloud environment; health checks combined with scheduling strategies can schedule new virtual machine instances to cells with sufficient resources and good health, achieving load balancing and avoiding hot spots.
[0275] The technical solution provided in the embodiment of the present application ensures the performance and response time of cloud services, improves tenant experience and customer satisfaction through fine-grained control and management of resources and service status; at the same time, the multi-Cell environment can be more easily expanded horizontally, and new Cells can be seamlessly added to the existing architecture. Health checks and automatic repair mechanisms can also be expanded accordingly to ensure unified management in large-scale environments.
[0276] Embodiment 4
[0277] The present invention also provides a cloud platform repair device, comprising:
[0278] one or more processors;
[0279] A storage device for storing one or more programs;
[0280] When the one or more programs are executed by the one or more processors, the one or more processors execute the following cloud platform repair method:
[0281] Acquire multiple service information of any logical area, wherein the services include computing coordination service, computing engine service, database, and message queue;
[0282] Performing health check on each service information of the logical area;
[0283] Predicting resource usage trends and failure occurrence probabilities of the logical area based on health detection data of each service information of the logical area and a machine learning algorithm model;
[0284] The logical area is automatically repaired according to the prediction result type of the logical area, wherein the automatic repair includes resource allocation across logical areas and repair within the logical area.
[0285] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0286] This application can greatly improve the operation and maintenance efficiency of the cloud platform and the continuity of business processing.
[0287] The technical solution provided in the embodiments of the present application can improve the scalability and performance of the system and reduce the risk of single point failure of the entire system; by using a multi-cell (logical area) architecture, computing services can better meet the needs of large-scale deployment and improve the availability and stability of the system; at the same time, the multi-cell architecture is also conducive to management and maintenance, and each cell can be independently expanded and managed according to needs.
[0288] Embodiment 5
[0289] The present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following cloud platform repair method can be executed:
[0290] Acquire multiple service information of any logical area, wherein the services include computing coordination service, computing engine service, database, and message queue;
[0291] Performing health check on each service information of the logical area;
[0292] Predicting resource usage trends and failure occurrence probabilities of the logical area based on health detection data of each service information of the logical area and a machine learning algorithm model;
[0293] The logical area is automatically repaired according to the prediction result type of the logical area, wherein the automatic repair includes resource allocation across logical areas and repair within the logical area.
[0294] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0295] This application can greatly improve the operation and maintenance efficiency of the cloud platform and the continuity of business processing.
[0296] The technical solution provided in the embodiments of the present application can improve the scalability and performance of the system and reduce the risk of single point failure of the entire system; by using a multi-cell (logical area) architecture, computing services can better meet the needs of large-scale deployment and improve the availability and stability of the system; at the same time, the multi-cell architecture is also conducive to management and maintenance, and each cell can be independently expanded and managed according to needs.
[0297] Embodiment 6
[0298] The present application also provides a computer program product, including a computer program, which, when executed by a processor, can implement the following cloud platform repair method:
[0299] Acquire multiple service information of any logical area, wherein the services include computing coordination service, computing engine service, database, and message queue;
[0300] Performing health check on each service information of the logical area;
[0301] Predicting resource usage trends and failure occurrence probabilities of the logical area based on health detection data of each service information of the logical area and a machine learning algorithm model;
[0302] The logical area is automatically repaired according to the prediction result type of the logical area, wherein the automatic repair includes resource allocation across logical areas and repair within the logical area.
[0303] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0304] The regular health check mechanism of the technical solution provided in the embodiment of the present application helps to timely discover potential faults, such as hardware failures, service process abnormalities, network interruptions, etc., so as to intervene at the beginning of the problem and reduce the risk of system downtime and business interruption; the automatic repair mechanism can be started immediately when a problem is detected, such as automatically migrating virtual machines online to computing nodes of healthy cells, restarting failed services, etc., to ensure service continuity; through automated health checks and repair services, the need for manual intervention is reduced, and the difficulty and labor costs of operation and maintenance are reduced; at the same time, predictive maintenance can plan resource changes in advance, reduce the cost of emergency response, and avoid the negative impact of sudden failures.
[0305] The technical solution provided in the embodiment of the present application ensures the performance and response time of cloud services, improves tenant experience and customer satisfaction through fine-grained control and management of resources and service status; at the same time, the multi-Cell environment can be more easily expanded horizontally, and new Cells can be seamlessly added to the existing architecture. Health checks and automatic repair mechanisms can also be expanded accordingly to ensure unified management in large-scale environments.
[0306] Embodiment 7
[0307] The present application provides a computer storage medium, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:
[0308] Acquire multiple service information of any logical area, wherein the services include computing coordination service, computing engine service, database, and message queue;
[0309] Performing health check on each service information of the logical area;
[0310] Predicting resource usage trends and failure occurrence probabilities of the logical area based on health detection data of each service information of the logical area and a machine learning algorithm model;
[0311] The logical area is automatically repaired according to the prediction result type of the logical area, wherein the automatic repair includes resource allocation across logical areas and repair within the logical area.
[0312] In one embodiment, before acquiring multiple service information of any logical area, the method includes:
[0313] Initialize and set the computing coordination service, computing engine service, database, and message queue objects.
[0314] In one embodiment, the performing health detection on each service information of the logical area includes:
[0315] Detecting the event execution time, service status, and computing node resource utilization rate of the computing engine service;
[0316] Detecting the event execution time of the computing coordination service;
[0317] Detecting the connection pool status and transaction log of the database;
[0318] The number of unprocessed messages in the message queue and the average delay time of message processing are detected.
[0319] In one embodiment, the machine learning algorithm model is a long short-term memory network model, which includes an input gate, a forget gate, an output gate, and a cell state. The prediction of the resource usage trend and the probability of failure of the logical area based on the health detection data of each service information of the logical area and the machine learning algorithm model includes:
[0320] Obtain health detection indicator data of each service information of the logical area;
[0321] A time series data set X=[x1, x2, ..., x t ], where x t is the feature vector at time step t;
[0322] Get the activation function σ, the weight matrix W of the input gate ix and W ih , the bias term b of the input gate i , the hidden state h of the previous time step t-1 , where W ix is the feature vector x corresponding to time step t t The input gate weight matrix, W ih is the hidden state h corresponding to the previous time step t-1 The input gate weight matrix of
[0323] By calculating the formula: t =σ(W ix x t +W ih h t-1 +b i ), calculate the input gate i t ;
[0324] Get the weight matrix W of the forget gate fx and W fh , forget the bias term b of the gate f , where Wfx is the feature vector x corresponding to time step t t The forget gate weight matrix, W fh is the hidden state h corresponding to the previous time step t-1 The forget gate weight matrix;
[0325] By calculating the formula: t =σ(W fx x t +W fh h t-1 +b f ), calculate the forget gate f t ;
[0326] Get the weight matrix W of the candidate cell state cx and W ch , the bias term b of the candidate cell state c , where W cx is the feature vector x corresponding to time step t t The candidate cell state weight matrix, W ch is the hidden state h corresponding to the previous time step t-1 The candidate cell state weight matrix;
[0327] By calculating the formula: C t' =tanh(W cx x t +W ch h t-1 +b c ), calculate the candidate cell state value C t' ;
[0328] Get the cell state C at the previous time step t-1 ;
[0329] By calculating the formula: C t =f t ⊙C t-1 +i t ⊙C t' , calculate the cell state update value C t ;
[0330] Get the weight matrix W of the output gate ot and W oh , the bias term b of the output gate o , where W ot is the feature vector x corresponding to time step t t The output gate weight matrix, W oh is the hidden state h corresponding to the previous time step t-1 The output gate weight matrix of
[0331] By calculating the formula: t =σ(W ox x t +W oh h t-1 +b o ), calculate the output gate o t ;
[0332] By calculating the formula: h t =o t ⊙tanh(C t ) Calculate the hidden state value h t .
[0333] In one embodiment, after calculating the hidden state value, the following steps are performed:
[0334] Get the weight matrix W of the fully connected layer y , target variable bias term b y , hidden state value h t ;
[0335] By calculation formula: Compute the predicted target variable at time step t
[0336] The predicted target variables include resource usage trends and failure occurrence probabilities of the logic areas.
[0337] In one embodiment, automatically repairing the logic area according to the prediction result type of the logic area includes:
[0338] When it is predicted that the processor usage of the logical area is close to a first preset value or the memory space usage is close to a second preset value, resources are allocated between the logical areas or the computing nodes of the logical areas are expanded, and the expanded computing nodes are detected;
[0339] When it is predicted that the logical area will fail, data migration is performed across the logical areas or the failed service of the logical area is restarted;
[0340] When it is predicted that the processing quality of any logical area will be degraded, the number of process pool threads of the corresponding logical area is increased to improve the concurrency capability of the corresponding logical area.
[0341] In one of the embodiments, after automatically repairing the logic area according to the prediction result type of the logic area, the method includes:
[0342] Re-check the health of each service information of the logical area;
[0343] Determine the health check result of each service in the logical area;
[0344] The judging of the health re-detection result of each service in the logical area includes:
[0345] Determine whether the health re-test result of each service in the logical area meets the preset requirements;
[0346] In response to each service re-health detection result of the logic area meeting the preset requirements, the automatic repair result of the logic area is sent to the database;
[0347] In response to any service re-health check result of the logical area not meeting the preset requirements, a log of health check, predictive analysis and repair processing is recorded, an early warning is sent and a maintenance personnel is notified to manually process;
[0348] After automatically repairing the logic area according to the prediction result type of the logic area, the method further includes:
[0349] The cloud platform health detection, prediction and repair process is optimized based on the automatic repair results of the logical area.
[0350] This application can greatly improve the operation and maintenance efficiency of the cloud platform and the continuity of business processing.
[0351] Figure 5 An exemplary system provided for Embodiment 7 of the present application that can be used to implement various embodiments described in the present application;
[0352] like Figure 5 As shown, in some embodiments, the system can be used as any of the above-mentioned devices for cloud platform repair in each of the described embodiments. In some embodiments, the system may include one or more computer-readable media (e.g., system memory or NVM / storage device) having results and one or more processors (e.g., (one or more) processors) coupled to the one or more computer-readable media and configured to execute the results to implement the module to perform the actions described in this application.
[0353] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0354] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0355] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A cloud platform repair method, characterized in that: The method is applied to a cloud platform distributed system, the system includes multiple logical areas, and the method includes: Acquire multiple service information of any logical area, wherein the services include computing coordination service, computing engine service, database, and message queue; Performing health check on each service information of the logical area; Predicting resource usage trends and failure occurrence probabilities of the logical area based on health detection data of each service information of the logical area and a machine learning algorithm model; The logical area is automatically repaired according to the prediction result type of the logical area, wherein the automatic repair includes resource allocation across logical areas and repair within the logical area.
2. The cloud platform repair method according to claim 1, characterized in that: Before obtaining the multiple service information of any logical area, the method includes: Initialize and set the computing coordination service, computing engine service, database, and message queue objects.
3. The cloud platform repair method according to claim 1, characterized in that: The performing health detection on each service information of the logical area includes: Detecting the event execution time, service status, and computing node resource utilization rate of the computing engine service; Detecting the event execution time of the computing coordination service; Detecting the connection pool status and transaction log of the database; The number of unprocessed messages in the message queue and the average delay time of message processing are detected.
4. The cloud platform repair method according to claim 1, characterized in that: The machine learning algorithm model is a long short-term memory network model, which includes an input gate, a forget gate, an output gate, and a cell state. The health detection data of each service information of the logic area and the machine learning algorithm model are used to predict the resource usage trend and the probability of failure of the logic area, including: Obtain health detection indicator data of each service information of the logical area; A time series data set X=[x1, x2, ..., x t ], where x t is the feature vector at time step t; Get the activation function σ, the weight matrix W of the input gate ix and W ih , the bias term b of the input gate i , the hidden state h of the previous time step t-1 , where W ix is the feature vector x corresponding to time step t t The input gate weight matrix, W ih is the hidden state h corresponding to the previous time step t-1 The input gate weight matrix of By calculating the formula: t =σ(W ix x t +W ih h t-1 +b i ), calculate the input gate i t ; Get the weight matrix W of the forget gate fx and W fh , forget the bias term b of the gate f , where W fx is the feature vector x corresponding to time step t t The forget gate weight matrix, W fh is the hidden state h corresponding to the previous time step t-1 The forget gate weight matrix; By calculating the formula: t =σ(W fx x t +W fh h t-1 +b f ), calculate the forget gate f t ; Get the weight matrix W of the candidate cell state cx and W ch , the bias term b of the candidate cell state c , where W cx is the feature vector x corresponding to time step t t The candidate cell state weight matrix, W ch is the hidden state h corresponding to the previous time step t-1 The candidate cell state weight matrix; By calculating the formula: C t' =tanh(W cx x t +W ch h t-1 +b c ), calculate the candidate cell state value C t' ; Get the cell state C at the previous time step t-1 ; By calculation formula: Calculate the cell state update value C t ; Get the weight matrix W of the output gate ot and W oh , the bias term b of the output gate o , where W ot is the feature vector x corresponding to time step t t The output gate weight matrix, W oh is the hidden state h corresponding to the previous time step t-1 The output gate weight matrix of By calculating the formula: t =σ(W ox x t +W oh h t-1 +b o ), calculate the output gate o t ; By calculating the formula: h t =o t ⊙tanh(C t ) Calculate the hidden state value h t .
5. The cloud platform repair method according to claim 4, characterized in that: After the hidden state value is calculated, the following steps are included: Get the weight matrix W of the fully connected layer y , target variable bias term b y , hidden state value h t ; By calculation formula: Compute the predicted target variable at time step t The predicted target variables include resource usage trends and failure occurrence probabilities of the logic areas.
6. The cloud platform repair method according to claim 1, characterized in that: The automatically repairing the logic area according to the prediction result type of the logic area includes: When it is predicted that the processor usage of the logical area is close to a first preset value or the memory space usage is close to a second preset value, resources are allocated between the logical areas or the computing nodes of the logical areas are expanded, and the expanded computing nodes are detected; When it is predicted that the logical area will fail, data migration is performed across the logical areas or the failed service of the logical area is restarted; When it is predicted that the processing quality of any logical area will be degraded, the number of process pool threads of the corresponding logical area is increased to improve the concurrency capability of the corresponding logical area.
7. The cloud platform repair method according to claim 1, characterized in that: After automatically repairing the logic area according to the prediction result type of the logic area, the method includes: Re-check the health of each service information of the logical area; Determine the health check result of each service in the logical area; The judging of the health re-detection result of each service in the logical area includes: Determine whether the health re-test result of each service in the logical area meets the preset requirements; In response to each service re-health detection result of the logic area meeting the preset requirements, the automatic repair result of the logic area is sent to the database; In response to any service re-health check result of the logical area not meeting the preset requirements, a log of health check, predictive analysis and repair processing is recorded, an early warning is sent and a maintenance personnel is notified to manually process; After automatically repairing the logic area according to the prediction result type of the logic area, the method further includes: The cloud platform health detection, prediction and repair process is optimized based on the automatic repair results of the logical area.
8. A cloud platform repair device, characterized in that: The device is applied to a cloud platform distributed system, the system includes multiple logical areas, and the device includes: An acquisition module, used to acquire multiple service information of any logical area, wherein the services include computing coordination service, computing engine service, database, and message queue; A detection module, used for performing health detection on each service information of the logical area; A prediction module, used to predict the resource usage trend and failure probability of the logical area according to the health detection data of each service information of the logical area and the machine learning algorithm model; A repair module is used to automatically repair the logical area according to the prediction result type of the logical area, wherein the automatic repair includes resource allocation across logical areas and repair within the logical area.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the cloud platform repair method described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the cloud platform repair method described in any one of claims 1 to 7 are implemented.