WO2025181564A1 - 故障预测方法、故障预测模型训练方法、计算设备、存储介质及计算机程序产品 - Google Patents

故障预测方法、故障预测模型训练方法、计算设备、存储介质及计算机程序产品

Info

Publication number
WO2025181564A1
WO2025181564A1 PCT/IB2025/050236 IB2025050236W WO2025181564A1 WO 2025181564 A1 WO2025181564 A1 WO 2025181564A1 IB 2025050236 W IB2025050236 W IB 2025050236W WO 2025181564 A1 WO2025181564 A1 WO 2025181564A1
Authority
WO
WIPO (PCT)
Prior art keywords
sample
abnormal
fault prediction
event sequence
layer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
PCT/IB2025/050236
Other languages
English (en)
French (fr)
Inventor
王雨农
马旭华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Cloud Intelligence Singapore Holding Pvt Ltd
Original Assignee
Cloud Intelligence Singapore Holding Pvt Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Cloud Intelligence Singapore Holding Pvt Ltd filed Critical Cloud Intelligence Singapore Holding Pvt Ltd
Publication of WO2025181564A1 publication Critical patent/WO2025181564A1/zh
Anticipated expiration legal-status Critical
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Definitions

  • the present disclosure relates to the field of computer technology, and more particularly to a fault prediction method, a fault prediction model training method, a computing device, a storage medium, and a computer program product.
  • Cloud computing systems enable centralized management and utilization of servers, improving the efficiency of computing resource utilization.
  • Node Controller (NC) downtime is a significant factor affecting the stability of cloud computing systems. Unexpected and sudden downtime can cause significant losses to users.
  • NC Node Controller
  • a fault prediction method for use in a cloud computing system, the cloud computing system including a service processing unit.
  • the method comprises: obtaining abnormality log data and unit attribute information of the service processing unit; determining an abnormal event sequence based on the abnormality log data; and inputting the unit attribute information and the abnormal event sequence into a fault prediction model to obtain a fault prediction result for the service processing unit.
  • the fault prediction model is trained using positive samples, first sample labels corresponding to the positive samples, and negative samples, second sample labels corresponding to the negative samples.
  • the positive samples include the positive sample abnormal event sequence and the sample unit attribute information
  • the negative samples include the negative sample abnormal event sequence and the sample unit attribute information.
  • a fault prediction device which is applied to a cloud computing system, wherein the cloud computing system includes a service processing unit, and the method includes: an acquisition module configured to acquire abnormal log data and unit attribute information of the service processing unit; a determination module configured to determine an abnormal event sequence based on the abnormal log data; an input module configured to input the unit attribute information and the abnormal event sequence into a fault prediction model to obtain a fault prediction result of the service processing unit; wherein the fault prediction model is based on a positive sample, a first sample label corresponding to the positive sample, a negative sample, and the The second sample labels corresponding to the negative samples are obtained through training.
  • the positive samples include a positive sample abnormal event sequence and sample unit attribute information
  • the negative samples include a negative sample abnormal event sequence and the sample unit attribute information.
  • a fault prediction model training method comprising: obtaining sample abnormality log data and sample unit attribute information from a service processing unit; determining a sample abnormal event sequence based on the sample abnormality log data; determining positive and negative samples based on the sample abnormal event sequence and the sample unit attribute information; and training the fault prediction model based on the positive samples, the first sample labels corresponding to the positive samples, the negative samples, and the second sample labels corresponding to the negative samples until a fault prediction model that meets a training stop condition is obtained.
  • a fault prediction model training apparatus comprising: an acquisition module configured to acquire sample abnormality log data and sample unit attribute information from a service processing unit; a first determination module configured to determine a sample abnormality event sequence based on the sample abnormality log data; a second determination module configured to determine positive samples and negative samples based on the sample abnormality event sequence and the sample unit attribute information; and a training module configured to train the fault prediction model based on the positive samples, the first sample labels corresponding to the positive samples, the negative samples, and the second sample labels corresponding to the negative samples until a fault prediction model that meets a training stop condition is obtained.
  • a computing device comprising: a memory and a processor; the memory is configured to store a computer program/instruction, and the processor is configured to execute the computer program/instruction. When executed by the processor, the computer program/instruction implements the steps of the above-described fault prediction method or fault prediction model training method.
  • a computer-readable storage medium is provided, storing a computer program/instruction, which, when executed by a processor, implements the steps of the above-mentioned fault prediction method or fault prediction model training method.
  • a computer program product comprising a computer program/instruction, which, when executed by a processor, implements the steps of the above-mentioned fault prediction method or fault prediction model training method.
  • a fault prediction method applied to a cloud computing system the cloud computing system including a service processing unit, the method comprising: obtaining abnormal log data and unit attribute information of the service processing unit; determining an abnormal event sequence based on the abnormal log data; inputting the unit attribute information and the abnormal event sequence into a fault prediction model to obtain a fault prediction result for the service processing unit; wherein the fault prediction model is obtained by training positive samples, first sample labels corresponding to the positive samples, negative samples, and second sample labels corresponding to the negative samples.
  • the positive samples include a sequence of positive abnormal events and sample unit attribute information
  • the negative samples include a sequence of negative abnormal events and the sample unit attribute information.
  • the sample unit attribute information of the service processing unit is taken into account during the training of the fault prediction model. This supplements the real-time information in the system log, enriching the training data for the fault prediction model. This allows the fault prediction model to learn abnormal conditions specific to service processing units with different attribute information, thereby improving the accuracy of the fault prediction model's prediction results during application.
  • Figure 1 is a schematic diagram of an application scenario of a fault prediction method provided in one embodiment of this specification;
  • Figure 2 is a flow chart of a fault prediction method provided in one embodiment of this specification;
  • Figure 3 is a schematic diagram of the encoding process in a fault prediction method provided in one embodiment of this specification;
  • Figure 4 is a schematic diagram of a fault prediction model in a fault prediction method provided in one embodiment of this specification;
  • Figure 5 is a flow chart of the training process of a fault prediction model in a fault prediction method provided in one embodiment of this specification;
  • Figure 6 is a flow chart of the processing process of a fault prediction method provided in one embodiment of this specification;
  • Figure 7 is a schematic diagram of the structure of a fault prediction device provided in one embodiment of this specification;
  • Figure 8 is a flow chart of a fault prediction model training method provided in one embodiment of this specification;
  • Figure 9 is a schematic diagram of the structure of a fault prediction model training device provided in one embodiment of this specification;
  • Figure 10 is a block diagram
  • user information including but not limited to user device information, user personal information, etc.
  • data including but not limited to data used for analysis, stored data, and display data
  • user information are generally intended to be used in conjunction with the user information.
  • data, etc. are all information and data authorized by the user or fully authorized by all parties. The collection, use, and processing of relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or reject.
  • a large model refers to a deep learning model with large-scale model parameters, typically containing hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than 10 trillion model parameters.
  • a large model can also be called a foundation model. It is pre-trained on large-scale unlabeled corpus to produce a pre-trained model with more than 100 million parameters.
  • This model can adapt to a wide range of downstream tasks and has good generalization capabilities, such as a large language model (LLM) or a multi-modal pre-training model. In practical applications, large models only require a small number of samples to fine-tune the pre-trained model and can be applied to various tasks.
  • LLM large language model
  • NLP natural language processing
  • VQA visual question answering
  • IC image captioning
  • IC image captioning
  • natural language processing tasks such as text-based sentiment classification, text summarization, and machine translation.
  • Key application scenarios for large models include digital assistants, intelligent robots, search, online education, office software, e-commerce, and intelligent design.
  • the attention mechanism can be used to devote more attention resources to the target area of focus to obtain more detailed information of the target that needs attention and suppress other useless information.
  • the attention mechanism can usually be used as an interface to provide correlation information between elements in the mining sequence.
  • BERT Bidirectional Encoder Representation from Transformers, bidirectional encoding Transformer model, commonly used in natural language processing and image processing tasks.
  • XgBoost Extreme GradientBoosting, a commonly used ensemble learning algorithm.
  • NC Node Control, refers to a single unit in a cloud computing system used to count failures and downtimes.
  • ECS Elastic Compute Server, cloud server.
  • NLP Natural Language Processing, natural language processing.
  • MoE Mixture of Experts, a deep learning structure.
  • the TAAT model in the embodiments of this application, is a model based on the BERT model, using the Transformer algorithm with a time-aware attention mechanism to implement machine learning fault prediction.
  • This specification provides a fault prediction method, as well as a fault prediction device, a fault prediction model training method, a fault prediction model training device, a computing device, a computer-readable storage medium, and a computer program product, each of which is described in detail in the following embodiments. See Figure 1, which shows a schematic diagram of an application scenario of a fault prediction method provided according to one embodiment of this specification. As shown in Figure 1, FIG1 includes a cloud computing platform 102 and a cloud computing server cluster 104.
  • the cloud computing platform 102 is used to manage the cloud computing server cluster 104 and can be used to execute the fault prediction method. Specifically, the cloud computing platform 102 can obtain abnormal log data and unit attribute information for each server from the cloud computing server cluster 104. For example, for a particular server, the abnormal log data and unit attribute information for the server are used to determine an abnormal event sequence. The abnormal event sequence and unit attribute information are then input into a fault prediction model to obtain a fault prediction result for the server. In practical applications, when performing fault prediction, the cloud computing platform 102 can obtain real-time abnormal log data. This collected abnormal log data can be obtained by sampling each server on a real-time link at a preset time interval, such as 5 minutes.
  • the cloud computing platform 102 predicts whether each server will experience a downtime failure. Based on the fault prediction results, the platform determines whether to perform maintenance on the server failure in advance to minimize user awareness of the downtime, thereby optimizing the user experience.
  • Fault prediction results include downtime results and no-downtime results.
  • a downtime result indicates that the server is at risk of downtime within a certain period of time. In this case, preemptive maintenance can be performed to minimize user downtime.
  • a no-downtime result indicates that the server is not at risk of downtime within a certain period of time. In this case, no operations can be performed temporarily.
  • Cloud computing platform 102 can be understood as a service based on hardware and software resources, providing computing, network, and storage capabilities.
  • FIG. 2 shows a flowchart of a fault prediction method according to one embodiment of this specification, applied to a cloud computing system including a service processing unit. The method specifically includes the following steps. Step 202: Obtain the abnormality log data and unit attribute information of the service processing unit.
  • a service processing unit can be understood as any server in the cloud computing system.
  • a service processing unit can be, for example, an NC.
  • the abnormality log data of the service processing unit can be understood as the abnormality log of the service processing unit detected by a detector.
  • the unit attribute information can be understood as the attribute information of the service processing unit. This attribute information is static and inherent and does not change.
  • the unit attribute information includes at least one of the following: brand information, memory information, memory manufacturer information, CPU manufacturer information, server manufacturer information, etc.
  • the abnormality log data reported by the service processing unit can be obtained in real time through the detector, and the static information field of the service processing unit can be extracted to obtain the unit attribute information of the service processing unit.
  • real-time system log data collected in real time can be obtained.
  • This real-time system log data can be obtained by sampling each service processing unit on a real-time link at a preset time interval.
  • the preset time interval For example, it could be 5 minutes, 10 seconds, etc.
  • a cloud computing system may include multiple service processing units, and exception log data and unit attribute information may be obtained for each service processing unit.
  • Each service processing unit may include multiple exception log data. For example, exception log data A1, A2, and A3 may be obtained for service processing unit A.
  • Step 204 Determine an exception event sequence based on the exception log data. Specifically, after obtaining the exception log data for a service processing unit, determine an exception event sequence based on the exception log data.
  • An exception event sequence can be understood as a sequence consisting of multiple exception events.
  • determining an exception event sequence based on the exception log data includes: processing the exception information in the exception log data to determine the exception event corresponding to the exception information; determining the event identifier corresponding to the exception event based on a matching relationship between a reference exception event and a reference event identifier in an exception event library; and sorting the event identifiers corresponding to the exception events based on the occurrence time of the exception events to generate the exception event sequence.
  • Abnormal events include, but are not limited to, cloud computing system downtime events, hardware anomaly events, and memory anomaly events.
  • the abnormal event library can be pre-built, similar to a corpus in natural language processing. It can include all types of abnormal events.
  • Each reference abnormal event in the abnormal event library corresponds to a reference event identifier, which can be represented by numbers, letters, or other characters.
  • the reference event identifier can be represented by a number, such as 1 for a downtime event and 2 for a hardware anomaly event.
  • the time of occurrence of the abnormal event can be determined based on the abnormal log data. Based on this, the abnormal information recorded in the abnormal log data can be processed to determine the abnormal event to which the abnormal information corresponds.
  • processing the exception information in the exception log data and determining the exception event corresponding to the exception information includes abstracting the exception information in the exception log data based on a regular expression to determine the exception event corresponding to the exception information.
  • the exception log data can be mapped to the exception event.
  • the mapping process of the exception log data can be performed by mapping the exception log data to the exception event using a regular expression.
  • the exception log data can be abstracted into a phrase based on expert knowledge and the regular expression, and the abstracted phrase can be used as the exception event. For example, for one exception log data item, keywords shared by the exception log data item and other exception log data items can be determined. Based on the keywords, the exception log data items can be classified into different exception categories, thereby obtaining a phrase used to name the exception event. It is understood that the abstracted exception event can be a unified description of the same type of exception log data. Continuing with the above example, let's say the exception log data A1 of service processing unit A is "mce: [Hardware Error]: Machine check events logged.” The exception information recorded in this exception log data is a hardware error.
  • the exception information recorded in this exception log data can be processed to obtain the exception event A1 corresponding to this exception information as "dmesg_unrecover_mce.”
  • the event identifier corresponding to exception event A1 is determined to be "2.”
  • the event identifier of exception event A2 corresponding to exception log data A2 is determined to be "1,”
  • the event identifier of exception event A3 corresponding to exception log data A3 is determined to be "4.”
  • the event identifiers corresponding to exception events A1, A2, and A3 can be sorted based on the occurrence time of the exceptions, resulting in the exception event sequence "1, 4, 2.”
  • it is also possible to pre-collect various exception logs process the exception information in the exception logs, construct corresponding exception events, and then perform encoding operations on the constructed exception events with corresponding numerical identifiers, thereby pre-building an exception event library for various exception events.
  • the exception event library can contain reference event identifiers for various exception events. This allows subsequent data pre-processing of the exception logs to be constructed based on a separate exception event library, eliminating the complex process of pre-training the fault prediction model to encode the exception log text.
  • This encoding process based on "abnormal log data to abnormal events to event identifiers," reduces the model size, accelerates training and testing, and replaces the original encoding process.
  • the complex process of encoding the abnormal information text is simplified, reducing the size of the fault prediction model and reducing the storage space required by the computer system.
  • the event identifier corresponding to the abnormal event can also be determined based on the order in which the abnormal events occurred within a preset time period. For example, if abnormal event A is the first to occur within a preset time period, the event identifier corresponding to abnormal event A is 1. If abnormal event B is the second to occur within the preset time period, the event identifier corresponding to abnormal event B is 2. By determining event identifiers based on the order in which abnormalities occur, there is no need to pre-set a matching relationship between reference abnormal events and reference event identifiers, saving computing time and storage resources. Alternatively, the event identifier corresponding to an abnormal event can be determined based on the event type of the abnormal event. This disclosure is not limited to this.
  • FIG. 3 shows a schematic diagram of the encoding process in a fault prediction method provided according to one embodiment of this specification.
  • the event identifier of the abnormal event is 2, and the encoding vector obtained by encoding it is [2]; the event identifier of the abnormal event is 1, and the encoding vector obtained by encoding it is [1]; the event identifier of the abnormal event is 9, and the encoding vector obtained by encoding it is [9]; the event identifier of the abnormal event is 30, and the encoding vector obtained by encoding it is [30];
  • the unit attribute information of the service processing unit includes unit attribute information 1, 2, 3 and 4, and the unit attribute information 1 is ne-hot encoded, and the encoding vector obtained is 0010; the unit attribute information 2 is ne-hot encoded, and the encoding vector obtained is 010; the unit attribute information 3 is ne-hot encoded, and the encoding vector obtained is 100; the unit attribute information 4 is
  • exception log data contains statements describing computer status and contains a lot of redundant information
  • abstract processing of the exception log data can extract key information. It can also selectively filter the exception log data, for example, by parsing exception log data containing an Error field (i.e., an error field).
  • sorting the event identifiers corresponding to the exception events based on the exception occurrence times corresponding to the exception events to generate the exception event sequence includes sorting the event identifiers corresponding to the exception events using a preset sorting rule based on the exception occurrence times corresponding to the exception events, and generating the exception time series based on the sorted event identifiers.
  • the preset sorting rule can be understood as a rule for sorting event identifiers based on the exception occurrence time.
  • the preset sorting rule can be a rule for sorting event identifiers based on the exception occurrence time.
  • the event identifiers can be sorted in reverse order based on the anomaly occurrence time corresponding to the abnormal events.
  • the event identifiers corresponding to the abnormal events are sorted in reverse order based on the anomaly occurrence time, thereby generating an abnormal event sequence based on the reverse order of the anomaly occurrence time.
  • abnormal information often has a correlation; that is, abnormal information at a previous moment can cause another abnormal information at a later moment.
  • the fault prediction model can better utilize the contextual semantic information of the abnormal information to predict faults in the service processing unit.
  • Step 206 Input the unit attribute information and the abnormal event sequence into a fault prediction model to obtain a fault prediction result for the service processing unit.
  • the fault prediction model is trained using positive samples, first sample labels corresponding to the positive samples, negative samples, and second sample labels corresponding to the negative samples.
  • the positive samples include the positive sample abnormal event sequence and the sample unit attribute information
  • the negative samples include the negative sample abnormal event sequence and the sample unit attribute information.
  • the unit attribute information and abnormal event sequence of the service processing unit are input into the fault prediction model.
  • the fault prediction model can perform a fault prediction based on the input unit attribute information and abnormal event sequence to predict whether a cloud computing system failure will occur. Based on the prediction result, the model can determine whether to perform maintenance on the cloud computing system in advance to minimize user awareness of the failure, thereby optimizing the user experience.
  • NC downtime is a significant factor affecting the stability of cloud computing systems. Unexpected and sudden downtime can cause significant losses to users.
  • a fault prediction model can be used to predict failures based on input unit attribute information and abnormal event sequences. This model infers whether the current NC in the cloud computing system will experience downtime within a certain period of time, and outputs a fault prediction result. This prediction result can include both downtime and non-downtime results.
  • a downtime result can be understood as a prediction of the risk of downtime for a service processing unit within a certain period of time. This allows for proactive maintenance and operational response to prevent downtime, enabling users to mitigate the downtime.
  • the "no downtime” result can be understood as a prediction that the service processing unit will not face downtime risk for a period of time in the future, and no operations are being performed at this time.
  • an encoding vector of the unit attribute information can be input into the fault prediction model.
  • inputting the unit attribute information and the abnormal event sequence into the fault prediction model to obtain a fault prediction result for the service processing unit includes: inputting the unit attribute information and the abnormal event sequence into the fault prediction model to obtain a confidence level output by the fault prediction model; and determining, based on the confidence level and a preset confidence threshold, whether the fault prediction result for the service processing unit is a downtime result or a no downtime result.
  • the unit attribute information and the abnormal event sequence can be input into a fault prediction model.
  • a target processing layer can be determined from multiple processing layers included in the fault prediction model based on the unit attribute information. The abnormal event sequence is then processed based on the target processing layer to obtain a confidence level output by the fault prediction model.
  • the fault prediction model includes a coding layer, a gating layer, and multiple processing layers.
  • inputting the unit attribute information and the abnormal event sequence into the fault prediction model to obtain a fault prediction result for the service processing unit includes: inputting the abnormal event sequence into the coding layer to obtain abnormal event sequence characteristics; inputting the unit attribute information into the gating layer to determine a target processing layer from the multiple processing layers using the gating layer; and inputting the abnormal event sequence characteristics into the target processing layer to obtain a fault prediction result for the service processing unit.
  • the encoding layer can be used to encode the abnormal event sequence to obtain abnormal event sequence features.
  • the gating layer can then be used to determine a target processing layer among multiple processing layers based on unit attribute information.
  • This target processing layer can then be used to perform feature processing on the abnormal event sequence features to obtain a fault prediction result for the service processing unit.
  • fault prediction for the service processing unit is achieved by determining the target processing layer through the gating layer, encoding the abnormal event sequence through the encoding layer, and processing the encoded abnormal event sequence features by the target processing layer.
  • the selection of the target processing layer takes into account the associations between different service processing units and processing layers, ensuring the targeted nature of the fault prediction and further improving the accuracy of the fault prediction results.
  • inputting the unit attribute information into the gating layer and using the gating layer to determine the target processing layer among the multiple processing layers includes: inputting the unit attribute information features into the gating layer and using the gating layer to calculate the first attention weight of each processing layer; Based on the first attention weights of each processing layer, a target processing layer is determined among the multiple processing layers. Accordingly, after using the gating layer to determine the target processing layer among the multiple processing layers, the method further includes: determining a target first attention weight corresponding to the target processing layer based on the first attention weights of each processing layer, and sending the target first attention weight to the target processing layer.
  • the gating layer can be used to calculate the first attention weight of each processing layer, and the target attention layer can be determined based on the first attention weight of each processing layer.
  • the target first attention weight corresponding to the target processing layer can also be sent to the target processing layer.
  • the fault prediction model also includes an attention mechanism layer.
  • the method further includes: inputting the abnormal event sequence features into the attention mechanism layer, using the attention mechanism layer to calculate a second attention weight corresponding to the abnormal event sequence features; and sending the second attention weight to the target processing layer.
  • Inputting the abnormal event sequence features into the target processing layer to obtain a fault prediction result for the service processing unit includes: processing the abnormal event sequence features based on the target first attention weight and the second attention weight to obtain a fault prediction result for the service processing unit.
  • Figure 4 shows a schematic diagram of a fault prediction model in a fault prediction method provided in one embodiment of this specification.
  • fault prediction models include a gating layer (i.e., static gates) and multiple processing layers (i.e., TAAT models).
  • Each TAAT model includes an encoding layer (i.e., exception embedding), an attention mechanism layer (i.e., multi-head exception attention), a feature processing layer (i.e., MTA block), and a classifier (i.e., classifier).
  • encoding layer i.e., exception embedding
  • an attention mechanism layer i.e., multi-head exception attention
  • a feature processing layer i.e., MTA block
  • classifier i.e., classifier
  • Figure 4 shows the encoding layer, attention mechanism layer, multiple feature processing layers, and classifier. These multiple feature processing layers can be used to implement feature processing for multiple TAAT models.
  • the unit attribute information of the service processing unit (including unit attribute information 1, 2, 3, and 4) can be input into the gating layer, which can then use the gating layer to determine the target feature processing layer from multiple feature processing layers.
  • the gating layer can calculate the first attention weights of the multiple feature processing layers through a fully connected layer and softmax.
  • the gating layer can then determine the target feature processing layer from the multiple feature processing layers and send the first attention weight of each feature processing layer to the corresponding feature processing layer.
  • the weight matrix can be understood as a matrix containing the initial attention weights of multiple feature processing layers. This weight matrix can be subsequently adjusted to ensure that the gating layer During application, the appropriate target feature processing layer can be determined from multiple feature processing layers.
  • the target feature processing layer determined by the gating layer can be understood as the target TAAT model (i.e., target processing layer) determined by the gating layer.
  • the abnormal event sequence of the service processing unit can be input into the encoding layer to obtain the abnormal event sequence features output by the encoding layer. These abnormal event sequence features are then input into the attention mechanism layer.
  • the attention mechanism layer divides the forward fully connected layer into multiple fully connected layers, calculates the second attention weight corresponding to the abnormal event sequence features, and then uses the target feature processing layer to perform a weighted average based on the first and second attention weights.
  • the predicted features are then output as prediction features corresponding to the abnormal event sequence features.
  • These prediction features are then input into the classifier to obtain the confidence level of the service processing unit. This confidence level and a pre-set confidence threshold are then used to determine the fault prediction result for the service processing unit.
  • a fault prediction model including three feature processing layers i.e., three feature processing layers included in the TAAT model
  • the gating layer can calculate the first attention weight of feature processing layer 1, the first attention weight of feature processing layer 2, and the first attention weight of feature processing layer 3 based on the input unit attribute information and weight matrix of the service processing unit, and send the first attention weight of feature processing layer 1 to feature processing layer 1, the first attention weight of feature processing layer 2 to feature processing layer 2, and the first attention weight of feature processing layer 3 to feature processing layer 3.
  • the abnormal event sequence of the service processing unit is input into the encoding layer to obtain the abnormal event sequence features output by the encoding layer.
  • the abnormal event sequence features are input into the attention mechanism layer, and the second attention weight corresponding to the abnormal event sequence features is calculated.
  • Feature processing layer 1 outputs the predicted features corresponding to the abnormal event sequence features based on the second attention weight.
  • feature processing layers 2 and 3 also output predicted features. Therefore, feature processing layers 1, 2, and 3 can be respectively evaluated based on the first attention weights corresponding to feature processing layers 1, 2, and 3.
  • the prediction features output by steps 2 and 3 are weighted and averaged to obtain a target prediction feature. This target prediction feature is then input into the classifier to obtain the confidence score for the service processing unit.
  • the fault prediction model is used to predict faults for the service processing unit, thereby achieving fault prediction for the cloud computing system and maintaining the stability of the cloud computing system.
  • FIG5 shows a flowchart of the fault prediction model training process in a fault prediction method provided according to one embodiment of this specification.
  • the fault prediction model training steps include: Step 502: Obtaining sample abnormality log data and sample unit attribute information of the service processing unit. Specifically, the sample abnormality log data and sample unit attribute information of the service processing unit can be obtained in real time by a detector. The specific acquisition process is similar to the aforementioned process for obtaining abnormality log data and unit attribute information, and will not be repeated in this disclosure.
  • Step 504 Determining a sample abnormal event sequence based on the sample abnormality log data.
  • determining a sample abnormal event sequence based on the sample abnormal log data includes: processing sample abnormal information in the sample abnormal log data to determine a sample abnormal event corresponding to the sample abnormal information; determining a sample event identifier corresponding to the sample abnormal event based on a matching relationship between a reference abnormal event and a reference event identifier in an abnormal event library; The sample event identifiers corresponding to the sample abnormal events are sorted based on the abnormal occurrence times corresponding to the sample abnormal events to generate the sample abnormal event sequence.
  • the sample abnormal information recorded in the sample abnormality log data can be processed to determine the sample abnormal events corresponding to the sample abnormal information.
  • sample event identifiers corresponding to the sample abnormal events are then determined based on the matching relationship between reference abnormal events and reference event identifiers in the abnormal event library.
  • the sample event identifiers corresponding to the sample abnormal events are then sorted based on the abnormal occurrence times corresponding to the sample abnormal events to generate the sample abnormal event sequence.
  • the specific process for generating the sample abnormal event sequence here is similar to the specific process for generating the abnormal event sequence described above and will not be repeated here.
  • processing the sample abnormal information in the sample abnormality log data to determine the sample abnormal events corresponding to the sample abnormal information includes: abstracting the sample abnormal information in the sample abnormality log data based on a regular expression to determine the sample abnormal events corresponding to the sample abnormal information.
  • determining the sample abnormal event is similar to the process for determining abnormal events described above and will not be repeated here.
  • sorting the sample event identifiers corresponding to the sample abnormal events according to the abnormal occurrence times corresponding to the sample abnormal events to generate the sample abnormal event sequence includes: sorting the sample event identifiers corresponding to the sample abnormal events according to the abnormal occurrence times corresponding to the sample abnormal events using a preset sorting rule, and generating the sample abnormal event sequence based on the sorted sample event identifiers.
  • the process of generating the sample abnormal event sequence here is similar to the process of generating the abnormal event sequence described above and will not be repeated here.
  • Step 506 Determine positive and negative samples based on the sample abnormal event sequence and the sample unit attribute information.
  • determining positive samples based on the sample abnormal event sequence and the sample unit attribute information includes: sampling the sample abnormal event sequence according to a sampling time interval and a sampling time length to obtain a positive sample abnormal event sequence; and using the positive sample abnormal event sequence and the sample unit attribute information as the positive sample.
  • the sample abnormal event sequence can be understood as an abnormal event sequence determined from sample abnormality log data when a service processing unit experiences a downtime.
  • the preset sampling time can be understood as a preset sampling time interval; the preset sampling length can be understood as a preset sampling window length; and the preset negative sample sampling rule can be understood as a rule for randomly acquiring samples in a proportional manner from the sample abnormal event sequence.
  • the sample abnormal event sequence when acquiring positive samples, can be sampled with overlapping intervals of 5 minutes and a sampling window length of 3 days, thereby obtaining a positive sample abnormal event sequence.
  • a sliding window approach is used to calculate a subsequence of all abnormal events within the previous 72 hours (i.e., 3 days) starting at every 5-minute time point.
  • the first sampling window begins at time A and ends at time B (72 hours before time A).
  • the window then moves forward 5 minutes
  • the second sampling window begins at time C (5 minutes before time A), also covering the previous 72 hours, and so on.
  • the sample abnormal event sequence can be sampled according to a preset negative sample sampling rule to obtain a negative sample abnormal event sequence.
  • the negative sample abnormal event sequence and the sample unit attribute information are used as negative samples.
  • a negative sample abnormal event sequence can be understood as an abnormal event sequence determined from sample abnormality log data when the service processing unit does not experience downtime.
  • the preset negative sample sampling rule can be understood as sampling according to a preset sampling ratio. Specifically, abnormal events can be randomly obtained from the sample abnormal event sequence according to the preset sampling ratio to determine the negative sample abnormal event sequence.
  • the constructed positive and negative samples can help the fault prediction model fully learn and distinguish between downtime and normal service processing unit states, thereby improving the prediction accuracy and generalization ability of the fault prediction model in practical applications.
  • Step 508 Train the fault prediction model based on the positive samples, the first sample labels corresponding to the positive samples, the negative samples, and the second sample labels corresponding to the negative samples until a fault prediction model that meets the training stop condition is obtained.
  • the training stop condition can be understood as the model loss value reaching a preset loss value threshold or the number of model training times reaching a preset number of times threshold.
  • the first sample label can be represented by 1, and the second sample label can be represented by 0.
  • the positive samples, the first sample labels, the negative samples, and the second sample labels can be input into the fault prediction model to obtain the first prediction results corresponding to the positive samples and the second prediction results corresponding to the negative samples.
  • a first model loss value is calculated based on the first sample labels and the first prediction results.
  • a second model loss value is calculated based on the second prediction results and the second sample labels.
  • the fault prediction model is trained based on the first and second model loss values.
  • the fault prediction model includes a coding layer, a gating layer, and multiple processing layers; accordingly, the fault prediction model is trained according to the positive sample, the first sample label corresponding to the positive sample, the negative sample, and the second sample label corresponding to the negative sample until a fault prediction model that meets the training stop condition is obtained, including: inputting the positive sample abnormal event sequence into the coding layer to obtain positive sample abnormal event sequence features; inputting the sample unit attribute information into the gating layer, and using the gating layer to determine the target processing layer among the multiple processing layers; inputting the positive sample abnormal event sequence features into the target processing layer to obtain a first prediction result corresponding to the positive sample abnormal event sequence features; and inputting the negative sample abnormal event sequence into the coding layer to obtain negative sample abnormal event sequence features; inputting the sample unit attribute information into the gating layer, and using the gating layer to
  • the target processing layer is configured to input the negative sample abnormal event sequence features into the target processing layer to obtain a second prediction result corresponding to the negative sample abnormal event sequence features; and the fault prediction model is trained based on the first prediction result, the second prediction result, the first sample label, and the second sample label until a fault prediction model that meets the training stop condition is obtained.
  • the processing process of the fault prediction model training phase is similar to that of the fault prediction model application phase described above and will not be further described here.
  • static information such as unit attribute information into both positive and negative samples, and utilizing both real-time and static information from service processing units, the data source is enriched and the model is made more accurate.
  • inputting the sample unit attribute information features into the gating layer and determining a target processing layer from the multiple processing layers using the gating layer includes: inputting the sample unit attribute information features into the gating layer, calculating the first attention weight of each processing layer using the gating layer; and determining the target processing layer from the multiple processing layers based on the first attention weights of each processing layer. Accordingly, after determining the target processing layer from the multiple processing layers using the gating layer, the method further includes: determining a target first attention weight corresponding to the target processing layer from the first attention weights of each processing layer, and sending the target first attention weight to the target processing layer.
  • the first attention weight can be understood as the attention weight of the processing layer.
  • the gating layer can calculate the first attention weights of multiple feature processing layers using a fully connected layer and softmax based on the unit attribute information and weight matrix of the service processing unit. The gating layer can then determine the target feature processing layer from the multiple feature processing layers based on the first attention weights of the multiple feature processing layers, and send the target first attention weight of the target feature processing layer to the target feature processing layer. In addition, the gating layer can also send the first attention weights of other feature processing layers to the other feature processing layers. In summary, by calculating the first attention weight of each processing layer, the target processing layer is selected, allowing the model to specifically select the processing layer that processes the abnormal event sequence. Furthermore, the fault prediction model also includes an attention mechanism layer.
  • the method further includes: inputting the negative sample abnormal event sequence features into the attention mechanism layer, calculating the negative sample second attention weight corresponding to the negative sample abnormal event sequence features using the attention mechanism layer; and sending the negative sample second attention weight to the target processing layer.
  • Inputting the negative sample abnormal event sequence features into the target processing layer and obtaining the second prediction result corresponding to the negative sample abnormal event sequence features includes: The negative sample abnormal event sequence features are processed based on the target first attention weight and the negative sample second attention weight to obtain a second prediction result corresponding to the negative sample abnormal event sequence features.
  • the method further includes: inputting the positive sample abnormal event sequence features into the attention mechanism layer, calculating the positive sample second attention weight corresponding to the positive sample abnormal event sequence features using the attention mechanism layer; and sending the positive sample second attention weight to the target processing layer.
  • Inputting the positive sample abnormal event sequence features into the target processing layer to obtain the first prediction result corresponding to the positive sample abnormal event sequence features includes: processing the positive sample abnormal event sequence features based on the target first attention weight and the positive sample second attention weight to obtain the first prediction result corresponding to the positive sample abnormal event sequence features.
  • the target first attention weight can be understood as the attention weight of the target processing layer.
  • the second attention weight can be understood as the attention weight of the sample abnormal event sequence feature. Therefore, the positive sample second attention weight can be understood as the attention weight of the positive sample abnormal event sequence feature.
  • the negative sample second attention weight can be understood as the attention weight of the negative sample abnormal event sequence feature. Specifically, as described in Figure 4 above, after the gating layer determines the target feature processing layer, the negative sample abnormal event sequence of the service processing unit can be input into the encoding layer to obtain the negative sample abnormal event sequence feature output by the encoding layer. The negative sample abnormal event sequence feature is then input into the attention mechanism layer.
  • the attention mechanism layer can divide the forward fully connected layer into multiple fully connected layers, calculate the negative sample second attention weight corresponding to the negative sample abnormal event sequence feature, and then perform a weighted average based on the first attention weight and the negative sample second attention weight through the target feature processing layer to output a predicted feature corresponding to the negative sample abnormal event sequence feature.
  • This predicted feature is then input into the classifier to obtain the confidence level of the service processing unit. This facilitates the subsequent determination of the fault prediction result (i.e., the second prediction result) for the service processing unit based on the confidence level and a preset confidence threshold.
  • the process of obtaining the first prediction result corresponding to the features of a positive sample abnormal event sequence is similar to the process of obtaining the second prediction result described above, and will not be repeated here.
  • the hybrid expert model calculates an attention weight for each abnormal event sequence, thereby specifically analyzing the sample and enabling the model to integrate information to predict downtime.
  • the sample unit attribute information of the service processing unit is taken into account. This sample unit attribute information supplements the real-time information in the system log, enriching the training data for the fault prediction model. This allows the fault prediction model to learn abnormal conditions for service processing units with different attribute information, thereby improving the accuracy of the prediction results during application.
  • FIG6 further illustrates the fault prediction method provided in this specification using the application of the fault prediction method in fault prediction model training as an example.
  • FIG6 shows a process flow chart of a fault prediction method provided in one embodiment of this specification, specifically comprising the following steps: Step 602: Obtain sample abnormal log data and sample unit attribute information of the service processing unit. Specifically, the sample abnormality log data and sample unit attribute information (ie, static information) of the NC (ie, service processing unit) may be obtained. Step 604: Process the sample abnormality information in the sample abnormality log data to determine the sample abnormality event corresponding to the sample abnormality information.
  • Step 606 Determine the sample event identifier corresponding to the sample abnormality event based on the matching relationship between the reference abnormal event and the reference event identifier in the abnormal event library.
  • the sample event identifier "32" corresponding to the sample abnormality event “dmesg_unrecover_mce” can be determined based on the matching relationship between the reference abnormal event and the reference event identifier in the pre-built abnormal event library.
  • Step 608 Sort the sample event identifiers corresponding to the sample abnormality events according to the abnormality occurrence time corresponding to the sample abnormality events to generate the sample abnormality event sequence. Specifically, the sample event identifiers corresponding to each sample abnormality event can be sorted in reverse order according to the abnormality occurrence time of multiple sample abnormality times to obtain the sample abnormality event sequence.
  • Step 610 The sample abnormal event sequence is sampled based on the sampling time interval and sampling time length to obtain a positive sample abnormal event sequence.
  • the positive sample abnormal event sequence and the sample unit attribute information are used as positive samples. Specifically, the sample abnormal event sequence can be sampled based on a sampling time interval of 5 minutes and a sampling time length of 3 days.
  • Step 612 According to the preset negative sample sampling rule, the sample abnormal event sequence is sampled to obtain a negative sample abnormal event sequence.
  • the negative sample abnormal event sequence and the sample unit attribute information are used as negative samples.
  • the sample abnormal event sequence can be randomly sampled to obtain a sample abnormal event sequence 3 days prior to the sampling time as the negative sample abnormal event sequence.
  • the negative sample abnormal event sequence and the sample unit attribute information are used as negative samples.
  • the sample abnormal event sequence can be sampled based on a sampling time interval of 5 minutes and a sampling time length of 3 days.
  • Step 614 Train the fault prediction model based on the positive samples, the first sample labels corresponding to the positive samples, the negative samples, and the second sample labels corresponding to the negative samples until a fault prediction model that meets the training stop condition is obtained.
  • the fault prediction model can be trained based on the positive samples, the first sample labels corresponding to the positive samples being 1, the negative samples, and the second sample labels corresponding to the negative samples being 0 until a fault prediction model that meets the training stop condition is obtained.
  • the positive sample abnormal event sequence can be input into the encoding layer to obtain positive sample abnormal event sequence features;
  • the sample unit attribute information can be input into the gating layer, and the gating layer can be used to determine a target processing layer among the multiple processing layers;
  • the positive sample abnormal event sequence features can be input into the target processing layer to obtain a first prediction result corresponding to the positive sample abnormal event sequence features;
  • the negative sample abnormal event sequence can be input into the encoding layer to obtain negative sample abnormal event sequence features;
  • the sample unit attribute information can be input into the gating layer, and the gating layer can be used to determine the target processing layer among the multiple processing layers;
  • the negative sample abnormal event sequence features can be input into the target processing layer to obtain a second prediction result corresponding to the negative sample abnormal event sequence features; and
  • the fault prediction model can be trained based on the first prediction result, the second prediction result, the first sample label, and the second sample label until a fault prediction model that meets the training stop condition is obtained.
  • the above method takes into account the sample unit attribute information of the service processing unit during the training of the fault prediction model.
  • This sample unit attribute information supplements the real-time information in the system log, enriching the training data for the fault prediction model.
  • This enables the fault prediction model to learn abnormal conditions specific to service processing units with different attribute information, thereby improving the accuracy of the fault prediction model's prediction results during application.
  • this specification also provides an embodiment of a fault prediction device.
  • Figure 7 shows a schematic structural diagram of a fault prediction device provided in one embodiment of this specification.
  • the apparatus includes: an acquisition module 702 configured to acquire abnormal log data and unit attribute information of the service processing unit; a determination module 704 configured to determine an abnormal event sequence based on the abnormal log data; and an input module 706 configured to input the unit attribute information and the abnormal event sequence into a fault prediction model to obtain a fault prediction result for the service processing unit.
  • the fault prediction model is obtained by training with positive samples, first sample labels corresponding to the positive samples, negative samples, and second sample labels corresponding to the negative samples.
  • the positive samples include positive sample abnormal event sequences and sample unit attribute information
  • the negative samples include negative sample abnormal event sequences and the sample unit attribute information.
  • the fault prediction model includes a coding layer, a gating layer, and multiple processing layers.
  • the input module 706 is further configured to: input the abnormal event sequence into the coding layer to obtain abnormal event sequence characteristics; input the unit attribute information into the gating layer, and use the gating layer to determine a target processing layer among the multiple processing layers; input the abnormal event sequence characteristics into the target processing layer to obtain a fault prediction result for the service processing unit.
  • the input module 706 is further configured to: input the unit attribute information characteristics into the gating layer, and use the gating layer to calculate a first attention weight for each processing layer; and determine a target processing layer among the multiple processing layers based on the first attention weights of each processing layer.
  • the method further includes: Determining a target first attention weight corresponding to the target processing layer from the first attention weights of each processing layer, and sending the target first attention weight to the target processing layer.
  • the fault prediction model further includes an attention mechanism layer; the input module 706 is further configured to: input the abnormal event sequence features into the attention mechanism layer, calculate a second attention weight corresponding to the abnormal event sequence features using the attention mechanism layer; and send the second attention weight to the target processing layer; inputting the abnormal event sequence features into the target processing layer to obtain a fault prediction result for the service processing unit includes: processing the abnormal event sequence features based on the target first attention weight and the second attention weight to obtain a fault prediction result for the service processing unit.
  • the input module 706 is further configured to: input the unit attribute information and the abnormal event sequence into the fault prediction model to obtain a confidence level output by the fault prediction model; and determine whether the fault prediction result for the service processing unit is a downtime result or a non-downtime result based on the confidence level and a preset confidence threshold.
  • the determination module 704 is further configured to: process the abnormal information in the abnormal log data to determine the abnormal event corresponding to the abnormal information; determine the event identifier corresponding to the abnormal event based on the matching relationship between the reference abnormal event and the reference event identifier in the abnormal event library; and sort the event identifiers corresponding to the abnormal event according to the abnormal occurrence time corresponding to the abnormal event to generate the abnormal event sequence.
  • the determination module 704 is further configured to: abstract the abnormal information in the abnormal log data according to a regular expression to determine the abnormal event corresponding to the abnormal information. In an optional embodiment, the determination module 704 is further configured to: sort the event identifiers corresponding to the abnormal event according to the abnormal occurrence time corresponding to the abnormal event using a preset sorting rule, and generate the abnormal event sequence based on the sorted event identifiers.
  • the apparatus further includes a training module configured to: obtain sample abnormality log data and sample unit attribute information of the service processing unit; determine a sample abnormality event sequence based on the sample abnormality log data; determine the positive sample and the negative sample based on the sample abnormality event sequence and the sample unit attribute information;
  • the fault prediction model is trained according to the positive samples, the first sample labels corresponding to the positive samples, the negative samples, and the second sample labels corresponding to the negative samples until a fault prediction model that meets a training stop condition is obtained.
  • the fault prediction model includes an encoding layer, a gating layer, and multiple processing layers; accordingly, the training module is further configured to: input the positive sample abnormal event sequence into the encoding layer to obtain positive sample abnormal event sequence features; input the sample unit attribute information into the gating layer, and use the gating layer to determine a target processing layer among the multiple processing layers; input the positive sample abnormal event sequence features into the target processing layer to obtain a first prediction result corresponding to the positive sample abnormal event sequence features; and input the negative sample abnormal event sequence into the encoding layer to obtain negative sample abnormal event sequence features; input the sample unit attribute information into the gating layer, and use the gating layer to determine the target processing layer among the multiple processing layers; input the negative sample abnormal event sequence features into the target processing layer to obtain a second prediction result corresponding to the negative sample abnormal event sequence features; and train the fault prediction model based on the first prediction result, the second prediction result, the first sample label, and the second sample label until a fault prediction model that meets a training stop condition is obtained.
  • the training module is further configured to: input the sample unit attribute information characteristics into the gating layer, and use the gating layer to calculate the first attention weight of each processing layer; determine the target processing layer among the multiple processing layers based on the first attention weight of each processing layer; accordingly, after using the gating layer to determine the target processing layer among the multiple processing layers, it also includes: determining the target first attention weight corresponding to the target processing layer from the first attention weights of each processing layer, and sending the target first attention weight to the target processing layer.
  • the fault prediction model further includes an attention mechanism layer;
  • the training module is further configured to: input the negative sample abnormal event sequence features into the attention mechanism layer, and use the attention mechanism layer to calculate the negative sample second attention weight corresponding to the negative sample abnormal event sequence features; send the negative sample second attention weight to the target processing layer; inputting the negative sample abnormal event sequence features into the target processing layer to obtain the second prediction result corresponding to the negative sample abnormal event sequence features includes: processing the negative sample abnormal event sequence features according to the target first attention weight and the negative sample second attention weight to obtain the second prediction result corresponding to the negative sample abnormal event sequence features.
  • the training module is further configured to: Inputting the positive sample abnormal event sequence features into the attention mechanism layer, calculating a positive sample second attention weight corresponding to the positive sample abnormal event sequence features using the attention mechanism layer, and sending the positive sample second attention weight to the target processing layer; inputting the positive sample abnormal event sequence features into the target processing layer to obtain a first prediction result corresponding to the positive sample abnormal event sequence features includes: processing the positive sample abnormal event sequence features based on the target first attention weight and the positive sample second attention weight to obtain the first prediction result corresponding to the positive sample abnormal event sequence features.
  • the training module is further configured to: process sample abnormality information in the sample abnormality log data to determine sample abnormal events corresponding to the sample abnormality information; determine sample event identifiers corresponding to the sample abnormal events based on a matching relationship between reference abnormal events and reference event identifiers in an abnormal event library; and sort the sample event identifiers corresponding to the sample abnormal events based on the abnormality occurrence time corresponding to the sample abnormal events to generate the sample abnormal event sequence.
  • the training module is further configured to: abstract the sample anomaly information in the sample anomaly log data according to a regular expression to determine the sample anomaly events corresponding to the sample anomaly information.
  • the training module is further configured to: sort the sample event identifiers corresponding to the sample anomaly events according to the anomaly occurrence time corresponding to the sample anomaly events using a preset sorting rule, and generate the sample anomaly event sequence based on the sorted sample event identifiers.
  • the training module is further configured to: sample the sample anomaly event sequence according to a sampling time interval and a sampling time length to obtain a positive sample anomaly event sequence; and use the positive sample anomaly event sequence and the sample unit attribute information as the positive sample.
  • This information supplements the real-time information in the system log, enriching the training data for the fault prediction model.
  • the above is a schematic diagram of a fault prediction device according to this embodiment. It should be noted that the technical solution of this fault prediction device and the technical solution of the above-described fault prediction method are based on the same concept. For details not described in detail in the technical solution of the fault prediction device, please refer to the description of the technical solution of the above-described fault prediction method.
  • Step 802 Obtain sample abnormality log data and sample unit attribute information of the service processing unit;
  • Step 804 Determine a sample abnormal event sequence based on the sample abnormality log data;
  • Step 806 Determine positive samples and negative samples based on the sample abnormal event sequence and the sample unit attribute information;
  • Step 808 Train the fault prediction model based on the positive samples, the first sample labels corresponding to the positive samples, the negative samples, and the second sample labels corresponding to the negative samples until a fault prediction model that meets the training stop condition is obtained.
  • the positive samples include the positive sample abnormal event sequence and the sample unit attribute information
  • the negative samples include the negative sample abnormal event sequence and the sample unit attribute information.
  • the sample unit attribute information of the service processing unit is taken into account during the training of the fault prediction model.
  • the sample unit attribute information supplements the real-time information in the system log, enriching the training data for the fault prediction model. This enables the fault prediction model to learn abnormal conditions for service processing units with different attribute information, thereby improving the accuracy of the prediction results of the fault prediction model during application.
  • the above is a schematic scheme of a fault prediction model training method according to this embodiment. It should be noted that the technical scheme of this fault prediction model training method shares the same concept as the technical scheme of the aforementioned fault prediction method.
  • FIG. 9 shows a schematic structural diagram of a fault prediction model training device according to one embodiment of this specification.
  • the apparatus includes: an acquisition module 902, configured to acquire sample abnormality log data and sample unit attribute information of a service processing unit; a first determination module 904, configured to determine a sample abnormality event sequence based on the sample abnormality log data; a second determination module 906, configured to determine the positive sample and the negative sample based on the sample abnormality event sequence and the sample unit attribute information; a training module 908, configured to train the fault prediction model based on the positive sample, the first sample label corresponding to the positive sample, the negative sample, and the second sample label corresponding to the negative sample, until a fault prediction model that meets a training stop condition is obtained; wherein the positive sample includes a positive sample abnormal event sequence and sample unit attribute information, and the negative sample includes a negative sample abnormal event sequence and the sample unit attribute information.
  • the above-described apparatus takes into account the sample unit attribute information of the service processing unit during the training of the fault prediction model.
  • This sample unit attribute information supplements the real-time information in the system log, enriching the training data for the fault prediction model.
  • This allows the fault prediction model to learn abnormal conditions specific to service processing units with different attribute information, thereby improving the accuracy of the fault prediction model's prediction results during application.
  • the above is a schematic diagram of a fault prediction model training apparatus according to this embodiment. It should be noted that the fault prediction model...
  • the technical solution of the fault prediction model training device shares the same concept as the technical solution of the aforementioned fault prediction method. For details not described in detail in the technical solution of the fault prediction model training device, please refer to the description of the technical solution of the aforementioned fault prediction method.
  • FIG. 10 shows a block diagram of a computing device 1000 according to one embodiment of this specification.
  • the components of computing device 1000 include, but are not limited to, a memory 1010 and a processor 1020.
  • Processor 1020 and memory 1010 are connected via a bus 1030.
  • a database 1050 is used to store data.
  • Computing device 1000 also includes an access device 1040, which enables computing device 1000 to communicate via one or more networks 1060. Examples of these networks include a combination of the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a communication network such as the Internet.
  • PSTN Public Switched Telephone Network
  • LAN Local Area Network
  • WAN Wide Area Network
  • PAN Personal Area Network
  • communication network such as the Internet.
  • the access device 1040 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and the like.
  • NIC network interface card
  • Computing device 1000 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, personal digital assistant, laptop computer, notebook computer, netbook, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or personal computer (PC).
  • Computing device 1000 can also be a mobile or stationary server.
  • Processor 1020 is configured to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the aforementioned fault prediction method or fault prediction model training method.
  • the various embodiments in this specification are described in a progressive manner. References can be made to the common and similar parts between the various embodiments. Each embodiment focuses on the differences from other embodiments.
  • the computing device embodiment because it is substantially similar to the fault prediction method or fault prediction model training method embodiment, is described briefly. For relevant details, reference can be made to the description of the fault prediction method or fault prediction model training method embodiment.
  • One embodiment of this specification also provides a computer-readable storage medium storing a computer program/instructions.
  • the computer program/instructions When executed by a processor, the computer program/instructions implement the steps of the above-described fault prediction method or fault prediction model training method.
  • Each embodiment in this specification is described in a progressive manner. Similar or identical parts between embodiments can be referenced to each other. Each embodiment focuses on the differences from other embodiments.
  • the computer-readable storage medium embodiment is substantially similar to the fault prediction method or fault prediction model training method embodiment. The description is relatively brief; for relevant details, please refer to the description of the embodiments of the fault prediction method or fault prediction model training method.
  • One embodiment of this specification also provides a computer program product, comprising a computer program/instructions. When executed by a processor, the computer program/instructions implement the steps of the fault prediction method or fault prediction model training method described above.
  • the computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form.
  • the computer-readable medium may include any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content of the computer-readable medium may be appropriately increased or decreased based on the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media does not include electric carrier signals and telecommunication signals.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本公开提供故障预测方法、故障预测模型训练方法、计算设备、存储介质及计算机程序产品,其中故障预测方法包括:获取服务处理单元的异常日志数据和单元属性信息;根据异常日志数据,确定异常事件序列;将单元属性信息和所述异常事件序列输入故障预测模型,获得服务处理单元的故障预测结果;其中,故障预测模型通过正样本、正样本对应的第一样本标签、负样本、负样本对应的第二样本标签训练获得,正样本包括正样本异常事件序列以及样本单元属性信息,负样本包括负样本异常事件序列以及样本单元属性信息。使得故障预测模型的训练数据更加丰富,从而提升故障预测模型在应用过程中的预测结果的准确度。

