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

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

Info

Publication number
WO2025181599A1
WO2025181599A1 PCT/IB2025/051389 IB2025051389W WO2025181599A1 WO 2025181599 A1 WO2025181599 A1 WO 2025181599A1 IB 2025051389 W IB2025051389 W IB 2025051389W WO 2025181599 A1 WO2025181599 A1 WO 2025181599A1
Authority
WO
WIPO (PCT)
Prior art keywords
abnormal
sample
sequence
abnormality
event
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/051389
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 WO2025181599A1 publication Critical patent/WO2025181599A1/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
    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • 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

Definitions

  • the present disclosure relates to the field of computer technology, and more particularly to a fault prediction method and apparatus, a fault prediction model training method and apparatus, computing device, computer storage medium, and computer program product.
  • Background Cloud computing systems enable centralized management and utilization of servers, thereby improving the efficiency of computing resource utilization.
  • server downtime can reduce the stability of cloud computing systems and, in severe cases, lead to user information loss, impacting the user experience. Therefore, predicting downtime in advance and implementing maintenance based on server anomaly log data is key to solving this problem.
  • the present disclosure provides a fault prediction method.
  • One or more embodiments of this specification simultaneously relate to a fault prediction apparatus, a fault prediction model training method, a fault prediction model training apparatus, a computing device, a computer-readable storage medium, and a computer program product to address technical deficiencies in the prior art.
  • a fault prediction method for use in a cloud computing system, the cloud computing system including a service processing unit.
  • the method comprises: obtaining abnormal log data and a log acquisition time of the abnormal log data from the service processing unit; determining an abnormal event sequence and an abnormal timestamp sequence based on the abnormal log data and the log acquisition time; grouping the abnormal events in the abnormal event sequence based on a time interval threshold and the abnormal occurrence times corresponding to the abnormal events to obtain an abnormal group sequence; and obtaining a fault prediction result for the service processing unit using a fault prediction model based on the abnormal event sequence, the abnormal timestamp sequence, and the abnormal group sequence.
  • a fault prediction device which is applied to a cloud computing system, wherein the cloud computing system includes a service processing unit, and the device includes: a data acquisition module, configured to acquire abnormal log data of the service processing unit and the log acquisition time of the abnormal log data; a sequence determination module, configured to determine an abnormal event sequence and an abnormal timestamp sequence based on the abnormal log data and the log acquisition time; a sequence acquisition module, configured to group the abnormal events in the abnormal event sequence according to a time interval threshold and the abnormal occurrence time corresponding to the abnormal events, to obtain an abnormal group sequence; and a result acquisition module, configured to obtain a fault prediction result of the service processing unit using a fault prediction model based on the abnormal event sequence, the abnormal timestamp sequence, and the abnormal group sequence.
  • a fault prediction model training method is provided, which is applied to a cloud computing system, wherein
  • the cloud computing system includes a service processing unit, and the method includes: obtaining sample abnormality log data from the service processing unit and the sample log acquisition time of the sample abnormality log data; determining a sample abnormality event sequence and a sample abnormality timestamp sequence based on the sample abnormality log data and the sample log acquisition time of the sample abnormality log data; grouping the sample abnormality events in the sample abnormality event sequence based on the time interval threshold and the sample abnormality occurrence time corresponding to the sample abnormality events to obtain a sample abnormality grouping sequence; determining positive samples and negative samples based on the sample abnormality event sequence, the sample abnormality timestamp sequence, and the sample abnormality grouping sequence; and training a fault prediction model based on the positive samples, the sample labels corresponding to the positive samples, the negative samples, and the sample labels corresponding to the negative samples.
  • a fault prediction model training device which is applied to a cloud computing system, the cloud computing system including a service processing unit, and the device including: a data acquisition module, configured to acquire sample abnormality log data of the service processing unit and a sample log acquisition time of the sample abnormality log data; a sequence determination module, configured to determine a sample abnormality event sequence and a sample abnormality timestamp sequence based on the sample abnormality log data and the sample log acquisition time of the sample abnormality log data; a sequence acquisition module, configured to group the sample abnormality events in the sample abnormality event sequence according to the time interval threshold and the sample abnormality occurrence time corresponding to the sample abnormality events, to obtain a sample abnormality grouping sequence; a sample determination module, configured to determine positive samples and negative samples based on the sample abnormality event sequence, the sample abnormality timestamp sequence, and the sample abnormality grouping sequence; and a training module, configured to train and acquire a fault prediction model based on the positive samples, the sample labels corresponding
  • a computing device comprising: a memory and a processor; the memory is configured to store a computer program/instructions, and the processor is configured to execute the computer program/instructions. When executed by the processor, the computer program/instructions implement the steps of the aforementioned fault prediction method or fault prediction model training method.
  • a computer-readable storage medium is provided, storing a computer program/instructions. When executed by the processor, the computer program/instructions implement the steps of the aforementioned fault prediction method or fault prediction model training method.
  • a computer program product is provided, comprising a computer program/instructions.
  • a fault prediction method provided in one embodiment of the present specification is applied to a cloud computing system, wherein the cloud computing system includes a service processing unit.
  • the method includes: obtaining abnormal log data of the service processing unit and a log acquisition time of the abnormal log data; determining an abnormal event sequence and an abnormal timestamp sequence based on the abnormal log data and the log acquisition time; grouping the abnormal events in the abnormal event sequence based on a time interval threshold and the abnormal occurrence time corresponding to the abnormal events to obtain an abnormal group sequence; and obtaining a fault prediction result for the service processing unit using a fault prediction model based on the abnormal event sequence, the abnormal timestamp sequence, and the abnormal group sequence.
  • the fault prediction method obtains abnormal log data from the service processing unit and the log acquisition time of the abnormal log data to determine the abnormal event sequence and the abnormal timestamp sequence.
  • the abnormal events are then grouped according to their time intervals to obtain the abnormal group sequence.
  • the abnormal event sequence, abnormal timestamp sequence, and abnormal group sequence are input into the fault prediction model.
  • the term "and/or" used in one or more embodiments of this specification refers to and encompasses any and all possible combinations of one or more of the associated listed items. It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are merely used to distinguish information of the same type from one another. For example, the first could also be referred to as the second, and similarly, the second could be referred to as the first, without departing from the scope of one or more embodiments of this specification.
  • the word "if,” as used herein, can be interpreted as “when" or "when" or “in response to determining.”
  • the 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, displayed data, etc.
  • 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 refuse.
  • large models refer to deep learning models with large-scale model parameters, usually These models contain hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than ten trillion model parameters. These large models, also known as foundational models, are pre-trained on large, unlabeled corpora, producing models with over a hundred million parameters. These models are adaptable to a wide range of downstream tasks and exhibit good generalization capabilities. Examples include Large Language Models (LLMs) and multimodal pre-training models. In practical applications, large models only require a small number of samples to fine-tune the pre-trained model and can be applied to different tasks. Large models can be widely used in fields such as natural language processing (NLP) and computer vision.
  • NLP natural language processing
  • VQA visual question answering
  • IC image description
  • IC image generation
  • natural language processing tasks such as text-based sentiment classification, text summarization, and machine translation.
  • the main application scenarios of large models include digital assistants, intelligent robots, search, online education, office software, e-commerce, and intelligent design.
  • NC Node Controller
  • NC refers to a single unit in a cloud computing system used to count fault downtime, and can be understood as a service processing unit in this disclosure.
  • This specification provides a fault prediction method, which also involves a fault prediction method and apparatus, a fault prediction model training method, a fault prediction model training apparatus, 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.
  • the fault prediction method can be applied in a cloud computing system, involving a cloud computing platform 102 and a cloud computing server cluster 104.
  • the cloud computing platform 102 may obtain the abnormal log data of each server from the cloud computing server cluster 104 and determine the log acquisition time for obtaining the abnormal log data. For example, for a particular server, the abnormal log data is processed based on the abnormal log data and the log acquisition time of the server to obtain an abnormal event sequence corresponding to the abnormal information in the abnormal log data and an abnormal timestamp sequence related to the abnormal occurrence time of the abnormal information. The abnormal events are grouped using a time interval threshold, the abnormal events in the abnormal event sequence, and the corresponding abnormal occurrence time to obtain an abnormal group sequence. Based on the abnormal event sequence, the abnormal timestamp sequence, and the abnormal group sequence, a fault prediction result for the server is obtained using a fault prediction model.
  • Cloud computing platform 102 can be understood as a service based on hardware and software resources, providing computing, network, and storage capabilities. In this disclosure, it is used to provide fault prediction services, predicting whether a server will experience downtime by obtaining abnormal log data from the server.
  • the servers in cloud computing server cluster 104 can be understood as servers that provide various services, including physical servers and cloud servers. For example, servers that provide communication services to multiple clients, servers that support backend training for models used on clients, and servers that process data sent by clients.
  • the fault prediction method provided in this disclosure can fully utilize the event, time, and grouping information in abnormal log data.
  • Step 202 Obtain exception log data of the service processing unit and the log acquisition time of the exception log data.
  • the service processing unit can be understood as the NC, i.e., the server in the above-mentioned embodiment.
  • the exception log data includes exception information and the corresponding exception occurrence time.
  • Exception information can be understood as raw, unprocessed, formatted, or compressed log information within the service processing unit. This exception information typically contains detailed errors, warnings, and debugging information, thoroughly recording all activity details during the operation of the service processing unit.
  • the corresponding exception occurrence time can be understood as the timestamp of the exception information, recording the corresponding occurrence time of each exception information.
  • the log acquisition time can be understood as the acquisition time of the exception log data of the service processing unit.
  • a detector can be used to continuously monitor the operation of the service processing unit and, when an exception or error occurs in the service processing unit, record and capture the relevant exception log data.
  • the initial log data upon obtaining an initial exception log, can be sorted according to the exception occurrence time corresponding to the initial exception information, thereby obtaining exception log data arranged in order according to the exception occurrence time corresponding to the initial exception information.
  • a specific implementation is as follows: Obtaining the exception log data from the service processing unit includes: obtaining initial exception log data from the service processing unit, wherein the initial exception log data includes initial exception information and the exception occurrence time corresponding to the initial exception information; sorting the initial exception log data according to the exception occurrence time corresponding to the initial exception information using a preset sorting rule; and obtaining the exception log data based on the sorted initial exception log data.
  • the initial exception log data can be understood as out-of-order exception information obtained from the service processing unit; the preset sorting rule can be understood as a pre-set rule for sorting according to the exception occurrence time corresponding to the initial exception information, which can be sorting from earliest to latest according to the exception occurrence time corresponding to the initial exception information, or from latest to earliest according to the exception occurrence time corresponding to the initial exception information.
  • the initial exception log data of the service processing unit is obtained and the obtained initial exception log data is decoded.
  • Analysis extracts the initial exception information and the corresponding exception occurrence time, and sorts the initial exception log according to a preset sorting rule (e.g., sorting the exception occurrence time corresponding to the initial exception information from latest to earliest).
  • Step 204 Determine an exception event sequence and an exception timestamp sequence based on the exception log data and the log acquisition time.
  • the exception event sequence can be understood as a sequence containing semantic information of the exception log data; the exception timestamp sequence can be understood as a sequence containing time information of the exception log data.
  • the abnormal log data in the service processing unit is analyzed and processed to obtain an abnormal event sequence and an abnormal timestamp sequence.
  • the abnormal event sequence and the abnormal timestamp sequence are input into the fault prediction model, the semantic information and time information contained in the abnormal log data are extracted.
  • the abnormal event sequence is determined based on the abnormal information in the abnormal log data; and the abnormal timestamp sequence is determined based on the abnormal occurrence time.
  • a specific implementation method is as follows: Determining the abnormal event sequence and the abnormal timestamp sequence based on the abnormal log data and the log acquisition time includes: determining the abnormal event sequence based on the abnormal information in the abnormal log data; determining the abnormal occurrence time corresponding to the abnormal event in the abnormal event sequence based on the abnormal occurrence time of the abnormal information; and determining the abnormal timestamp sequence based on the abnormal occurrence time and the log acquisition time.
  • An abnormal event can be understood as data resulting from abstract processing of abnormal information, used to abstract and simplify complex abnormal information.
  • An abnormal event sequence can be understood as a sequence obtained by abstracting and encoding abnormal information.
  • An abnormal timestamp sequence can be understood as a sequence obtained by abstracting and encoding the abnormal occurrence time corresponding to the abnormal information.
  • an abnormal event sequence is determined based on the abnormal information in the abnormal log data.
  • This abnormal event sequence contains the semantic information of the abnormal log data. Since the abnormal event is obtained by abstracting the abnormal information, the abnormal occurrence time of the abnormal information is the abnormal event in the abnormal event sequence and the corresponding abnormal occurrence time.
  • An abnormal timestamp sequence is determined based on the abnormal occurrence time corresponding to the abnormal event and the log acquisition time of the abnormal log data. This abnormal timestamp sequence contains the time information of the abnormal log data.
  • the fault prediction method provided by the present disclosure organizes the abnormal log data of the service processing unit by determining the abnormal event sequence and the abnormal timestamp sequence, forming a structured sequence.
  • abnormal information is processed to obtain an abnormal event sequence, and the abnormal event sequence is input into the fault prediction model, thereby avoiding the process of encoding text information by the fault prediction model.
  • the specific implementation method is as follows: Determining the abnormal event sequence based on the abnormal information in the abnormal log data includes: processing the abnormal information to determine the abnormal event corresponding to the abnormal information; determining the event identifier corresponding to the abnormal event based on a matching relationship between reference abnormal events and reference event identifiers in an abnormal event database; and sorting the event identifiers based on the abnormal occurrence time corresponding to the abnormal event to generate the abnormal event sequence.
  • the event identifier can be understood as an event identifier corresponding to the abnormal event determined based on a matching relationship between the reference abnormal event and the reference event identifier, and can be represented by a numerical value, a symbol, or other means, without limitation herein.
  • the abnormal event library contains references to multiple abnormal event types. Each reference abnormal event corresponds to a reference event identifier, thereby establishing a matching relationship between the reference abnormal event and the reference event identifier. Specifically, the matching relationship between the reference abnormal event and the reference event identifier can be obtained through historical abnormal log data. Based on abstract processing of the historical abnormal log data, the corresponding reference abnormal event is constructed.
  • the constructed reference abnormal event is subjected to corresponding identification encoding operations to obtain the reference event identifier corresponding to the reference abnormal event, thereby pre-establishing the matching relationship between each reference abnormal event and the reference event identifier.
  • the exception information can be abstracted to determine the exception event corresponding to the exception information.
  • the exception information "mce: [Hardware Error]: Machine check events logged” can be abstracted into the exception event "dmesg_unrecover_mce” using a regular expression.
  • the exception event identifier corresponding to the exception event is determined based on the matching relationship between the reference exception events and the reference event identifiers in the exception event library.
  • the event identifier corresponding to the exception event "dmesg_unrecover_mce” is 2. Based on the determined event identifier, the event identifiers need to be sorted according to the exception occurrence time corresponding to the exception event to generate an exception event sequence. In practical applications, reported exception information can be mapped to exception events using regular expressions. Specifically, for each piece of exception information, keywords shared by this exception information and other exception information can be identified, such as "Error" and "Hardware.” These keywords can then be classified into different exception names based on their type, yielding phrases used to name the exception events.
  • the exception information "mce: [Hardware Error]: Machine check events logged” can be abstracted into the exception event “dmesg_unrecover_mce.” Because exception information describes the computer status and contains a lot of redundant information, abstracting the exception information text can extract key information. Furthermore, reported exception information can be selectively filtered, such as by parsing exception information containing the "Error" field. It should be noted that the abstracted exception events often provide a unified description of a category of exception information.
  • the fault prediction method provided herein abstracts and simplifies abnormal information into a sequence of abnormal events.
  • event identifiers are sorted according to a preset sorting rule, thereby generating an abnormal event sequence based on the sorted event identifiers.
  • a specific implementation method is as follows: Sorting the event identifiers corresponding to the abnormal events according to the abnormal occurrence times corresponding to the abnormal events to generate the abnormal event sequence includes: sorting the event identifiers corresponding to the abnormal events according to the abnormal occurrence times corresponding to the abnormal events using a preset sorting rule, and generating the abnormal event sequence based on the sorted event identifiers.
  • the preset sorting rule can be understood as a rule for sorting event identifiers based on the time of anomaly occurrence.
  • the event identifiers can be sorted in reverse order based on the time of anomaly occurrence corresponding to the abnormal event.
  • the event identifiers corresponding to the abnormal events are sorted in reverse order based on the time of anomaly occurrence, thereby generating an abnormal event sequence based on the reverse order of the abnormality occurrence time.
  • abnormal information often has a correlation, meaning that 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.
  • the fault prediction method provided in this disclosure sorts the event identifiers corresponding to abnormal events according to the preset sorting rule, strengthening the correlation between abnormal events in the abnormal event sequence and enabling the fault prediction model to better utilize the contextual semantic information of the abnormal events.
  • the abnormal occurrence time is processed, and abnormal occurrence times in different representations are uniformly structured to facilitate the fault prediction model's processing of the abnormal occurrence time in the uniform representation.
  • Determining the abnormal timestamp sequence based on the abnormal occurrence time and the log acquisition time includes: calculating the time difference between the abnormal occurrence time and the log acquisition time; grouping the abnormal occurrence times based on the time difference and a preset time encoding rule, and determining group numbers for the groups, wherein the preset time encoding rule is used to determine the groups corresponding to the abnormal occurrence times based on the time difference; and encoding the abnormal occurrence times based on the group numbers to obtain the abnormal timestamp sequence.
  • the group numbers can be understood as sequence numbers assigned to the grouped abnormal occurrence times; and encoding can be understood as the process of converting the abnormal occurrence times into group numbers.
  • the acquired exception log data includes exception occurrence time 1, exception occurrence time 2, exception occurrence time 3, exception occurrence time 4, and exception occurrence time 5, and the log acquisition time of the exception log data is time A (in fact, time A is later than the exception occurrence time in the exception log data).
  • the time difference between each exception occurrence time and the log acquisition time is calculated.
  • the exception occurrence time with a time difference within 1000 seconds is divided into the first group, the exception occurrence time with a time difference between 1000-2000 seconds is divided into the second group; the exception occurrence time with a time difference between 2000-3000 seconds is divided into the third group, and so on.
  • exception time 1 and exception time 2 are encoded as 1
  • exception time 3 is encoded as 2
  • exception time 3 and exception time 4 are encoded as 3, thereby obtaining the exception timestamp sequence [1, 1, 2, 3, 3].
  • time can be represented in different forms, such as text or delimiters.
  • Each server may have different representations for exception time depending on its settings.
  • the exception timestamp sequence [1, 1, 2, 3, 3] is obtained.
  • the anomaly occurrence time can also be encoded based on the time difference to obtain an anomaly timestamp sequence.
  • this approach may not effectively utilize time information to analyze anomaly occurrence patterns.
  • the fault prediction method provided herein processes a unified anomaly timestamp sequence in the fault prediction model, and the anomaly timestamp sequence is a sequence of encoded anomaly occurrence times. This simplifies the processing flow of the fault prediction model and allows the fault prediction model to extract time information from the anomaly log data based on the anomaly timestamp sequence, thereby obtaining more accurate fault prediction results.
  • Step 206 Group the anomaly events in the anomaly event sequence based on the time interval threshold and the anomaly occurrence times corresponding to the anomaly events, obtaining an anomaly group sequence.
  • the time interval threshold can be understood as a threshold used to determine whether two adjacent anomaly events meet a threshold for close time, and can be set according to actual needs. Specifically, prior knowledge is incorporated into the data processing layer, namely that abnormal events occurring at close times are more highly correlated. Given the sequence characteristic that abnormal event sequences are sorted according to their corresponding abnormal occurrence times, abnormal events occurring at close times can be combined into abnormal event groups. Therefore, a time interval threshold can be set to determine whether adjacent abnormal events meet the criteria of close time.
  • abnormal events that are less than or equal to the time interval threshold are grouped together. For example, if the time interval threshold is 30 minutes, if the time difference between the abnormal occurrence times of adjacent abnormal events is less than or equal to 30 minutes, the two adjacent abnormal events can be combined into an abnormal event group. For example, in an abnormal event sequence, abnormal events A, B, C, and D are adjacent to each other. If the time difference between the abnormal occurrence times of abnormal events A, B, and C is less than 30 minutes, abnormal events A, B, and C can be grouped into abnormal event group 1.
  • abnormal event D can be grouped into abnormal event group 2, thereby obtaining an abnormal group sequence.
  • the abnormal events in the abnormal event groups are encoded to obtain an abnormal group sequence, and the abnormal events in the same abnormal event group are encoded with the same numerical identifier.
  • Grouping the abnormal events according to the time interval threshold and the abnormal occurrence times corresponding to the abnormal events in the abnormal event sequence to obtain an abnormal group sequence includes: grouping the abnormal events according to the time interval threshold and the abnormal occurrence times corresponding to the abnormal events in the abnormal event sequence to obtain multiple abnormal event groups; encoding the abnormal events according to the position of the target abnormal event in each abnormal event group in the abnormal event sequence to obtain an abnormal group sequence.
  • the target abnormal event can be understood as the first abnormal event in the abnormal event group.
  • the first abnormal event in the abnormal event group is encoded according to its position in the abnormal event sequence.
  • the abnormal group sequence may be [1, 1, 3, 3, 3].
  • abnormal events A, B, and C are grouped into abnormal event group 1
  • abnormal event D is grouped into abnormal event group 2
  • the first abnormal event in abnormal event group 1 is abnormal event A, which is located at position 1 in the abnormal event sequence. Therefore, abnormal events A, B, and C in abnormal event group 1 are encoded as 1.
  • the first abnormal event in abnormal event group 2 is abnormal event D, which is located at position 4 in the abnormal event sequence. Therefore, abnormal event D in abnormal event group 2 is encoded as 4, resulting in the abnormal group sequence [1, 1, 1, 4].
  • abnormal event sequences, abnormal timestamp sequences, and abnormal group sequences all use "[start]" as the starting symbol. This symbol has no specific meaning and is used to identify the starting position of the entire sequence.
  • the fault prediction method provided herein groups abnormal events that occur consecutively at similar times based on their abnormal occurrence times. This method uses a fault prediction model to extract higher-level sequence features from the abnormal grouping sequence, accurately predicting the probability of another abnormal event caused by the occurrence of a particular abnormal event.
  • Step 208 Using the fault prediction model, a fault prediction result for the service processing unit is obtained based on the abnormal event sequence, the abnormal timestamp sequence, and the abnormal grouping sequence.
  • the fault prediction model can be understood as a model for predicting whether a service processing unit will experience downtime, and it has a Transform structure.
  • Fault prediction results include downtime results and no downtime results.
  • the abnormal event sequence, abnormal timestamp sequence, and abnormal grouping sequence are input into the fault prediction model, which extracts semantic information, temporal information, and grouping information from the abnormal log data. This allows the fault prediction model to extract information from the abnormal log data from multiple dimensions, resulting in a more accurate prediction of whether the service processing unit will experience downtime.
  • a self-attention mechanism is used to process abnormal event sequences, abnormal timestamp sequences, and abnormal packet sequences to enable the fault prediction model to focus more on abnormal events that have a significant impact on the fault prediction results and to capture the temporal changes in the impact of abnormal events.
  • the specific implementation method is as follows: Obtaining the fault prediction results for the service processing unit using the fault prediction model based on the abnormal event sequences, abnormal timestamp sequences, and abnormal packet sequences includes: obtaining an event correlation matrix and a time correlation matrix based on the abnormal event sequences, abnormal timestamp sequences, and abnormal packet sequences using the self-attention layer of the fault prediction model; and obtaining the fault prediction results for the service processing unit based on the event correlation matrix and the time correlation matrix.
  • the event correlation matrix represents the intrinsic connections and impact levels between different abnormal events calculated based on semantic information; the time correlation matrix represents the associations between abnormal events calculated based on temporal information; and both the event correlation matrix and the time correlation matrix can be represented as square matrices with a sequence length dimension.
  • the abnormal event sequence, abnormal timestamp sequence, and abnormal group sequence are input into the self-attention layer of the fault prediction model.
  • an event correlation matrix and a time correlation matrix are calculated. Correlations between anomalies in the abnormal log data are obtained from different dimensions. Based on these correlations, a fault prediction result for the service processing unit is predicted.
  • the self-attention layer dynamically assigns weights based on the importance of different abnormal events and their impact on the fault prediction result. This allows the fault prediction model to focus more on abnormal log data that has a greater impact on the fault prediction result, thereby improving prediction accuracy.
  • an abnormal event sequence is input into a first self-attention layer, and an abnormal timestamp sequence and an abnormal packet sequence are input into a second self-attention layer.
  • An event correlation matrix and a temporal correlation matrix are obtained based on the different self-attention layers.
  • a specific implementation is as follows: Obtaining the event correlation matrix and the temporal correlation matrix using the self-attention layer of the fault prediction model based on the abnormal event sequence, the abnormal timestamp sequence, and the abnormal packet sequence includes: inputting the abnormal event sequence into the first self-attention layer of the fault prediction model to obtain the event correlation matrix; and inputting the abnormal timestamp sequence and the abnormal packet sequence into the second self-attention layer of the fault prediction model to obtain the temporal correlation matrix.
  • the first self-attention layer can be understood as a self-attention layer that processes the abnormal event sequence
  • the second self-attention layer can be understood as a self-attention layer that processes the abnormal timestamp sequence and the abnormal packet sequence
  • the first and second self-attention layers are two parallel self-attention layers in the fault prediction model
  • the first self-attention layer is used to process the abnormal event sequence
  • the second self-attention layer is used to process the abnormal timestamp sequence and the abnormal packet sequence.
  • the abnormal event sequence can be first input into the fault prediction model's abnormal event embedding layer (Exception Embedding).
  • the abnormal event embedding layer maps the abnormal event sequence into an event vector.
  • the output of the Except Embedding layer is used as the input to the first self-attention layer, and the event correlation matrix is calculated using the self-attention mechanism.
  • the abnormal timestamp sequence can first be input into the fault prediction model's timestamp kilosecond embedding layer (Temporal Embedding).
  • the timestamp kilosecond embedding layer maps the abnormal timestamp sequence into a timestamp vector.
  • the abnormal packet sequence can be input into the fault prediction model's group embedding layer, and the group embedding layer maps the abnormal packet sequence into a group vector.
  • Temporal Embedding and Group Embedding namely the timestamp vector and group vector
  • the self-attention mechanism is used to construct a temporal correlation matrix.
  • the abnormal event sequence can be obtained in the abnormal event embedding layer of the fault prediction model and mapped into an event vector
  • the abnormal timestamp sequence can be obtained in the timestamp embedding layer of the fault prediction model and mapped into a timestamp vector
  • the abnormal packet sequence can be obtained in the packet embedding layer and mapped into a packet vector.
  • the element in the i-th row and j-th column of the generated event correlation matrix can be determined based on the correlation between two abnormal events at positions i and j in the abnormal event sequence.
  • the fault prediction method provided in this disclosure processes the abnormal event sequence through a first self-attention layer to capture and quantify the dependencies and potential impacts between different abnormal events, forming an event correlation matrix.
  • the second self-attention layer processes the abnormal timestamp sequence and abnormal packet sequence to deeply analyze the temporal evolution patterns and periodic characteristics of the abnormal events.
  • the event correlation matrix and the time correlation matrix are fused to obtain an attention matrix, and subsequent calculations are used to obtain the fault prediction results for the service processing unit.
  • the specific implementation method is as follows: Obtaining the fault prediction result of the service processing unit based on the event correlation matrix and the time correlation matrix includes: using the attention fusion of the fault prediction model based on the event correlation matrix and the time correlation matrix.
  • the attention fusion layer obtains an attention matrix; based on the attention matrix, a target feature vector is determined; and the target feature vector is input into the classification layer of the fault prediction model to obtain a fault prediction result for the service processing unit.
  • the attention fusion layer is used to fuse the event correlation matrix and the time correlation matrix; the target feature vector can be understood as the feature vector corresponding to the start symbol in the output sequence composed of the attention matrix; and the classification layer can be understood as a classifier.
  • the time correlation matrix and the event correlation matrix can be combined through the attention fusion layer.
  • the fault prediction model has multiple attention fusion layers, which can be used to instruct the fault prediction model to perform fault prediction based on event, time, and grouping information.
  • the time correlation matrix and the event correlation matrix can be summed to fuse the extracted event, time, and grouping information. This enables the fault prediction model to simultaneously extract information from the abnormal event sequence, the abnormal timestamp sequence, and the abnormal grouping sequence.
  • the model can also consider the meaning of the abnormal event itself, the time of abnormal occurrence, and the correlation between abnormal events within the abnormal event grouping.
  • the sum of the temporal correlation matrix and the event correlation matrix can be used as the Attention Score in the fault prediction model.
  • the Attention Score refers to the correlation matrix calculated by the Attention process in the fault prediction model. Specifically, it can be viewed as a dynamic weight matrix calculated by the fault prediction model, so that in subsequent steps, the Attention Score is multiplied by the input to weight the input. It should be noted that the entire Attention process can be understood as multiplying the input by its own transpose to obtain a dynamic weight matrix (i.e., the Attention Score), which is then used to weight the input. After weighting, the dimensionality of the input remains unchanged, and it is subsequently sent to the fully connected layer and classifier module for classification. After the Attention Score is obtained by summing up, the output can be calculated using Transformer's calculation method.
  • the time correlation matrix and the event correlation matrix are used as the input items of the first layer of the attention fusion layer, that is, the attention fusion layer of the first layer uses the time correlation matrix and the event correlation matrix as input.
  • the time correlation matrix and the event correlation matrix can be summed, and then the matrix obtained by summing them can be used as the input item of the first layer and multiplied with the weight matrix to obtain the output item of the first layer.
  • the sum of the input item and the output item of the previous layer can be used as the input item of the next layer, and multiplied with the weight matrix to obtain the output item of the next layer, until the sum of the input item and the output item of the previous layer is multiplied with the weight matrix to obtain the output item of the top layer.
  • the output items of the top-level attention fusion layer in the fault prediction model are expressed in matrix form (attention matrix).
  • This matrix form is equivalent to a special vector, that is, it can be converted into a feature vector for representation.
  • the feature vectors of each row vector in the output items can be combined into an output sequence.
  • the target feature vector at the first position in the output sequence i.e., the feature vector corresponding to the start symbol
  • This target feature vector is input into a classifier for classification, and the output is the confidence level that the service processing unit will experience a downtime.
  • a preset threshold can be set. When the confidence level exceeds the preset threshold, it is predicted that the corresponding service processing unit will experience a downtime.
  • the feature vector corresponding to the start symbol of the output sequence of the top-level attention fusion layer (class token) is used as the representative of the output sequence and fed into the classifier for classification.
  • the start symbol does not correspond to any abnormal information.
  • the correlation between each abnormal event and the start symbol is calculated and the start symbol vector is weighted based on this correlation. Therefore, the start symbol can be considered as a symbol that is independent of each abnormal event, but can also represent the combination of all abnormal events. Therefore, the feature vector corresponding to this start symbol is used for classification.
  • the fault prediction method provided by the present disclosure can fully utilize the event, time and group information in the abnormal log data.
  • the fault prediction model is trained and obtained through the following steps: obtaining sample abnormality log data of the service processing unit and the sample log acquisition time of the sample abnormality log data; determining a sample abnormality event sequence and a sample abnormality timestamp sequence based on the sample abnormality log data and the sample log acquisition time of the sample abnormality log data; grouping the sample abnormality events in the sample abnormality event sequence based on the time interval threshold and the sample abnormality occurrence time corresponding to the sample abnormality events to obtain a sample abnormality group sequence; determining positive samples and negative samples based on the sample abnormality event sequence, the sample abnormality timestamp sequence, and the sample abnormality group sequence; and training and obtaining the fault prediction model based on the positive samples, the sample labels corresponding to the positive samples, the negative samples, and the sample labels corresponding to the negative samples.
  • Positive samples can be understood as downtime samples. That is, when a service processing unit experiences a downtime, the sample abnormality event sequence, the sample abnormality timestamp sequence, and the sample abnormality group sequence are determined based on the obtained sample abnormality log data of the service processing unit and the sample log acquisition time of the sample abnormality log data; and the sample labels corresponding to the positive samples are the downtime results of the service processing unit.
  • Negative samples can be understood as normal samples. Specifically, when the service processing unit does not experience downtime, the sample abnormality event sequence, sample abnormality timestamp sequence, and sample abnormality group sequence are determined based on the acquired sample abnormality log data of the service processing unit and the sample log acquisition time of the sample abnormality log data.
  • the sample labels corresponding to the negative samples are the server non-downtime results.
  • the specific implementation of obtaining the sample abnormality event sequence, sample abnormality timestamp sequence, and sample abnormality group sequence can be found in the above embodiments and will not be further described here.
  • the fault prediction model can predict a service processing unit downtime or no downtime based on the acquired abnormality log data and the log acquisition time.
  • the fault prediction method provided by the present disclosure by distinguishing between positive and negative samples, enables the fault prediction model to better learn the patterns of abnormal event downtime or no downtime, thereby enabling accurate prediction of the acquired abnormal log data using the fault prediction model.
  • determining a sample abnormal event sequence and a sample abnormal timestamp sequence based on the sample abnormal log data and the sample log acquisition time of the sample abnormal log data includes: determining a positive sample abnormal event sequence and a negative sample abnormal event sequence based on the sample abnormal log data; and determining a positive sample abnormal timestamp sequence and a negative sample abnormal timestamp sequence based on the positive sample abnormal event sequence, the negative sample abnormal event sequence, and the sample log acquisition time of the sample abnormal log data.
  • the positive sample abnormal event sequence can be understood as the sequence of positive sample abnormal events generated from the sample abnormal event sequence when a service processing unit crashes.
  • Abnormal event sequences determined from normal log data; negative sample abnormal event sequences can be understood as abnormal event sequences determined from sample abnormal log data when no service processing unit downtime occurs.
  • positive sample abnormal event sequences and negative sample abnormal event sequences are determined for the acquired sample abnormal log data.
  • a positive sample abnormal timestamp sequence is determined based on the positive sample abnormal event sequence and the sample log acquisition time of the sample abnormal log data
  • a negative sample abnormal timestamp sequence is determined based on the negative sample abnormal event sequence and the sample log acquisition time of the sample abnormal log data.
  • determining the positive sample abnormal event sequence and the negative sample abnormal event sequence based on the sample abnormal log data includes: determining the sample abnormal event sequence based on sample abnormality information in the sample abnormal log data, and determining the positive sample abnormal event sequence and the negative sample abnormal event sequence based on the sample abnormal event sequence.
  • determining a sample abnormal event sequence based on sample abnormality information in the sample abnormality log data includes: processing the sample abnormality information to determine the sample abnormal event corresponding to the sample abnormality information; determining the sample event identifier corresponding to the sample abnormal event based on a matching relationship between reference abnormal events and reference event identifiers in an abnormal event library; and sorting the sample event identifiers based on the occurrence time of the sample abnormalities corresponding to the sample abnormal events to generate the sample abnormal event sequence.
  • the specific implementation of generating the sample abnormal event sequence is similar to that of the above-mentioned embodiment and will not be further described here.
  • a positive sample abnormal event sequence is acquired using a preset sampling time and a preset sampling length, while a negative sample abnormal event sequence is determined using a preset negative sample sampling rule.
  • Determining the positive sample abnormal event sequence and the negative sample abnormal event sequence based on the sample abnormal event sequence includes: determining the positive sample abnormal event sequence from the sample abnormal event sequence based on a preset sampling time and a preset sampling length; and determining the negative sample abnormal event sequence from the sample abnormal event sequence based on a preset negative sample sampling rule, wherein the preset negative sample sampling rule is a rule for randomly sampling according to a preset proportion.
  • 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 events from the sample abnormal event sequence according to a preset proportion.
  • overlapping sampling can be performed within the sample abnormal event sequence at a 5-minute time interval and a 3-day sampling window length, thereby obtaining the positive sample abnormal event sequence.
  • negative samples abnormal events can be randomly acquired from the sample abnormal event sequence according to a preset proportion (e.g., 60%), thereby determining the negative sample abnormal event sequence.
  • a sliding window approach is used to calculate a subsequence of all abnormal events in the previous 72 hours (i.e., 3 days) starting at every 5-minute time point. For example, the first sampling window starts from time A and ends at time B (72 hours before time A); then the window moves forward 5 minutes, and the second sampling window starts from time C (time A 5 minutes before), and also covers the first 72 hours, and so on.
  • grouping the sample abnormal events based on the time interval threshold and the sample abnormality occurrence times corresponding to the sample abnormal events in the sample abnormality event sequence to obtain a sample abnormality grouping sequence includes: grouping the positive sample abnormal events based on the time interval threshold and the positive sample abnormality occurrence times corresponding to the positive sample abnormal events in the positive sample abnormality event sequence to obtain a positive sample abnormality grouping sequence; and grouping the negative sample abnormal events based on the time interval threshold and the negative sample abnormality occurrence times corresponding to the negative sample abnormal events in the negative sample abnormality event sequence to obtain a negative sample abnormality grouping sequence.
  • determining positive and negative samples based on the sample abnormal event sequence, the sample abnormal timestamp sequence, and the sample abnormal grouping sequence includes: using the positive sample abnormal event sequence, the positive sample abnormal timestamp sequence, and the positive sample abnormal grouping sequence as positive samples, and using the negative sample abnormal event sequence, the negative sample abnormal timestamp sequence, and the negative sample abnormal grouping sequence as negative samples.
  • the fault prediction method provided herein can help a fault prediction model fully learn and distinguish between service processing unit downtime and non-downtime states, thereby improving the prediction accuracy and generalization capability of the fault prediction model in practical applications.
  • the fault prediction method provided herein determines an abnormal event sequence and an abnormal timestamp sequence by acquiring abnormal log data from a service processing unit and the time at which the abnormal log data was acquired. The abnormal events are then grouped by their time intervals to obtain an abnormal grouping sequence. When abnormal events occurring at similar times are more correlated, the abnormal log data is analyzed from multiple dimensions.
  • FIG3 illustrates a flowchart of a fault prediction model training method provided by one embodiment of this specification, specifically comprising the following steps: Step 302: Acquire sample abnormal log data from the service processing unit and the time at which the sample abnormal log data was acquired.
  • Determining a positive sample abnormal event sequence and a negative sample abnormal event sequence based on the sample abnormal log data includes: determining a sample abnormal event sequence based on sample abnormality information in the sample abnormal log data, and determining the positive sample abnormal event sequence and the negative sample abnormal event sequence based on the sample abnormal event sequence.
  • Determining a sample abnormal event sequence based on sample abnormality information in the sample abnormality log data includes: processing the sample abnormality information to determine a sample abnormal event corresponding to the sample abnormality 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; and sorting the sample event identifiers based on the sample abnormality occurrence time corresponding to the sample abnormal event to generate the sample abnormal event sequence.
  • Determining the positive sample abnormal event sequence and the negative sample abnormal event sequence based on the sample abnormal event sequence includes: determining the positive sample abnormal event sequence from the sample abnormal event sequence based on a preset sampling time and a preset sampling length; and determining the negative sample abnormal event sequence from the sample abnormal event sequence based on a preset negative sample sampling rule, wherein the preset negative sample sampling rule is a rule for random sampling according to a preset ratio.
  • Step 304 Determining a sample abnormal event sequence and a sample abnormal timestamp sequence based on the sample abnormal log data and the sample log acquisition time of the sample abnormal log data.
  • Determining the sample abnormal event sequence and the sample abnormal timestamp sequence based on the sample abnormal log data and the sample log acquisition time of the sample abnormal log data includes: determining the positive sample abnormal event sequence and the negative sample abnormal event sequence based on the sample abnormal log data; and determining the positive sample abnormal timestamp sequence and the negative sample abnormal timestamp sequence based on the positive sample abnormal event sequence, the negative sample abnormal event sequence, and the sample log acquisition time of the sample abnormal log data.
  • Step 306 Group the sample abnormal events according to the time interval threshold and the sample abnormality occurrence times corresponding to the sample abnormal events in the sample abnormality event sequence to obtain a sample abnormality grouping sequence; Grouping the sample abnormal events according to the time interval threshold and the sample abnormality occurrence times corresponding to the sample abnormal events in the sample abnormality event sequence to obtain a sample abnormality grouping sequence includes: Grouping the positive sample abnormal events according to the time interval threshold and the positive sample abnormality occurrence times corresponding to the positive sample abnormal events in the positive sample abnormality event sequence to obtain a positive sample abnormality grouping sequence; Grouping the negative sample abnormal events according to the time interval threshold and the negative sample abnormality occurrence times corresponding to the negative sample abnormal events in the negative sample abnormality event sequence to obtain a negative sample abnormality grouping sequence.
  • Step 308 Determine positive and negative samples based on the sample abnormal event sequence, the sample abnormal timestamp sequence, and the sample abnormal grouping sequence. Determining positive and negative samples based on the sample abnormal event sequence, the sample abnormal timestamp sequence, and the sample abnormal grouping sequence includes: using the positive sample abnormal event sequence, the positive sample abnormal timestamp sequence, and the positive sample abnormal grouping sequence as positive samples, and using the negative sample abnormal event sequence, the negative sample abnormal timestamp sequence, and the negative sample abnormal grouping sequence as negative samples.
  • Step 310 Train a fault prediction model based on the positive samples, the sample labels corresponding to the positive samples, the negative samples, and the sample labels corresponding to the negative samples. The specific implementation is described in the above embodiments and will not be further described here.
  • the fault prediction model training method determines an abnormal event sequence and an abnormal timestamp sequence; and groups abnormal events by their time intervals to obtain an abnormal grouping sequence. When abnormal events occurring at similar times are more highly correlated, the abnormal log data is analyzed from multiple dimensions, enabling the trained fault prediction model to achieve more accurate predictions.
  • the above is a schematic scheme of a fault prediction model training method of this embodiment. It should be noted that the technical solution of the fault prediction model training method and the technical solution of the above fault prediction method belong to the same concept. For details not described in detail in the technical solution of the training method, please refer to the description of the technical solution of the fault prediction method described above.
  • FIG 4 shows a flowchart of the processing process of a fault prediction model training method provided in one embodiment of this specification, which specifically includes the following steps.
  • Step 402 Preprocess the training sample data.
  • the detector obtains abnormality log data corresponding to the NC (i.e., the service processing unit in the above embodiment).
  • the abnormal information in the abnormality log data is abstracted into an abnormal event.
  • the same abnormal event is abstracted.
  • the abnormal event is converted into a corresponding event identifier using the abnormal event library.
  • Figure 5 shows a schematic diagram of the data preprocessing process provided in one embodiment of this specification. As shown in Figure 5, the data preprocessing process organizes exception log data into structured data.
  • the exception log data includes the log time (i.e., the exception occurrence time in the above embodiment) and the original record information (i.e., the exception information in the above embodiment).
  • the exception information is abstracted, that is, the color-coded portion of the original record information is abstracted into an exception event.
  • the exception event library contains all types of exception events, and each exception event corresponds to an integer (i.e., the event identifier in the above embodiment). Each exception is converted into an integer number according to the exception event library. For example, the exception event "dmesg_unrecover_mce" is converted to 2.
  • Step 404 Sampling.
  • the exception log data When the exception log data is obtained by the detector, the exception log data includes the exception occurrence time corresponding to the exception information. The exception log data is sorted in reverse order of the exception occurrence time. The acquired exception log data is then sampled according to a preset sampling time interval and sampling window length to obtain sample exception log data.
  • the abnormality log data reported by each NC is arranged in reverse order of the time of occurrence to form a sequence. Sampling is performed with overlapping intervals of 5 minutes and a sampling window of 3 days across the entire sequence.
  • the resulting sample format is "[start], 1, 2, >, 3," where [start] is a starting symbol and has no specific meaning.
  • Step 406 Code mapping. Specifically, the sequence "[start], 1, 2, ..., 3" obtained above is coded and mapped into a vector that can be trained by the fault prediction model. For example, the abnormal event sequence obtained above is coded and mapped. For the abnormal timestamp sequence, the time difference between the occurrence time of each abnormality and the sampling time is calculated.
  • Step 408 Obtain an event correlation matrix and a time correlation matrix.
  • the output of the fault prediction model embedding layer is used as input and input into the self-attention layer of the fault prediction model; first, the output of Except i on Embedding, that is, the abnormal event sequence after encoding and mapping, is input into the first self-attention layer, and the event correlation matrix is obtained using the self-attention mechanism; the output of Tempora I Embedding and Group Embedding, that is, the abnormal timestamp sequence and abnormal grouping sequence after encoding and mapping, are superimposed and input into the second self-attention layer, and the correlation between each event in the sequence is calculated based on the time information to obtain the time correlation matrix.
  • Step 410 Matrix fusion.
  • Step 412 Model training.
  • the feature vector corresponding to the start symbol (c I ass token) in the output sequence of the top attention fusion layer is used as the representative of this output sequence and fed into the classifier for classification.
  • Fault prediction is a binary classification task, resulting in a fault prediction result (downtime, normal).
  • the fault prediction result and sample labels are used to calculate a loss function to update the model parameters of the fault prediction model.
  • the loss function used during model training is the cross-bing loss
  • the gradient descent algorithm is used to backpropagate the gradient of the loss to update the model parameters.
  • the fault prediction model training method provided in this disclosure fully considers temporal information, specifically time and grouping information. It eliminates the need for direct learning from raw recorded data, instead using preprocessed results for learning, improving model training efficiency. By effectively integrating event, temporal, and grouping information, it can more effectively extract information from sequences, enhancing data representation. This allows subsequent application of the fault prediction model to improve the accuracy and recall of fault predictions, enabling cloud computing systems to predict downtime in advance and implement timely maintenance, reducing downtime and improving cloud computing system stability.
  • Figure 7 shows a schematic structural diagram of a fault prediction device provided in one embodiment of this specification.
  • the apparatus includes: a data acquisition module 702 configured to acquire the abnormal log data of the service processing unit and the log acquisition time of the abnormal log data; a sequence determination module 704 configured to determine an abnormal event sequence and an abnormal timestamp sequence based on the abnormal log data and the log acquisition time; a sequence acquisition module 706 configured to group the abnormal events in the abnormal event sequence according to a time interval threshold and the abnormal occurrence time corresponding to the abnormal events, thereby obtaining an abnormal grouping sequence; and a result acquisition module 708 configured to obtain a fault prediction result for the service processing unit using a fault prediction model based on the abnormal event sequence, the abnormal timestamp sequence, and the abnormal grouping sequence.
  • the apparatus further includes: a model training module configured to acquire sample abnormal log data of the service processing unit and the sample log acquisition time of the sample abnormal log data; Determine a sample abnormal event sequence and a sample abnormal timestamp sequence based on the sample abnormal log data and the sample log acquisition time of the sample abnormal log data; group the sample abnormal events based on the time interval threshold and the sample abnormality occurrence time corresponding to the sample abnormal events in the sample abnormal event sequence to obtain a sample abnormality group sequence; determine positive samples and negative samples based on the sample abnormal event sequence, the sample abnormality timestamp sequence, and the sample abnormality group sequence; and train a fault prediction model based on the positive samples, the sample labels corresponding to the positive samples, the negative samples, and the sample labels corresponding to the negative samples.
  • a model training module configured to acquire sample abnormal log data of the service processing unit and the sample log acquisition time of the sample abnormal log data; Determine a sample abnormal event sequence and a sample abnormal timestamp sequence based on the sample abnormal log data and the sample log acquisition time of the sample abnormal log data
  • the model training module is further configured to: determine a positive sample abnormal event sequence and a negative sample abnormal event sequence based on the sample abnormal log data; and determine a positive sample abnormal timestamp sequence and a negative sample abnormal timestamp sequence based on the positive sample abnormal event sequence, the negative sample abnormal event sequence, and the sample log acquisition time of the sample abnormal log data.
  • the model training module is further configured to: group the positive abnormal events based on the time interval threshold and the positive abnormal occurrence times corresponding to the positive abnormal events in the positive abnormal event sequence to obtain a positive abnormal group sequence; and group the negative abnormal events based on the time interval threshold and the negative abnormal occurrence times corresponding to the negative abnormal events in the negative abnormal event sequence to obtain a negative abnormal group sequence.
  • the model training module is further configured to: use the positive abnormal event sequence, the positive abnormal timestamp sequence, and the positive abnormal group sequence as positive samples, and use the negative abnormal event sequence, the negative abnormal timestamp sequence, and the negative abnormal group sequence as negative samples.
  • the model training module is further configured to: determine a sample abnormal event sequence based on sample abnormality information in the sample abnormality log data, and determine the positive abnormal event sequence and the negative abnormal event sequence based on the sample abnormal event sequence.
  • the model training module is further configured to: process the sample anomaly information to determine the sample anomaly events corresponding to the sample anomaly information; determine the sample event identifiers corresponding to the sample anomaly events based on the matching relationship between reference anomaly events and reference event identifiers in the anomaly event library; sort the sample event identifiers based on the sample anomaly occurrence times corresponding to the sample anomaly events to generate the sample anomaly event sequence.
  • the model training module is further configured to: determine the positive sample anomaly event sequence from the sample anomaly event sequence based on a preset sampling time and a preset sampling length; and determine the negative sample anomaly event sequence from the sample anomaly event sequence based on a preset negative sample sampling rule, wherein the preset negative sample sampling rule is a rule for random sampling according to a preset ratio.
  • the sequence determination module 704 is further configured to: Determine the abnormal event sequence based on the abnormal information in the abnormal log data; determine the abnormal occurrence time corresponding to the abnormal event in the abnormal event sequence based on the abnormal occurrence time of the abnormal information; and determine the abnormal timestamp sequence based on the abnormal occurrence time and the log acquisition time.
  • the sequence determination module 704 is further configured to: process the abnormal information to determine the abnormal event corresponding to the abnormal information; determine the event identifier corresponding to the abnormal event based on a matching relationship between a reference abnormal event and a reference event identifier in an abnormal event library; sort the event identifiers based on the abnormal occurrence time corresponding to the abnormal event to generate the abnormal event sequence.
  • the sequence determination module 704 is further configured to: calculate the time difference between the abnormal occurrence time and the log acquisition time; group the abnormal occurrence times based on the time difference and a preset time encoding rule, and determine group numbers for the groups, wherein the preset time encoding rule is used to determine the group corresponding to the abnormal occurrence time based on the time difference; and encode the abnormal occurrence time based on the group number to obtain the abnormal timestamp sequence.
  • the sequence determination module 704 is further configured to: sort the event identifiers corresponding to the abnormal events using a preset sorting rule based on the abnormal occurrence times corresponding to the abnormal events, and generate an abnormal event sequence based on the sorted event identifiers.
  • the sequence acquisition module 706 is further configured to: group the abnormal events based on the time interval threshold and the abnormal occurrence times corresponding to the abnormal events in the abnormal event sequence to obtain multiple abnormal event groups; encode the abnormal events based on the position of the target abnormal event in each abnormal event group in the abnormal event sequence to obtain an abnormal group sequence.
  • the result acquisition module 708 is further configured to: obtain an event correlation matrix and a time correlation matrix based on the abnormal event sequence, the abnormal timestamp sequence, and the abnormal group sequence using the self-attention layer of the fault prediction model; and obtain a fault prediction result for the service processing unit based on the event correlation matrix and the time correlation matrix.
  • the result acquisition module 708 is further configured to: input the abnormal event sequence into the first self-attention layer of the fault prediction model to obtain the event correlation matrix; input the abnormal timestamp sequence and the abnormal group sequence into the second self-attention layer of the fault prediction model to obtain the time correlation matrix.
  • the result acquisition module 708 is further configured to: utilize the attention fusion of the fault prediction model based on the event correlation matrix and the time correlation matrix.
  • the sequence determination module 804 is further configured to: determine a positive sample abnormal event sequence and a negative sample abnormal event sequence based on the sample abnormality log data; and determine a positive sample abnormality timestamp sequence and a negative sample abnormality timestamp sequence based on the positive sample abnormal event sequence, the negative sample abnormal event sequence, and the sample log acquisition time of the sample abnormality log data.
  • the sequence acquisition module 806 is further configured to: group the positive sample abnormal events based on the time interval threshold and the positive sample abnormality occurrence times corresponding to the positive sample abnormal events in the positive sample abnormal event sequence to obtain a positive sample abnormality grouping sequence; and group the negative sample abnormal events based on the time interval threshold and the negative sample abnormality occurrence times corresponding to the negative sample abnormal events in the negative sample abnormal event sequence to obtain a negative sample abnormality grouping sequence.
  • the sample determination module 808 is further configured to: use the positive sample abnormal event sequence, the positive sample abnormal timestamp sequence, and the positive sample abnormal grouping sequence as positive samples, and use the negative sample abnormal event sequence, the negative sample abnormal timestamp sequence, and the negative sample abnormal grouping sequence as negative samples.
  • the sequence determination module 804 is further configured to: determine the sample abnormal event sequence based on the sample abnormality information in the sample abnormality log data, and This abnormal event sequence determines the positive sample abnormal event sequence and the negative sample abnormal event sequence.
  • the sequence determination module 804 is further configured to: process the sample abnormality information to determine the sample abnormal event corresponding to the sample abnormality information; determine the sample event identifier corresponding to the sample abnormal event based on the matching relationship between the reference abnormal event and the reference event identifier in the abnormal event library; sort the sample event identifiers based on the sample abnormality occurrence time corresponding to the sample abnormality event to generate the sample abnormal event sequence.
  • the sequence determination module 804 is further configured to: determine the positive sample abnormal event sequence from the sample abnormal event sequence based on a preset sampling time and a preset sampling length; and determine the negative sample abnormal event sequence from the sample abnormal event sequence based on a preset negative sample sampling rule, wherein the preset negative sample sampling rule is a rule for random sampling according to a preset ratio.
  • FIG9 shows a block diagram of a computing device 900 according to one embodiment of this specification.
  • the components of computing device 900 include, but are not limited to, a memory 910 and a processor 920.
  • the processor 920 is connected to the memory 910 via a bus 930, and a database 950 is used to store data.
  • Computing device 900 also includes an access device 940, which enables computing device 900 to communicate via one or more networks 960. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet.
  • PSTN public switched telephone network
  • LAN local area network
  • WAN wide area network
  • PAN personal area network
  • FIG9 shows a block diagram of a computing device 900 according to one embodiment of this specification.
  • the components of computing device 900 include, but are not limited to, a memory 910 and a processor 920.
  • the processor 920
  • the access device 940 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, or a near field communication (NFC) interface.
  • NIC network interface card
  • Wi-MAX Worldwide Interoperability for Microwave Access
  • Ethernet e.g., a USB interface, a cellular network interface, a Bluetooth interface, or a near field communication (NFC) interface.
  • the aforementioned components of the computing device 900 and other components not shown in FIG. 9 may also be connected to each other, for example, via a bus.
  • the computing device structure block diagram shown in FIG. 9 is for illustrative purposes only and does not limit the scope of this specification.
  • Computing device 900 may 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 computer, 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 900 may also be a mobile or stationary server.
  • the processor 920 is configured to execute the following computer program/instructions, which, when executed by the processor, implement the steps of the aforementioned fault prediction method.
  • the various embodiments in this specification are described in a progressive manner. Similar or identical portions between the various embodiments may be referenced to each other. Each embodiment focuses on the differences from other embodiments.
  • the computing device embodiment since it is substantially similar to the fault prediction method embodiment, is described relatively simply. For relevant portions, refer to the description of the fault prediction method embodiment.
  • An embodiment of this specification also provides a computer-readable storage medium storing a computer program/instructions. When executed by the processor, the computer program/instructions 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. Similar or identical portions between the various embodiments may be referenced to each other. Each embodiment focuses on the differences from other embodiments.
  • the computer-readable storage medium embodiment since it is substantially similar to the fault prediction method embodiment, is described relatively simply. For relevant portions, refer to the description of the fault prediction method embodiment.
  • One embodiment of this specification also provides a computer program product, including a 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.
  • the above is an illustrative embodiment of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product 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 computer program product, please refer to the description of the technical solution of the above-described fault prediction method.
  • 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, a recording medium, a USB flash drive, a mobile hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunications signal, and a software distribution medium.
  • ROM read-only memory
  • RAM random access memory
  • the content of the computer-readable medium may be appropriately increased or decreased based on the requirements of patent practice.
  • computer-readable media do not include electric carrier signals and telecommunications signals. It should be noted that for ease of description, the aforementioned method embodiments are described as a series of actions.

