Service health level evaluation method, electronic device and readable storage medium
By building a service health assessment model, identifying the target operating status information of the distributed system and its causal relationship, the problem of weak generalization ability of the evaluation method in the existing technology is solved, and the health assessment of the high accuracy and reliability of the distributed system is achieved.
Patent Information
- Application Number
- PCT/CN2024/143172
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-29
- Filing Date
- 2024-12-27
- Publication Date
- 2025-08-07
AI Technical Summary
The existing service health assessment methods are difficult to effectively monitor and evaluate system health in distributed software systems. Especially when the system scale and complexity increase, the threshold-based evaluation methods are weak in generalization ability and cannot meet the needs of complex environments.
By obtaining the status monitoring data of the distributed system, a service health assessment model is built, the target operating status information and its causal relationship are identified, the associated data is determined, and the service health assessment of the distributed system is realized, the impact of human factors is reduced, and the accuracy and reliability of the assessment is improved.
There is no need to set evaluation rules and thresholds for humans to achieve service health assessment of distributed systems, with good generalization capabilities, improve the accuracy and reliability of evaluation, and can fully discover the root causes of problems and alarms.
Smart Images

Figure CN2024143172_07082025_PF_FP_ABST
Abstract
Description
Service health evaluation method, electronic device and readable storage medium
[0001] Cross-references
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on January 29, 2024, with application number 202410123142.0 and application name “Service Health Assessment Method, Electronic Device and Readable Storage Medium”. The entire contents of the application are incorporated by reference into this application. Technical Field
[0003] The embodiments of the present application relate to the technical field of system service health assessment, and in particular to a service health assessment method, an electronic device, and a readable storage medium. Background Art
[0004] Service health assessment models, as a measure of service health, are widely used in distributed architecture systems, such as distributed software systems. Currently, most service health assessment methods score service alerts based on pre-defined evaluation rules and compare the scoring results with set thresholds to determine the service health of the distributed system. The selection of alert assessment rules and thresholds often relies on empirical data. As distributed software systems continue to grow in size and complexity, the generalizability of these solutions has weakened, making it difficult to effectively monitor and assess the service health of distributed systems. Summary of the Invention
[0005] Embodiments of the present application provide a service health assessment method, an electronic device, and a readable storage medium.
[0006] In the first aspect, an embodiment of the present application provides a service health assessment method, comprising: in response to collected status monitoring data of a distributed system, obtaining target operating status information that matches the status monitoring data from multiple operating status information of a service health assessment model; based on the causal relationship between each operating status information in the multiple operating status information, determining associated operating status information that has a direct causal relationship or an indirect causal relationship with the target operating status information; determining associated data in the status monitoring data that matches the associated operating status information, and determining the service health of the distributed system based on the associated data.
[0007] In a second aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method described in the first aspect above are implemented.
[0008] In a third aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect above are implemented.
[0009] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0011] FIG1 is a flow chart showing a method for evaluating service health provided in an embodiment of the present application;
[0012] FIG2 shows an example diagram of a service health assessment model provided in an embodiment of the present application;
[0013] FIG3 shows a flow chart of a method for constructing an initial service health assessment model according to an embodiment of the present application;
[0014] FIG4 a shows an example diagram of the initial service health assessment model provided in an embodiment of the present application before being updated;
[0015] FIG4 b shows an example diagram corresponding to the initial service health assessment model provided in an embodiment of the present application after being updated;
[0016] FIG5 is a flow chart showing a method for constructing a service health assessment model according to an embodiment of the present application;
[0017] FIG6 shows a schematic diagram of the structure of a service health assessment system provided in an embodiment of the present application;
[0018] FIG7 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0019] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0020] As a measurement of service health, service health assessment models are widely used in systems based on distributed architectures, such as distributed software systems. For example, distributed software systems, which execute tasks on a multi-processor architecture interconnected by a communication network, accurately reflect the health or failure status of distributed software systems in production environments. This is a key indicator of the effectiveness of a service health assessment model.
[0021] Currently, most service health assessment models are based on the experience of experts in distributed software systems. From the perspective of system operation and maintenance, services are divided into "available" and "unavailable" states. Alarms generated by services are assigned a certain weight according to the alarm level. The service health is then calculated based on the alarm level and weight. The service status is obtained by comparing the service health with the set threshold. For example, the service health of a distributed software system can be evaluated using the following formula: H = 100 - ∑L*k1 - ∑O*k2 - ∑P*k3;
[0022] Where H is the service health, L is the alarm level, O is the object level, P is the performance level, k1, k2, and k3 are the weights corresponding to the alarm level L, object level O, and performance level P, respectively.
[0023] Alarm information generated by distributed software systems can be divided into three different dimensions: alarm level L, object level O, and performance level P. Here, assuming an alarm occurs for a metric on the current object of the distributed software system, alarm level L can be used to measure the severity of the alarm's impact on the system, object level O can be used to measure the severity of the metric's impact on the system, and performance level P can be used to measure the performance of the current metric. The service health level H is calculated according to the above formula, and a threshold is set based on experience. When the service health level H is greater than the threshold, the distributed software system is available; when the service health level H is less than the threshold, the distributed software system is unavailable.
[0024] However, as distributed software systems continue to grow in size and complexity, effectively monitoring and evaluating the service health of distributed software systems has become increasingly difficult. The aforementioned threshold-based service health assessment methods have weak generalization capabilities and cannot meet the environmental requirements of today's complex distributed software systems.
[0025] In response to the problems existing in the service health evaluation process of the above-mentioned distributed system, an embodiment of the present application provides a service health evaluation method. When the status monitoring data (such as indicators, alarms, logs, etc.) of the distributed system is collected, the method obtains the target operating status information that matches the status monitoring data from the multiple operating status information of the service health evaluation model; based on the causal relationship between each operating status information in the multiple operating status information, the associated operating status information that has a direct causal relationship or an indirect causal relationship with the target operating status information is determined; the associated data that matches the associated operating status information in the status monitoring data is determined, and the service health of the distributed system is determined based on the associated data. In this way, the service health of the distributed system can be evaluated without manually setting evaluation rules and thresholds for each status monitoring data of the distributed system. It has good generalization ability, can reduce the influence of human factors, and improve the accuracy and reliability of service health evaluation.
[0026] Please refer to Figure 1, which shows a flow chart of the service health assessment method provided in an embodiment of the present application. The execution subject of the method can be a terminal device or a server, wherein the terminal device can be a device such as a personal computer, or a mobile terminal device such as a mobile phone or a tablet computer, and the terminal device can be a terminal device used by a user. The server can be an independent server or a server cluster composed of multiple servers, and the server can be a background server for a certain business or a background server for a certain application (such as a service health assessment system, an availability prediction system, etc.). In the embodiment of the present application, the execution subject is taken as an example to illustrate. For the case of the terminal device, it can be processed according to the following relevant content, which will not be repeated here. As shown in the figure, the service health assessment method 100 may include the following steps:
[0027] S101: In response to collected state monitoring data of a distributed system, target operation state information matching the state monitoring data is obtained from a plurality of operation state information of a service health evaluation model.
[0028] Distributed systems can be based on distributed architecture, a design approach that distributes the different components of a system across multiple independent computer nodes. Distributed systems adhere to one or more communication protocols. Currently, the most common distributed systems use the http / https protocol for sending and requesting network data. For example, distributed software systems are software systems that are collaboratively operated by multiple computer nodes and typically include multiple different components, such as servers, databases, load balancers, caches, and message queues. These components can be distributed across different nodes to implement distributed functions, such as data storage, processing, and transmission.
[0029] Status monitoring data can include indicator data such as resource utilization, network latency, and packet loss rate of distributed systems. It can also include log data such as "Insufficient heap memory for the NameNode process, frequent Full GCs, leading to active / standby switchovers," or alarm data such as "NameNode node unavailable."
[0030] In an embodiment of the present application, when state monitoring data (such as resource utilization, network latency, alarms, logs, etc.) of a distributed system is collected, target state information that matches the state monitoring data is searched for within the multiple state information of a pre-built service health assessment model. In one exemplary embodiment, similarities between the state monitoring data and the multiple state information can be calculated, and based on the similarities, the target state information that matches the state monitoring data is determined from the multiple state information.
[0031] S102: Based on the causal relationship between each piece of the plurality of pieces of operating status information, determine associated operating status information having a direct causal relationship or an indirect causal relationship with the target operating status information.
[0032] The service health assessment model includes multiple pieces of operating status information and the causal relationships between each piece of operating status information. A direct causal relationship refers to a direct and clear causal relationship between two pieces of operating status information. For example, "Irrational NameNode heap memory configuration" directly leads to "Insufficient NameNode heap memory and frequent GC." An indirect causal relationship refers to an indirect connection or influence relationship between two or more pieces of operating status information. Taking "Irrational NameNode heap memory configuration" as an example, "Irrational NameNode heap memory configuration" directly leads to "Insufficient NameNode heap memory and frequent GC." "Insufficient NameNode heap memory and frequent GC" directly leads to "NameNode node unavailability." There is an indirect causal relationship between "Irrational NameNode heap memory configuration" and "NameNode node unavailability."
[0033] In an embodiment of the present application, based on the target operating status information obtained in the above step S101 and the service health assessment model, the associated operating status information with a direct causal relationship or an indirect causal relationship with the target operating status information can be determined. As shown in Figure 2, the alarm information "NameNode node is unavailable" generated by the distributed system is collected, and then its parent node information is found based on the multiple operating status information in the service health assessment model. If there is a log information "NameNode process heap memory is insufficient, Full GC occurs frequently, resulting in master-slave switching", then continue to look for configuration information. If it is found that the configuration is unreasonable, then at this time "NameNode heap memory configuration is unreasonable" is the root cause of the alarm. At the same time, recursively search for child nodes to detect "whether the HDFS service is available". If it is determined that "HDFS service is unavailable", continue to look for the next child node, and eventually obtain the associated operating status information with a direct causal relationship or an indirect causal relationship with the target operating status information.
[0034] S103: Determine associated data in the status monitoring data that matches the associated operating status information, and determine the service health of the distributed system based on the associated data.
[0035] In an embodiment of the present application, based on the associated operating status information determined in the above step S102, associated data matching the associated operating status information in the status monitoring data of the distributed system is determined, and the service health of the distributed system is determined based on the associated data. For example, based on the NameNode heap memory configuration-related data, it can be determined whether the NameNode heap memory configuration is reasonable; based on the HDFS service-related data, it can be determined whether the HDFS service is available, thereby determining the availability of multiple related services based on the associated data, and then obtaining the service health of the distributed system.
[0036] Compared to the threshold-based service health assessment method, the health assessment method provided by the embodiment of the present application does not require manual setting of assessment rules and corresponding thresholds for the various status monitoring data of the distributed system, and can achieve the assessment of the service health of the distributed system. It has good generalization capabilities and can reduce the impact of human factors, thereby improving the accuracy and reliability of service health assessment. At the same time, it can more comprehensively discover problems in the status monitoring data, the causal relationship between problems and alarms, the root causes of alarms, etc., so that users can take corresponding measures to repair the faults of the distributed system in a timely manner.
[0037] In a possible implementation, in the above step S102, before obtaining the target operating state information that matches the status monitoring data from the multiple operating state information of the service health assessment model, the following steps may be further included:
[0038] Step 1021: Based on the historical operation data of the distributed system, determine first operation status information in the historical operation data and second operation status information having a causal relationship with the first operation status information.
[0039] In an embodiment of the present application, historical operating data of a distributed system within a preset time period can be obtained. For example, historical operating data of the distributed system within the past week can be obtained. Here, the preset time period can be set according to actual needs. Based on the historical operating data of the distributed system, first operating status information in the historical operating data and second operating status information having a causal relationship with the first operating status information are determined.
[0040] Step 1022: predicting third operating state information other than the second operating state information that has a causal relationship with the first operating state information based on a pre-trained target strategy network.
[0041] In this embodiment of the present application, after obtaining the first operating status information from the historical operating data, a pre-trained target policy network is used to predict a third operating status information that has a causal relationship with the first operating status information, in addition to the second operating status information. In this way, the target policy network can complete the causal relationship between the various operating status information in the service health assessment model.
[0042] Step 1023: Generate the service health assessment model based on the first operating status information, the second operating status information, the third operating status information, and the causal relationship between each operating status information.
[0043] In an embodiment of the present application, a service health assessment model is generated based on the first operating status information, the second operating status information, the third operating status information, and the causal relationship between each operating status information obtained in the above steps 1021 and 1022. Since the embodiment of the present application not only determines the second operating status information that has a causal relationship with the first operating status information through the historical operating data of the distributed system, but also predicts the third operating status information that has a causal relationship with the first operating status information through the target policy network, the causal relationship between each operating status information in the generated service health assessment model is more comprehensive, thereby facilitating improving the accuracy and reliability of the service health assessment.
[0044] In one possible implementation, in step 1021, determining, based on historical operating data of the distributed system, first operating status information in the historical operating data and second operating status information having a causal relationship with the first operating status information includes:
[0045] Acquire structured and semi-structured operation status information data from the historical operation data of the distributed system; determine multiple candidate operation status information in the structured and semi-structured operation status information data based on preset data extraction rules; perform feature association processing on the multiple candidate operation status information based on feature information of the multiple candidate operation status information to obtain the first operation status information and the second operation status information that has a causal relationship with the first operation status information.
[0046] In the embodiment of the present application, taking a distributed software system as an example, the operation information of the distributed software system is stored in different databases, and a data acquisition layer is constructed to connect to the data source of the distributed software system. The data source is such as (PG / MySQL / Elastic Search) or Rest API, etc., and the expert experience is organized into semi-structured data. The various semi-structured and structured operation status information data collected by the data acquisition layer are combined as data input; based on the preset data extraction rules, multiple candidate operation status information in the structured and semi-structured operation status information data are determined, wherein the candidate operation status information may include knowledge entities (such as resource utilization, network delay and other indicator information, log information, alarm information, etc.), knowledge relationships (such as time relationships, spatial relationships, causal relationships, etc.), semantic attributes (such as the type of knowledge entity) and other features. Based on the feature information of multiple candidate operation status information, feature association processing is performed on the multiple candidate operation status information to obtain a first operation status information and a second operation status information that has a causal relationship with the first operation status information. Among them, the feature association processing may include entity alignment, entity disambiguation, entity association and other processing.
[0047] In one possible implementation, in step 1023, generating the service health assessment model based on the first operating status information, the second operating status information, the third operating status information, and the causal relationship between each operating status information includes:
[0048] generating an initial service health assessment model based on the first operating status information, the second operating status information, and a causal relationship between the first operating status information and the second operating status information, and evaluating the initial service health assessment model to obtain a first evaluation indicator;
[0049] updating the initial service health assessment model according to the third operating state information and the causal relationship between the first operating state information and the third operating state information, and evaluating the updated initial service health assessment model to obtain a second evaluation indicator;
[0050] When the deviation between the second evaluation indicator and the first evaluation indicator is less than a preset threshold, the updated initial service health evaluation model is used as the service health evaluation model; when the deviation is not less than the preset threshold, the initial service health model is used as the service health evaluation model.
[0051] In an embodiment of the present application, as shown in FIG3 , an initial service health assessment model can be constructed by the following steps: 301: Organizing data. Collecting historical operation data of the distributed system, and obtaining structured and semi-structured operation status information data from the historical operation data of the distributed system; 302: Knowledge extraction. Performing knowledge extraction on the historical operation data to obtain feature information such as knowledge entities, knowledge relationships, and semantic attributes; 303: Knowledge cleaning. Based on the feature information of multiple candidate operation status information, the candidate operation status information is subjected to feature association processing such as entity alignment, entity disambiguation, and entity association to obtain the first operation status information in the historical operation data, and the second operation status information having a causal relationship with the first operation status information; based on the first operation status information, the second operation status information, and the causal relationship between the first operation status information and the second operation status information, an initial service health assessment model is generated; and then, 304: the initial service health assessment model is evaluated to obtain a first evaluation index. The first evaluation index may include accuracy and coverage.
[0052] Then, based on the third operating status information and the causal relationship between the first operating status information and the third operating status information, the initial service health assessment model is updated, and the updated initial service health assessment model is evaluated to obtain a second evaluation indicator. Based on the historical operating data of the distributed system, an initial service health assessment model including the first operating status information, the second operating status information, and the causal relationship between the first operating status information and the second operating status information is obtained, as shown in FIG4a. Then, based on the third operating status information and the causal relationship between the first operating status information and the third operating status information, the initial service health assessment model is updated to obtain the updated initial service health assessment model shown in FIG4b.
[0053] By comparing the first evaluation indicator and the second evaluation indicator, the improvement effect of the updated initial service health model can be measured. When the deviation between the second evaluation indicator and the first evaluation indicator is less than the preset threshold, the model tends to be stable and eventually converges. At this time, the updated initial service health evaluation model can be used as the service health evaluation model; when the deviation is not less than the preset threshold, the model is still unstable and needs to be optimized again. At this time, the initial service health model is used as the service health evaluation model.
[0054] In a possible implementation, in step 304 above, the initial service health assessment model may be evaluated in the following manner:
[0055] Acquire a plurality of pre-labeled sample data, process the plurality of sample data using the initial service health assessment model, and obtain an availability assessment label corresponding to each of the plurality of sample data; the sample data carries a true availability label;
[0056] By comparing the availability evaluation label and the actual availability label corresponding to each sample data, the accuracy and coverage of the initial service health evaluation model are determined, and the evaluation index corresponding to the initial service health evaluation model is obtained according to the accuracy and coverage.
[0057] In an embodiment of the present application, a test set is first constructed, which includes a plurality of pre-labeled sample data, and the sample data carries a true availability label. For example, 30 faulty operation behaviors (negative examples) and 20 normal operation behaviors (positive examples) are selected, and log data, indicator data, alarm data, etc. are constructed and injected into the distributed software system. Then, the multiple sample data are processed by the initial service health assessment model to obtain the availability assessment label corresponding to each sample data in the multiple sample data; by comparing the availability assessment label corresponding to each sample data with the true availability label, the accuracy and coverage of the initial service health assessment model are determined. For example, the initial service health assessment model identifies the number of true positive examples TP, the number of false positive examples FP, the number of false negative examples FN, and the number of true negative examples TN, and the accuracy can be determined by the following formula:
[0058] The coverage is determined by the following formula:
[0059] The evaluation index corresponding to the initial service health assessment model is obtained based on the accuracy and coverage. For example, the sum of the accuracy and coverage can be used as the evaluation index corresponding to the initial service health assessment model, or the average of the accuracy and coverage can be used as the evaluation index corresponding to the initial service health assessment model. No specific limitation is made here.
[0060] In a possible implementation, when the deviation between the second evaluation indicator and the first evaluation indicator is less than a preset threshold, the method further includes:
[0061] Obtain monitoring data of the service health assessment model under multiple preset performance indicators; determine the performance estimate of the service health assessment model based on the monitoring data under each of the performance indicators; if the performance estimate meets the preset indicator threshold, use the updated initial service health assessment model as the service health assessment model; if the performance estimate does not meet the preset indicator threshold, use the initial service health model as the service health assessment model.
[0062] In the embodiment of the present application, a comprehensive evaluation is performed on the constructed service health model. The performance estimation criteria of a distributed system generally include latency, traffic, errors, saturation, etc., among which latency refers to the time required for the service to process a request. It is important to distinguish between successful requests and failed requests. For example, an HTTP 500 error caused by a lost database connection or other backend problem may have a very low latency; traffic refers to the measurement of system load requirements using a high-level pointer in the system. For a Web server, this indicator is usually the number of HTTP requests per second, and is classified by request type (static request and dynamic request); error refers to the rate of request failure, either explicit failure, implicit failure, or failure caused by policy reasons; saturation can be understood as how "full" the service capacity is, which is usually a measurement of a specific indicator of the most limited resource in the system (in a memory-limited system, it is memory; in an I / O-limited system, it is I / O).
[0063] The indicators in the above-mentioned performance estimation criteria can be used as performance indicators for evaluating the service health assessment model. According to the monitoring data of the service health assessment model under the above-mentioned multiple preset performance indicators, the performance estimation value of the service health assessment model (such as the time to process requests, the required traffic, the rate of request failure, the saturation of service capacity, etc.) is determined; when the performance estimation value meets the preset indicator threshold, the updated initial service health assessment model is used as the service health assessment model; when the performance estimation value does not meet the preset indicator threshold, the initial service health model is used as the service health assessment model.
[0064] In a possible implementation, in step 1022, after predicting third operating state information other than the second operating state information that has a causal relationship with the first operating state information based on the pre-trained target policy network, the step further includes:
[0065] Obtaining observation parameters corresponding to the third operating state information at multiple historical time points, and determining an adaptive threshold corresponding to the third operating state information based on the observation parameters corresponding to the multiple historical time points;
[0066] In step 1023, the service health assessment model is generated based on the first operating status information, the second operating status information, the third operating status information, and the causal relationship between each operating status information, including:
[0067] The service health evaluation model is generated according to the first operating status information, the second operating status information, the third operating status information with the adaptive threshold, and the causal relationship between each piece of operating status information.
[0068] In the embodiment of the present application, since the third operating state information is predicted based on the target policy network, after obtaining the third operating state information that has a causal relationship with the first operating state information, the observed parameters corresponding to the third operating state information at multiple historical time points can also be obtained, and the adaptive threshold corresponding to the third operating state information can be determined based on the observed parameters corresponding to the multiple historical time points. The service health assessment model is then generated based on the first operating state information, the second operating state information, the third operating state information with the adaptive threshold, and the causal relationship between each piece of operating state information.
[0069] Based on this situation, in the above step S102, based on the causal relationship between each piece of the plurality of pieces of operating status information, determining the associated operating status information having a direct or indirect causal relationship with the target operating status information includes:
[0070] Obtain first associated operating status information that has a direct causal relationship with the target operating status information; if the first associated operating status information is determined to be abnormal according to the adaptive threshold corresponding to the first associated operating status information, obtain second associated operating status information that has a direct causal relationship with the first associated operating status information; if the second associated operating status information is determined to be abnormal according to the adaptive threshold corresponding to the second associated operating status information, obtain third associated operating status information that has a direct causal relationship with the second associated operating status information, and repeat this process until all associated operating status information that has a direct causal relationship or an indirect causal relationship with the target operating status information is determined.
[0071] In an embodiment of the present application, taking the alarm information "NameNode node is unavailable" generated by the distributed system as an example, according to multiple operating status information in the service health assessment model, the child node "HDFS is unavailable" of the "NameNode node is unavailable" is found, and the adaptive threshold corresponding to "HDFS is unavailable" is used to determine whether the child node has an abnormality. If the child node is abnormal, that is, HDFS is unavailable, continue to find the next child node "HBase is unavailable", and then determine whether the next child node has an abnormality according to the adaptive threshold corresponding to "HBase is unavailable". This process is repeated until all related operating status information that has a direct or indirect causal relationship with the target operating status information is determined.
[0072] The adaptive threshold corresponding to each operating status information can be determined in the following manner:
[0073] A threshold time series model is constructed based on the autoregressive model and the moving average model; and an adaptive threshold corresponding to each operating status information is obtained by inputting the observation parameters corresponding to each operating status information at multiple historical time points into the threshold time series model.
[0074] In the embodiment of the present application, if the operating status information is indicator-type data such as resource utilization, network latency, and network packet loss rate, the adaptive threshold corresponding to each operating status information can be obtained by inputting the observation parameters corresponding to each operating status information at multiple historical time points into the threshold time series model. The threshold time series model can be constructed based on the autoregressive model and the moving average model. The expression of the autoregressive model is as follows:
[0075] Among them, X t is the observation parameter corresponding to the current time point t, c is a constant, are the coefficients of the observation parameters corresponding to the lag time points, ε t is the white noise error.
[0076] The expression of the moving average model is as follows: X t =μ+ε t +θ1ε t-1 +θ2ε t-2 +θ q ε t-q ;
[0077] Among them, μ is a constant, ε t represents white noise error, θ1,θ2,...,θ q Indicates the coefficient corresponding to the hysteresis error.
[0078] Then the final expression of the threshold time series model is:
[0079] Among them, X t is the observation parameter corresponding to the current time point t, It is used to describe the relationship between the current observation parameters and the observation parameters corresponding to the past p time points, θ1, θ2, ..., θ q Used to describe the relationship between the error of the current observation parameter and the observation parameter corresponding to the past q time points. ε t is the error term at time point t, and c is a constant term. Usually, p and q are positive integers between [1,3]. The values of p and q can be selected by exhaustive method to fit the model, and the relevant parameters can be determined by maximum likelihood estimation. θ1,θ2,...,θ q , and finally obtain the adaptive threshold corresponding to each operating status information.
[0080] The target policy network in step 1022 is a neural network-based model used to learn and represent the action strategy that the agent should take in a given state. The policy network here is a key concept in reinforcement learning. The reinforcement learning system mainly consists of the following two parts:
[0081] The first is the external environment ε, which constrains the dynamic interaction between the agent and the initial service health assessment model. This external environment is modeled as a Markov decision process (MDP) with a tuple<S,A,P,R> To describe, where S represents a continuous state space, A={a1,a2...a n} represents a series of optional action spaces, P(S t+1 =s'|S t =s,A t =a) is the transition probability matrix, R(s,a) is the reward function. S in the transition probability matrix formula t Indicates that the current state is s, A t Indicates that the action selected by the agent at the current moment is a. The meaning of the formula is that at the current moment t, the state of the environment is s. At this time, the agent takes an action a based on the state, then the probability that the next state of the system will be s'.
[0082] The second part is the RL agent, described as a policy network π θ (s,a)=p(a|s;θ), maps the state vector to a random strategy, and uses the gradient descent method to update the parameters θ of the neural network. The policy gradient is a random strategy that can avoid falling into the local optimal solution.
[0083] In a possible implementation, in step 1022, the target policy network may be trained in the following manner:
[0084] A preset path-finding method is used to determine the relationship path between each candidate operating state information in the historical operating data; a pre-constructed policy network is pre-trained based on the relationship path, the reward of the policy network is determined, and the network parameters of the policy network are updated with maximizing the reward as the optimization goal to obtain a pre-trained policy network; the pre-trained policy network is retrained through multiple reward functions to obtain the target policy network.
[0085] In this embodiment of the application, the external environment of the RL agent consists of three parts: action, state, and reward:
[0086] a. Action, for two given candidate running state information, here it is recorded as entity pair (e s ,e t ) and relationship r, hoping that the agent can find the path with the richest information between the entity pairs. The agent initially starts from the entity e s Start, at each time step, find an edge as a path through the policy network until it reaches the tail entity e t To ensure consistency of output dimensions in the policy network, the size of the action space is defined as the number of all relations.
[0087] b. State. In the initial service health model, entities and relationships are discrete information. TransE and TransR based on translation models can be used for modeling to describe the entities and relationships in the initial service health model. The agent first obtains the current state input, then makes a decision and selects an action to transfer from the current entity to the next entity. The state input can be the performance of a certain indicator, such as a network delay of 1000ms, a network packet loss rate of 2%; or a certain log, link, etc. The state vector at time step t is set as follows: s t =(e t ,e target -e t ), e t Represents the vector corresponding to the entity where the agent is currently located. At the first time step e t =e source , where e source is the source node, e target is the target node.
[0088] c. Rewards: Multiple reward functions can be set, including path accuracy reward function, path validity reward function, and path diversity reward function.
[0089] Accuracy: In the modeled environment, the dimension of the action space is large, that is, the number of wrong paths is much greater than the number of correct paths. The incorrect decision sequence will increase exponentially with the growth of the path. To overcome this problem, the reward function r is set GLOBAL :
[0090] That is, if the agent reaches the target entity e after a series of decisions target , give reward 1, otherwise -1.
[0091] Path validity: For relational reasoning tasks, it is generally believed that the reasoning of short paths is more reliable than that of long paths. Therefore, by setting the reward function r EFFICENCY Make the path p found by the agent as short as possible, the reward function r EFFICENCY is defined as follows:
[0092] That is, rewards are given according to the length (p) of the relationship path.
[0093] Path diversity: Using positive samples to train the agent to find paths, the agent tends to find paths with similar semantics and syntax. These paths often contain redundant information. To ensure the diversity of the paths found by the agent, the cosine similarity between the current path and the existing paths is used to set the diversity reward function rDIVERISITY:
[0094] in, Represents a relationship chain, which is the current path; F represents the number of existing paths; p i Indicates an existing path.
[0095] Then, supervised strategy training is first performed. A preset path finding method is used to determine the relationship path between each candidate operation status information in the historical operation data. For each relationship path, a subset of all positive samples is used to pre-train the pre-built strategy network. Positive samples (e source ,e target ) Start from two nodes respectively and perform a bidirectional BFS (Bidirectional Breadth-First Search) search to find the correct path.
[0096] Bidirectional BFS is a graph search algorithm that searches simultaneously from the starting point and the end point to find the shortest path. In a bidirectional BFS algorithm, two queues or sets are used to record the nodes reachable from the starting point and the end point, respectively. In each round, a node is alternately selected from each queue or set for expansion. If a node is reached in both directions, a path exists between the two nodes.
[0097] For each sequence (r1,r2...r n ) path p, using Monte Carlo gradient descent to maximize the cumulative reward, its loss function J(θ) is:
[0098] in, Indicates that the state at time t is s t , take action α t Rewards obtained when .
[0099] Update the network parameters θ of the policy network with the optimization goal of maximizing the reward to obtain the pre-trained policy network.
[0100] Further retraining rewards. In order to find the reasoning path through the reward function, the supervised pre-trained policy network is retrained using rewards. An entity pair (e source ,e target ) is a sequence, starting from the entity e source Initially, the agent selects an edge / relationship according to a random strategy π(α|s), where π(α|s) represents the probability distribution of all possible actions. This relationship link may point to a new entity, and the agent will receive a negative reward value for these failed time steps. In these time steps, the agent will stop at the current state. Since the agent follows a random strategy, the agent will not repeat wrong decisions. In order to improve training efficiency, the maximum time step of the agent's pathfinding will not exceed max_length. If the agent does not find the target entity e in max_length time steps target , stop executing this sequence. After each sequence is executed, update the policy network gradient formula:
[0101] Among them, R total =λ1r GLOBAL +λ2rEFFICIENCY+λ3r DIVERSITY .
[0102] When the loss function J(θ) reaches its maximum value, the model training is completed and the target policy network is obtained.
[0103] FIG5 is a flow chart of a method for constructing a service health assessment model according to an embodiment of the present application. As shown in the figure, the method may include the following steps:
[0104] Step 501: Data collection: The operation information of the distributed software system is stored in different databases, and the data source of the distributed software system is connected to collect the historical operation data of the distributed software system.
[0105] Step 502: Construct an initial service health assessment model: obtain structured and semi-structured operation status information data from the historical operation data of the distributed software system; determine multiple candidate operation status information in the structured and semi-structured operation status information data based on preset data extraction rules; based on the feature information of the multiple candidate operation status information, perform knowledge cleaning and knowledge evaluation on the multiple candidate operation status information to construct an initial service health assessment model.
[0106] Step 503: Use the target policy network in the reinforcement learning algorithm to optimize the initial service health assessment model, build a model generation engine, and generate a service health assessment model.
[0107] Step 504: Perform a comprehensive evaluation on the generated service health evaluation model. If the evaluation passes, the service health evaluation model is stored to obtain a service health evaluation system.
[0108] The above-mentioned service health evaluation method can be implemented by software programs such as MATLAB and OpenCV. FIG6 shows a schematic diagram of the structure of the service health evaluation system provided by an embodiment of the present application. As shown in the figure, the system may include:
[0109] The data collection layer 610 is used to collect the operating data of the distributed software system and measure the service health of the distributed system. It can connect to different data sources such as Prometheus, MySQL, ElasticSearch, and PostgreSQL.
[0110] The model building layer 620 is used to build and improve the initial service health assessment model, including a knowledge acquisition module, a knowledge fusion module, a knowledge evaluation module, and a knowledge reasoning module.
[0111] The model optimization layer 630 is used to optimize and adjust the initial service health assessment model, including: a reinforcement learning model module and a model generation engine module.
[0112] The model generation layer 640 is used to intelligently generate a service health assessment model based on the initial service health assessment model and the multi-objective optimization model, including: a model comprehensive evaluation module and a service health model module.
[0113] The embodiment of the present application applies the reinforcement learning algorithm to the generation process of the service health assessment model, constructs an operation and maintenance knowledge base, and uses knowledge reasoning technology to efficiently and reliably analyze the service health of the distributed system, thereby enabling reasonable planning of operation and maintenance strategies and reducing operation and maintenance costs.
[0114] FIG7 shows a schematic diagram of the hardware structure of an electronic device that implements an embodiment of the present application. Referring to the figure, at the hardware level, the electronic device includes a processor, and optionally, an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage device. Of course, the electronic device may also include hardware required for other services.
[0115] The processor, network interface, and memory can be interconnected via an internal bus, such as an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. These buses can be classified as address buses, data buses, and control buses. For ease of illustration, the figure uses only one bidirectional arrow, but this does not imply that there is only one bus or only one type of bus.
[0116] The memory stores the program. In an exemplary embodiment, the program may include program code, which includes computer operating instructions. The memory may include internal memory and non-volatile memory, and provides instructions and data to the processor.
[0117] The processor reads the corresponding computer program from the non-volatile memory into the internal memory and then runs it, forming a device for locating the target user at a logical level. The processor executes the program stored in the memory and specifically performs the method disclosed in the embodiment shown in Figure 1 or Figure 5, and realizes the functions and beneficial effects of each method described in the method embodiments above, which will not be repeated here.
[0118] The methods disclosed in the embodiments shown in FIG. 1 or FIG. 5 of the present application can be implemented in a processor or by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the method can be completed by hardware integrated logic circuits in the processor or by software instructions. The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The methods, steps, and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly implemented as a hardware decoding processor, or can be implemented by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.
[0119] The computer device can also execute the methods described in the above method embodiments and realize the functions and beneficial effects of the methods described in the above method embodiments, which will not be repeated here.
[0120] Of course, in addition to software implementation, the electronic device of this application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0121] An embodiment of the present application also proposes a computer-readable storage medium, which stores one or more programs. When the one or more programs are executed by an electronic device including multiple applications, the electronic device executes the method disclosed in the embodiment shown in Figure 1 or Figure 5 and realizes the functions and beneficial effects of the various methods described in the previous method embodiments, which will not be repeated here.
[0122] The computer-readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0123] Furthermore, an embodiment of the present application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the following process is implemented: the method disclosed in the embodiment shown in Figure 1 or Figure 5 and the functions and beneficial effects of the various methods described in the previous method embodiments are implemented, which will not be repeated here.
[0124] The embodiments of the present application can be applied to various electronic device collaboration or interconnection scenarios, including: collaboration and interconnection between mobile phones and laptops / tablets; collaboration and interconnection between mobile terminals and smart TVs / displays; collaboration and interconnection between mobile phones or tablets and in-car entertainment systems; collaboration and interconnection between mobile terminals and smart conference systems, etc., thereby meeting the diverse needs of users in scenarios such as smart homes, smart offices, and smart travel.
[0125] In short, the above description is only a preferred embodiment of the present application and does not limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
[0126] The systems, devices, modules, or units described in the above embodiments may be implemented by a computer chip or entity, or by a product having a certain function. A typical implementation device is a computer. In an exemplary embodiment, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0127] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0128] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0129] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.
Claims
1. A service health assessment method, comprising: In response to the collected state monitoring data of the distributed system, obtaining target operation state information that matches the state monitoring data from a plurality of operation state information of the service health evaluation model; Determining, based on the causal relationship between each piece of operating state information among the plurality of operating state information, associated operating state information having a direct causal relationship or an indirect causal relationship with the target operating state information; Determine associated data in the status monitoring data that matches the associated operating status information, and determine the service health of the distributed system based on the associated data.
2. The method according to claim 1, wherein Before acquiring target operating state information that matches the state monitoring data from a plurality of operating state information of the service health evaluation model, the method further includes: Determining, based on historical operating data of the distributed system, first operating status information in the historical operating data and second operating status information having a causal relationship with the first operating status information; Predicting, based on a pre-trained target strategy network, third operating state information other than the second operating state information that has a causal relationship with the first operating state information; The service health evaluation model is generated according to the first operating status information, the second operating status information, the third operating status information, and the causal relationship between each operating status information.
3. The method according to claim 2, wherein: Generating the service health assessment model according to the first operating status information, the second operating status information, the third operating status information, and the causal relationship between each operating status information includes: generating an initial service health assessment model based on the first operating status information, the second operating status information, and a causal relationship between the first operating status information and the second operating status information, and evaluating the initial service health assessment model to obtain a first evaluation indicator; updating the initial service health assessment model according to the third operating state information and the causal relationship between the first operating state information and the third operating state information, and evaluating the updated initial service health assessment model to obtain a second evaluation indicator; When the deviation between the second evaluation indicator and the first evaluation indicator is less than a preset threshold, the updated initial service health evaluation model is used as the service health evaluation model; when the deviation is not less than the preset threshold, the initial service health model is used as the service health evaluation model.
4. The method according to claim 3, wherein: The initial service health assessment model is evaluated in the following manner: Acquire a plurality of pre-labeled sample data, process the plurality of sample data using the initial service health evaluation model, and obtain an availability evaluation label corresponding to each of the plurality of sample data; The sample data carries a true availability label; By comparing the availability evaluation label and the actual availability label corresponding to each sample data, the accuracy and coverage of the initial service health evaluation model are determined, and the evaluation index corresponding to the initial service health evaluation model is obtained according to the accuracy and coverage.
5. The method according to claim 3, wherein: When the deviation between the second evaluation index and the first evaluation index is less than a preset threshold, the method further includes: Obtaining monitoring data of the service health assessment model under multiple preset performance indicators; Determine the performance estimate of the service health assessment model based on the monitoring data under each of the performance indicators; When the performance estimate meets the preset indicator threshold, the updated initial service health assessment model is used as the service health assessment model; when the performance estimate does not meet the preset indicator threshold, the initial service health model is used as the service health assessment model.
6. The method according to claim 2, wherein: After predicting third operating state information other than the second operating state information that has a causal relationship with the first operating state information according to the pre-trained target policy network, the method further includes: Obtaining observation parameters corresponding to the third operating state information at multiple historical time points, and determining an adaptive threshold corresponding to the third operating state information based on the observation parameters corresponding to the multiple historical time points; Generating the service health assessment model according to the first operating status information, the second operating status information, the third operating status information, and the causal relationship between each operating status information includes: The service health evaluation model is generated according to the first operating status information, the second operating status information, the third operating status information with the adaptive threshold, and the causal relationship between each piece of operating status information.
7. The method according to claim 1, wherein The determining, based on the causal relationship between each piece of the plurality of pieces of operating state information, associated operating state information having a direct causal relationship or an indirect causal relationship with the target operating state information includes: Acquire first associated operating status information that has a direct causal relationship with the target operating status information; If the first associated operating status information is determined to be abnormal according to the adaptive threshold corresponding to the first associated operating status information, the second associated operating status information having a direct causal relationship with the first associated operating status information is obtained; if the second associated operating status information is determined to be abnormal according to the adaptive threshold corresponding to the second associated operating status information, the third associated operating status information having a direct causal relationship with the second associated operating status information is obtained, and this process is repeated until all associated operating status information having a direct causal relationship or an indirect causal relationship with the target operating status information is determined.
8. The method according to claim 6 or claim 7, wherein: The adaptive threshold corresponding to each operating status information is determined in the following way: Construct a threshold time series model based on the autoregressive model and the moving average model; By inputting the observation parameters corresponding to each piece of running status information at multiple historical time points into the threshold time series model, the adaptive threshold corresponding to each piece of running status information is obtained.
9. The method according to claim 2, wherein: The determining, based on the historical operation data of the distributed system, first operation status information in the historical operation data and second operation status information having a causal relationship with the first operation status information includes: Acquiring structured or semi-structured operation status information data from the historical operation data of the distributed system; Determining a plurality of candidate operating status information in the structured and semi-structured operating status information data based on a preset data extraction rule; Based on the feature information of the plurality of candidate running state information, feature association processing is performed on the plurality of candidate running state information to obtain the first running state information and the second running state information having a causal relationship with the first running state information.
10. The method according to claim 2, wherein: The target policy network is trained as follows: Determine the relationship path between each candidate operation status information in the historical operation data using a preset path finding method; Pre-training a pre-built policy network based on the relationship path, determining a reward of the policy network, and updating network parameters of the policy network with maximizing the reward as an optimization goal to obtain a pre-trained policy network; The pre-trained policy network is retrained using multiple reward functions to obtain the target policy network.
11. The method according to claim 10, wherein: The multiple reward functions include a path accuracy reward function, a path validity reward function, and a path diversity reward function; and retraining the pre-trained policy network using the multiple reward functions to obtain the target policy network includes: Using the path accuracy reward function to provide a reward when a target candidate running state information among the candidate running state information is found according to the relationship path, and updating the pre-trained strategy network; Using the path validity reward function to give rewards according to the length of the relationship path, updating the pre-trained strategy network; Using the path diversity reward function to give rewards according to the similarity between the relationship path and the existing relationship path, and updating the pre-trained strategy network; The target policy network is determined based on the updated pre-trained policy network.
12. An electronic device comprising a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 11 are implemented.
13. A readable storage medium storing a program or instruction, wherein the program or instruction is executed by a processor to implement the steps of the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Server health degree analysis method and device, storage medium and electronic equipment
CN109800139A
Method and device for evaluating and observing health degree of business system
CN117194201A
System and method for output of assessment of physical entity attribute effects on physical environments through in part social networking service input
US20110125659A1
Cited By
Abnormality detection model selection method and system based on index portrait
CN120724255A
Server cluster network monitoring optimization method and device, medium and program product
CN120785746A
Industrial time series data management method and system, terminal and medium
CN120873555A
Malicious access information detection method and device
CN120880779A