Description

故障预测方法、 故障预测模型训练方法、 计算设备、 存储介质及计算机程序产品 技术领域 本公开 涉及计算机技术领域, 特别涉及故障预测方法、 故障预测模型训练方法、 计算设 备、 存储介质及计算机程序产品。 背景技术 云计算 系统能够将服务器进行集中管理和使用, 实现提高计算资源的利用效率的效果。 对于云计算系统管理的服务器, 其中, NC (Node Contro l l er , 云计算系统中用于统计故障宕 机的单个单元) 宕机故障是影响云计算系统稳定性的重要因素之一, 不可预料的突然宕机会 给用户造成严重损失。 为了维护云计算系统的稳定性, 通常需要提前预测云计算系统中服务 器的故障并及时对故障进行运维。 目前, 系统日志是对云计算系统中服务器的故障进行提前预测的重要依据之一。 然而, 在通过系统日志对服务器的故障进行预测缺少充分性和完整性,导致预测结果的准确度较低。 因此, 亟需一种有效的技术方案解决上述问题。 发明内容 有 鉴于此, 本公开提供了一种故障预测方法。 本说明书一个或者多个实施例同时涉及一 种故障预测装置,一种故障预测模型训练方法,一种故障预测模型训练装置,一种计算设备, 一种计算机可读存储介质以及一种计算机程序产品, 以解决现有技术中存在的技术缺陷。 根据 本公开的第一方面, 提供了一种故障预测方法, 应用于云计算系统, 所述云计算系 统包括服务处理单元, 所述方法包括: 获取所述服 务处理单元的异常日志数据和单元属性信息; 根据所述 异常日志数据, 确定异常事件序列; 将所述单 元属性信息和所述异常事件序列输入故障预测模型, 获得所述服务处理单元的 故障预测结果; 其 中, 所述故障预测模型通过正样本、 所述正样本对应的第一样本标签、 负样本、 所述 负样本对应的第二样本标签训练获得, 所述正样本包括正样本异常事件序列以及样本单元属 性信息, 所述负样本包括负样本异常事件序列以及所述样本单元属性信息。 根据 本公开的第二方面, 提供了一种故障预测装置, 应用于云计算系统, 所述云计算系 统包括服务处理单元, 所述方法包括: 获取模块 , 被配置为获取所述服务处理单元的异常日志数据和单元属性信息; 确定模块, 被配置为根据所述异常日志数据, 确定异常事件序列; 输入模块 , 被配置为将所述单元属性信息和所述异常事件序列输入故障预测模型, 获得 所述服务处理单元的故障预测结果; 其 中, 所述故障预测模型通过正样本、 所述正样本对应的第一样本标签、 负样本、 所述 负样本对应的第二样本标签训练获得, 所述正样本包括正样本异常事件序列以及样本单元属 性信息, 所述负样本包括负样本异常事件序列以及所述样本单元属性信息。 根据本公开 的第三方面, 提供了一种故障预测模型训练方法, 包括: 获取服 务处理单元的样本异常日志数据和样本单元属性信息; 根据所述样本 异常日志数据, 确定样本异常事件序列; 根据所述样本 异常事件序列以及所述样本单元属性信息, 确定正样本和负样本; 根据所述正样 本、 所述正样本对应的第一样本标签、 所述负样本、 所述负样本对应的第 二样本标签, 对所述故障预测模型进行训练, 直至获得满足训练停止条件的故障预测模型; 其 中, 所述正样本包括正样本异常事件序列以及样本单元属性信息, 所述负样本包括负 样本异常事件序列以及所述样本单元属性信息。 根据本公开 的第四方面, 提供了一种故障预测模型训练装置, 包括: 获取模块 , 被配置为获取服务处理单元的样本异常日志数据和样本单元属性信息; 第一确定模块, 被配置为根据所述样本异常日志数据, 确定样本异常事件序列; 第二确定模块, 被配置为根据所述样本异常事件序列以及所述样本单元属性信息, 确定 正样本和负样本; 训练模块 , 被配置为根据所述正样本、 所述正样本对应的第一样本标签、 所述负样本、 所述负样本对应的第二样本标签, 对所述故障预测模型进行训练, 直至获得满足训练停止条 件的故障预测模型; 其 中, 所述正样本包括正样本异常事件序列以及样本单元属性信息, 所述负样本包括负 样本异常事件序列以及所述样本单元属性信息。 根据本公开 的第五方面, 提供了一种计算设备, 包括: 存储器和处理器 ; 所述存储器用于存储计算机程序 /指令, 所述处理器用于执行所述计算机程序 /指令, 该 计算机程序 /指令被处理器执行时实现上述故障预测方法或故障预测模型训练方法的步骤。 根据 本公开的第六方面, 提供了一种计算机可读存储介质, 其存储有计算机程序 /指令, 该计算机程序 /指令被处理器执行时实现上述故障预测方法或故障预测模型训练方法的步骤。 根据本公开 的第七方面, 提供了一种计算机程序产品, 包括计算机程序 /指令, 该计算机 程序 /指令被处理器执行时实现上述故障预测方法或故障预测模型训练方法的步骤。 本说 明书一个实施例提供了一种故障预测方法, 应用于云计算系统, 所述云计算系统包 括服务处理单元, 所述方法包括: 获取所述服务处理单元的异常日志数据和单元属性信息; 根据所述异常日志数据, 确定异常事件序列; 将所述单元属性信息和所述异常事件序列输入 故障预测模型, 获得所述服务处理单元的故障预测结果; 其中, 所述故障预测模型通过正样 本、 所述正样本对应的第一样本标签、 负样本、 所述负样本对应的第二样本标签训练获得, 所述正样本包括正样本异常事件序列以及样本单元属性信息, 所述负样本包括负样本异常事 件序列以及所述样本单元属性信息。 上述方法中, 在对故障预测模型的训练过程中, 考虑到 了服务处理单元的样本单元属性信息,样本单元属性信息补充了系统日志的实时信息的不足, 使得故障预测模型的训练数据更加丰富, 从而使得故障预测模型能够学习到针对不同属性信 息的服务处理单元的异常情况, 从而提升故障预测模型在应用过程中的预测结果的准确度。 附图说明 图 1是本说明书一个实施例提供的一种故障预测方法的应用场景示意图; 图 2是本说明书一个实施例提供的一种故障预测方法的流程图; 图 3是本说明书一个实施例提供的一种故障预测方法中编码过程的示意图; 图 4是本说明书一个实施例提供的一种故障预测方法中、 故障预测模型的示意图; 图 5是本说明书一个实施例提供的一种故障预测方法中、 故障预测模型的训练过程流程 图; 图 6是本说明书一个实施例提供的一种故障预测方法的处理过程流程图; 图 7是本说明书一个实施例提供的一种故障预测装置的结构示意图; 图 8 本说明书一个实施例提供的一种故障预测模型训练方法的流程图; 图 9是本说明书一个实施例提供的一种故障预测模型训练装置的结构示意图; 图 10是本说明书一个实施例提供的一种计算设备的结构框图。 具体实施方式 在 下面的描述中阐述了很多具体细节以便于充分理解本说明书。 但是本说明书能够以很 多不同于在此描述的其它方式来实施, 本领域技术人员可以在不违背本说明书内涵的情况下 做类似推广, 因此本说明书不受下面公开的具体实施的限制。 在 本说明书一个或多个实施例中使用的术语是仅仅出于描述特定实施例的目的, 而非旨 在限制本说明书一个或多个实施例。 在本说明书一个或多个实施例和所附权利要求书中所使 用的单数形式的 “一种”、 “所述 ”和 “该”也旨在包括多数形式, 除非上下文清楚地表示其 他含义。 还应当理解, 本说明书一个或多个实施例中使用的术语 “和 /或 ”是指并包含一个或 多个相关联的列出项目的任何或所有可能组合。 应 当理解, 尽管在本说明书一个或多个实施例中可能采用术语第一、 第二等来描述各种 信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如, 在不脱离本说明书一个或多个实施例范围的情况下, 第一也可以被称为第二, 类似地, 第二 也可以被称为第一。取决于语境, 如在此所使用的词语 “如果 ”可以被解释成为 “在 ……时” 或 “当 ……时"或 “响应于确定 "。 此外 , 需要说明的是, 本说明书一个或多个实施例所涉及的用户信息 (包括但不限于用 户设备信息、 用户个人信息等) 和数据 (包括但不限于用于分析的数据、 存储的数据、 展示 的数据等), 均为经用户授权或者经过各方充分授权的信息和数据, 并且相关数据的收集、 使 用和处理需要遵守相关国家和地区的相关法律法规和标准, 并提供有相应的操作入口, 供用 户选择授权或者拒绝。 本说明书一个或多个实施例中, 大模型是指具有大规模模型参数的深度学习模型, 通常 包含上亿、 上百亿、 上千亿、 上万亿甚至十万亿以上的模型参数。 大模型又可以称为基石模 型 /基础模型 (Foundation Model) , 通过大规模无标注的语料进行大模型的预训练, 产出亿级 以上参数的预训练模型, 这种模型能适应广泛的下游任务, 模型具有较好的泛化能力, 例如 大规模语言模型 (Large Language Model, LLM) > 多模态预训练模型 (multi-modal pre-training model ) 等。 大模型在实际应用时, 仅需少量样本对预训练模型进行微调即可应用于不同的任务中, 大模型可以广泛应用于自然语言处理 (Natural Language Processing, 简称 NLP)、 计算机视觉 等领域,具体可以应用于如视觉问答 ( Visual Question Answering,简称 VQA)、图像描述 (Image Caption, 简称 IC)、 图像生成等计算机视觉领域任务, 以及基于文本的情感分类、 文本摘要 生成、 机器翻译等自然语言处理领域任务, 大模型主要的应用场景包括数字助理、 智能机器 人、 搜索、 在线教育、 办公软件、 电子商务、 智能设计等。 首先 , 对本说明书一个或多个实施例涉及的名词术语进行解释。
Attent i on : 注意力机制, 其可用于对重点关注的目标区域投入更多的注意力资源, 以获 得更多所需关注的 目标的细节信息, 并抑制其它无用信息, 在本公开中通常可将注意力机制 作为接口, 提供挖掘序列中元素间相关性信息。
Transformer : 基于 Attent i on的机器学习模型, 常用于自然语言处理和图像处理任务。
BERT : B i d i rect i ona I Encoder Representat i ons from Transformers , 双向编码 Transformer模型, 常用于自然语言处理和图像处理任务。
XgBoost : Extreme Grad i entBoost i ng, 一种常用的集成学习算法。
NC : Node Contro l l er , 指的是云计算系统中用于统计故障宕机的单个单元。
ECS : E I ast i c Compute Serv i ce, 云月艮务器。
NLP : Natura I Language Process i ng, 自然语言处理。
MoE : M i xture of Experts, 混合专家模型, 一种深度学习结构。
TAAT模型: 在本申请实施例中表现为以 BERT模型为基础, 采用时间感知注意力机 制的 T ransf ormer算法实现机器学习故障预测的模型。 在 本说明书中, 提供了一种故障预测方法, 本说明书同时涉及一种故障预测装置, 一种 故障预测模型训练方法, 一种故障预测模型训练装置, 一种计算设备, 一种计算机可读存储 介质以及一种计算机程序产品, 在下面的实施例中逐一进行详细说明。 参 见图 1 , 图 1 示出了根据本说明书一个实施例提供的一种故障预测方法的应用场景示 意图。 如 图 1 所示, 图 1 中包括云计算平台 102和云计算服务器集群 104, 其中, 云计算平台 102用于管理云计算服务器集群 104, 云计算平台 102可以用于执行该故障预测方法。 具体 的, 云计算平台 102可以从云计算服务器集群 104获取各服务器的异常日志数据和 单元属性信息。 示例性地, 针对某一服务器来说, 根据该服务器的异常日志数据以及单元属 性信息, 并根据异常日志数据, 确定异常事件序列, 将异常事件序列和单元属性信息输入故 障预测模型, 获得该服务器的故障预测结果。 实 际应用中, 在进行故障预测时, 可以表现为云计算平台 102获取实时采集的异常日志 数据, 其所采集的异常日志数据可以通过在实时链路上对每台服务器按照预设时间间隔, 例 如 5分钟进行采样得到, 然后基于故障预测模型, 预测各服务器是否会发生宕机故障, 并基 于故障预测结果决定是否提前对服务器的宕机故障进行运维以实现用户对宕机的无感化, 从 而优化用户的体验。 其 中, 故障预测结果包括宕机结果和不宕机结果, 宕机结果指的是判定服务器未来一段 时间内有宕机风险, 此时可以提前对宕机故障进行运维以实现用户对宕机的无感化, 不宕机 结果指的是服务器未来一段时间内不存在宕机风险, 此时可暂时不进行任何操作。 云计算平 台 102可以理解为基于硬件资源和软件资源的服务, 提供计算、 网络和存储能 力, 在本公开中用于提供故障预测服务, 通过获取服务器的异常日志数据, 预测服务器是否 会发生宕机。 云计算服 务器集群 104中的服务器可以理解为, 提供各种服务的服务器, 包括物理服务 器、 云服务器, 例如为多个客户端提供通信服务的服务器, 又如为客户端上使用的模型提供 支持的用于后台训练的服务器, 又如对客户端发送的数据进行处理的服务器等。 参见图 2, 图 2示出了根据本说明书一个实施例提供的一种故障预测方法的流程图, 应用于云计算系统, 所述云计算系统包括服务处理单元, 具体包括以下步骤。 步骤 202: 获取所述服务处理单元的异常日志数据和单元属性信息。 具体 的, 本公开提供的故障预测方法可以应用于云计算系统, 云计算系统可以用于管理 多个服务器, 服务处理单元可以理解为云计算系统中的任意一个服务器, 实际应用中, 服务 处理单元比如可以是 NC。 其 中, 服务处理单元的异常日志数据, 可以理解为通过检测器检测的服务处理单元的异 常日志。 单元属性信息可以理解为服务处理单元的属性信息, 该属性信息为静态固有信息, 不会发生变化, 单元属性信息包括如下至少之一: 服务处理单元的品牌信息、 内存信息、 内 存生产厂家信息、 CPU厂家信息、 服务器厂家信息等。 基 于此, 可以通过检测器实时获取服务处理单元报出的异常日志数据, 并对服务处理单 元提取静态信息字段, 从而获得该服务处理单元的单元属性信息。 本说 明书一个实施例中, 可以获取实时采集的实时系统日志数据, 该实时系统日志数据 可以通过在实时链路上对每个服务处理单元按照预设时间间隔进行采样得到, 预设时间间隔 比如可以是 5分钟、 10秒等。 可 以理解的, 云计算系统可以包括多个服务处理单元, 可以获取每个服务处理单元的异 常日志数据和单元属性信息, 并且, 每个服务处理单元的异常日志数据可以包括多个, 举例 而言, 可以获取服务处理单元 A的异常日志数据 A1、 A2、 A3O 步骤 204: 根据所述异常日志数据, 确定异常事件序列。 具体 的, 在获取服务处理单元的异常日志数据之后, 可以根据该异常日志数据, 确定异 常事件序列。 其 中, 异常事件序列可以理解为多个异常事件构成的序列。 具体实施 时, 所述根据所述异常日志数据, 确定异常事件序列, 包括: 对所述 异常日志数据中的异常信息进行处理, 确定所述异常信息对应的异常事件; 根据 异常事件库中的参考异常事件与参考事件标识之间的匹配关系, 确定所述异常事件 对应的事件标识; 根据所述 异常事件对应的异常发生时间, 对所述异常事件对应的事件标识进行排序, 生 成所述异常事件序列。 其 中,异常事件包括但不限于云计算系统的宕机事件、硬件异常事件、内存异常事件等。 异常事件库可以是预先构建的, 其与自然语言处理中的语料库类似, 异常事件库中可以包括 所有的异常事件种类, 并且, 异常事件库中的每种参考异常事件对应一个参考事件标识, 该 参考事件标识可以通过数字、 字母或者其他字符表示。 比如, 参考事件标识可以通过数字表 示, 比如宕机事件用数字 1表示、 硬件异常时间用数字 2表示等。 异常事件对应的异常发生 时间可以根据异常日志数据确定。 基 于此, 可以对异常日志数据中记载的异常信息进行处理, 确定该异常信息对应的异常 事件, 并根据异常事件库中的参考异常事件和参考事件标识之间的匹配关系, 确定该异常事 件对应的事件标识, 根据异常事件对应的异常发生时间, 对异常事件对应的事件标识进行排 序, 从而生成异常事件序列。 具体 实施时, 所述对所述异常日志数据中的异常信息进行处理, 确定所述异常信息对应 的异常事件, 包括: 根据正 则表达式, 对所述异常日志数据中的异常信息进行抽象化处理, 确定所述异常信 息对应的异常事件。 实 际应用中, 可以将异常日志数据映射得到异常事件。 具体实施时, 对异常日志数据的 映射过程, 可以通过正则表达式将异常日志数据映射得到异常事件, 具体的, 可以根据专家 知识和正则表达式将异常 日志数据抽象为一个短语, 所抽象得到的短语可以作为异常事件。 比如, 对于其中一个异常日志数据, 可以确定该异常日志数据和其他异常日志数据共有的关 键词, 根据关键词的种类将这些异常日志数据划分为不同的异常种类, 从而得到用于命名异 常事件的短语。 可以理解的, 抽象得到的异常事件可以是同一类异常日志数据的统一描述。 沿 用 上 例 , 比 如 服 务 处 理 单 元 A 的 异 常 日 志 数 据 A1 为 "mce : [Hardware Error] : Mach i ne check events I ogged ”, 该异常日志数据中记录的异常信 息为硬件错误, 那么可以对该异常日志数据记录的异常信息进行处理, 获得该异常信息对应 的异常事件 A1为“ dmesg_unrecover_mce", 并根据异常事件库中的参考异常事件和参考事件 标识之间的匹配关系, 确定该异常事件 A1对应的事件标识为 “2"。 与前述类似的, 确定异常 日志数据 A2对应的异常事件 A2的事件标识为 “ 1 ”, 确定异常日志数据 A3对应的异常事件 A3的事件标识为 “4", 那么, 可以根据异常事件 A1、 A2和 A3的异常发生时间, 对异常事件 对应的事件标识进行排序, 生成的异常事件序列为 “ 1 , 4, 2”。 此 外, 还可以预先收集多种异常日志, 并对异常日志中的异常信息后进行处理, 构建相 应的异常事件, 对所构建的异常事件进行相应的数值标识的编码操作, 实现针对各种异常事 件的异常事件库的预先构建, 即异常事件库可以包含针对各种异常事件的参考事件标识, 以 便后续在对异常 日志进行数据预处理时, 能够基于单独的异常事件库进行构建以免去故障预 测模型对异常 日志文本编码的预训练的复杂过程, 基于 “异常日志数据到异常事件到事件标 识” 的编码过程能够减少模型的体量, 加快训练的测试速度, 实现替换原有的编码环节的目 的。 综 上, 通过对异常信息抽象简化为异常事件序列, 在将异常事件序列输入故障预测模型 的情况下, 简化了故障预测模型对异常信息的文本进行编码的复杂过程, 减轻了故障预测模 型的体量, 减少了对计算机系统的存储空间。 本说明书另一个实施例中, 还可以根据异常事件在预设时间段内的异常发生顺序, 确定 异常事件对应的事件标识。 比如异常事件 A在预设时间段内第 1 个发生, 那么该异常事件 A 对应的事件标识为 1 , 异常事件 B在预设时间段内第 2个发生, 那么该异常事件 B对应的事 件标识为 2O 通过按照异常发生顺序确定事件标识的方式, 无需预先设置参考异常事件和参 考事件标识之间的匹配关系, 节省计算时间和占用存储资源。 或者 , 还可以根据异常事件的事件类型, 确定异常事件对应的事件标识。 本公开对此不 做限定。 参 见图 3, 图 3示出了根据本说明书一个实施例提供的一种故障预测方法中编码过程的 示意图。 如图 3所示, 异常事件的事件标识为 2, 对其进行编码得到的编码向量为 巳【2】, 异常事件的事件标识为 1 ,对其进行编码得到的编码向量为巳【1】,异常事件的事件标识为 9, 对其进行编码得到的编码向量为 巳【9】, 异常事件的事件标识为 30, 对其进行编码得到的编 码向量为 巳【30】, 服务处理单元的单元属性信息包括单元属性信息 1、 2、 3和 4, 对单元属 性信息 1进行。 ne-hot编码, 得到的编码向量为 0010, 对单元属性信息 2进行。 ne-hot编码 得到的编码向量为 010, 对单元属性信息 3进行。 ne-hot编码得到的编码向量为 100, 对单元 属性信息 4进行。 ne-hot编码得到的编码向量为 10o 那么, 在将异常事件序列和单元属性信 息输入故障预测模型时, 可以将经过上述编码过程得到的编码后的异常事件序列和单元属性 信息输入故障预测模型。 综上 , 由于异常日志数据中记载的是描述计算机状态的语句, 包含很多冗余信息, 通过 对异常日志数据的抽象处理可以提取其中的关键信息, 同时也可以对异常日志数据进行有选 择地筛选, 比如可以选择具有 Error字段 (即报错字段) 的异常日志数据进行解析。 进一 步地, 所述根据所述异常事件对应的异常发生时间, 对所述异常事件对应的事件标 识进行排序, 生成所述异常事件序列, 包括: 根据 异常事件对应的异常发生时间, 利用预设排序规则对所述异常事件对应的事件标识 进行排序, 并根据排序后的事件标识生成所述异常时间序列。 其 中, 预设排序规则可以理解为根据异常发生时间对事件标识进行排序的规则, 预设排 序规则比如可以是根据异常发生时间对事件标识进行序排序的规则。 具体 的, 可以根据异常事件对应的异常发生时间对事件标识进行倒序排序, 通常进行故 障预测时, 与当前时刻较为接近的异常发生时间所对应的异常事件较有参考性, 因此利用异 常事件对应的异常发生时间, 对异常事件对应的事件标识进行倒序排序, 从而根据异常发生 时间的倒序排列生成异常事件序列。 而且异常信息之间通常存在连带关系, 即上一时刻的异常信息可以引起下一时刻的另一 异常信息, 在根据异常发生时间对事件标识 (实际上也可理解为异常信息) 进行排序的情况 下, 可以利用故障预测模型更好的通过异常信息的上下文语义信息, 对服务处理单元进行故 障预测。 综上 , 根据预设排序规则对异常事件对应的事件标识进行排序, 加强异常事件序列中异 常事件之间的相关性, 使得故障预测模型更好的利用异常事件的上下文语义信息。 步骤 206: 将所述单元属性信息和所述异常事件序列输入故障预测模型, 获得所述服务 处理单元的故障预测结果; 其 中, 所述故障预测模型通过正样本、 所述正样本对应的第一样本标签、 负样本、 所述 负样本对应的第二样本标签训练获得, 所述正样本包括正样本异常事件序列以及样本单元属 性信息, 所述负样本包括负样本异常事件序列以及所述样本单元属性信息。 具体 的, 可以将服务处理单元的单元属性信息和异常事件序列输入故障预测模型, 故障 预测模型可以根据输入的单元属性信息和异常事件序列进行故障预测, 预测云计算系统是否 会发生故障, 并基于预测结果确定是否提前对云计算系统的宕机故障进行运维, 以实现用户 对宕机的无感化, 从而优化用户的体验。 实 际应用中, NC宕机故障是影响云计算系统稳定性的重要因素之一, 不可预料的突然宕 机会给用户造成严重损失, 为了维护云计算系统的稳定性, 此时可以通过故障预测模型基于 所输入的单元属性信息和异常事件序列进行故障预测,推断云计算系统当前的 NC是否会在接 下来的一段时间内发生宕机, 以此输出故障预测结果。 其 中, 故障预测结果可以包括宕机结果和不宕机结果, 宕机结果可以理解为预测服务处 理单元未来一段时间内具有宕机风险, 此时可以提前对宕机故障进行运维以实现用户对宕机 的无感花, 不宕机结果可以理解为预测服务处理单元未来一段时间内不存在宕机风险, 此时 暂时不进行任何操作。 本说 明书一个实施例中, 将单元属性信息输入故障预测模型时, 可以将单元属性信息的 编码向量输入故障预测模型。 具体实施 时, 所述将所述单元属性信息和所述异常事件序列输入故障预测模型, 获得所 述服务处理单元的故障预测结果, 包括: 将所述单元属性信 息和所述异常事件序列输入故障预测模型, 获得所述故障预测模型输 出的置信度; 根据所述置信度和预设置信度 阈值, 确定所述服务处理单元的故障预测结果为宕机结果 或者不宕机结果。 具体 的, 可以将单元属性信息和异常事件序列输入故障预测模型, 在故障预测模型中, 可以根据单元属性信息, 从该故障预测模型包括的多个处理层中确定目标处理层, 并根据目 标处理层对异常事件序列进行处理, 从而获得故障预测模型输出的置信度, 在置信度大于预 设置信度阈值的情况下, 确定服务处理单元的故障预测结果为宕机结果, 在置信度小于预设 置信度阈值的情况下, 确定服务处理单元的故障预测结果为不宕机结果。 实际应 用中, 所述故障预测模型包括编码层、 门控层和多个处理层; 相应地 , 所述将所述单元属性信息和所述异常事件序列输入故障预测模型, 获得所述服 务处理单元的故障预测结果, 包括: 将所述异 常事件序列输入所述编码层, 获得异常事件序列特征; 将所述单元属性信 息输入所述门控层, 利用所述门控层在所述多个处理层中确定目标处 理层; 将所述异 常事件序列特征输入所述目标处理层,获得所述服务处理单元的故障预测结果。 具体 的, 在故障预测模型中, 可以利用编码层对异常事件序列进行编码, 获得异常事件 序列特征, 并利用门控层根据单元属性信息在多个处理层中确定目标处理层, 从而利用该目 标处理层对异常事件序列特征进行特征处理, 以获得服务处理单元的故障预测结果。 综上 , 通过门控层确定目标处理层、 编码层对异常事件序列进行编码, 并由目标处理层 处理编码得到的异常事件序列特征, 实现服务处理单元的故障预测, 目标处理层的选择考虑 到不同的服务处理单元和处理层之间的关联关系, 保证故障预测的针对性, 进一步提升故障 预测结果的准确度。 具体实施 时, 所述将所述单元属性信息输入所述门控层, 利用所述门控层在所述多个处 理层中确定目标处理层, 包括: 将所述单元属性信 息特征输入所述门控层, 利用所述门控层计算各处理层的第一注意力 权重; 根据所述各处理层 的第一注意力权重, 在所述多个处理层中确定目标处理层; 相应地 , 所述利用所述门控层在所述多个处理层中确定目标处理层之后, 还包括: 从 所述各处理层的第一注意力权重, 确定所述目标处理层对应的目标第一注意力权重, 并将所述目标第一注意力权重发送至所述目标处理层。 具体 的, 可以利用门控层计算每个处理层的第一注意力权重, 并根据每个处理层的第一 注意力权重, 确定目标注意力层, 还可以将目标处理层对应的目标第一注意力权重发送至目 标处理层。 综上 ,通过计算第一注意力权重,便于确定最适合处理异常事件序列特征的目标处理层, 并将 目标第一注意力权重发送至目标处理层, 便于目标处理层后续根据该目标第一注意力权 重对异常事件序列特征进行处理。 此外 , 所述故障预测模型还包括注意力机制层; 所 述将所述异常事件序列特征输入所述目标处理层, 获得所述服务处理单元的故障预测 结果之前, 还包括: 将 所述异常事件序列特征输入所述注意力机制层, 利用所述注意力机制层计算所述异常 事件序列特征对应的第二注意力权重; 将所述 第二注意力权重发送至所述目标处理层; 所 述将所述异常事件序列特征输入所述目标处理层, 获得所述服务处理单元的故障预测 结果, 包括: 根据 所述目标第一注意力权重和所述第二注意力权重, 对所述异常事件序列特征进行处 理, 获得所述服务处理单元的故障预测结果。 具体 实施时, 参见图 4, 图 4示出了本说明书一个实施例提供的一种故障预测方法中、 故障预测模型的示意图。 实际应用中, 故障预测模型包括门控层 (即 Stat i c gates) 和多个 处理层 (即 TAAT模型), 其中, 每个 TAAT模型均包括编码层 (即 Except i on Embedd i ng)、 注意力机制层 (即 Mu l t i -Head Except i on Attent i on)^ 特征处理层 (即 MTA B l ock) 和分类 器 (即 C l ass i f i er)。 如图 4所示, 由于每个 TAAT模型的编码层、 注意力机制层和分类器的 结构都相同, 基于此, 为了使模型结构简便化, 减少模型占用的存储资源, 可以将每个 TAAT 模型中的编码层、 注意力机制层和分类器共用, 图 4中示出了编码层、 注意力机制层、 多个 特征处理层和分类器, 该多个特征处理层可以用于实现多个 TAAT模型的特征处理。具体实施 时, 可以将服务处理单元的单元属性信息 (包括单元属性信息 1、 2、 3和 4) 输入门控层, 利用门控层从多个特征处理层中确定 目标特征处理层。 门控层可以根据服务处理单元的单元 属性信息和权重矩阵, 通过全连接层和 softmax计算多个特征处理层的第一注意力权重, 从 而根据多个特征处理层的第一注意力权重, 从多个特征处理层中确定目标特征处理层, 并将 每个特征处理层的第一注意力权重发送至相应的特征处理层。 其中, 权重矩阵可以理解为包 含多个特征处理层的初始注意力权重的矩阵, 后续可以对该权重矩阵进行调整, 以使门控层 在应用过程中能够从多个特征处理层中确定合适的目标特征处理层。 换言之, 门控层确定的 目标特征处理层, 可以理解为门控层确定的目标 TAAT模型 (即目标处理层)。 门控层确定目标特征处理层之后, 可以将服务处理单元的异常事件序列输入编码层, 获 得编码层输出的异常事件序列特征, 将异常事件序列特征输入注意力机制层, 注意力机制层 可以将前向全连接层分为多个全连接层, 计算异常事件序列特征对应的第二注意力权重, 并 通过目标特征处理层根据第一注意力权重和第二注意力权重进行加权求平均值, 输出异常事 件序列特征对应的预测特征, 将该预测特征输入分类器, 获得服务处理单元的置信度, 便于 后续根据置信度和预设置信度阈值, 确定服务处理单元的故障预测结果。 实 际应用中, 以故障预测模型包括三个特征处理层(即三个 TAAT模型中包括的特征处理 层) 为例进行说明, 门控层可以根据输入的服务处理单元的单元属性信息和权重矩阵, 计算 特征处理层 1 的第一注意力权重、 特征处理层 2的第一注意力权重和特征处理层 3的第一注 意力权重, 并将特征处理层 1 的第一注意力权重发送至特征处理层 1 , 将特征处理层 2的第 一注意力权重发送至特征处理层 2, 将特征处理层 3的第一注意力权重发送至特征处理层 3, 对于特征处理层 1 来说, 将服务处理单元的异常事件序列输入编码层, 获得编码层输出的异 常事件序列特征, 将异常事件序列特征输入注意力机制层, 计算异常事件序列特征对应的第 二注意力权重, 并通过特征处理层 1 根据该第二注意力权重输出异常事件序列特征对应的预 测特征, 相应地, 特征处理层 2和特征处理层 3也会输出预测特征, 那么可以根据特征处理 层 1、 2和 3分别对应的第一注意力权重, 对特征处理层 1、 2和 3输出的预测特征进行加权 求平均值, 获得目标预测特征, 将该目标预测特征输入分类器, 则获得该服务处理单元的置 信度。 综上 , 通过故障预测模型实现对服务处理单元的故障预测结果, 从而实现对云计算系统 的故障预测, 维护云计算系统的稳定性。 实 际应用中, 参见图 5, 图 5示出了根据本说明书一个实施例提供的一种故障预测方法 中、 故障预测模型的训练过程流程图, 如图 5所示, 所述故障预测模型的训练步骤包括: 步骤 502: 获取服务处理单元的样本异常日志数据和样本单元属性信息。 具体 的, 可以通过检测器实时获取服务处理单元的样本异常日志数据和样本单元属性信 息。 具体获取过程与前述异常日志数据和单元属性信息的获取过程类似, 本公开对此不再重 复赘述。 步骤 504: 根据所述样本异常日志数据, 确定样本异常事件序列。 具体实施 时, 所述根据所述样本异常日志数据, 确定样本异常事件序列, 包括: 对所述样 本异常日志数据中的样本异常信息进行处理, 确定所述样本异常信息对应的样 本异常事件; 根据 异常事件库中的参考异常事件与参考事件标识之间的匹配关系, 确定所述样本异常 事件对应的样本事件标识; 根据所述样 本异常事件对应的异常发生时间, 对所述样本异常事件对应的样本事件标识 进行排序, 生成所述样本异常事件序列。 具体 的, 可以对样本异常日志数据中记载的样本异常信息进行处理, 确定该样本异常信 息对应的样本异常事件, 并根据异常事件库中的参考异常事件和参考事件标识之间的匹配关 系, 确定该样本异常事件对应的样本事件标识, 根据样本异常事件对应的异常发生时间, 对 样本异常事件对应的样本事件标识进行排序, 从而生成样本异常事件序列。 此处生成样 本异常事件序列的具体过程与前述生成异常事件序列的具体过程类似, 本说 明书对此不再重复赘述。 实 际应用中, 所述对所述样本异常日志数据中的样本异常信息进行处理, 确定所述样本 异常信息对应的样本异常事件, 包括: 根据正 则表达式, 对所述样本异常日志数据中的样本异常信息进行抽象化处理, 确定所 述样本异常信息对应的样本异常事件。 具体 的, 此处确定样本异常事件与前述确定异常事件的过程类似, 在此不再重复赘述。 具体 的, 所述根据所述样本异常事件对应的异常发生时间, 对所述样本异常事件对应的 样本事件标识进行排序, 生成所述样本异常事件序列, 包括: 根据所述样 本异常事件对应的异常发生时间, 利用预设排序规则对所述样本异常事件对 应的样本事件标识进行排序, 并根据排序后的样本事件标识生成所述样本异常事件序列。 具体 的, 此处生成样本异常事件序列的过程与前述生成异常事件序列的过程类似, 在此 不再重复赘述。 步骤 506: 根据所述样本异常事件序列以及所述样本单元属性信息, 确定正样本和负样 本。 具体实施 时,所述根据所述样本异常事件序列以及所述样本单元属性信息,确定正样本, 包括: 根据采样 时间间隔以及采样时间长度, 对所述样本异常事件序列进行采样, 获得正样本 异常事件序列; 将所述正样本 异常事件序列和所述样本单元属性信息, 作为所述正样本。 其 中, 样本异常事件序列可以理解为, 在服务处理单元发生宕机的情况下, 从样本异常 日志数据中确定的异常事件序列。 预设采样时间可以理解为, 预设的采样时间间隔; 预设采 样长度可以理解为, 预设的采样窗口长度; 预设负样本采样规则可以理解为, 在样本异常事 件序列上按比例随机获取的规则。 具体 的, 在获取正样本时, 可以在样本异常事件序列中可以按 5分钟为时间间隔, 以 3 天为采样窗口长度, 在样本异常事件序列上有重叠地进行采样, 从而获得正样本异常事件序 列。 实 际应用中, 采用滑动窗口的方式, 在每个 5分钟的时间点开始计算一个包含前 72小时 (即 3天) 内所有异常事件的子序列, 例如第一个采样窗口从时间 A开始到时间 B (时间 A 往前推 72小时的时间) 结束; 然后窗口向前移动 5分钟, 第二个采样窗口从时间 C (时间 A 往前推 5分钟的时间) 开始, 同样覆盖前 72小时, 如此类推。 本说 明书一个实施例中, 可以根据预设负样本采样规则, 对所述样本异常事件序列进行 采样, 获得负样本异常事件序列, 将所述负样本异常事件序列和所述样本单元属性信息, 作 为负样本。 其 中, 负样本异常事件序列可以理解为, 在服务处理单元没有发生宕机的情况下, 从样 本异常日志数据中确定的异常事件序列。 预设负样本采样规则, 可以理解为按照预设采样比 例进行采样。 具体 的, 可以在样本异常事件序列中按预设采样比例随机获取异常事件, 从而确定负样 本异常事件序列。 综上 , 通过构造的正负样本, 能够帮助故障预测模型充分学习并区分服务处理单元宕机 与不宕机的状态, 从而提升故障预测模型在实际应用中的预测准确率和泛化能力。 步骤 508: 根据所述正样本、 所述正样本对应的第一样本标签、 所述负样本、 所述负样 本对应的第二样本标签, 对所述故障预测模型进行训练, 直至获得满足训练停止条件的故障 预测模型。 其 中, 训练停止条件可以理解为模型损失值达到预设损失值阈值或模型训练次数达到预 设次数阈值。 第一样本标签比如可以用 1表示, 那么第二样本标签比如可以用 0表示。 具体 的, 可以将正样本、 第一样本标签、 负样本和第二样本标签输入故障预测模型, 获 得故障预测模型输出的、 正样本对应的第一预测结果和负样本对应的第二预测结果, 根据第 一样本标签和第一预测结果, 计算第一模型损失值, 根据第二预测结果和第二样本标签, 计 算第二模型损失值, 根据第一模型损失值和第二模型损失值, 对故障预测模型进行训练。 具体实施 时, 所述故障预测模型包括编码层、 门控层和多个处理层; 相应地 , 所述根据所述正样本、 所述正样本对应的第一样本标签、 所述负样本、 所述负 样本对应的第二样本标签, 对所述故障预测模型进行训练, 直至获得满足训练停止条件的故 障预测模型, 包括: 将所述正样本 异常事件序列输入所述编码层, 获得正样本异常事件序列特征; 将所述样 本单元属性信息输入所述门控层, 利用所述门控层在所述多个处理层中确定目 标处理层; 将所述正样 本异常事件序列特征输入所述目标处理层, 获得所述正样本异常事件序列特 征对应的第一预测结果; 以及 将所述 负样本异常事件序列输入所述编码层, 获得负样本异常事件序列特征; 将所述样 本单元属性信息输入所述门控层, 利用所述门控层在所述多个处理层中确定所 述目标处理层; 将所述 负样本异常事件序列特征输入所述目标处理层, 获得所述负样本异常事件序列特 征对应的第二预测结果; 根据所述 第一预测结果、 所述第二预测结果、 所述第一样本标签和所述第二样本标签, 对所述故障预测模型进行训练, 直至获得满足训练停止条件的故障预测模型。 具体 的, 故障预测模型训练阶段的处理过程与前述故障预测模型应用阶段的处理过程类 似, 在此不再赘述。 综上 , 通过在正样本和负样本中均加入单元属性信息这些静态信息, 同时使用服务处理 单元的实时信息和静态信息, 丰富了数据来源, 使模型更加精准。 具体 实施时, 所述将所述样本单元属性信息特征输入所述门控层, 利用所述门控层在所 述多个处理层中确定目标处理层, 包括: 将所述样 本单元属性信息特征输入所述门控层, 利用所述门控层计算各处理层的第一注 意力权重; 根据所述各处理层 的第一注意力权重, 在所述多个处理层中确定目标处理层; 相应地 , 所述利用所述门控层在所述多个处理层中确定目标处理层之后, 还包括: 从所述各处理层 的第一注意力权重, 确定所述目标处理层对应的目标第一注意力权重, 并将所述目标第一注意力权重发送至所述目标处理层。 其 中, 第一注意力权重可以理解为处理层的注意力权重。 具体 的, 如上述图 4所述, 门控层可以根据服务处理单元的单元属性信息和权重矩阵, 通过全连接层和 softmax计算多个特征处理层的第一注意力权重, 从而根据多个特征处理层 的第一注意力权重, 从多个特征处理层中确定目标特征处理层, 并将目标特征处理层的目标 第一注意力权重发送至 目标特征处理层。 此外, 门控层还可以将其他特征处理层的第一注意 力权重分别发送至其他特征处理层。 综上 , 通过计算每个处理层的第一注意力权重, 实现目标处理层的选择, 使得模型可以 针对性选择处理异常事件序列的处理层。 进一 步地, 所述故障预测模型还包括注意力机制层。 所述将所述 负样本异常事件序列特征输入所述目标处理层, 获得所述负样本异常事件序 列特征对应的第二预测结果之前, 还包括: 将所述 负样本异常事件序列特征输入所述注意力机制层, 利用所述注意力机制层计算所 述负样本异常事件序列特征对应的负样本第二注意力权重; 将所述 负样本第二注意力权重发送至所述目标处理层; 所述将所述 负样本异常事件序列特征输入所述目标处理层, 获得所述负样本异常事件序 列特征对应的第二预测结果, 包括: 根据所述 目标第一注意力权重和所述负样本第二注意力权重, 对所述负样本异常事件序 列特征进行处理, 获得所述负样本异常事件序列特征对应的第二预测结果。 并且 , 所述将所述正样本异常事件序列特征输入所述目标处理层, 获得所述正样本异常 事件序列特征对应的第一预测结果之前, 还包括: 将所述正样 本异常事件序列特征输入所述注意力机制层, 利用所述注意力机制层计算所 述正样本异常事件序列特征对应的正样本第二注意力权重; 将所述正样本 第二注意力权重发送至所述目标处理层; 所述将所述正样 本异常事件序列特征输入所述目标处理层, 获得所述正样本异常事件序 列特征对应的第一预测结果, 包括: 根据所述 目标第一注意力权重和所述正样本第二注意力权重, 对所述正样本异常事件序 列特征进行处理, 获得所述正样本异常事件序列特征对应的第一预测结果。 其 中, 目标第一注意力权重可以理解为目标处理层的注意力权重。 第二注意力权重可以 理解为样本异常事件序列特征的注意力权重, 那么, 正样本第二注意力权重, 可以理解为正 样本异常事件序列特征的注意力权重。 负样本第二注意力权重, 可以理解为负样本异常事件 序列特征的注意力权重。 具体 的, 如上述图 4所述, 门控层确定目标特征处理层之后, 可以将服务处理单元的负 样本异常事件序列输入编码层, 获得编码层输出的负样本异常事件序列特征, 将负样本异常 事件序列特征输入注意力机制层, 注意力机制层可以将前向全连接层分为多个全连接层, 计 算负样本异常事件序列特征对应的负样本第二注意力权重, 并通过目标特征处理层根据第一 注意力权重和负样本第二注意力权重进行加权求平均值, 输出负样本异常事件序列特征对应 的预测特征, 将该预测特征输入分类器, 获得服务处理单元的置信度, 便于后续根据置信度 和预设置信度阈值, 确定服务处理单元的故障预测结果 (即第二预测结果)。 可 以理解的, 获得正样本异常事件序列特征对应的第一预测结果的过程与前述获得第二 预测结果的过程类似, 在此不再重复赘述。 综上 ,通过混合专家模型为每条异常事件序列计算注意力权重,从而针对性的分析样本, 使模型能够综合信息来进行宕机预测。 综上所述 , 上述方法中, 在对故障预测模型的训练过程中, 考虑到了服务处理单元的样 本单元属性信息, 样本单元属性信息补充了系统日志的实时信息的不足, 使得故障预测模型 的训练数据更加丰富, 从而使得故障预测模型能够学习到针对不同属性信息的服务处理单元 的异常情况, 从而提升故障预测模型在应用过程中的预测结果的准确度。 下述结合 附图 6, 以本说明书提供的故障预测方法在故障预测模型训练的应用为例, 对 所述故障预测方法进行进一步说明。 其中, 图 6示出了本说明书一个实施例提供的一种故障 预测方法的处理过程流程图, 具体包括以下步骤。 步骤 602: 获取服务处理单元的样本异常日志数据和样本单元属性信息。 具体 的, 可以获取 NC (即服务处理单元) 的样本异常日志数据和样本单元属性信息 (即 静态信息)。 步骤 604: 对所述样本异常日志数据中的样本异常信息进行处理, 确定所述样本异常信 息对应的样本异常事件。 具体 的, 可以根据正则表达式,对样本异常日志数据 umce : [Hardware Er ror] : Mach i ne c heck events l ogged ”中记载的样本异常信息进行抽象化处理, 抽象为样本异常信息对应的样 本异常事件 "dmesg_unrecover_mce”。 步骤 606: 根据异常事件库中的参考异常事件与参考事件标识之间的匹配关系, 确定所 述样本异常事件对应的样本事件标识。 具体 的, 可以根据预先构建的异常事件库中、 参考异常事件和参考事件标识之间的匹配 关系, 确定样本异常事件 "dmesg_unrecover_mce”对应的样本事件标识 "32"。 步骤 608 : 根据所述样本异常事件对应的异常发生时间, 对所述样本异常事件对应的样 本事件标识进行排序, 生成所述样本异常事件序列。 具体 的, 可以根据多个样本异常时间的异常发生时间, 对每个样本异常事件对应的样本 事件标识进行倒序排序, 获得样本异常事件序列。 步骤 610 : 根据采样时间间隔以及采样时间长度, 对所述样本异常事件序列进行采样, 获得正样本异常事件序列, 将所述正样本异常事件序列和所述样本单元属性信息, 作为正样 本。 具体 的, 可以根据采样时间间隔 5分钟、 采样时间长度 3天, 对样本异常事件序列进行 采样, 获得在采样时刻为宕机时刻的情况下, 该采样时刻之前 3天的样本异常事件序列作为 正样本异常事件序列, 并将正样本异常事件序列和样本单元属性信息, 作为正样本。 步骤 612: 根据预设负样本采样规则, 对所述样本异常事件序列进行采样, 获得负样本 异常事件序列, 将所述负样本异常事件序列和所述样本单元属性信息, 作为负样本。 具体 的, 可以对样本异常事件序列进行随机采样, 获得采样时刻之前 3天的样本异常事 件序列作为负样本异常事件序列, 并将负样本异常事件序列和样本单元属性信息, 作为负样 本。 或者 , 还可以根据采样时间间隔 5分钟、 采样时间长度 3天, 对样本异常事件序列进行 采样, 获得在采样时刻不为宕机时刻的情况下, 该采样时刻之前 3天的样本异常事件序列作 为负样本异常事件序列。 步骤 614: 根据所述正样本、 所述正样本对应的第一样本标签、 所述负样本、 所述负样 本对应的第二样本标签, 对所述故障预测模型进行训练, 直至获得满足训练停止条件的故障 预测模型。 具体 的, 可以根据正样本、 正样本对应的第一样本标签 1、 负样本、 负样本对应的第二 样本标签 0, 对故障预测模型进行训练, 直至获得满足训练停止条件的故障预测模型。 具体实施 时, 可以将所述正样本异常事件序列输入所述编码层, 获得正样本异常事件序 列特征; 将所述样本单元属性信息输入所述门控层, 利用所述门控层在所述多个处理层中确 定目标处理层; 将所述正样本异常事件序列特征输入所述目标处理层, 获得所述正样本异常 事件序列特征对应的第一预测结果; 以及将所述负样本异常事件序列输入所述编码层, 获得 负样本异常事件序列特征; 将所述样本单元属性信息输入所述门控层, 利用所述门控层在所 述多个处理层中确定所述目标处理层;将所述负样本异常事件序列特征输入所述目标处理层, 获得所述负样本异常事件序列特征对应的第二预测结果; 根据所述第一预测结果、 所述第二 预测结果、 所述第一样本标签和所述第二样本标签, 对所述故障预测模型进行训练, 直至获 得满足训练停止条件的故障预测模型。 综上所述 , 上述方法中, 在对故障预测模型的训练过程中, 考虑到了服务处理单元的样 本单元属性信息, 样本单元属性信息补充了系统日志的实时信息的不足, 使得故障预测模型 的训练数据更加丰富, 从而使得故障预测模型能够学习到针对不同属性信息的服务处理单元 的异常情况, 从而提升故障预测模型在应用过程中的预测结果的准确度。 与上述方法实施例相对应, 本说明书还提供了故障预测装置实施例, 图 7示出了本说明 书一个实施例提供的一种故障预测装置的结构示意图。 如图 7所示, 该装置包括: 获取模块 702, 被配置为获取所述服务处理单元的异常日志数据和单元属性信息; 确定模块 704, 被配置为根据所述异常日志数据, 确定异常事件序列; 输入模块 706, 被配置为将所述单元属性信息和所述异常事件序列输入故障预测模型, 获得所述服务处理单元的故障预测结果; 其 中, 所述故障预测模型通过正样本、 所述正样本对应的第一样本标签、 负样本、 所述 负样本对应的第二样本标签训练获得, 所述正样本包括正样本异常事件序列以及样本单元属 性信息, 所述负样本包括负样本异常事件序列以及所述样本单元属性信息。 一个可选的实施例 中, 所述故障预测模型包括编码层、 门控层和多个处理层; 相应地, 所述输入模块 706, 进一步被配置为: 将所述异 常事件序列输入所述编码层, 获得异常事件序列特征; 将所述单元属性信 息输入所述门控层, 利用所述门控层在所述多个处理层中确定目标处 理层; 将所述异 常事件序列特征输入所述目标处理层,获得所述服务处理单元的故障预测结果。 一个可选的实施例 中, 所述输入模块 706, 进一步被配置为: 将所述单元属性信 息特征输入所述门控层, 利用所述门控层计算各处理层的第一注意力 权重; 根据所述各处理层的 第一注意力权重, 在所述多个处理层中确定目标处理层; 相应地, 所述利用所述门控层在所述多个处理层中确定目标处理层之后, 还包括: 从所述各处理层 的第一注意力权重, 确定所述目标处理层对应的目标第一注意力权重, 并将所述目标第一注意力权重发送至所述目标处理层。 一个可选的实施例 中, 所述故障预测模型还包括注意力机制层; 所述输入模块 706, 进一步被配置为: 将所述 异常事件序列特征输入所述注意力机制层, 利用所述注意力机制层计算所述异常 事件序列特征对应的第二注意力权重; 将所述 第二注意力权重发送至所述目标处理层; 所述将所述 异常事件序列特征输入所述目标处理层, 获得所述服务处理单元的故障预测 结果, 包括: 根据所述 目标第一注意力权重和所述第二注意力权重, 对所述异常事件序列特征进行处 理, 获得所述服务处理单元的故障预测结果。 一个可选的实施例 中, 所述输入模块 706, 进一步被配置为: 将所述单元属性信 息和所述异常事件序列输入故障预测模型, 获得所述故障预测模型输 出的置信度; 根据所述置信度和预设置信度 阈值, 确定所述服务处理单元的故障预测结果为宕机结果 或者不宕机结果。 一个可选的实施例 中, 所述确定模块 704, 进一步被配置为: 对所述异 常日志数据中的异常信息进行处理, 确定所述异常信息对应的异常事件; 根据 异常事件库中的参考异常事件与参考事件标识之间的匹配关系, 确定所述异常事件 对应的事件标识; 根据所述 异常事件对应的异常发生时间, 对所述异常事件对应的事件标识进行排序, 生 成所述异常事件序列。 一个可选的实施例 中, 所述确定模块 704, 进一步被配置为: 根据正则表达 式, 对所述异常日志数据中的异常信息进行抽象化处理, 确定所述异常信 息对应的异常事件。 一个可选的实施例 中, 所述确定模块 704, 进一步被配置为: 根据所述 异常事件对应的异常发生时间, 利用预设排序规则对所述异常事件对应的事件 标识进行排序, 并根据排序后的事件标识生成所述异常事件序列。 一个可选的实施例 中, 所述装置还包括训练模块, 被配置为: 获取所述服务处理单元的样本异 常日志数据和样本单元属性信息; 根据所述样本异 常日志数据, 确定样本异常事件序列; 根据所述样本异 常事件序列以及所述样本单元属性信息,确定所述正样本和所述负样本; 根据所述正样 本、 所述正样本对应的第一样本标签、 所述负样本、 所述负样本对应的第 二样本标签, 对所述故障预测模型进行训练, 直至获得满足训练停止条件的故障预测模型。 一个可选的实施例 中, 所述故障预测模型包括编码层、 门控层和多个处理层; 相应地, 所述训练模块, 进一步被配置为: 将所述正样本异 常事件序列输入所述编码层, 获得正样本异常事件序列特征; 将所述样本单 元属性信息输入所述门控层, 利用所述门控层在所述多个处理层中确定目 标处理层; 将所述正样本 异常事件序列特征输入所述目标处理层, 获得所述正样本异常事件序列特 征对应的第一预测结果; 以及 将所述 负样本异常事件序列输入所述编码层, 获得负样本异常事件序列特征; 将所述样本单 元属性信息输入所述门控层, 利用所述门控层在所述多个处理层中确定所 述目标处理层; 将所述 负样本异常事件序列特征输入所述目标处理层, 获得所述负样本异常事件序列特 征对应的第二预测结果; 根据所述 第一预测结果、 所述第二预测结果、 所述第一样本标签和所述第二样本标签, 对所述故障预测模型进行训练, 直至获得满足训练停止条件的故障预测模型。 一个可选的实施例 中, 所述训练模块, 进一步被配置为: 将所述样本单 元属性信息特征输入所述门控层, 利用所述门控层计算各处理层的第一注 意力权重; 根据所述各处理层的 第一注意力权重, 在所述多个处理层中确定目标处理层; 相应地, 所述利用所述门控层在所述多个处理层中确定目标处理层之后, 还包括: 从所述各处理层 的第一注意力权重, 确定所述目标处理层对应的目标第一注意力权重, 并将所述目标第一注意力权重发送至所述目标处理层。 一个可选的实施例 中, 所述故障预测模型还包括注意力机制层; 所述训练模块, 进一步被配置为: 将所述 负样本异常事件序列特征输入所述注意力机制层, 利用所述注意力机制层计算所 述负样本异常事件序列特征对应的负样本第二注意力权重; 将所述 负样本第二注意力权重发送至所述目标处理层; 所述将所述 负样本异常事件序列特征输入所述目标处理层, 获得所述负样本异常事件序 列特征对应的第二预测结果, 包括: 根据所述 目标第一注意力权重和所述负样本第二注意力权重, 对所述负样本异常事件序 列特征进行处理, 获得所述负样本异常事件序列特征对应的第二预测结果。 一个可选的实施例 中, 所述训练模块, 进一步被配置为: 将所述正样 本异常事件序列特征输入所述注意力机制层, 利用所述注意力机制层计算所 述正样本异常事件序列特征对应的正样本第二注意力权重; 将所述正样本 第二注意力权重发送至所述目标处理层; 所述将所述正样 本异常事件序列特征输入所述目标处理层, 获得所述正样本异常事件序 列特征对应的第一预测结果, 包括: 根据所述 目标第一注意力权重和所述正样本第二注意力权重, 对所述正样本异常事件序 列特征进行处理, 获得所述正样本异常事件序列特征对应的第一预测结果。 一个可选 的实施例中, 所述训练模块, 进一步被配置为: 对所述样 本异常日志数据中的样本异常信息进行处理, 确定所述样本异常信息对应的样 本异常事件; 根据 异常事件库中的参考异常事件与参考事件标识之间的匹配关系, 确定所述样本异常 事件对应的样本事件标识; 根据所述样 本异常事件对应的异常发生时间, 对所述样本异常事件对应的样本事件标识 进行排序, 生成所述样本异常事件序列。 一个可选 的实施例中, 所述训练模块, 进一步被配置为: 根据正 则表达式, 对所述样本异常日志数据中的样本异常信息进行抽象化处理, 确定所 述样本异常信息对应的样本异常事件。 一个可选 的实施例中, 所述训练模块, 进一步被配置为: 根据所述样 本异常事件对应的异常发生时间, 利用预设排序规则对所述样本异常事件对 应的样本事件标识进行排序, 并根据排序后的样本事件标识生成所述样本异常事件序列。 一个可选 的实施例中, 所述训练模块, 进一步被配置为: 根据采样 时间间隔以及采样时间长度, 对所述样本异常事件序列进行采样, 获得正样本 异常事件序列; 将所述正样本 异常事件序列和所述样本单元属性信息, 作为所述正样本。 综上所述 , 上述装置中, 在对故障预测模型的训练过程中, 考虑到了服务处理单元的样 本单元属性信息, 样本单元属性信息补充了系统日志的实时信息的不足, 使得故障预测模型 的训练数据更加丰富, 从而使得故障预测模型能够学习到针对不同属性信息的服务处理单元 的异常情况, 从而提升故障预测模型在应用过程中的预测结果的准确度。 上述 为本实施例的一种故障预测装置的示意性方案。 需要说明的是, 该故障预测装置的 技术方案与上述的故障预测方法的技术方案属于同一构思, 故障预测装置的技术方案未详细 描述的细节内容, 均可以参见上述故障预测方法的技术方案的描述。 与上述方法实施例相对应 , 参见图 8, 图 8 示出了根据本说明书一个实施例提供的 一种故障预测模型训练方法 的流程图, 具体包括以下步骤。 步骤 802: 获取服务处理单元的样本异常日志数据和样本单元属性信息; 步骤 804: 根据所述样本异常日志数据, 确定样本异常事件序列; 步骤 806: 根据所述样本异常事件序列以及所述样本单元属性信息, 确定正样本和负样 本; 步骤 808: 根据所述正样本、 所述正样本对应的第一样本标签、 所述负样本、 所述负样 本对应的第二样本标签, 对所述故障预测模型进行训练, 直至获得满足训练停止条件的故障 预测模型; 其 中, 所述正样本包括正样本异常事件序列以及样本单元属性信息, 所述负样本包括负 样本异常事件序列以及所述样本单元属性信息。 综上所述 , 上述方法中, 在对故障预测模型的训练过程中, 考虑到了服务处理单元的样 本单元属性信息, 样本单元属性信息补充了系统日志的实时信息的不足, 使得故障预测模型 的训练数据更加丰富, 从而使得故障预测模型能够学习到针对不同属性信息的服务处理单元 的异常情况, 从而提升故障预测模型在应用过程中的预测结果的准确度。 上述 为本实施例的一种故障预测模型训练方法的示意性方案。 需要说明的是, 该故障预 测模型训练方法的技术方案与上述的故障预测方法的技术方案属于同一构思, 故障预测模型 训练方法的技术方案未详细描述的细节内容, 均可以参见上述故障预测方法的技术方案的描 述。 与上述方法实施例相对应, 本说明书还提供了故障预测模型训练装置实施例, 图 9示出 了本说明书一个实施例提供的一种故障预测模型训练装置的结构示意图。 如图 9所示, 该装 置包括: 获取模块 902, 被配置为获取服务处理单元的样本异常日志数据和样本单元属性信息; 第一确定模块 904, 被配置为根据所述样本异常日志数据, 确定样本异常事件序列; 第二确定模块 906, 被配置为根据所述样本异常事件序列以及所述样本单元属性信息, 确定所述正样本和所述负样本; 训练模块 908, 被配置为根据所述正样本、 所述正样本对应的第一样本标签、 所述负样 本、 所述负样本对应的第二样本标签, 对所述故障预测模型进行训练, 直至获得满足训练停 止条件的故障预测模型; 其 中, 所述正样本包括正样本异常事件序列以及样本单元属性信息, 所述负样本包括负 样本异常事件序列以及所述样本单元属性信息。 综上所述 , 上述装置中, 在对故障预测模型的训练过程中, 考虑到了服务处理单元的样 本单元属性信息, 样本单元属性信息补充了系统日志的实时信息的不足, 使得故障预测模型 的训练数据更加丰富, 从而使得故障预测模型能够学习到针对不同属性信息的服务处理单元 的异常情况, 从而提升故障预测模型在应用过程中的预测结果的准确度。 上述 为本实施例的一种故障预测模型训练装置的示意性方案。 需要说明的是, 该故障预 测模型训练装置的技术方案与上述的故障预测方法的技术方案属于 同一构思, 故障预测模型 训练装置的技术方案未详细描述的细节 内容, 均可以参见上述故障预测方法的技术方案的描 述。 图 10示出了根据本说明书一个实施例提供的一种计算设备 1000的结构框图。 该计算设 备 1000的部件包括但不限于存储器 1010和处理器 1020o 处理器 1020与存储器 1010通过总 线 1030相连接, 数据库 1050用于保存数据。 计算设备 1000还包括接入设备 1040, 接入设备 1040使得计算设备 1000能够经由一个 或多个网络 1060通信。这些网络的示例包括公用交换电话网 ( PSTN, Public Switched Telephone Network) > 局域网 (LAN, Local Area Network) > 广域网 (WAN, Wide Area Network) > 个域 网 (PAN, Personal Area Network) 或诸如因特网的通信网络的组合。 接入设备 1040可以包 括有线或无线的任何类型的网络接口 (例如, 网络接口卡 (NIC, network interface controller) ) 中的一个或多个, 诸如 IEEE802.il无线局域网 (WLAN, Wireless Local Area Network) 无线 接口、全球微波互联接入 (Wi-MAX, Worldwide Interoperability for Microwave Access)接口、 以太网接口、 通用串行总线 (USB, Universal Serial Bus) 接口、 蜂窝网络接口、 蓝牙接口、 近场通信 (NFC, Near Field Communication) 接口, 等等。 在 本申请的一个实施例中, 计算设备 1000的上述部件以及图 10中未示出的其他部件也 可以彼此相连接, 例如通过总线。 应当理解, 图 10所示的计算设备结构框图仅仅是出于示例 的 目的, 而不是对本申请范围的限制。本领域技术人员可以根据需要,增添或替换其他部件。 计算设备 1000可以是任何类型的静止或移动计算设备,包括移动计算机或移动计算设备 (例如, 平板计算机、 个人数字助理、 膝上型计算机、 笔记本计算机、 上网本等)、 移动电话 (例如, 智能手机)、 可佩戴的计算设备 (例如, 智能手表、 智能眼镜等) 或其他类型的移动 设备, 或者诸如台式计算机或个人计算机 (PC, Personal Computer) 的静止计算设备。 计算 设备 1000还可以是移动式或静止式的服务器。 其中, 处理器 1020用于执行如下计算机可执行指令, 该计算机可执行指令被处理器执行 时实现上述故障预测方法或故障预测模型训练方法的步骤。 本说明书中的各个实施例均采用递进的方式描述, 各个实施例之间相同相似的部分互相 参见即可, 每个实施例重点说明的都是与其他实施例的不同之处。 尤其, 对于计算设备实施 例而言, 由于其基本相似于故障预测方法或故障预测模型训练方法实施例, 所以描述的比较 简单, 相关之处参见故障预测方法或故障预测模型训练方法实施例的部分说明即可。 本说明书一实施例还提供一种计算机可读存储介质, 其存储有计算机程序 /指令, 该计算 机程序 /指令被处理器执行时实现上述故障预测方法或故障预测模型训练方法的步骤。 本说明书中的各个实施例均采用递进的方式描述, 各个实施例之间相同相似的部分互相 参见即可, 每个实施例重点说明的都是与其他实施例的不同之处。 尤其, 对于计算机可读存 储介质实施例而言, 由于其基本相似于故障预测方法或故障预测模型训练方法实施例, 所以 描述的比较简单, 相关之处参见故障预测方法或故障预测模型训练方法实施例的部分说明即 可。 本说明书一实施例还提供一种计算机程序产品, 包括计算机程序 /指令, 该计算机程序 / 指令被处理器执行时实现上述故障预测方法或故障预测模型训练方法的步骤。 上 述为本实施例的一种计算机程序产品的示意性方案。 需要说明的是, 该计算机程序产 品的技术方案与上述的故障预测方法或故障预测模型训练方法的技术方案属于 同一构思, 计 算机程序产品的技术方案未详细描述的细节内容, 均可以参见上述故障预测方法或故障预测 模型训练方法的技术方案的描述。 上 述对本说明书特定实施例进行了描述。 其它实施例在所附权利要求书的范围内。 在一 些情况下, 在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍 然可以实现期望的结果。 另外, 在附图中描绘的过程不一定要求示出的特定顺序或者连续顺 序才能实现期望的结果。 在某些实施方式中, 多任务处理和并行处理也是可以的或者可能是 有利的。 所 述计算机指令包括计算机程序代码, 所述计算机程序代码可以为源代码形式、 对象代 码形式、 可执行文件或某些中间形式等。 所述计算机可读介质可以包括: 能够携带所述计算 机程序代码的任何实体或装置、 记录介质、 U 盘、 移动硬盘、 磁碟、 光盘、 计算机存储器、 只读存储器 (ROM, Read-On I y Memory)、 随机存取存储器 (RAM, Random Access Memory)、 电载波信号、 电信信号以及软件分发介质等。 需要说明的是, 所述计算机可读介质包含的内 容可以根据专利实践的要求进行适当的增减, 例如在某些地区, 根据专利实践, 计算机可读 介质不包括电载波信号和电信信号。 需要说明的是, 对于前述的各方法实施例, 为了简便描述, 故将其都表述为一系列的动 作组合, 但是本领域技术人员应该知悉, 本公开并不受所描述的动作顺序的限制, 因为依据 本公开, 某些步骤可以采用其它顺序或者同时进行。 其次, 本领域技术人员也应该知悉, 说 明书中所描述的实施例均属于优选实施例, 所涉及的动作和模块并不一定都是本公开所必须 的。 在 上述实施例中, 对各个实施例的描述都各有侧重, 某个实施例中没有详述的部分, 可 以参见其它实施例的相关描述。 以上公开的本说明书优选实施例只是用于帮助阐述本说明书。 可选实施例并没有详尽叙 述所有的细节, 也不限制该发明仅为所述的具体实施方式。 显然, 根据本公开的内容, 可作 很多的修改和变化。 本说明书选取并具体描述这些实施例, 是为了更好地解释本公开的原理 和实际应用, 从而使所属技术领域技术人员能很好地理解和利用本说明书。 本说明书仅受权 利要求书及其全部范围和等效物的限制。