Landscapes

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

Abstract

本公开提供故障预测方法及装置、故障预测模型训练方法及装置、计算设备、计算机存储介质、计算机程序产品,故障预测方法应用于云计算系统,云计算系统包括服务处理单元,故障预测方法包括:获取服务处理单元的异常日志数据以及异常日志数据的日志获取时间;根据异常日志数据以及日志获取时间,确定异常事件序列以及异常时间戳序列;根据时间间隔阈值以及异常事件序列中的异常事件对应的异常发生时间,对异常事件进行分组,获得异常分组序列;根据异常事件序列、异常时间戳序列以及异常分组序列,利用故障预测模型,获得服务处理单元的故障预测结果;从多维度分析异常日志数据,提高故障预测模型预测的精准率,提高云计算系统的稳定性。

Description

故 障预测方法及装置、 故障预测模型训练方法及装置、 计算设备、 计算机存储介质、 计 算机程序产品 技术领域 本公开 涉及计算机技术领域, 特别涉及故障预测方法及装置、 故障预测模型训练方法及 装置、 计算设备、 计算机存储介质、 计算机程序产品。 背景技术 云计算 系统能够集中管理和使用服务器, 从而提高计算资源的利用效率, 但服务器宕机 故障会使云计算系统的稳定性降低,并且严重情况会导致用户信息损失,影响用户使用体验; 因此, 如何根据服务器的异常日志数据来提前预测宕机并进行维护是解决问题的关键。 由于现有的自然语言处理方法的语料库并不包含现实的时间信息, 而且异常日志数据中 会存在多种类型的异常, 而且各异常之间的时间间隔非固定值, 利用自然语言处理方法对异 常日志数据进行分析, 容易导致对异常日志数据中时间相关性信息的忽略或误判, 因此利用 自然语言处理方法很难准确的预测出服务器的宕机情况, 不利于维护云计算系统的稳定性。 发明内容 有 鉴于此, 本公开提供了一种故障预测方法。 本说明书一个或者多个实施例同时涉及一 种故障预测装置,一种故障预测模型训练方法,一种故障预测模型训练装置,一种计算设备, 一种计算机可读存储介质以及一种计算机程序产品, 以解决现有技术中存在的技术缺陷。 根据 本公开的第一方面, 提供了一种故障预测方法, 应用于云计算系统, 所述云计算系 统包括服务处理单元, 所述方法包括: 获取所述服 务处理单元的异常日志数据以及所述异常日志数据的日志获取时间; 根据所述 异常日志数据以及所述日志获取时间,确定异常事件序列以及异常时间戳序列; 根据 时间间隔阈值以及所述异常事件序列中的异常事件对应的异常发生时间, 对所述异 常事件进行分组, 获得异常分组序列; 根据所述 异常事件序列、 所述异常时间戳序列以及所述异常分组序列, 利用故障预测模 型, 获得所述服务处理单元的故障预测结果。 根据 本公开的第二方面, 提供了一种故障预测装置, 应用于云计算系统, 所述云计算系 统包括服务处理单元, 所述装置包括: 数据获取模块 , 被配置为获取所述服务处理单元的异常日志数据以及所述异常日志数据 的日志获取时间; 序列确定模块 , 被配置为根据所述异常日志数据以及所述日志获取时间, 确定异常事件 序列以及异常时间戳序列; 序列获得模块 , 被配置为根据时间间隔阈值以及所述异常事件序列中的异常事件对应的 异常发生时间, 对所述异常事件进行分组, 获得异常分组序列; 结 果获得模块, 被配置为根据所述异常事件序列、 所述异常时间戳序列以及所述异常分 组序列, 利用故障预测模型, 获得所述服务处理单元的故障预测结果。 根据 本公开的第三方面, 提供了一种故障预测模型训练方法, 应用于云计算系统, 所述 云计算系统包括服务处理单元, 所述方法包括: 获取所述服 务处理单元的样本异常日志数据、 所述样本异常日志数据的样本日志获取时 间; 根据所述样 本异常日志数据、 以及所述样本异常日志数据的样本日志获取时间, 确定样 本异常事件序列以及样本异常时间戳序列; 根据所述 时间间隔阈值以及所述样本异常事件序列中的样本异常事件对应的样本异常发 生时间, 对所述样本异常事件进行分组, 获得样本异常分组序列; 根据所述样 本异常事件序列、 所述样本异常时间戳序列以及所述样本异常分组序列, 确 定正样本以及负样本; 根据所述正样 本、 所述正样本对应的样本标签、 所述负样本、 所述负样本对应的样本标 签, 训练获得故障预测模型。 根据 本公开的第四方面, 提供了一种故障预测模型训练装置, 应用于云计算系统, 所述 云计算系统包括服务处理单元, 所述装置包括: 数据获取模块 , 被配置为获取所述服务处理单元的样本异常日志数据、 所述样本异常日 志数据的样本日志获取时间; 序列确定模块 , 被配置为根据所述样本异常日志数据、 以及所述样本异常日志数据的样 本日志获取时间, 确定样本异常事件序列以及样本异常时间戳序列; 序列获得模块 , 被配置为根据所述时间间隔阈值以及所述样本异常事件序列中的样本异 常事件对应的样本异常发生时间, 对所述样本异常事件进行分组, 获得样本异常分组序列; 样 本确定模块, 被配置为根据所述样本异常事件序列、 所述样本异常时间戳序列以及所 述样本异常分组序列, 确定正样本以及负样本; 训练模块 , 被配置为根据所述正样本、 所述正样本对应的样本标签、 所述负样本、 所述 负样本对应的样本标签, 训练获得故障预测模型。 根据本公开 的第五方面, 提供了一种计算设备, 包括: 存储器和处理器 ; 所述存储 器用于存储计算机程序 /指令, 所述处理器用于执行所述计算机程序 /指令, 该 计算机程序 /指令被处理器执行时实现上述故障预测方法、 或故障预测模型训练方法的步骤。 根据 本公开的第六方面, 提供了一种计算机可读存储介质, 其存储有计算机程序 /指令, 该计算机程序 /指令被处理器执行时实现上述故障预测方法、或故障预测模型训练方法的步骤。 根据本公开 的第七方面, 提供了一种计算机程序产品, 包括计算机程序 /指令, 该计算机 程序 /指令被处理器执行时实现上述故障预测方法、 或故障预测模型训练方法的步骤。 本说 明书一个实施例提供的故障预测方法, 应用于云计算系统, 所述云计算系统包括服 务处理单元, 所述方法包括: 获取所述服务处理单元的异常日志数据以及所述异常日志数据 的日志获取时间; 根据所述异常日志数据以及所述日志获取时间, 确定异常事件序列以及异 常时间戳序列;根据时间间隔阈值以及所述异常事件序列中的异常事件对应的异常发生时间, 对所述异常事件进行分组, 获得异常分组序列; 根据所述异常事件序列、 所述异常时间戳序 列以及所述异常分组序列, 利用故障预测模型, 获得所述服务处理单元的故障预测结果。 基 于此, 该故障预测方法, 通过获取服务处理单元的异常日志数据以及异常日志数据的 日志获取时间, 确定异常事件序列以及异常时间戳序列; 并通过异常事件的时间间隔来对异 常事件分组, 获得异常分组序列, 在相近时刻发生的异常事件相关性更强的情况下, 通过将 异常事件序列、 异常时间戳序列以及异常分组序列输入故障预测模型, 能够使故障预测模型 从多维度对异常日志数据进行分析, 获得异常日志数据中各异常之间的事件相关性以及时间 相关性, 从而提高故障预测模型故障预测的精准率和召回率, 使云计算系统可以提前预测宕 机并进行及时运维, 减少宕机率, 提高云计算系统的稳定性。 附图说明 图 1是本说明书一个实施例提供的一种故障预测方法的场景示意图; 图 2是本说明书一个实施例提供的一种故障预测方法的流程图; 图 3是本说明书一个实施例提供的一种故障预测模型训练方法的流程图; 图 4是本说明书一个实施例提供的一种故障预测模型训练方法的处理过程流程图; 图 5是本说明书一个实施例提供的一种数据预处理过程示意图; 图 6是本说明书一个实施例提供的一种编码映射过程示意图; 图 7是本说明书一个实施例提供的一种故障预测装置的结构示意图; 图 8是本说明书一个实施例提供的一种故障预测模型训练装置的结构示意图; 图 9是本说明书一个实施例提供的一种计算设备的结构框图。 具体 实施方式 在 下面的描述中阐述了很多具体细节以便于充分理解本说明书。 但是本说明书能够以很 多不同于在此描述的其它方式来实施, 本领域技术人员可以在不违背本说明书内涵的情况下 做类似推广, 因此本说明书不受下面公开的具体实施的限制。 在 本说明书一个或多个实施例中使用的术语是仅仅出于描述特定实施例的目的, 而非旨 在限制本说明书一个或多个实施例。 在本说明书一个或多个实施例和所附权利要求书中所使 用的单数形式的 “一种”、 “所述 ”和 “该”也旨在包括多数形式, 除非上下文清楚地表示其 他含义。 还应当理解, 本说明书一个或多个实施例中使用的术语 “和 /或 ”是指并包含一个或 多个相关联的列出项目的任何或所有可能组合。 应 当理解, 尽管在本说明书一个或多个实施例中可能采用术语第一、 第二等来描述各种 信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如, 在不脱离本说明书一个或多个实施例范围的情况下, 第一也可以被称为第二, 类似地, 第二 也可以被称为第一。取决于语境, 如在此所使用的词语 “如果 ”可以被解释成为 “在 ……时” 或 “当 ……时"或 “响应于确定 "。 此外 , 需要说明的是, 本说明书一个或多个实施例所涉及的用户信息 (包括但不限于用 户设备信息、 用户个人信息等) 和数据 (包括但不限于用于分析的数据、 存储的数据、 展示 的数据等), 均为经用户授权或者经过各方充分授权的信息和数据, 并且相关数据的收集、 使 用和处理需要遵守相关国家和地区的相关法律法规和标准, 并提供有相应的操作入口, 供用 户选择授权或者拒绝。 本说 明书一个或多个实施例中, 大模型是指具有大规模模型参数的深度学习模型, 通常 包含上亿、 上百亿、 上千亿、 上万亿甚至十万亿以上的模型参数。 大模型又可以称为基石模 型 /基础模型 (Foundat i on Mode l ) , 通过大规模无标注的语料进行大模型的预训练, 产出亿 级以上参数的预训练模型, 这种模型能适应广泛的下游任务, 模型具有较好的泛化能力, 例 如大规 模语言模型 ( Large Language Mode I , LLM )、 多模态预训练模型 ( mu l t i -moda l pre-tra i n i ng mode I ) 等。 大模型在实际应用时, 仅需少量样本对预训练模型进行微调即可应用于不同的任务中, 大模型可以广泛应用于 自然语言处理 (Natura I Language Process i ng, 简称 NLP)、 计算机 视觉等领域, 具体可以应用于如视觉问答 (Vi sua l Quest i on Answer i ng, 简称 VQA)、 图像 描述 ( I mage Capt i on, 简称 I C)、 图像生成等计算机视觉领域任务, 以及基于文本的情感分 类、 文本摘要生成、 机器翻译等自然语言处理领域任务, 大模型主要的应用场景包括数字助 理、 智能机器人、 搜索、 在线教育、 办公软件、 电子商务、 智能设计等。 首先 , 对本说明书一个或多个实施例涉及的名词术语进行解释。
Attent i on : 注意力机制, 其可用于对重点关注的目标区域投入更多的注意力资源, 以获 得更多所需关注的 目标的细节信息, 并抑制其它无用信息, 在本公开中用于挖掘序列中元素 间相关性信息。
Transformer : 基于 Attent i on的机器学习模型, 常用于自然语言处理和图像处理任务。
NC : Node Contro l l er , 指的是云计算系统中用于统计故障宕机的单个单元, 本公开中可 以理解为服务处理单元。 在 本说明书中, 提供了一种故障预测方法, 本说明书同时涉及一种故障预测方法装置, 一种故障预测模型训练方法, 一种故障预测模型训练装置, 一种计算设备, 一种计算机可读 存储介质以及一种计算机程序产品, 在下面的实施例中逐一进行详细说明。 参 见图 1 , 图 1 示出了根据本说明书一个实施例提供的一种故障预测方法的应用场景示 意图。 故 障预测方法可以应用在云计算系统, 涉及云计算平台 102和云计算服务器集群 104。 具体 的, 云计算平台 102可以从云计算服务器集群 104获取各服务器的异常日志数据, 并确定获取异常日志数据的日志获取时间; 示例性地, 针对某一服务器来说, 根据该服务器 的异常日志数据以及 日志获取时间, 对异常日志数据进行处理, 获得与异常日志数据中异常 信息对应的异常事件序列、 以及与异常信息的异常发生时间相关的异常时间戳序列; 并利用 时间间隔阈值以及异常事件序列中的异常事件、对应的异常发生时间,对异常事件进行分组, 获得异常分组序列; 根据异常事件序列、 异常时间戳序列以及异常分组序列, 利用故障预测 模型, 获得该服务器的故障预测结果。 实际应用中, 在进行故障预测时, 可以表现为云计算平台 102获取实时采集的异常日志 数据, 其所采集的异常日志数据可以通过在实时链路上对每台服务器按照预设时间间隔, 例 如 5分钟进行采样得到, 然后基于故障预测模型, 预测各服务器是否会发生宕机故障, 并基 于故障预测结果决定是否提前对服务器的宕机故障进行运维以实现用户对宕机的无感化, 从 而优化用户的体验。 其 中, 故障预测结果包括宕机结果和不宕机结果, 宕机结果指的是判定服务器未来一段 时间内有宕机风险, 此时可以提前对宕机故障进行运维以实现用户对宕机的无感化, 不宕机 结果指的是服务器未来一段时间内不存在宕机风险, 此时可暂时不进行任何操作。 云计算平 台 102可以理解为基于硬件资源和软件资源的服务, 提供计算、 网络和存储能 力, 在本公开中用于提供故障预测服务, 通过获取服务器的异常日志数据, 预测服务器是否 会发生宕机。 云计算服 务器集群 104中的服务器可以理解为, 提供各种服务的服务器, 包括物理服务 器、 云服务器, 例如为多个客户端提供通信服务的服务器, 又如为客户端上使用的模型提供 支持的用于后台训练的服务器, 又如对客户端发送的数据进行处理的服务器等。 本公开提供 的故障预测方法, 能够充分利用异常日志数据中的事件、 时间和分组信息, 通过将相近时间连续发生的异常事件分为一组, 利用时间信息更好地融合事件信息, 提取更 高层次的序列特征, 从而提高故障预测的精准率和召回率, 使云计算系统能更快速、 准确地 对即将宕机的服务器进行运维, 从而减少宕机率或者降低宕机对用户带来的损失, 大大增加 云计算系统的稳定性和可靠性。 参 见图 2, 图 2示出了本说明书一个实施例提供的一种故障预测方法的流程图, 具体包 括以下步骤。 步骤 202: 获取所述服务处理单元的异常日志数据以及所述异常日志数据的日志获取时 间。 其 中, 所述服务处理单元可以理解为, NC即上述实施例中的服务器; 异常日志数据, 包 括异常信息以及异常信息对应的异常发生时间; 异常信息可以理解为, 在服务处理单元中, 未经处理、 格式化或压缩的原始记录信息, 这些异常信息通常包含详细的错误、 警告和调试 信息, 详尽地记录了服务处理单元运行过程中的所有活动细节; 异常信息对应的异常发生时 间, 可以理解为异常信息发生的时间戳, 记录了每条异常信息对应的发生时间。 日志获取时间可以理解为, 获取服务处理单元的异常日志数据的获取时间。 具体 的, 可以利用检测器持续监测服务处理单元的运行情况, 并当服务处理单元发生异 常或错误的情况下, 记录并抓取相关的异常日志数据。 在 本说明书一个或多个实施例中, 为可以在获得初始异常日志的情况下, 可以根据初始 异常信息对应的异常发生时间对初始 日志数据进行排序, 从而获得根据初始异常信息对应的 异常发生时间有序排列的异常日志数据。 具体实现方式如下所述: 所述获取所述服 务处理单元的异常日志数据, 包括: 获取所述服 务处理单元的初始异常日志数据, 其中, 所述初始异常日志数据包括初始异 常信息以及所述初始异常信息对应的异常发生时间; 根据所述初始 异常信息对应的异常发生时间, 利用所述预设排序规则对所述初始异常日 志数据进行排序, 并根据排序后的初始异常日志数据, 获得所述异常日志数据。 初始 异常日志数据可以理解为, 从服务处理单元获取的、 乱序的异常情况; 预设排序规 则可以理解为, 预先设置的、 根据初始异常信息对应的异常发生时间进行排序的规则, 可以 是按照初始异常信息对应的异常发生时间由早到晚进行排序, 也可以是按照初始异常信息对 应的异常发生时间由晚到早进行排序。 具体 的, 获取服务处理单元的初始异常日志数据, 并对获取的初始异常日志数据进行解 析, 提取出初始异常信息以及对应的异常发生时间, 并根据预设排序规则 (如初始异常信息 对应的异常发生时间由晚到早进行排序), 对初始异常日志进行排序, 这样可以确保按照异常 发生时间的先后顺序、 有序的排列初始异常日志数据; 在完成排序的情况下, 得到的有序的 初始异常日志数据即为异常 日志数据, 它以时间顺序展示了服务处理单元遇到的异常情况及 其具体的发生时间。 本公开提供 的故障预测方法, 根据初始异常信息对应的异常发生时间对初始异常日志数 据进行排序, 获得时间有序的异常日志数据, 从而更快速的根据时间有序的异常日志数据, 获得异常事件序列、 异常时间戳序列以及异常分组序列。 步骤 204: 根据所述异常日志数据以及所述日志获取时间, 确定异常事件序列以及异常 时间戳序列。 其 中, 异常事件序列可以理解为, 包含异常日志数据的语义信息的序列; 异常时间戳序 列可以理解为, 包含异常日志数据的时间信息的序列。 具体 的, 针对服务处理单元中的异常日志数据进行分析处理, 分别获得异常事件序列以 及异常时间戳序列, 由此, 在将异常事件序列以及异常时间戳序列输入故障预测模型的情况 下, 提取出异常日志数据所包含的语义信息以及时间信息。 在 本说明书一个或多个实施例中, 为确保异常事件序列包含异常日志数据的语义信息, 异常时间戳序列包含异常日志数据的时间信息, 根据异常日志数据中的异常信息, 确定异常 事件序列; 根据异常发生时间确定异常时间戳序列。 具体实现方式如下所述: 所述根据所述 异常日志数据以及所述日志获取时间, 确定异常事件序列以及异常时间戳 序列, 包括: 根据所述 异常日志数据中的异常信息, 确定所述异常事件序列; 根据所述 异常信息的异常发生时间, 确定所述异常事件序列中的异常事件对应的异常发 生时间; 根据所述 异常发生时间以及所述日志获取时间, 确定所述异常时间戳序列。 其 中, 异常事件可以理解为, 对异常信息进行抽象处理后的数据, 用于将复杂的异常信 息抽象简单化; 异常事件序列可以理解为, 对异常信息进行抽象处理并编码得到的序列; 异 常时间戳序列可以理解为,对异常信息对应的异常发生时间进行抽象处理并编码得到的序列 O 具体 的, 根据异常日志数据中的异常信息, 确定异常事件序列, 该异常事件序列包含异 常日志数据的语义信息; 且由于异常事件根据对异常信息进行抽象处理得到, 因此异常信息 的异常发生时间为异常事件序列中的异常事件、 对应的异常发生时间; 根据异常事件对应的 异常发生时间以及获取异常 日志数据的日志获取时间, 确定异常时间戳序列, 该异常时间戳 序列包含异常日志数据的时间信息。 本公开提供 的故障预测方法, 通过确定异常事件序列以及异常时间戳序列, 实现对服务 处理单元的异常日志数据进行整理, 形成结构化的序列, 便于后续将结构化的序列输入故障 预测模型, 提高故障预测模型的处理效率。 在 本说明书一个或多个实施例中, 对异常信息处理得到异常事件序列, 将该异常事件序 列输入故障预测模型, 避免了故障预测模型对文本信息进行编码的过程。 具体实现方式如下 所述: 所述根据所述 异常日志数据中的异常信息, 确定所述异常事件序列, 包括: 对所述 异常信息进行处理, 确定所述异常信息对应的异常事件; 根据 异常事件库中的参考异常事件与参考事件标识之间的匹配关系, 确定所述异常事件 对应的事件标识; 根据所述 异常事件对应的异常发生时间, 对所述事件标识进行排序, 生成所述异常事件 序列。 其 中, 事件标识可以理解为, 根据参考异常事件与参考事件标识之间的匹配关系, 确定 的与异常事件对应的事件标识, 其可以通过数值、 符号等方式表示, 在此不做限定。 异常事件库中包含了参考多种异常事件种类, 每个参考异常事件均对应一个参考事件标 识, 从而构建了参考异常事件与参考事件标识之间的匹配关系; 具体的, 参考异常事件与参 考事件标识之间的匹配关系, 可通过历史异常日志数据获得, 根据对历史异常日志数据进行 抽象处理,构建其对应的参考异常事件,对所构建的参考异常事件进行相应的标识编码操作, 获得参考异常事件对应的参考事件标识, 从而实现对针对各个参考异常事件与参考事件标识 之间的匹配关系的预先构建。 具体 的, 可对异常信息进行抽象处理, 确定异常信息对应的异常事件, 例如利用正则表 达式的方式, 将异常信息 "mce : [Hardware Er ror] : Mach i ne check events l ogged ”抽象 为异常事件 "dmesg_unrecover_mce"; 在异常事件库中根据异常事件库中的参考异常事件与 参 考事件 标识之 间的 匹配关 系, 确定异 常事件 对应的 事件标 识, 如异常事件 "dmesg_unrecover_mce ”对应的事件标识为 2 ; 在确定事件标识的基础上, 需要根据异常事 件对应的异常发生时间, 对事件标识进行排序, 生成异常事件序列。 实 际应用中, 可以通过正则表达式将报出的异常信息映射得到异常事件, 具体地, 对每 一条异常信息, 可以确定此异常信息和其他异常信息共有的关键词, 比如 Er ror、 hardware 等词, 然后可以再根据所出现的关键词的种类将其划分为不同的异常名称, 得到用于命名异 常事件的短语,示例性地,将异常信息 "mce : [Hardware Er ror] : Mach i necheckevents l ogged ” 抽象为异常事件" dmesg_unrecover_mce"。 由于异常信息是描述计算机状态的语句, 包含很 多冗余信息, 而通过对异常信息文本的抽象可提取其中的关键信息, 同时也可对报出的异常 信息进行有选择地筛选, 比如选择具有 Er ror字段的异常信息进行解析。 需要说明的是, 抽 象得到的异常事件往往是一类异常信息的统一描述。 本公开提供 的故障预测方法, 通过对异常信息抽象简化为异常事件序列, 在将异常事件 序列输入故障预测模型的情况下, 简化了故障预测模型对异常信息的文本进行编码的复杂过 程, 减轻了故障预测模型的体量, 减少了对计算机系统的存储空间。 在本说 明书一个或多个实施例中,对事件标识进行排序时,根据预设排序规则进行排序, 从而根据排序后的事件标识, 生成异常事件序列。 具体实现方式如下所述: 所述根据所述 异常事件对应的异常发生时间,对所述异常事件对应的事件标识进行排序 , 生成异常事件序列, 包括: 根据所述 异常事件对应的异常发生时间, 利用预设排序规则对所述异常事件对应的事件 标识进行排序, 并根据排序后的事件标识, 生成异常事件序列。 其 中, 预设排序规则可以理解为, 根据异常发生时间对事件标识进行排序的规则。 具体 的, 可以根据异常事件对应的异常发生时间对事件标识进行倒序排序, 通常进行故 障预测时, 与当前时刻较为接近的异常发生时间所对应的异常事件较有参考性, 因此利用异 常事件对应的异常发生时间, 对异常事件对应的事件标识进行倒序排序, 从而根据异常发生 时间的倒序排列生成异常事件序列。 而且异常信息之间通常存在连带关系, 即上一时刻的异常信息可以引起下一时刻的另一 异常信息, 在根据异常发生时间对事件标识 (实际上也可理解为异常信息) 进行排序的情况 下, 可以利用故障预测模型更好的通过异常信息的上下文语义信息, 对服务处理单元进行故 障预测。 本公开提供 的故障预测方法, 根据预设排序规则对异常事件对应的事件标识进行排序, 加强异常事件序列中异常事件之间的相关性, 使得故障预测模型更好的利用异常事件的上下 文语义信息。 在 本说明书一个或多个实施例中, 与得到异常事件序列类似的, 对异常发生时间进行处 理, 将不同表示形式的异常发生时间进行统一的结构化处理, 便于故障预测模型对统一表示 形式的异常发生时间进行处理。 具体实现方式如下所述: 所述根据所述 异常发生时间以及所述日志获取时间, 确定所述异常时间戳序列, 包括: 计算所述 异常发生时间以及所述日志获取时间的时间差; 根据所述 时间差以及预设时间编码规则, 对所述异常发生时间进行分组, 并确定所述分 组的分组编号, 其中, 所述预设时间编码规则用于根据所述时间差确定所述异常发生时间对 应的分组; 根据所述分组编号对所述 异常发生时间进行编码, 获得所述异常时间戳序列。 其 中, 所述分组编号可以理解为, 对异常发生时间进行分组后设置的序号; 编码可以理 解为, 将异常发生时间转换为分组编号的过程。 例如 ,获取到的异常日志数据中包括异常发生时间 1 ,异常发生时间 2,异常发生时间 3, 异常发生时间 4以及异常发生时间 5, 而获取异常日志数据的日志获取时间为时间 A(实际上 时间 A晚于异常日志数据中异常发生时间),计算各个异常发生时间与日志获取时间的时间差, 在预设时 间编码规则为将时间差在 1000 秒内的异常发生时间分为第一组, 将时间差在 1000-2000秒内的异常发生时间分为第二组; 将时间差在 2000-3000秒内的异常发生时间分 为第三组, 以此类推, 进行分组情况下, 若异常发生时间 1 与时间 A的时间差为 156秒, 异 常发生时间 2与时间 A的时间差为 865秒, 异常发生时间 3与时间 A的时间差为 1426秒, 异 常发生时间 4与时间 A的时间差为 2159秒, 异常发生时间 5与时间 A的时间差为 2596秒; 将异常发生时间 1、 异常发生时间 2分为第一组, 将异常发生时间 3分为第二组, 将异常发 生时间 3、 异常发生时间 4分为第三组。 由此, 根据分组编号对异常发生时间进行编码的情况下, 将异常发生时间 1、 异常发生 时间 2编码为 1 ,将异常发生时间 3编码为 2,将异常发生时间 3、异常发生时间 4编码为 3, 从而获得异常时间戳序列[1 , 1 , 2, 3, 3]。 并且 , 由于实际应用中, 时间可通过不同形式进行表示, 如利用文本的形式表示或利用 分隔符的形式表示, 各服务器根据设置不同异常发生时间的表示形式不同, 在此情况下, 通 过上述方式对异常发生时间进行处理, 尽管异常发生时间的表示形式不同, 均可编码为统一 形式的异常时间戳序列。 当然, 实际应用中, 在计算各个异常发生时间与日志获取时间的时间差后, 也可以根据 时间差对异常发生时间进行编码, 获得异常时间戳序列, 但该种方式可能无法有效利用时间 信息来分析异常发生的规律。 本公开提供 的故障预测方法, 在故障预测模型对统一形式的异常时间戳序列进行处理, 且异常时间戳序列为对异常发生时间进行编码后的序列, 简化了故障预测模型的处理流程, 故障预测模型也能根据异常时间戳序列提取异常日志数据中的时间信息, 进而得到更准确的 故障预测结果。 步骤 206:根据时间间隔阈值以及所述异常事件序列中的异常事件对应的异常发生时间, 对所述异常事件进行分组, 获得异常分组序列。 其 中, 时间间隔阈值可以理解为, 用于判断两个相邻异常事件之间是否满足相近时刻的 限定值, 可根据实际需求进行设置。 具体 的, 在数据处理层面加入先验知识, 即相近时刻发生的异常事件相关性更强; 针对 异常事件序列已根据异常事件对应的异常发生时间进行排序的序列特性, 可以将相近时刻发 生的异常事件合并为异常事件分组, 因此, 可以设置时间间隔阈值, 用于判断相邻的异常事 件之间是否满足相近时刻的标准, 根据相邻异常事件的时间间隔, 将小于等于时间间隔阈值 的异常事件划分为一组, 例如在时间间隔阈值为 30分钟的情况下, 若相邻的异常事件的异常 发生时间的时间差小于等于 30分钟, 则可将这两个相邻的异常事件合并为异常事件分组。 例如 , 异常事件序列中异常事件 A、 异常事件 B、 异常事件 C、 异常事件 D为两两相邻的 异常事件, 在异常事件 A、 异常事件 B、 异常事件 C 两两之间异常发生时间的时间差均小于 30分钟的情况下, 可将异常事件 A、 异常事件 B、 异常事件 C分为异常事件分组 1 , 而异常事 件 D与异常事件 C之间异常发生时间的时间差大于 30分钟,且异常事件 D与其另一相邻的异 常事件之间异常发生时间的时间差也大于 30分钟,此时可将异常事件 D分为异常事件分组 2 , 进而获得异常分组序列。 在 本说明书一个或多个实施例中, 在获得异常事件分组的情况下, 对异常事件分组中的 异常事件进行编码, 获得异常分组序列, 将同一异常事件分组中的异常事件编码为同一数值 标识。 具体实现方式如下所述: 所述根据 时间间隔阈值以及所述异常事件序列中的异常事件对应的异常发生时间, 对所 述异常事件进行分组, 获得异常分组序列, 包括: 根据所述 时间间隔阈值以及所述异常事件序列中的异常事件对应的异常发生时间, 对所 述异常事件进行分组, 获得多个异常事件分组; 根据各个 异常事件分组中目标异常事件在所述异常事件序列中的位置, 对所述异常事件 进行编码, 获得异常分组序列。 其 中, 目标异常事件可以理解为, 异常事件分组中的首位异常事件。 具体 的, 根据异常事件分组内首位异常事件在异常事件序列中的位置来编码; 例如某一 异常事件序列前 2个异常事件为一组, 之后 3个异常事件为一组, 那么异常分组序列可以为 为 [1 , 1 , 3, 3, 3]。 沿用上例, 在将异常事件 A、 异常事件 B、 异常事件 C分为异常事件分组 1 , 将异常事件 D分为异 常事件分组 2的情况下, 将异常事件分组 1 中的首位异常事件为异常事件 A, 其在异 常事件序列中的位置为第 1位, 因此将异常事件分组 1 中的异常事件 A、 异常事件 B、 异常事 件 C编码为 1 , 异常事件分组 2中的首位异常事件为异常事件 D, 其在异常事件序列中的位置 为第 4位, 因此将异常事件分组 2中的异常事件 D编码为 4, 获得异常分组序列 [1 , 1 , 1 , 4]。 实际应用中, 异常事件序列、 异常时间戳序列以及异常分组序列均以 “ [start] ”作为起 始符, 其没有具体含义, 用于标识整个序列的起始位置。 本公开提供的故障预测方法, 根据异常事件的异常发生时间对相近时间连续发生的异常 事件进行分组, 从而利用故障预测模型从异常分组序列提取更高层次的序列特征, 准确预测 某异常事件的发生将引起的另一异常事件的发生概率。 步骤 208 : 根据所述异常事件序列、 所述异常时间戳序列以及所述异常分组序列, 利用 故障预测模型, 获得所述服务处理单元的故障预测结果。 其 中, 故障预测模型可以理解为, 用于预测服务处理单元是否发生会宕机的模型, 其为 T ransform结构; 故障预测结果包括宕机结果以及不宕机结果。 具体 的, 将异常事件序列、 异常时间戳序列以及异常分组序列, 输入故障预测模型, 分 别提取出异常 日志数据的语义信息、 时间信息以及分组信息, 使得故障预测模型能够从更多 的维度提取异常日志数据的所包含的信息,获得更准确预测的服务处理单元是否会发生宕机。 在 本说明书一个或多个实施例中, 为使故障预测模型更加关注那些对故障预测结果影响 较大的异常事件, 捕捉异常事件随时间影响的变化, 利用自注意力机制, 对异常事件序列、 异常时间戳序列以及异常分组序列进行处理。 具体实现方式如下所述: 所 述根据所述异常事件序列、 所述异常时间戳序列以及所述异常分组序列, 利用故障预 测模型, 获得所述服务处理单元的故障预测结果, 包括: 根据 所述异常事件序列、 所述异常时间戳序列以及所述异常分组序列, 利用所述故障预 测模型的自注意力层, 获得事件相关性矩阵以及时间相关性矩阵; 根据 所述事件相关性矩阵以及所述时间相关性矩阵, 获得所述服务处理单元的故障预测 结果。 其 中, 事件相关性矩阵用于表示, 基于语义信息计算得到的不同异常事件之间的内在联 系与影响程度; 时间相关性矩阵用于表示, 基于时间信息计算得到的各异常事件之间的关联 关系; 事件相关性矩阵以及时间相关性矩阵均可表示为序列长度维度的方阵。 具体 的, 将异常事件序列、 异常时间戳序列以及异常分组序列, 输入故障预测模型的自 注意力层,利用自注意力层的自注意力机制,计算得到事件相关性矩阵以及时间相关性矩阵; 从不同维度上获得异常 日志数据中各异常之间的关联关系, 根据异常日志数据中各异常之间 的关联关系, 预测服务处理单元的故障预测结果。 本公开提供的故障预测方法, 自注意力层能根据不同异常事件的重要性和对故障预测结 果的影响动态分配权重, 使得故障预测模型更加关注那些对故障预测结果影响较大的异常日 志数据, 提升预测的准确性。 在 本说明书一个或多个实施例中, 将异常事件序列输入第一自注意力层、 将异常时间戳 序列以及异常分组序列输入第二 自注意力层, 分别根据不同的自注意力层获得事件相关性矩 阵以及时间相关性矩阵。 具体实现方式如下所述: 所述根据所述 异常事件序列、 所述异常时间戳序列以及所述异常分组序列, 利用所述故 障预测模型的自注意力层, 获得事件相关性矩阵以及时间相关性矩阵, 包括: 将所述 异常事件序列输入所述故障预测模型的第一自注意力层, 获得所述事件相关性矩 阵; 将所述 异常时间戳序列以及所述异常分组序列, 输入所述故障预测模型的第二自注意力 层, 获得所述时间相关性矩阵。 其 中, 第一自注意力层可以理解为, 处理异常事件序列的自注意力层; 第二自注意力层 可以理解为, 处理异常时间戳序列以及异常分组序列的自注意力层; 第一自注意力层与第二 自注意力层为故障预测模型中并列的两个自注意力层; 第一自注意力层用于处理异常事件序 列, 第二自注意力层用于处理异常时间戳序列以及异常分组序列。 具体 的, 将异常事件序列输入故障预测模型的第一自注意力层之前, 首先可将异常事件 序列输入故障预测模型的异常事件嵌入层 (Except i on Embedd i ng) , 利用异常事件嵌入层将 异常事件序列映射为事件向量, 将 Except i on Embedd i ng的输出, 作为第一自注意力层的输 入, 利用自注意力机制计算得到事件相关性矩阵。 将 异常时间戳序列以及异常分组序列输入故障预测模型的第二自注意力层之前, 首先可 将异常时间戳序列输入故障预测模型的时间戳千秒嵌入层 (Tempora l Embedd i ng) , 利用时间 戳千秒嵌入层将异常时间戳序列映射为时间戳向量; 将异常分组序列输入故障预测模型的分 组嵌入层 (Group Embedd i ng) ,利用分组嵌入层将异常分组序列映射为分组向量;将 Tempora I Embedd i ng和 Group Embedd i ng的输出, 即时间戳向量以及分组向量叠加作为第二自注意力 层的输入, 利用自注意力机制组成时间相关性矩阵。 实 际应用中, 在将异常日志数据输入故障预测模型的情况下, 可以在故障预测模型的异 常事件嵌入层中获得异常事件序列, 并将异常事件序列映射为事件向量; 在故障预测模型的 时间戳千秒嵌入层中获得异常时间戳序列, 并将异常时间戳序列映射为时间戳向量; 在分组 嵌入层中获得异常分组序列, 并将异常分组序列映射为分组向量。 示例性地 , 可以基于异常事件序列中位置 i和 j的两个异常事件的相关性, 确定所生成 的事件相关性矩阵中第 i行第 j列的元素。 本公开提供 的故障预测方法, 通过第一自注意力层对异常事件序列进行处理, 可以捕捉 并量化不同异常事件间的依赖关系和潜在影响, 形成事件相关性矩阵; 利用第二自注意力层 对异常时间戳序列和异常分组序列处理, 能够深入分析异常事件随时间演变的规律和周期性 特征。 在 本说明书一个或多个实施例中, 对事件相关性矩阵以及时间相关性矩阵进行融合, 得 到注意力矩阵,并通过后续计算得到服务处理单元的故障预测结果。具体实现方式如下所述: 所述根据所述 事件相关性矩阵以及所述时间相关性矩阵, 获得所述服务处理单元的故障 预测结果, 包括: 根据所述 事件相关性矩阵以及所述时间相关性矩阵, 利用所述故障预测模型的注意力融 合层, 获得注意力矩阵; 根据所述注 意力矩阵, 确定目标特征向量; 将所述 目标特征向量输入所述故障预测模型的分类层, 获得所述服务处理单元的故障预 测结果。 其 中, 注意力融合层用于对事件相关性矩阵以及时间相关性矩阵进行融合; 目标特征向 量可以理解为,由注意力矩阵组成的输出序列中起始符对应的特征向量;分类层可以理解为, 分类器。 在 实际应用中, 时间相关性矩阵和事件相关性矩阵的结合可通过注意力融合层实现, 故 障预测模型具有多层注意力融合层, 可用于指示故障预测模型基于事件、 时间以及分组信息 进行故障预测。 此时可将时间相关性矩阵和事件相关性矩阵进行求和, 以融合提取的事件、 时间、 分组信息, 让故障预测模型具有同时从异常事件序列、 异常时间戳序列以及异常分组 序列中提取信息,以及具有在寻找异常事件相关性时的同时还能够考虑异常事件自身的含义、 异常发生时间和异常事件分组中异常事件间相关性的能力。 对 时间相关性矩阵和事件相关性矩阵进行的求和,可以作为故障预测模型中的 Attent i on Score (注意力得分), Attent i on Score指故障预测模型中 Attent i on过程计算得到的相关 性矩阵, 其具体可以看作故障预测模型计算得到的一个动态权重矩阵, 以便在后续步骤中采 用 Attent i on Score与输入项相乘, 为输入项进行加权。 需要说明的是, 整个 Attent i on的 过程可以理解为输入项 自身乘自身的转置求出动态权重矩阵(即 Attent i on Score)再用这个 权重矩阵给自身加权,加权后输入的维度不变,后续再送入全连接层和分类器模块进行分类。 在求和得到 Attent i on Score之后, 可以利用 T ransf ormer的计算方法计算得到输出, 具体表现为将时间相关性矩阵和事件相关性矩阵作为注意力融合层的第一层的输入项, 即第 一层的注意力融合层以时间相关性矩阵和事件相关性矩阵作为输入, 此时可以将时间相关性 矩阵和事件相关矩阵进行求和后, 再将其进行求和后得到的矩阵, 作为第一层的输入项与权 重矩阵相乘, 得到第一层的输出项, 那么可以从第二层开始, 可以按照前一层的输入项和前 一层的输出项的和作为下一层的输入项, 并与权重矩阵相乘得到下一层的输出项, 直至按照 前一层的输入项和前一层的输出项的和与权重矩阵相乘, 得到顶层的输出项为止。 在 本说明书一个实施例中, 故障预测模型中的顶层的注意力融合层所输出的输出项表现 为矩阵形式 (注意力矩阵), 而矩阵形式相当于特殊的向量, 即其可以转化为特征向量进行表 示, 此时可以将输出项中各个行向量的特征向量组成输出序列, 此时可以获取输出序列中位 于第一个位置的 目标特征向量, 即起始符对应的特征向量, 将所获取的目标特征向量输入至 分类器进行分类, 输出为服务处理单元会发生宕机的置信度, 此时可以设置一个预设阈值, 当置信度大于预设阈值的情况下, 预测对应的服务处理单元会发生宕机。 在 实际应用中, 顶层注意力融合层的输出序列的起始符对应的特征向量(c l ass token) 作为输出序列的代表, 送入分类器进行分类, 其中起始符不对应任何异常信息, 但在计算相 关性矩阵时计算每个异常事件与起始符的相关关系并以此为基础对起始符的向量进行 了加权 , 那么起始符可以看作独立在各个异常事件之外的, 但又可以代表所有异常事件的组合的一个 符号, 因此采用此起始符所对应的特征向量用于分类。 本公开提供 的故障预测方法, 能够充分利用异常日志数据中的事件、 时间和分组信息, 通过将相近时间连续发生的异常事件分为一组, 利用时间信息更好地融合事件信息, 提取更 高层次的序列特征, 从而提高故障预测的精准率和召回率, 使云计算系统能更快速、 准确地 对即将宕机的服务器进行运维, 从而减少宕机率或者降低宕机对用户带来的损失, 大大增加 云计算系统的稳定性和可靠性。 在 本说明书一个或多个实施例中, 所述故障预测模型通过如下步骤训练获得: 获取 所述服务处理单元的样本异常日志数据、 所述样本异常日志数据的样本日志获取时 间; 根据 所述样本异常日志数据、 以及所述样本异常日志数据的样本日志获取时间, 确定样 本异常事件序列以及样本异常时间戳序列; 根据 所述时间间隔阈值以及所述样本异常事件序列中的样本异常事件对应的样本异常发 生时间, 对所述样本异常事件进行分组, 获得样本异常分组序列; 根据 所述样本异常事件序列、 所述样本异常时间戳序列以及所述样本异常分组序列, 确 定正样本以及负样本; 根据 所述正样本、 所述正样本对应的样本标签、 所述负样本、 所述负样本对应的样本标 签, 训练获得故障预测模型。 其 中, 正样本可以理解为宕机样本, 即在服务处理单元发生了宕机的情况下, 根据获取 到的服务处理单元的样本异常 日志数据、 样本异常日志数据的样本日志获取时间, 确定的样 本异常事件序列、 样本异常时间戳序列以及样本异常分组序列; 正样本对应的样本标签为服 务处理单元的宕机结果。 负样本可以理解为正常样本, 即在服务处理单元没有发生宕机的情况下, 根据获取到的 服务处理单元的样本异常 日志数据、 样本异常日志数据的样本日志获取时间, 确定的样本异 常事件序列、 样本异常时间戳序列以及样本异常分组序列; 负样本对应的样本标签为服务器 的不宕机结果。 获得样 本异常事件序列、 样本异常时间戳序列以及样本异常分组序列的具体实现可参见 上述实施例, 在此不再赘述。 而在根据所述正样本、 所述正样本对应的样本标签、 所述负样本、 所述负样本对应的样 本标签, 训练获得故障预测模型的情况下, 故障预测模型能够根据获取到的异常日志数据以 及日志获取时间预测出服务处理单元发生宕机, 或者不宕机的故障预测结果。 本公开提供的故障预测方法, 通过区分正、 负样本, 故障预测模型能够更好地学习异常 事件发生宕机或者不发生宕机的模式, 从而能够应用故障预测模型对获取的异常日志数据进 行准确预测。 在 本说明书一个或多个实施例中, 所述根据所述样本异常日志数据、 以及所述样本异常 日志数据的样本日志获取时间, 确定样本异常事件序列以及样本异常时间戳序列, 包括: 根据所述样 本异常日志数据, 确定正样本异常事件序列以及负样本异常事件序列; 根据 所述正样本异常事件序列、 所述负样本异常事件序列以及所述样本异常日志数据的 样本日志获取时间, 确定正样本异常时间戳序列以及负样本异常时间戳序列。 其 中, 正样本异常事件序列可以理解为, 在服务处理单元发生宕机的情况下, 从样本异 常日志数据中确定的异常事件序列; 负样本异常事件序列可以理解为, 在服务处理单元没有 发生宕机的情况下, 从样本异常日志数据中确定的异常事件序列。 具体 的, 在需要通过正、 负样本对故障预测模型进行训练的情况下, 针对获取的样本异 常日志数据, 分别确定正样本异常事件序列以及负样本异常事件序列; 并根据正样本异常事 件序列以及样本异常日志数据的样本 日志获取时间, 确定正样本异常时间戳序列, 根据负样 本异常事件序列以及样本异常日志数据的样本日志获取时间, 确定负样本异常时间戳序列。 在 本说明书一个或多个实施例中, 所述根据所述样本异常日志数据, 确定正样本异常事 件序列以及负样本异常事件序列, 包括: 根据所述样 本异常日志数据中的样本异常信息, 确定样本异常事件序列, 并根据所述样 本异常事件序列确定所述正样本异常事件序列、 以及所述负样本异常事件序列。 在 本说明书一个或多个实施例中, 所述根据所述样本异常日志数据中的样本异常信息, 确定样本异常事件序列, 包括: 对所述样本 异常信息进行处理, 确定所述样本异常信息对应的样本异常事件; 根据 异常事件库中的参考异常事件与参考事件标识之间的匹配关系, 确定所述样本异常 事件对应的样本事件标识; 根据所述样 本异常事件对应的样本异常发生时间, 对所述样本事件标识进行排序, 生成 所述样本异常事件序列。 生成样本 异常事件序列的具体实现与上述实施例类似, 在此不再赘述。 在 本说明书一个或多个实施例中, 针对正样本异常事件序列, 利用预设采样时间以及预 设采样长度进行获取, 针对负样本异常事件序列, 利用预设负样本采样规则进行确定。 具体 实现方式如下所述: 所述根据所述样 本异常事件序列确定所述正样本异常事件序列、 以及所述负样本异常事 件序列, 包括: 根据预设采样 时间以及预设采样长度, 从所述样本异常事件序列确定所述正样本异常事 件序列; 根据预设 负样本采样规则, 从所述样本异常事件序列确定所述负样本异常事件序列, 其 中, 所述预设负样本采样规则为按照预设比例随机进行采样的规则。 其 中, 预设采样时间可以理解为, 预设的采样时间间隔; 预设采样长度可以理解为, 预 设的采样窗口长度; 预设负样本采样规则可以理解为, 在样本异常事件序列上按预设比例随 机获取的规则。 具体 的, 在获取正样本时, 可以在样本异常事件序列中可以按 5分钟为时间间隔, 以 3 天为采样窗口长度, 在样本异常事件序列上有重叠地进行采样, 从而获得正样本异常事件序 列; 而在获取负样本时, 可以在样本异常事件序列中按预设比例 (比如 60%) 随机获取异常 事件, 从而确定负样本异常事件序列。 实 际应用中, 采用滑动窗口的方式, 在每个 5分钟的时间点开始计算一个包含前 72小时 (即 3天) 内所有异常事件的子序列, 例如第一个采样窗口从时间 A开始到时间 B (时间 A 往前推 72小时的时间) 结束; 然后窗口向前移动 5分钟, 第二个采样窗口从时间 C (时间 A 往前推 5分钟的时间) 开始, 同样覆盖前 72小时, 如此类推。 在 本说明书一个或多个实施例中, 所述根据所述时间间隔阈值以及所述样本异常事件序 列中的样本异常事件对应的样本异常发生时间, 对所述样本异常事件进行分组, 获得样本异 常分组序列, 包括: 根据所述 时间间隔阈值以及所述正样本异常事件序列中正样本异常事件对应的正样本异 常发生时间, 对所述正样本异常事件进行分组, 获得正样本异常分组序列; 根据所述 时间间隔阈值以及所述负样本异常事件序列中负样本异常事件对应的负样本异 常发生时间, 对所述负样本异常事件进行分组, 获得负样本异常分组序列。 对正样 本异常事件进行分组、 对负样本异常事件进行分组的具体实现与上述实施例的分 组方式类似, 在此不再赘述。 在 本说明书一个或多个实施例中, 所述根据所述样本异常事件序列、 所述样本异常时间 戳序列以及所述样本异常分组序列, 确定正样本以及负样本, 包括: 将所述正样 本异常事件序列、 所述正样本异常时间戳序列、 所述正样本异常分组序列作 为正样本, 将所述负样本异常事件序列、 所述负样本异常时间戳序列、 所述负样本异常分组 序列作为负样本。 本公开提供 的故障预测方法, 通过构造的正负样本, 能够帮助故障预测模型充分学习并 区分服务处理单元宕机与不宕机的状态, 从而提升故障预测模型在实际应用中的预测准确率 和泛化能力。 本公开提供 的故障预测方法, 通过获取服务处理单元的异常日志数据以及异常日志数据 的日志获取时间, 确定异常事件序列以及异常时间戳序列; 并通过异常事件的时间间隔来对 异常事件分组, 获得异常分组序列, 在相近时刻发生的异常事件相关性更强的情况下, 从多 维度对异常日志数据进行分析,从而利用故障预测模型可以提高故障预测的精准率和召回率, 使云计算系统可以提前预测宕机并进行及时运维, 减少宕机率, 提高云计算系统的稳定性。 参 见图 3,图 3示出了本说明书一个实施例提供的一种故障预测模型训练方法的流程图, 具体包括以下步骤。 步骤 302: 获取所述服务处理单元的样本异常日志数据、 所述样本异常日志数据的样本 日志获取时间; 所述根据所述样 本异常日志数据, 确定正样本异常事件序列以及负样本异常事件序列, 包括: 根据所述样 本异常日志数据中的样本异常信息, 确定样本异常事件序列, 并根据所述样 本异常事件序列确定所述正样本异常事件序列、 以及所述负样本异常事件序列。 所述根据所述样本 异常日志数据中的样本异常信息, 确定样本异常事件序列, 包括: 对所述样本 异常信息进行处理, 确定所述样本异常信息对应的样本异常事件; 根据 异常事件库中的参考异常事件与参考事件标识之间的匹配关系, 确定所述样本异常 事件对应的样本事件标识; 根据所述样 本异常事件对应的样本异常发生时间, 对所述样本事件标识进行排序, 生成 所述样本异常事件序列。 所述根据所述样 本异常事件序列确定所述正样本异常事件序列、 以及所述负样本异常事 件序列, 包括: 根据预设采样 时间以及预设采样长度, 从所述样本异常事件序列确定所述正样本异常事 件序列; 根据预设 负样本采样规则, 从所述样本异常事件序列确定所述负样本异常事件序列, 其 中, 所述预设负样本采样规则为按照预设比例随机进行采样的规则。 步骤 304: 根据所述样本异常日志数据、 以及所述样本异常日志数据的样本日志获取时 间, 确定样本异常事件序列以及样本异常时间戳序列; 所述根据所述样 本异常日志数据、 以及所述样本异常日志数据的样本日志获取时间, 确 定样本异常事件序列以及样本异常时间戳序列, 包括: 根据所述样本 异常日志数据, 确定正样本异常事件序列以及负样本异常事件序列; 根据所述正样 本异常事件序列、 所述负样本异常事件序列以及所述样本异常日志数据的 样本日志获取时间, 确定正样本异常时间戳序列以及负样本异常时间戳序列。 步骤 306: 根据所述时间间隔阈值以及所述样本异常事件序列中的样本异常事件对应的 样本异常发生时间, 对所述样本异常事件进行分组, 获得样本异常分组序列; 所述根据所述 时间间隔阈值以及所述样本异常事件序列中的样本异常事件对应的样本异 常发生时间, 对所述样本异常事件进行分组, 获得样本异常分组序列, 包括: 根据所述 时间间隔阈值以及所述正样本异常事件序列中正样本异常事件对应的正样本异 常发生时间, 对所述正样本异常事件进行分组, 获得正样本异常分组序列; 根据所述 时间间隔阈值以及所述负样本异常事件序列中负样本异常事件对应的负样本异 常发生时间, 对所述负样本异常事件进行分组, 获得负样本异常分组序列。 步骤 308: 根据所述样本异常事件序列、 所述样本异常时间戳序列以及所述样本异常分 组序列, 确定正样本以及负样本; 所述根据所述样本 异常事件序列、所述样本异常时间戳序列以及所述样本异常分组序列, 确定正样本以及负样本, 包括: 将所述正样 本异常事件序列、 所述正样本异常时间戳序列、 所述正样本异常分组序列作 为正样本, 将所述负样本异常事件序列、 所述负样本异常时间戳序列、 所述负样本异常分组 序列作为负样本。 步骤 310: 根据所述正样本、 所述正样本对应的样本标签、 所述负样本、 所述负样本对 应的样本标签, 训练获得故障预测模型。 具体实现可参 见上述实施例, 在此不再赘述。 本公开提供 的故障预测模型训练方法, 通过确定异常事件序列、 异常时间戳序列; 并通 过异常事件的时间间隔来对异常事件分组, 获得异常分组序列, 在相近时刻发生的异常事件 相关性更强的情况下, 从多维度对异常日志数据进行分析, 使训练获得的故障预测模型能够 实现更精准的预测。 上述 为本实施例的一种故障预测模型训练方法的示意性方案。 需要说明的是, 该故障预 测模型训练方法的技术方案与上述的故障预测方法的技术方案属于同一构思, 故障预测模型 训练方法的技术方案未详细描述的细节内容, 均可以参见上述故障预测方法的技术方案的描 述。 参 见图 4, 图 4示出了本说明书一个实施例提供的一种故障预测模型训练方法的处理过 程流程图, 具体包括以下步骤。 步骤 402: 对训练样本数据进行预处理。 通过检测 器获得 NC (即上述实施例中的服务处理单元) 对应的异常日志数据, 将异常日 志数据中的异常信息抽象为一个异常事件, 其中针对同一种异常信息, 抽象为同一种异常事 件, 通过异常事件库将异常事件转化为对应的事件标识。 具体的, 图 5示出了本说明书一个 实施例提供的一种数据预处理过程示意图。 如 图 5所示, 数据预处理过程即将异常日志数据组织成结构化数据的过程; 具体的, 异 常日志数据中包括 日志时间 (即上述实施例中的异常发生时间) 以及原始记录信息 (即上述 实施例中的异常信息), 对异常信息进行抽象化处理, 即根据原始记录信息中用颜色框出来的 部分抽象为异常事件, 在异常事件库中包含所有异常事件种类, 每个异常事件都对应一个整 数数字 (即上述实施例中的事件标识), 根据异常事件库将每个异常转化为整数数字。 比如: 异常事件“ dmesg_unrecover_mce "转化为 2 ; 图 5中利用颜色进行区分的目的为, 表明同一 类的异常事件利用同一整数数字表示, 得到利用整数数字表示异常信息的预处理结果。 步骤 404: 采样。 通 过检测器获得异常日志数据时, 异常日志数据包括异常信息对应的异常发生时间, 将 异常日志数据按异常发生时间的倒序进行排列, 然后按照预设的采样时间间隔以及采样窗口 长度对获取到的异常日志数据进行采样, 得到样本异常日志数据。 实际应用中, 将每台 NC报出的异常日志数据按异常发生时间的倒序排列组成一个序列, 按 5分钟为时间间隔, 以 3天为采样窗口长度, 在整段序列上有重叠地进行采样 (根据步骤 402处理, 得到的样本形如" [start] , 1 , 2, > , 3", 其中 [start] 为起始符, 没有具体 含义); 对宕机样本 (正样本) 仅保留采样起点在宕机时刻 3天内的数据, 对正常样本 (负样 本) 在整段序列上随机保留一定比例的样本。 步骤 406: 编码映射。 具体 的, 对于上述获得的序列 “ [start] , 1 , 2, ……, 3”, 进行编码映射, 映射为故障 预测模型可训练的向量, 例如对上述获得的异常事件序列进行编码映射; 而对于异常时间戳 序列, 计算每个异常发生时间和采样时刻的时间差, 例如, 三天共计 259200秒, 将 0-1000 秒映射为数字 1 , 1000-2000秒映射为数字 2, 以此类推编码, 之后映射为向量。 对于异常分 组序列, 根据相邻异常事件的时间间隔, 将小于某一阈值的异常事件划分为一组, 并根据组 内首位异常事件在序列中的位置来编码, 例如某一序列前三个异常事件为一组, 之后五个异 常事件为一组, 那么异常分组序列为 “ [start] , 1 , 1 , 1 , 4, 4, 4, 4, 4", 对该异常分组 序列进行编码映射。 图 6示出了本说明书一个实施例提供的一种编码映射过程示意图。 针对 异常事件对应的异常事件序列进行编码映射, 如将“ 2, 1 , 9, ……, 30”进行编码映 射, 获得异常事件序列对应的编码向量 “E”2] EJ1 ] E, [9] …… EJ30] ”; 基于异常发生时 间 “20230501 16: 20 : 00, 20230501 16: 19 : 10, 20230501 15 : 56: 04, 20230501 13 : 57: 47” 进行编码获得异常时间戳序列以及异常分组序列, 并映射为向量, 如异常时间戳序列对应的 编码向量为 'EU ] E2[1 ] E2[1 ] …… E2 [30] \ 异常分组序列对应的编码向量为 “E3〔1 ] E3 [1] E3 [3] …… E3[89] "。 步骤 408: 获得事件相关性矩阵以及时间相关性矩阵。 将 故障预测模型嵌入层 的输出作为输入, 输入故障预测模型的 自注意力层; 首先将 Except i on Embedd i ng 的输出, 即编码映射后的异常事件序列, 输入第一自注意力层, 利用 自注意力机制得到事件相关性矩阵; 将 Tempora I Embedd i ng和 Group Embedd i ng输出, 即编 码映射后的异常时间戳序列以及异常分组序列叠加输入第二自注意力层, 基于时间信息来计 算序列中每个事件互相之间的相关关系, 得到时间相关性矩阵。 步骤 410: 矩阵融合。 将 事件相关性矩阵以及时间相关性矩阵相加融合得到注意力矩阵, 将该注意力矩阵输入 故障预测模型的每一层注意力融合层, 得到顶层的注意力融合层的输出序列。 步骤 412: 模型训练。 将顶层 的注意力融合层的输出序列中, 起始符对应的特征向量 (c I ass token) 作为这个 输出序列的代表, 送入分类器进行分类, 故障预测是一个二分类任务,得到故障预测结果 (宕 机、 正常); 利用故障预测结果以及样本标签, 通过计算损失函数的方式, 更新故障预测模型 的模型参数, 实际应用中, 模型训练时采用的损失函数为交叉炳损失, 利用梯度下降算法反 传损失的梯度以更新模型的参数。 本公开提供的故障预测模型训练方法, 充分考虑了时间信息, 具体包含时间信息以及分 组信息, 且不需要对原始记录信息进行直接学习, 而是通过预处理后的预处理结果来进行学 习, 提高了模型训练效率; 在能够有效融合事件信息、 时间信息和分组信息的情况下, 可以 更有效地提取序列中的信息, 提升数据的表达能力, 从而后续可应用故障预测模型提高故障 预测的精准率和召回率, 使云计算系统可以提前预测宕机并进行及时运维, 减少宕机率, 提 高云计算系统的稳定性。 与上述方法实施例相对应, 本说明书还提供了故障预测装置实施例, 图 7示出了本说明 书一个实施例提供的一种故障预测装置的结构示意图。 如图 7所示, 该装置包括: 数据获取模块 702, 被配置为获取所述服务处理单元的异常日志数据以及所述异常日志 数据的日志获取时间; 序 列确定模块 704, 被配置为根据所述异常日志数据以及所述日志获取时间, 确定异常 事件序列以及异常时间戳序列; 序 列获得模块 706, 被配置为根据时间间隔阈值以及所述异常事件序列中的异常事件对 应的异常发生时间, 对所述异常事件进行分组, 获得异常分组序列; 结 果获得模块 708, 被配置为根据所述异常事件序列、 所述异常时间戳序列以及所述异 常分组序列, 利用故障预测模型, 获得所述服务处理单元的故障预测结果。 所述装置 , 还包括: 模 型训练模块, 被配置为获取所述服务处理单元的样本异常日志数据、 所述样本异常日 志数据的样本日志获取时间; 根据所述样 本异常日志数据、 以及所述样本异常日志数据的样本日志获取时间, 确定样 本异常事件序列以及样本异常时间戳序列; 根据所述 时间间隔阈值以及所述样本异常事件序列中的样本异常事件对应的样本异常发 生时间, 对所述样本异常事件进行分组, 获得样本异常分组序列; 根据所述样 本异常事件序列、 所述样本异常时间戳序列以及所述样本异常分组序列, 确 定正样本以及负样本; 根据所述正样 本、 所述正样本对应的样本标签、 所述负样本、 所述负样本对应的样本标 签, 训练获得故障预测模型。 可选地 , 所述模型训练模块, 进一步被配置为: 根据所述样本 异常日志数据, 确定正样本异常事件序列以及负样本异常事件序列; 根据所述正样 本异常事件序列、 所述负样本异常事件序列以及所述样本异常日志数据的 样本日志获取时间, 确定正样本异常时间戳序列以及负样本异常时间戳序列。 可选地 , 所述模型训练模块, 进一步被配置为: 根据所述 时间间隔阈值以及所述正样本异常事件序列中正样本异常事件对应的正样本异 常发生时间, 对所述正样本异常事件进行分组, 获得正样本异常分组序列; 根据所述 时间间隔阈值以及所述负样本异常事件序列中负样本异常事件对应的负样本异 常发生时间, 对所述负样本异常事件进行分组, 获得负样本异常分组序列。 可选地 , 所述模型训练模块, 进一步被配置为: 将所述正样 本异常事件序列、 所述正样本异常时间戳序列、 所述正样本异常分组序列作 为正样本, 将所述负样本异常事件序列、 所述负样本异常时间戳序列、 所述负样本异常分组 序列作为负样本。 可选地 , 所述模型训练模块, 进一步被配置为: 根据所述样 本异常日志数据中的样本异常信息, 确定样本异常事件序列, 并根据所述样 本异常事件序列确定所述正样本异常事件序列、 以及所述负样本异常事件序列。 可选地 , 所述模型训练模块, 进一步被配置为: 对所述样本 异常信息进行处理, 确定所述样本异常信息对应的样本异常事件; 根据 异常事件库中的参考异常事件与参考事件标识之间的匹配关系, 确定所述样本异常 事件对应的样本事件标识; 根据所述样 本异常事件对应的样本异常发生时间, 对所述样本事件标识进行排序, 生成 所述样本异常事件序列。 可选地 , 所述模型训练模块, 进一步被配置为: 根据预设采样 时间以及预设采样长度, 从所述样本异常事件序列确定所述正样本异常事 件序列; 根据预设 负样本采样规则, 从所述样本异常事件序列确定所述负样本异常事件序列, 其 中, 所述预设负样本采样规则为按照预设比例随机进行采样的规则。 可选地 , 所述序列确定模块 704, 进一步被配置为: 根据所述 异常日志数据中的异常信息, 确定所述异常事件序列; 根据所述 异常信息的异常发生时间, 确定所述异常事件序列中的异常事件对应的异常发 生时间; 根据所述 异常发生时间以及所述日志获取时间, 确定所述异常时间戳序列。 可选地 , 所述序列确定模块 704, 进一步被配置为: 对所述 异常信息进行处理, 确定所述异常信息对应的异常事件; 根据 异常事件库中的参考异常事件与参考事件标识之间的匹配关系, 确定所述异常事件 对应的事件标识; 根据所述 异常事件对应的异常发生时间, 对所述事件标识进行排序, 生成所述异常事件 序列。 可选地 , 所述序列确定模块 704, 进一步被配置为: 计算所述 异常发生时间以及所述日志获取时间的时间差; 根据所述 时间差以及预设时间编码规则, 对所述异常发生时间进行分组, 并确定所述分 组的分组编号, 其中, 所述预设时间编码规则用于根据所述时间差确定所述异常发生时间对 应的分组; 根据所述分组编号对所述 异常发生时间进行编码, 获得所述异常时间戳序列。 可选地 , 所述序列确定模块 704, 进一步被配置为: 根据所述 异常事件对应的异常发生时间, 利用预设排序规则对所述异常事件对应的事件 标识进行排序, 并根据排序后的事件标识, 生成异常事件序列。 可选地 , 所述序列获得模块 706, 进一步被配置为: 根据所述 时间间隔阈值以及所述异常事件序列中的异常事件对应的异常发生时间, 对所 述异常事件进行分组, 获得多个异常事件分组; 根据各个 异常事件分组中目标异常事件在所述异常事件序列中的位置, 对所述异常事件 进行编码, 获得异常分组序列。 可选地 , 所述结果获得模块 708, 进一步被配置为: 根据所述 异常事件序列、 所述异常时间戳序列以及所述异常分组序列, 利用所述故障预 测模型的自注意力层, 获得事件相关性矩阵以及时间相关性矩阵; 根据所述 事件相关性矩阵以及所述时间相关性矩阵, 获得所述服务处理单元的故障预测 结果。 可选地 , 所述结果获得模块 708, 进一步被配置为: 将所述 异常事件序列输入所述故障预测模型的第一自注意力层, 获得所述事件相关性矩 阵; 将所述 异常时间戳序列以及所述异常分组序列, 输入所述故障预测模型的第二自注意力 层, 获得所述时间相关性矩阵。 可选地 , 所述结果获得模块 708, 进一步被配置为: 根据所述 事件相关性矩阵以及所述时间相关性矩阵, 利用所述故障预测模型的注意力融 合层, 获得注意力矩阵; 根据所述注 意力矩阵, 确定目标特征向量; 将所述 目标特征向量输入所述故障预测模型的分类层, 获得所述服务处理单元的故障预 测结果。 上述 为本实施例的一种故障预测装置的示意性方案。 需要说明的是, 该故障预测装置的 技术方案与上述的故障预测装置的技术方案属于同一构思, 故障预测装置的技术方案未详细 描述的细节内容, 均可以参见上述故障预测方法的技术方案的描述。 与上述方法实施例相对应, 本说明书还提供了故障预测模型训练装置实施例, 图 8示出 了本说明书一个实施例提供的一种故障预测模型训练装置的结构示意图。 如图 8所示, 该装 置包括: 数据获取模块 802, 被配置为获取所述服务处理单元的样本异常日志数据、 所述样本异 常日志数据的样本日志获取时间; 序列确定模块 804, 被配置为根据所述样本异常日志数据、 以及所述样本异常日志数据 的样本日志获取时间, 确定样本异常事件序列以及样本异常时间戳序列; 序列获得模块 806, 被配置为根据所述时间间隔阈值以及所述样本异常事件序列中的样 本异常事件对应的样本异常发生时间, 对所述样本异常事件进行分组, 获得样本异常分组序 列; 样 本确定模块 808, 被配置为根据所述样本异常事件序列、 所述样本异常时间戳序列以 及所述样本异常分组序列, 确定正样本以及负样本; 训练模块 810, 被配置为根据所述正样本、 所述正样本对应的样本标签、 所述负样本、 所述负样本对应的样本标签, 训练获得故障预测模型。 可选地 , 所述序列确定模块 804, 进一步被配置为: 根据所述样本 异常日志数据, 确定正样本异常事件序列以及负样本异常事件序列; 根据所述正样 本异常事件序列、 所述负样本异常事件序列以及所述样本异常日志数据的 样本日志获取时间, 确定正样本异常时间戳序列以及负样本异常时间戳序列。 可选地 , 所述序列获得模块 806, 进一步被配置为: 根据所述 时间间隔阈值以及所述正样本异常事件序列中正样本异常事件对应的正样本异 常发生时间, 对所述正样本异常事件进行分组, 获得正样本异常分组序列; 根据所述 时间间隔阈值以及所述负样本异常事件序列中负样本异常事件对应的负样本异 常发生时间, 对所述负样本异常事件进行分组, 获得负样本异常分组序列。 可选地 , 所述样本确定模块 808, 进一步被配置为: 将所述正样 本异常事件序列、 所述正样本异常时间戳序列、 所述正样本异常分组序列作 为正样本, 将所述负样本异常事件序列、 所述负样本异常时间戳序列、 所述负样本异常分组 序列作为负样本。 可选地 , 所述序列确定模块 804, 进一步被配置为: 根据所述样 本异常日志数据中的样本异常信息, 确定样本异常事件序列, 并根据所述样 本异常事件序列确定所述正样本异常事件序列、 以及所述负样本异常事件序列。 可选地, 所述序列确定模块 804, 进一步被配置为: 对所述样 本异常信息进行处理, 确定所述样本异常信息对应的样本异常事件; 根据 异常事件库中的参考异常事件与参考事件标识之间的匹配关系, 确定所述样本异常 事件对应的样本事件标识; 根据 所述样本异常事件对应的样本异常发生时间, 对所述样本事件标识进行排序, 生成 所述样本异常事件序列。 可选地, 所述序列确定模块 804, 进一步被配置为: 根据预设采样 时间以及预设采样长度, 从所述样本异常事件序列确定所述正样本异常事 件序列; 根据预设 负样本采样规则, 从所述样本异常事件序列确定所述负样本异常事件序列, 其 中, 所述预设负样本采样规则为按照预设比例随机进行采样的规则。 上 述为本实施例的一种故障预测模型训练装置的示意性方案。 需要说明的是, 该故障预 测模型训练装置的技术方案与上述的故障预测方法的技术方案属于同一构思, 故障预测模型 训练装置的技术方案未详细描述的细节内容, 均可以参见上述故障预测方法的技术方案的描 述。 图 9示出了根据本说明书一个实施例提供的一种计算设备 900的结构框图。 该计算设备 900的部件包括但不限于存储器 910和处理器 920o处理器 920与存储器 910通过总线 930相 连接, 数据库 950用于保存数据。 计算设备 900还包括接入设备 940, 接入设备 940使得计算设备 900能够经由一个或多 个网络 960通信。 这些网络的示例包括公用交换电话网 (PSTN, Pub l i c Swi tched Te l ephone Network)、 局域网 (LAN, Loca I Area Network)、 广域网 (WAN, Wi de Area Network)、 个域 网 (PAN, Persona I Area Network) 或诸如因特网的通信网络的组合。 接入设备 940可以包 括有 线或无线的任 何类型的 网络接口 (例如, 网络接口卡 ( N I C , network i nterface contro l l er ) ) 中的一个或多个, 诸如 I EEE802. 1 1无线局域网 (WLAN, Wi re I ess Loca I Area Network)无线接口、全球微波互联接入 (Wi -MAX, Wor I dwi de I nteroperab i I i ty for M i crowave Access) 接口、 以太网接口、 通用串行总线 (USB, Un i versa I Ser i a l Bus) 接口、 蜂窝网络 接口、 蓝牙接口、 近场通信 (NFC, Near F i e l d Commun i cat i on)。 在 本说明书的一个实施例中, 计算设备 900的上述部件以及图 9中未示出的其他部件也 可以彼此相连接, 例如通过总线。 应当理解, 图 9所示的计算设备结构框图仅仅是出于示例 的 目的, 而不是对本说明书范围的限制。 本领域技术人员可以根据需要, 增添或替换其他部 件。 计算设备 900可以是任何类型的静止或移动计算设备, 包括移动计算机或移动计算设备 (例如, 平板计算机、 个人数字助理、 膝上型计算机、 笔记本计算机、 上网本等)、 移动电话 (例如, 智能手机)、 可佩戴的计算设备 (例如, 智能手表、 智能眼镜等) 或其他类型的移动 设备, 或者诸如台式计算机或个人计算机 (PC, Persona l Computer ) 的静止计算设备。 计算 设备 900还可以是移动式或静止式的服务器。 其 中, 处理器 920用于执行如下计算机程序 /指令, 该计算机程序 /指令被处理器执行时 实现上述故障预测方法的步骤。 本说明书中的各个实施例均采用递进的方式描述, 各个实施例之间相同相似的部分互相 参见即可, 每个实施例重点说明的都是与其他实施例的不同之处。 尤其, 对于计算设备实施 例而言, 由于其基本相似于故障预测方法实施例, 所以描述的比较简单, 相关之处参见故障 预测方法实施例的部分说明即可。 本说明书一实施例还提供一种计算机可读存储介质, 其存储有计算机程序 /指令, 该计算 机程序 /指令被处理器执行时上述故障预测方法、 或故障预测模型训练方法的步骤。 本说明书中的各个实施例均采用递进的方式描述, 各个实施例之间相同相似的部分互相 参见即可, 每个实施例重点说明的都是与其他实施例的不同之处。 尤其, 对于计算机可读存 储介质实施例而言, 由于其基本相似于故障预测方法实施例, 所以描述的比较简单, 相关之 处参见故障预测方法实施例的部分说明即可。 本说明书一实施例还提供一种计算机程序产品, 包括计算机程序 /指令, 该计算机程序 / 指令被处理器执行时实现上述故障预测方法、 或故障预测模型训练方法的步骤。 上 述为本实施例的一种计算机程序产品的示意性方案。 需要说明的是, 该计算机程序产 品的技术方案与上述的故障预测方法的技术方案属于同一构思, 计算机程序产品的技术方案 未详细描述的细节内容, 均可以参见上述故障预测方法的技术方案的描述。 上 述对本说明书特定实施例进行了描述。 其它实施例在所附权利要求书的范围内。 在一 些情况下, 在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍 然可以实现期望的结果。 另外, 在附图中描绘的过程不一定要求示出的特定顺序或者连续顺 序才能实现期望的结果。 在某些实施方式中, 多任务处理和并行处理也是可以的或者可能是 有利的。 所 述计算机指令包括计算机程序代码, 所述计算机程序代码可以为源代码形式、 对象代 码形式、 可执行文件或某些中间形式等。 所述计算机可读介质可以包括: 能够携带所述计算 机程序代码的任何实体或装置、 记录介质、 U 盘、 移动硬盘、 磁碟、 光盘、 计算机存储器、 只读存储器 (ROM, Read-On I y Memory)、 随机存取存储器 (RAM, Random Access Memory)、 电载波信号、 电信信号以及软件分发介质等。 需要说明的是, 所述计算机可读介质包含的内 容可以根据专利实践的要求进行适当的增减, 例如在某些地区, 根据专利实践, 计算机可读 介质不包括电载波信号和电信信号。 需要说明的是, 对于前述的各方法实施例, 为了简便描述, 故将其都表述为一系列的动 作组合, 但是本领域技术人员应该知悉, 本公开并不受所描述的动作顺序的限制, 因为依据 本公开, 某些步骤可以采用其它顺序或者同时进行。 其次, 本领域技术人员也应该知悉, 说 明书中所描述的实施例均属于优选实施例, 所涉及的动作和模块并不一定都是本公开所必须 的。 在 上述实施例中, 对各个实施例的描述都各有侧重, 某个实施例中没有详述的部分, 可 以参见其它实施例的相关描述。 以上公开的本说明书优选实施例只是用于帮助阐述本说明书。 可选实施例并没有详尽叙 述所有的细节, 也不限制该发明仅为所述的具体实施方式。 显然, 根据本公开的内容, 可作 很多的修改和变化。 本说明书选取并具体描述这些实施例, 是为了更好地解释本公开的原理 和实际应用, 从而使所属技术领域技术人员能很好地理解和利用本说明书。 本说明书仅受权 利要求书及其全部范围和等效物的限制。