Claims

24 权 利 要 求 书
1.一种故障预测方法, 应用于云计算系统, 所述云计算系统包括服务处理单元, 所述方 法包括: 获取所述服务处理单元的异 常日志数据和单元属性信息; 根据所述异 常日志数据, 确定异常事件序列; 将所述单元属性信 息和所述异常事件序列输入故障预测模型, 获得所述服务处理单元的 故障预测结果; 其 中, 所述故障预测模型通过正样本、 所述正样本对应的第一样本标签、 负样本、 所述 负样本对应的第二样本标签训练获得, 所述正样本包括正样本异常事件序列以及样本单元属 性信息, 所述负样本包括负样本异常事件序列以及所述样本单元属性信息。
2.根据权利要求 1 所述的故障预测方法, 所述故障预测模型包括编码层、 门控层和多个 处理层; 相应地 , 所述将所述单元属性信息和所述异常事件序列输入故障预测模型, 获得所述服 务处理单元的故障预测结果, 包括: 将所述异 常事件序列输入所述编码层, 获得异常事件序列特征; 将所述单元属性信 息输入所述门控层, 利用所述门控层在所述多个处理层中确定目标处 理层; 将所述异 常事件序列特征输入所述目标处理层,获得所述服务处理单元的故障预测结果。
3.根据权利要求 2所述的故障预测方法, 所述将所述单元属性信息输入所述门控层, 利 用所述门控层在所述多个处理层中确定目标处理层, 包括: 将所述单元属性信 息特征输入所述门控层, 利用所述门控层计算各处理层的第一注意力 权重; 根据所述各处理层的 第一注意力权重, 在所述多个处理层中确定目标处理层; 相应地, 所述利用所述门控层在所述多个处理层中确定目标处理层之后, 还包括: 从所述各处理层 的第一注意力权重, 确定所述目标处理层对应的目标第一注意力权重, 并将所述目标第一注意力权重发送至所述目标处理层。
4.根据权利要求 3所述的故障预测方法, 所述故障预测模型还包括注意力机制层; 所述将所述 异常事件序列特征输入所述目标处理层, 获得所述服务处理单元的故障预测 结果之前, 还包括: 将所述 异常事件序列特征输入所述注意力机制层, 利用所述注意力机制层计算所述异常 事件序列特征对应的第二注意力权重; 将所述 第二注意力权重发送至所述目标处理层; 所述将所述 异常事件序列特征输入所述目标处理层, 获得所述服务处理单元的故障预测 结果, 包括: 根据所述 目标第一注意力权重和所述第二注意力权重, 对所述异常事件序列特征进行处 理, 获得所述服务处理单元的故障预测结果。
5.根据权利要求 1 所述的故障预测方法, 所述根据所述异常日志数据, 确定异常事件序 列, 包括: 对所述异 常日志数据中的异常信息进行处理, 确定所述异常信息对应的异常事件; 根据 异常事件库中的参考异常事件与参考事件标识之间的匹配关系, 确定所述异常事件 对应的事件标识; 根据所述 异常事件对应的异常发生时间, 对所述异常事件对应的事件标识进行排序, 生 成所述异常事件序列。
6.根据权利要求 5所述的故障预测方法, 所述对所述异常日志数据中的异常信息进行处 理, 确定所述异常信息对应的异常事件, 包括: 根据正则表达 式, 对所述异常日志数据中的异常信息进行抽象化处理, 确定所述异常信 息对应的异常事件。
7.根据权利要求 5所述的故障预测方法, 所述根据所述异常事件对应的异常发生时间, 对所述异常事件对应的事件标识进行排序, 生成所述异常事件序列, 包括: 根据所述 异常事件对应的异常发生时间, 利用预设排序规则对所述异常事件对应的事件 标识进行排序, 并根据排序后的事件标识生成所述异常事件序列。
8.根据权利要求 1 所述的故障预测方法, 所述将所述单元属性信息和所述异常事件序列 输入故障预测模型, 获得所述服务处理单元的故障预测结果, 包括: 将所述单元属性信 息和所述异常事件序列输入故障预测模型, 获得所述故障预测模型输 出的置信度; 根据所述置信度和预设置信度 阈值, 确定所述服务处理单元的故障预测结果为宕机结果 或者不宕机结果。
9.根据权利要求 1所述的故障预测方法, 所述故障预测模型的训练步骤包括: 获取所述服务处理单元的样本异 常日志数据和样本单元属性信息; 根据所述样本异 常日志数据, 确定样本异常事件序列; 根据所述样本异 常事件序列以及所述样本单元属性信息,确定所述正样本和所述负样本; 根据所述正样 本、 所述正样本对应的第一样本标签、 所述负样本、 所述负样本对应的第 二样本标签, 对所述故障预测模型进行训练, 直至获得满足训练停止条件的故障预测模型。
10.根据权利要求 9所述的故障预测方法, 所述故障预测模型包括编码层、 门控层和多个 处理层; 相应地 , 所述根据所述正样本、 所述正样本对应的第一样本标签、 所述负样本、 所述负 样本对应的第二样本标签, 对所述故障预测模型进行训练, 直至获得满足训练停止条件的故 障预测模型, 包括: 将所述正样本异 常事件序列输入所述编码层, 获得正样本异常事件序列特征; 将所述样本单 元属性信息输入所述门控层, 利用所述门控层在所述多个处理层中确定目 标处理层; 将所述正样本 异常事件序列特征输入所述目标处理层, 获得所述正样本异常事件序列特 征对应的第一预测结果; 以及 将所述 负样本异常事件序列输入所述编码层, 获得负样本异常事件序列特征; 将所述样本单 元属性信息输入所述门控层, 利用所述门控层在所述多个处理层中确定所 述目标处理层; 将所述 负样本异常事件序列特征输入所述目标处理层, 获得所述负样本异常事件序列特 征对应的第二预测结果; 根据所述 第一预测结果、 所述第二预测结果、 所述第一样本标签和所述第二样本标签, 对所述故障预测模型进行训练, 直至获得满足训练停止条件的故障预测模型。
11.根据权利要求 10所述的故障预测方法, 所述将所述样本单元属性信息特征输入所述 门控层, 利用所述门控层在所述多个处理层中确定目标处理层, 包括: 将所述样本单 元属性信息特征输入所述门控层, 利用所述门控层计算各处理层的第一注 意力权重; 根据所述各处理层的 第一注意力权重, 在所述多个处理层中确定目标处理层; 相应地, 所述利用所述门控层在所述多个处理层中确定目标处理层之后, 还包括: 从所述各处理层 的第一注意力权重, 确定所述目标处理层对应的目标第一注意力权重, 并将所述目标第一注意力权重发送至所述目标处理层。
12.根据权利要求 11所述的故障预测方法, 所述故障预测模型还包括注意力机制层; 所述将所述 负样本异常事件序列特征输入所述目标处理层, 获得所述负样本异常事件序 列特征对应的第二预测结果之前, 还包括: 将所述 负样本异常事件序列特征输入所述注意力机制层, 利用所述注意力机制层计算所 述负样本异常事件序列特征对应的负样本第二注意力权重; 将所述 负样本第二注意力权重发送至所述目标处理层; 所述将所述 负样本异常事件序列特征输入所述目标处理层, 获得所述负样本异常事件序 列特征对应的第二预测结果, 包括: 根据所述 目标第一注意力权重和所述负样本第二注意力权重, 对所述负样本异常事件序 列特征进行处理, 获得所述负样本异常事件序列特征对应的第二预测结果。
13.根据权利要求 12所述的故障预测方法, 所述将所述正样本异常事件序列特征输入所 述目标处理层, 获得所述正样本异常事件序列特征对应的第一预测结果之前, 还包括: 27 将所述正样 本异常事件序列特征输入所述注意力机制层, 利用所述注意力机制层计算所 述正样本异常事件序列特征对应的正样本第二注意力权重; 将所述正样本 第二注意力权重发送至所述目标处理层; 所述将所述正样 本异常事件序列特征输入所述目标处理层, 获得所述正样本异常事件序 列特征对应的第一预测结果, 包括: 根据所述 目标第一注意力权重和所述正样本第二注意力权重, 对所述正样本异常事件序 列特征进行处理, 获得所述正样本异常事件序列特征对应的第一预测结果。
14.根据权利要求 9所述的故障预测方法, 所述根据所述样本异常日志数据, 确定样本异 常事件序列, 包括: 对所述样 本异常日志数据中的样本异常信息进行处理, 确定所述样本异常信息对应的样 本异常事件; 根据 异常事件库中的参考异常事件与参考事件标识之间的匹配关系, 确定所述样本异常 事件对应的样本事件标识; 根据所述样 本异常事件对应的异常发生时间, 对所述样本异常事件对应的样本事件标识 进行排序, 生成所述样本异常事件序列。
15.根据权利要求 14所述的故障预测方法, 所述对所述样本异常日志数据中的样本异常 信息进行处理, 确定所述样本异常信息对应的样本异常事件, 包括: 根据正 则表达式, 对所述样本异常日志数据中的样本异常信息进行抽象化处理, 确定所 述样本异常信息对应的样本异常事件。
16.根据权利要求 14所述的故障预测方法, 所述根据所述样本异常事件对应的异常发生 时间, 对所述样本异常事件对应的样本事件标识进行排序, 生成所述样本异常事件序列, 包 括: 根据所述样 本异常事件对应的异常发生时间, 利用预设排序规则对所述样本异常事件对 应的样本事件标识进行排序, 并根据排序后的样本事件标识生成所述样本异常事件序列。
17.根据权利要求 9所述的故障预测方法,所述根据所述样本异常事件序列以及所述样本 单元属性信息, 确定正样本, 包括: 根据采样 时间间隔以及采样时间长度, 对所述样本异常事件序列进行采样, 获得正样本 异常事件序列; 将所述正样本 异常事件序列和所述样本单元属性信息, 作为所述正样本。
18. —种故障预测模型训练方法, 包括: 获取服 务处理单元的样本异常日志数据和样本单元属性信息; 根据所述样本 异常日志数据, 确定样本异常事件序列; 根据所述样本 异常事件序列以及所述样本单元属性信息, 确定正样本和负样本; 28 根据所述正样 本、 所述正样本对应的第一样本标签、 所述负样本、 所述负样本对应的第 二样本标签, 对所述故障预测模型进行训练, 直至获得满足训练停止条件的故障预测模型; 其 中, 所述正样本包括正样本异常事件序列以及样本单元属性信息, 所述负样本包括负 样本异常事件序列以及所述样本单元属性信息。
19. -种计算设备, 包括: 存储器和处理器 ; 所述存储 器用于存储计算机程序 /指令, 所述处理器用于执行所述计算机程序 /指令, 该 计算机程序 /指令被处理器执行时实现权利要求 1至 18任意一项所述方法的步骤。
20. -种计算机可读存储介质, 其存储有计算机程序 /指令, 该计算机程序 /指令被处理器 执行时实现权利要求 1至 18任意一项所述方法的步骤。
21. -种计算机程序产品, 包括计算机程序 /指令, 该计算机程序 /指令被处理器执行时实 现权利要求 1至 18任意一项所述方法的步骤。
PCT/IB2025/050236 2024-02-29 2025-01-09 故障预测方法、故障预测模型训练方法、计算设备、存储介质及计算机程序产品 Pending WO2025181564A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202410233030.0A CN120561667A (zh) 2024-02-29 2024-02-29 故障预测方法、故障预测模型训练方法、计算设备、存储介质及计算机程序产品
CN202410233030.0 2024-02-29

Publications (1)

Publication Number Publication Date
WO2025181564A1 true WO2025181564A1 (zh) 2025-09-04

Family

ID=96814264

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/IB2025/050236 Pending WO2025181564A1 (zh) 2024-02-29 2025-01-09 故障预测方法、故障预测模型训练方法、计算设备、存储介质及计算机程序产品

Country Status (2)

Country Link
CN (1) CN120561667A (zh)
WO (1) WO2025181564A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114610515A (zh) * 2022-03-10 2022-06-10 电子科技大学 基于日志全语义的多特征日志异常检测方法及系统
CN115168173A (zh) * 2022-07-25 2022-10-11 阿里巴巴(中国)有限公司 故障预测模型训练方法、设备故障确定方法、装置及设备
CN115599579A (zh) * 2022-10-09 2023-01-13 阿里云计算有限公司(Cn) 基于加权损失的系统故障预测方法、装置、设备及介质
CN115617554A (zh) * 2022-10-09 2023-01-17 阿里云计算有限公司 基于时间感知的系统故障预测方法、装置、设备及介质
CN115840659A (zh) * 2022-12-26 2023-03-24 阿里云计算有限公司 内存条故障预测方法、装置、计算设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114610515A (zh) * 2022-03-10 2022-06-10 电子科技大学 基于日志全语义的多特征日志异常检测方法及系统
CN115168173A (zh) * 2022-07-25 2022-10-11 阿里巴巴(中国)有限公司 故障预测模型训练方法、设备故障确定方法、装置及设备
CN115599579A (zh) * 2022-10-09 2023-01-13 阿里云计算有限公司(Cn) 基于加权损失的系统故障预测方法、装置、设备及介质
CN115617554A (zh) * 2022-10-09 2023-01-17 阿里云计算有限公司 基于时间感知的系统故障预测方法、装置、设备及介质
CN115840659A (zh) * 2022-12-26 2023-03-24 阿里云计算有限公司 内存条故障预测方法、装置、计算设备及存储介质