Claims

25 权 利 要 求 书
1.一种故障预测方法, 应用于云计算系统, 所述云计算系统包括服务处理单元, 所述方 法包括: 获取所述服 务处理单元的异常日志数据以及所述异常日志数据的日志获取时间; 根据所述 异常日志数据以及所述日志获取时间,确定异常事件序列以及异常时间戳序列; 根据 时间间隔阈值以及所述异常事件序列中的异常事件对应的异常发生时间, 对所述异 常事件进行分组, 获得异常分组序列; 根据所述 异常事件序列、 所述异常时间戳序列以及所述异常分组序列, 利用故障预测模 型, 获得所述服务处理单元的故障预测结果。
2.根据权利要求 1 所述的故障预测方法, 其中, 所述故障预测模型通过如下步骤训练获 得: 获取所述服 务处理单元的样本异常日志数据、 所述样本异常日志数据的样本日志获取时 间; 根据所述样 本异常日志数据、 以及所述样本异常日志数据的样本日志获取时间, 确定样 本异常事件序列以及样本异常时间戳序列; 根据所述 时间间隔阈值以及所述样本异常事件序列中的样本异常事件对应的样本异常发 生时间, 对所述样本异常事件进行分组, 获得样本异常分组序列; 根据所述样 本异常事件序列、 所述样本异常时间戳序列以及所述样本异常分组序列, 确 定正样本以及负样本; 根据所述正样 本、 所述正样本对应的样本标签、 所述负样本、 所述负样本对应的样本标 签, 训练获得故障预测模型。
3.根据权利要求 2所述的故障预测方法, 其中, 所述根据所述样本异常日志数据、 以及 所述样本异常日志数据的样本 日志获取时间, 确定样本异常事件序列以及样本异常时间戳序 列, 包括: 根据所述样本 异常日志数据, 确定正样本异常事件序列以及负样本异常事件序列; 根据所述正样 本异常事件序列、 所述负样本异常事件序列以及所述样本异常日志数据的 样本日志获取时间, 确定正样本异常时间戳序列以及负样本异常时间戳序列。
4.根据权利要求 3所述的故障预测方法, 其中, 所述根据所述时间间隔阈值以及所述样 本异常事件序列中的样本异常事件对应的样本异常发生时间,对所述样本异常事件进行分组, 获得样本异常分组序列, 包括: 根据所述 时间间隔阈值以及所述正样本异常事件序列中正样本异常事件对应的正样本异 常发生时间, 对所述正样本异常事件进行分组, 获得正样本异常分组序列; 根据所述 时间间隔阈值以及所述负样本异常事件序列中负样本异常事件对应的负样本异 常发生时间, 对所述负样本异常事件进行分组, 获得负样本异常分组序列。
5.根据权利要求 4所述的故障预测方法, 其中, 所述根据所述样本异常事件序列、 所述 样本异常时间戳序列以及所述样本异常分组序列, 确定正样本以及负样本, 包括: 将所述正样 本异常事件序列、 所述正样本异常时间戳序列、 所述正样本异常分组序列作 为正样本, 将所述负样本异常事件序列、 所述负样本异常时间戳序列、 所述负样本异常分组 序列作为负样本。
6.根据权利要求 3所述的故障预测方法, 其中, 所述根据所述样本异常日志数据, 确定 正样本异常事件序列以及负样本异常事件序列, 包括: 根据所述样 本异常日志数据中的样本异常信息, 确定样本异常事件序列, 并根据所述样 本异常事件序列确定所述正样本异常事件序列、 以及所述负样本异常事件序列。
7.根据权利要求 6所述的故障预测方法, 其中, 所述根据所述样本异常日志数据中的样 本异常信息, 确定样本异常事件序列, 包括: 对所述样本 异常信息进行处理, 确定所述样本异常信息对应的样本异常事件; 根据 异常事件库中的参考异常事件与参考事件标识之间的匹配关系, 确定所述样本异常 事件对应的样本事件标识; 根据所述样 本异常事件对应的样本异常发生时间, 对所述样本事件标识进行排序, 生成 所述样本异常事件序列。
8.根据权利要求 6所述的故障预测方法, 其中, 所述根据所述样本异常事件序列确定所 述正样本异常事件序列、 以及所述负样本异常事件序列, 包括: 根据预设采样 时间以及预设采样长度, 从所述样本异常事件序列确定所述正样本异常事 件序列; 根据预设 负样本采样规则, 从所述样本异常事件序列确定所述负样本异常事件序列, 其 中, 所述预设负样本采样规则为按照预设比例随机进行采样的规则。
9.根据权利要求 1 所述的故障预测方法, 其中, 所述根据所述异常日志数据以及所述日 志获取时间, 确定异常事件序列以及异常时间戳序列, 包括: 根据所述 异常日志数据中的异常信息, 确定所述异常事件序列; 根据所述 异常信息的异常发生时间, 确定所述异常事件序列中的异常事件对应的异常发 生时间; 根据所述 异常发生时间以及所述日志获取时间, 确定所述异常时间戳序列。
10.根据权利要求 9所述的故障预测方法, 其中, 所述根据所述异常日志数据中的异常信 息, 确定所述异常事件序列, 包括: 对所述 异常信息进行处理, 确定所述异常信息对应的异常事件; 根据 异常事件库中的参考异常事件与参考事件标识之间的匹配关系, 确定所述异常事件 对应的事件标识; 根据所述 异常事件对应的异常发生时间, 对所述事件标识进行排序, 生成所述异常事件 序列。
11.根据权利要求 9所述的故障预测方法, 其中, 所述根据所述异常发生时间以及所述日 志获取时间, 确定所述异常时间戳序列, 包括: 计算所述 异常发生时间以及所述日志获取时间的时间差; 根据所述 时间差以及预设时间编码规则, 对所述异常发生时间进行分组, 并确定所述分 组的分组编号, 其中, 所述预设时间编码规则用于根据所述时间差确定所述异常发生时间对 应的分组; 根据所述分组编号对所述 异常发生时间进行编码, 获得所述异常时间戳序列。
12.根据权利要求 10所述的故障预测方法, 其中, 所述根据所述异常事件对应的异常发 生时间, 对所述异常事件对应的事件标识进行排序, 生成异常事件序列, 包括: 根据所述 异常事件对应的异常发生时间, 利用预设排序规则对所述异常事件对应的事件 标识进行排序, 并根据排序后的事件标识, 生成异常事件序列。
13.根据权利要求 1所述的故障预测方法, 其中, 所述根据时间间隔阈值以及所述异常事 件序列中的异常事件对应的异常发生时间, 对所述异常事件进行分组, 获得异常分组序列, 包括: 根据所述 时间间隔阈值以及所述异常事件序列中的异常事件对应的异常发生时间, 对所 述异常事件进行分组, 获得多个异常事件分组; 根据各个 异常事件分组中目标异常事件在所述异常事件序列中的位置, 对所述异常事件 进行编码, 获得异常分组序列。
14.根据权利要求 1所述的故障预测方法, 其中, 所述根据所述异常事件序列、 所述异常 时间戳序列以及所述异常分组序列, 利用故障预测模型, 获得所述服务处理单元的故障预测 结果, 包括: 根据所述 异常事件序列、 所述异常时间戳序列以及所述异常分组序列, 利用所述故障预 测模型的自注意力层, 获得事件相关性矩阵以及时间相关性矩阵; 根据所述 事件相关性矩阵以及所述时间相关性矩阵, 获得所述服务处理单元的故障预测 结果。 28
15.根据权利要求 14所述的故障预测方法, 其中, 所述根据所述异常事件序列、 所述异 常时间戳序列以及所述异常分组序列, 利用所述故障预测模型的自注意力层, 获得事件相关 性矩阵以及时间相关性矩阵, 包括: 将所述 异常事件序列输入所述故障预测模型的第一自注意力层, 获得所述事件相关性矩 阵; 将所述 异常时间戳序列以及所述异常分组序列, 输入所述故障预测模型的第二自注意力 层, 获得所述时间相关性矩阵。
16.根据权利要求 14所述的故障预测方法, 其中, 所述根据所述事件相关性矩阵以及所 述时间相关性矩阵, 获得所述服务处理单元的故障预测结果, 包括: 根据所述 事件相关性矩阵以及所述时间相关性矩阵, 利用所述故障预测模型的注意力融 合层, 获得注意力矩阵; 根据所述注 意力矩阵, 确定目标特征向量; 将所述 目标特征向量输入所述故障预测模型的分类层, 获得所述服务处理单元的故障预 测结果。
17.一种故障预测模型训练方法,应用于云计算系统,所述云计算系统包括服务处理单元, 所述方法包括: 获取所述服 务处理单元的样本异常日志数据、 所述样本异常日志数据的样本日志获取时 间; 根据所述样 本异常日志数据、 以及所述样本异常日志数据的样本日志获取时间, 确定样 本异常事件序列以及样本异常时间戳序列; 根据所述 时间间隔阈值以及所述样本异常事件序列中的样本异常事件对应的样本异常发 生时间, 对所述样本异常事件进行分组, 获得样本异常分组序列; 根据所述样 本异常事件序列、 所述样本异常时间戳序列以及所述样本异常分组序列, 确 定正样本以及负样本; 根据所述正样 本、 所述正样本对应的样本标签、 所述负样本、 所述负样本对应的样本标 签, 训练获得故障预测模型。
18.根据权利要求 17所述的故障预测模型训练方法, 其中, 所述根据所述样本异常日志 数据、 以及所述样本异常日志数据的样本日志获取时间, 确定样本异常事件序列以及样本异 常时间戳序列, 包括: 根据所述样本 异常日志数据, 确定正样本异常事件序列以及负样本异常事件序列; 根据所述正样 本异常事件序列、 所述负样本异常事件序列以及所述样本异常日志数据的 29 样本日志获取时间, 确定正样本异常时间戳序列以及负样本异常时间戳序列。
19.根据权利要求 18所述的故障预测模型训练方法, 其中, 所述根据所述时间间隔阈值 以及所述样本异常事件序列中的样本异常事件对应的样本异常发生时间, 对所述样本异常事 件进行分组, 获得样本异常分组序列, 包括: 根据所述 时间间隔阈值以及所述正样本异常事件序列中正样本异常事件对应的正样本异 常发生时间, 对所述正样本异常事件进行分组, 获得正样本异常分组序列; 根据所述 时间间隔阈值以及所述负样本异常事件序列中负样本异常事件对应的负样本异 常发生时间, 对所述负样本异常事件进行分组, 获得负样本异常分组序列。
20.根据权利要求 19所述的故障预测模型训练方法, 其中, 所述根据所述样本异常事件 序列、所述样本异常时间戳序列以及所述样本异常分组序列,确定正样本以及负样本,包括: 将所述正样 本异常事件序列、 所述正样本异常时间戳序列、 所述正样本异常分组序列作 为正样本, 将所述负样本异常事件序列、 所述负样本异常时间戳序列、 所述负样本异常分组 序列作为负样本。
21 .根据权利要求 18所述的故障预测模型训练方法, 其中, 所述根据所述样本异常日志 数据, 确定正样本异常事件序列以及负样本异常事件序列, 包括: 根据所述样 本异常日志数据中的样本异常信息, 确定样本异常事件序列, 并根据所述样 本异常事件序列确定所述正样本异常事件序列、 以及所述负样本异常事件序列。
22.根据权利要求 21 所述的故障预测模型训练方法, 其中, 所述根据所述样本异常日志 数据中的样本异常信息, 确定样本异常事件序列, 包括: 对所述样本 异常信息进行处理, 确定所述样本异常信息对应的样本异常事件; 根据 异常事件库中的参考异常事件与参考事件标识之间的匹配关系, 确定所述样本异常 事件对应的样本事件标识; 根据所述样 本异常事件对应的样本异常发生时间, 对所述样本事件标识进行排序, 生成 所述样本异常事件序列。
23.根据权利要求 21 所述的故障预测模型训练方法, 其中, 所述根据所述样本异常事件 序列确定所述正样本异常事件序列、 以及所述负样本异常事件序列, 包括: 根据预设采样 时间以及预设采样长度, 从所述样本异常事件序列确定所述正样本异常事 件序列; 根据预设 负样本采样规则, 从所述样本异常事件序列确定所述负样本异常事件序列, 其 中, 所述预设负样本采样规则为按照预设比例随机进行采样的规则。
24. —种故障预测装置, 应用于云计算系统, 所述云计算系统包括服务处理单元, 所述装 30 置包括: 数据获取模块 , 被配置为获取所述服务处理单元的异常日志数据以及所述异常日志数据 的日志获取时间; 序列确定模块 , 被配置为根据所述异常日志数据以及所述日志获取时间, 确定异常事件 序列以及异常时间戳序列; 序列获得模块 , 被配置为根据时间间隔阈值以及所述异常事件序列中的异常事件对应的 异常发生时间, 对所述异常事件进行分组, 获得异常分组序列; 结果获得模块 , 被配置为根据所述异常事件序列、 所述异常时间戳序列以及所述异常分 组序列, 利用故障预测模型, 获得所述服务处理单元的故障预测结果。
25.一种故障预测模型训练装置,应用于云计算系统,所述云计算系统包括服务处理单元, 所述装置包括: 数据获取模块 , 被配置为获取所述服务处理单元的样本异常日志数据、 所述样本异常日 志数据的样本日志获取时间; 序列确定模块 , 被配置为根据所述样本异常日志数据、 以及所述样本异常日志数据的样 本日志获取时间, 确定样本异常事件序列以及样本异常时间戳序列; 序列获得模块 , 被配置为根据所述时间间隔阈值以及所述样本异常事件序列中的样本异 常事件对应的样本异常发生时间, 对所述样本异常事件进行分组, 获得样本异常分组序列; 样本确定模块 , 被配置为根据所述样本异常事件序列、 所述样本异常时间戳序列以及所 述样本异常分组序列, 确定正样本以及负样本; 训练模块 , 被配置为根据所述正样本、 所述正样本对应的样本标签、 所述负样本、 所述 负样本对应的样本标签, 训练获得故障预测模型。
26. —种计算设备, 包括: 存储器和处理器 ; 所述存储器 用于存储计算机程序 /指令, 所述处理器用于执行所述计算机程序 /指令, 该 计算机程序 /指令被处理器执行时实现权利要求 1 至 16任意一项所述故障预测方法、 或实现 权利要求 17至 23任意一项所述故障预测模型训练方法的步骤。
27. -种计算机可读存储介质, 其存储有计算机程序 /指令, 该计算机程序 /指令被处理器 执行时实现权利要求 1至 16任意一项所述故障预测方法、或实现权利要求 17至 23任意一项 所述故障预测模型训练方法的步骤。
28. -种计算机程序产品, 包括计算机程序 /指令, 该计算机程序 /指令被处理器执行时实 现权利要求 1至 16任意一项所述故障预测方法、或实现权利要求 17至 23任意一项所述故障 31 预测模型训练方法的步骤。
PCT/IB2025/051389 2024-02-29 2025-02-11 故障预测方法及装置、故障预测模型训练方法及装置、计算设备、计算机存储介质、计算机程序产品 Pending WO2025181599A1 (zh)

Applications Claiming Priority (2)

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

Publications (1)

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

Family

ID=96830567

Family Applications (1)

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

Country Status (2)

Country Link
CN (1) CN120561668A (zh)
WO (1) WO2025181599A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115129965A (zh) * 2021-03-24 2022-09-30 上海财经大学 基于时间的定向注意力推荐系统及方法
CN115617614A (zh) * 2022-10-28 2023-01-17 大连海事大学 基于时间间隔感知自注意力机制的日志序列异常检测方法
CN115617554A (zh) * 2022-10-09 2023-01-17 阿里云计算有限公司 基于时间感知的系统故障预测方法、装置、设备及介质
CN116487030A (zh) * 2023-04-14 2023-07-25 武汉大学 一种基于注意力机制的多模态异步时序预测方法及装置
CN117390269A (zh) * 2023-10-09 2024-01-12 安徽师范大学 具有时间间隔感知增强的轻量级序列化推荐方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115129965A (zh) * 2021-03-24 2022-09-30 上海财经大学 基于时间的定向注意力推荐系统及方法
CN115617554A (zh) * 2022-10-09 2023-01-17 阿里云计算有限公司 基于时间感知的系统故障预测方法、装置、设备及介质
CN115617614A (zh) * 2022-10-28 2023-01-17 大连海事大学 基于时间间隔感知自注意力机制的日志序列异常检测方法
CN116487030A (zh) * 2023-04-14 2023-07-25 武汉大学 一种基于注意力机制的多模态异步时序预测方法及装置
CN117390269A (zh) * 2023-10-09 2024-01-12 安徽师范大学 具有时间间隔感知增强的轻量级序列化推荐方法