Also Published As

Publication number Publication date
CN120561667A (zh) 2025-08-29

Similar Documents

Publication Publication Date Title
CN113094200B (zh) 一种应用程序的故障预测方法和装置
US20220365996A1 (en) Real-time event detection on social media streams
US12200402B2 (en) Conference summary generation
US11570403B2 (en) Automated recording highlights for conferences
US11470279B1 (en) Automated recording highlights for conferences
CN115617554A (zh) 基于时间感知的系统故障预测方法、装置、设备及介质
US12457126B2 (en) Automated recording highlights for conferences
Tao et al. Biglog: Unsupervised large-scale pre-training for a unified log representation
CN114138977B (zh) 日志处理方法、装置、计算机设备和存储介质
US11847565B1 (en) Automatic refinement of intent classification for virtual assistant applications
WO2026021318A1 (zh) 基于结构化数据的问答方法、基于体育表格的问答方法
WO2025119070A1 (zh) 一种直播监控处理方法、系统、设备及介质
US12284089B2 (en) Alert correlating using sequence model with topology reinforcement systems and methods
Yu et al. Sequential recommendation with collaborative explanation via mutual information maximization
US20260006266A1 (en) Instantaneous Media Stream Transcription Systems and Methods
CN117041034A (zh) 训练故障智能诊断模型的方法、诊断方法、系统及设备
US20210342702A1 (en) Method for automatically analyzing transaction logs of a distributed computing system
WO2025181599A1 (zh) 故障预测方法及装置、故障预测模型训练方法及装置、计算设备、计算机存储介质、计算机程序产品
Wang et al. VCRLog: Variable Contents Relationship Perception for Log-based Anomaly Detection
CN120561667A (zh) 故障预测方法、故障预测模型训练方法、计算设备、存储介质及计算机程序产品
US12619830B2 (en) Optimizing performance of conversational interface applications using example forgetting
Deng et al. LogBD: A Log Anomaly Detection Method Based on Pre-trained Models and Domain Adaptation
Yao et al. GANFL: A log anomaly detection method based on collaborative optimization of federated learning and generative adversarial networks
US20260037567A1 (en) Multi-machine learning model system for unstructured data
US20260140991A1 (en) Scaling to Large Datasets with Runtime Classifier Training

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 25761749

Country of ref document: EP

Kind code of ref document: A1