Also Published As

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

Similar Documents

Publication Publication Date Title
CN111401063B (zh) 一种基于多池化网络的文本处理方法、装置和相关设备
CN118859868B (zh) 面向多参量耦合的工业设备运行状态评估系统
CN114138968B (zh) 一种网络热点的挖掘方法、装置、设备及存储介质
CN118733704B (zh) 舆情数据分析方法、装置、电子设备及可读存储介质
CN118567701B (zh) 一种智能化运维管理系统及方法
US12284089B2 (en) Alert correlating using sequence model with topology reinforcement systems and methods
CN112445893B (zh) 一种信息搜索方法、装置、设备及存储介质
WO2026021318A1 (zh) 基于结构化数据的问答方法、基于体育表格的问答方法
CN116484105A (zh) 业务处理方法、装置及计算机设备、存储介质、程序产品
CN118940164B (zh) 一种基于大数据的公共安全突发事件检测方法
CN119783813A (zh) 问答模型训练方法、装置、设备及存储介质
Long et al. Automated crisis content categorization for covid-19 tweet streams
CN119066272A (zh) 一种基于深度学习的网络舆情预测方法及系统
CN117435379A (zh) 业务故障确定方法、业务故障确定模型的训练方法及装置
CN116703075A (zh) 电力调度决策方法、装置、电子设备及存储介质
CN114205459B (zh) 基于网络切片的异常话单检测方法及装置
CN116225848A (zh) 日志监测方法、装置、设备和介质
CN120561668A (zh) 故障预测方法及装置、故障预测模型训练方法及装置、计算设备、计算机存储介质、计算机程序产品
WO2025181564A1 (zh) 故障预测方法、故障预测模型训练方法、计算设备、存储介质及计算机程序产品
US12619830B2 (en) Optimizing performance of conversational interface applications using example forgetting
CN120353453B (zh) 一种基于规则引擎的服务编排系统及优化方法
CN119883940B (zh) 基于大语言模型的软件配置项测试用例数据处理分析方法
WO2025163402A2 (zh) 日志数据处理方法、电子设备及计算机可读存储介质
US20240394564A1 (en) Exploratory offline generative online machine learning
CN120106687A (zh) 资源调度方法、弹性计算系统、计算设备、介质及产品

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: 25761764

Country of ref document: EP

Kind code of ref document: A1