Fault prediction method and device, equipment, storage medium and program product
By generating an initial sequence and determining a target subsequence for fault prediction, the low accuracy problem caused by inaccurate statistical information of equipment abnormal events in the prior art is solved, and higher-precision fault prediction is achieved.
Patent Information
- Application Number
- CN202410346716.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-25
- Publication Date
- 2025-09-26
AI Technical Summary
In the existing technology, the statistical information of equipment abnormal events cannot be accurately expressed, resulting in low accuracy of fault prediction.
An initial sequence is generated by acquiring multiple abnormal events of the target device, and multiple target subsequences are determined in the initial sequence. The target subsequences are processed using the target model to determine the fault prediction result.
The accuracy of fault prediction is improved by more accurately expressing abnormal event information and precisely processing target subsequences.
Smart Images

Figure CN120704280A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a fault prediction method, apparatus, device, storage medium, and program product. Background Art
[0002] During device operation, abnormal events may occur, which may cause the device to malfunction. Therefore, based on the abnormal events of the device within a preset historical period, it is possible to predict whether the device is likely to malfunction in the future.
[0003] In related technologies, electronic devices can obtain multiple abnormal events from a target device within multiple preset historical time periods and determine statistical information for each abnormal event within the multiple preset historical time periods (i.e., the total number of times each abnormal event occurred within the multiple preset time periods, as well as the maximum and minimum number of times). Based on the statistical information for each abnormal event, the device can then predict whether a failure will occur. However, in this approach, the statistical information for each abnormal event cannot accurately represent each abnormal event, resulting in low accuracy in fault prediction for the target device. Summary of the Invention
[0004] Various aspects of the present application provide a fault prediction method, apparatus, device, storage medium, and program product to address the problem of low accuracy in fault prediction of a target device.
[0005] In a first aspect, an embodiment of the present application provides a fault prediction method, comprising:
[0006] Acquire an initial sequence corresponding to a plurality of abnormal events of a target device, wherein the initial sequence includes event information of each abnormal event;
[0007] Determining a plurality of target subsequences in the initial sequence, wherein the amount of event information included in the target subsequences is less than or equal to a first threshold;
[0008] A fault prediction result of the target device is determined according to the multiple target subsequences.
[0009] In a second aspect, an embodiment of the present application provides a fault prediction method, comprising:
[0010] Obtaining an initial sequence corresponding to multiple abnormal events of a target device, wherein the initial sequence includes event information of each abnormal event, and the target device is a cloud server;
[0011] Determining a plurality of target subsequences in the initial sequence, wherein the amount of event information included in the target subsequences is less than or equal to a first threshold;
[0012] A fault prediction result of the target device is determined according to the multiple target subsequences.
[0013] In a third aspect, an embodiment of the present application provides a fault prediction device, comprising: an acquisition module, a first determination module, and a second determination module, wherein:
[0014] The acquisition module is used to acquire an initial sequence corresponding to multiple abnormal events of the target device, wherein the initial sequence includes event information of each abnormal event;
[0015] The first determining module is configured to determine a plurality of target subsequences in the initial sequence, wherein the number of event information included in the target subsequences is less than or equal to a first threshold;
[0016] The second determination module is configured to determine a fault prediction result of the target device according to the multiple target subsequences.
[0017] In a fourth aspect, an embodiment of the present application provides a fault prediction device, comprising: an acquisition module, a first determination module, and a second determination module, wherein:
[0018] The acquisition module is used to acquire an initial sequence corresponding to multiple abnormal events of a target device, wherein the initial sequence includes event information of each abnormal event, and the target device is a cloud server;
[0019] The first determining module is configured to determine a plurality of target subsequences in the initial sequence, wherein the number of event information included in the target subsequences is less than or equal to a first threshold;
[0020] The second determination module is configured to determine a fault prediction result of the target device according to the multiple target subsequences.
[0021] In a fifth aspect, an embodiment of the present application provides an electronic device, including: a memory and a processor;
[0022] The memory stores computer-executable instructions;
[0023] The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of the first aspect or the second aspect.
[0024] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method described in either the first aspect or the second aspect.
[0025] In a seventh aspect, an embodiment of the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method shown in either the first aspect or the second aspect.
[0026] Embodiments of the present application provide a fault prediction method, apparatus, device, storage medium, and program product. A computing device can obtain an initial sequence corresponding to multiple abnormal events of a target device, determine multiple target subsequences within the initial sequence, and then determine a fault prediction result for the target device based on the multiple target subsequences. Because the initial sequence includes event information for each abnormal event, compared to the statistical information of each abnormal event in the prior art, the initial sequence can more accurately represent each abnormal event. Furthermore, multiple target subsequences can be determined within the initial sequence. When fault prediction is performed based on the multiple target subsequences, each target subsequence can be more accurately processed, thereby comprehensively improving the accuracy of fault prediction for the target device. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0028] Figure 1 A schematic diagram of a scenario provided for an exemplary embodiment of the present application;
[0029] Figure 2 A flowchart of a fault prediction method provided by an exemplary embodiment of the present application;
[0030] Figure 3 A schematic diagram of the structure of a target model provided for an exemplary embodiment of the present application;
[0031] Figure 4 A flowchart of another fault prediction method provided by an exemplary embodiment of the present application;
[0032] Figure 5 A schematic diagram of determining a target subsequence in an initial sequence provided by an exemplary embodiment of the present application;
[0033] Figure 6 A schematic diagram of the structure of a fault prediction device provided in an embodiment of the present application;
[0034] Figure 7 A schematic structural diagram of a computing device is provided for an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0035] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0036] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this application and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0037] Figure 1 A schematic diagram of a scenario provided for an exemplary embodiment of this application. Figure 1 , including target devices and computing devices.
[0038] The target device may have multiple abnormal events, for example, the target device may have abnormal event 1, abnormal event 2, ..., abnormal event z (z is an integer greater than or equal to 1).
[0039] The computing device may obtain multiple abnormal events in the target device, and perform fault prediction on the target device based on the multiple abnormal events to determine a fault prediction result of the target device.
[0040] In related technologies, a computing device can obtain multiple abnormal events from a target device within multiple preset historical time periods and determine statistical information for each abnormal event within the multiple preset historical time periods (i.e., the total number of times each abnormal event occurred within the multiple preset time periods, as well as the maximum and minimum number of times). Based on the statistical information for each abnormal event, a prediction can be made as to whether the target device will malfunction. However, in this approach, the statistical information for each abnormal event cannot accurately represent each abnormal event, resulting in low accuracy in predicting the failure of the target device.
[0041] In an embodiment of the present application, a computing device can obtain multiple abnormal events of a target device and determine an initial sequence based on the multiple abnormal events. The initial sequence can include event information of each abnormal event. The computing device can determine multiple target subsequences in the initial sequence and process the multiple target subsequences to determine a fault prediction result for the target device. Since the initial sequence includes event information of each abnormal event, the initial sequence can more accurately express each abnormal event compared to the statistical information of each abnormal event in the prior art; and the computing device can determine multiple target subsequences in the initial sequence. When performing fault prediction based on the multiple target subsequences, each target subsequence can be processed more accurately, thereby comprehensively improving the accuracy of fault prediction for the target device.
[0042] The technical solutions shown in this application are described in detail below through specific embodiments. It should be noted that the following embodiments can exist independently or in combination with each other, and the same or similar contents will not be repeated in different embodiments.
[0043] Figure 2 This is a flowchart of a fault prediction method provided by an exemplary embodiment of the present application. Figure 2 , the method may include:
[0044] S201: Obtain an initial sequence corresponding to multiple abnormal events of a target device.
[0045] The execution subject of the embodiments of the present application may be a computing device, or a fault prediction device provided within the computing device. The fault prediction device may be implemented via software or a combination of software and hardware. The fault prediction device may be a processor within the computing device. For ease of understanding, the following description uses the computing device as an example.
[0046] The target device may be a device for which fault prediction is required, for example, a local server, a cloud server in a cloud computing system, etc.
[0047] During the operation of the target device, multiple exception events can be generated. For each exception event, the exception event can be represented by a phrase. For example, if exception event 1 is a hardware error event, exception event 1 can be represented by "dmesg_unrecover_mce".
[0048] For example, if the target device is cloud server 1, multiple abnormal events may occur in cloud server 1. Suppose that 8000 abnormal events occur in cloud server 1, namely abnormal event 1, abnormal event 2, ..., abnormal event 8000.
[0049] For any abnormal event, the computing device may determine the event information of the abnormal event in the abnormal event library. Optionally, the event information of the abnormal event may be a preset number corresponding to the abnormal event.
[0050] Optionally, the computing device may be pre-installed with an abnormal event library. The abnormal event library may include multiple preset abnormal events and a preset number corresponding to each preset abnormal event. The multiple preset abnormal events are all different.
[0051] For example, the abnormal event library can be shown in Table 1:
[0052] Table 1
[0053] Preset abnormal events Preset number Preset abnormal event 1 001 Preset abnormal event 2 002 Preset abnormal event 3 003 …… …… Preset abnormal event 95 095 …… ……
[0054] For any abnormal event, the computing device can search the abnormal event library based on the abnormal event. If the abnormal event is the same as the target preset abnormal event, the preset number corresponding to the target preset abnormal event can be determined as the preset number corresponding to the abnormal event, i.e., the event information. The target preset abnormal event can be any one of multiple preset abnormal events.
[0055] For example, if 8000 abnormal events occur on cloud server 1, namely abnormal event 1, abnormal event 2, ..., abnormal event 8000, and if the abnormal event library is as shown in Table 1, then for abnormal event 1, the computing device can query the abnormal event library. If abnormal event 1 is the same as the preset abnormal event 1, and the preset number corresponding to the preset abnormal event 1 is 001, then the event information of abnormal event 1 can be determined to be 001; assuming that the computing device can determine the event information of the 8000 abnormal events as shown in Table 2:
[0056] Table 2
[0057] Abnormal events Event Information Abnormal Event 1 001 Abnormal Event 2 003 …… …… Abnormal Event 4001 032 …… …… Abnormal Event 6001 125 …… …… Abnormal Event 7961 049 …… …… Abnormal Event 7971 011 …… …… Abnormal Event 7981 006 …… …… Abnormal Event 7991 031 …… …… Abnormal Event 8000 095
[0058] After the computing device determines the event information of the multiple abnormal events respectively, it can generate initial sequences corresponding to the multiple abnormal events based on the event information of the multiple abnormal events. The initial sequence can include the event information of each abnormal event.
[0059] The number of event information included in the initial sequence may be greater than a first threshold. The first threshold may be manually preset. For example, the first threshold may be 512.
[0060] Optionally, the sequence length of the initial sequence can be represented by the number of event information included in the initial sequence. The initial sequence can be an ultra-long sequence. For example, if the initial sequence includes 8000 event information, the sequence length of the initial sequence can be 8000.
[0061] For example, if 8000 abnormal events occur in cloud server 1, and the event information of the 8000 abnormal events is as shown in Table 2 above, then the initial sequence 1 can be generated as [095,…,031,…,006,…,011,…,049,…,125,…,032,…,003,001] based on the event information of the 8000 abnormal events. The initial sequence 1 includes the 8000 event information, and the sequence length of the initial sequence 1 can be 8000.
[0062] S202: Determine multiple target subsequences in the initial sequence.
[0063] The amount of event information included in the target subsequence may be less than or equal to the first threshold. The amount of event information included in multiple target subsequences may be the same, that is, the sequence lengths of the multiple target subsequences may be the same.
[0064] The computing device may perform sampling processing on the initial sequence to obtain multiple target subsequences.
[0065] For example, if the computing device can sample the initial sequence 1 with a sequence length of 8000, three target subsequences are obtained, namely target subsequence 1, target subsequence 2, and target subsequence 3. The sequence length of the three target subsequences can all be 200.
[0066] S203: Determine a fault prediction result of the target device according to the multiple target subsequences.
[0067] In an optional embodiment, a fault prediction result of a target device can be determined based on multiple target subsequences in the following manner: determining the sequence characteristics corresponding to each target subsequence and the weight value of each target subsequence; determining the failure probability of the target device failing in a future time period based on the sequence characteristics of each target subsequence and the weight value of each target subsequence; and determining the fault prediction result based on the failure probability.
[0068] The sequence characteristics of the target subsequence can be represented by a matrix. The weight value can be between 0 and 1.
[0069] The future time period can be manually preset or can be a model parameter determined when training the target model. For example, the future time period can be 48 hours after the current moment when the fault prediction result is obtained.
[0070] The computing device may be provided with a target model, which may be used to process multiple target subsequences to determine a fault prediction result for the target device.
[0071] Next, combine Figure 3 , explain the target model.
[0072] Figure 3 This is a schematic diagram of the target model provided by the exemplary embodiment of this application. Figure 3 The target model may include multiple embedding layers, multiple encoding layers, and feature fusion layers. Optionally, the target model may also include a classification layer.
[0073] For example, the target model may include three embedding layers, namely embedding layer 1, embedding layer 2, and embedding layer 3; and may include three encoding layers, namely encoding layer 1, encoding layer 2, and encoding layer 3.
[0074] For any embedding layer, a D*M mapping matrix E can be preset in the embedding layer, where M represents the number of preset abnormal events in the abnormal event library; and D represents the number of event dimensions.
[0075] The mapping matrix E may include multiple eigenvalues of M preset abnormal events in D event dimensions. For example, the mapping matrix E may be as follows:
[0076]
[0077] Among them, a DM Represents the characteristic value of the Mth preset abnormal event in the Dth event dimension.
[0078] The computing device can determine a target input subsequence based on the target subsequence. The computing device can input the target input subsequence into an embedding layer. The embedding layer can perform mapping and transformation processing on the target input subsequence to obtain intermediate features corresponding to the target input subsequence, i.e., intermediate features corresponding to the target subsequence.
[0079] After obtaining the intermediate features corresponding to the target subsequence, the intermediate features can be input into the corresponding encoding layer. The encoding layer can perform feature extraction on the intermediate features to obtain the sequence features corresponding to each target subsequence.
[0080] The feature fusion layer can include a fully connected layer and a fusion layer. The fully connected layer can be used to calculate the weight value of each target subsequence based on the sequence features corresponding to each target subsequence; the fusion layer can be used to perform weighted fusion based on the weight value of each target subsequence and the sequence features corresponding to each target subsequence to obtain the fault probability.
[0081] The classification layer can be used to classify according to the probability of failure and obtain the fault prediction results. The fault prediction results can include predicted normal and predicted failure.
[0082] It should be noted that the target model can be generated based on the transformer model.
[0083] For example, if there are three target subsequences, namely target subsequence 1, target subsequence 2, and target subsequence 3, the computing device can determine the target input subsequences corresponding to the three target subsequences, process the three target sub-input sequences through the target model, and obtain the sequence features and weight values corresponding to the three target subsequences, as shown in Table 3:
[0084] Table 3
[0085] Target subsequence Target input subsequence Sequence characteristics Weight value Target subsequence 1 Target input subsequence 1 Sequence feature 1 0.2 Target subsequence 2 Target input subsequence 2 Sequence feature 2 0.7 Target subsequence 3 Target input subsequence 3 Sequence feature 3 0.3
[0086] If the future period is 48 hours, the computing device can determine the probability of cloud server 1 failing within the next 48 hours based on the sequence features and weight values corresponding to the three target subsequences in Table 3. Assume that it can be determined that the probability of cloud server 1 failing within the next 48 hours is 0.8.
[0087] Optionally, determining the fault prediction result based on the fault probability may include the following two methods:
[0088] Method 1: The fault prediction result includes the fault probability.
[0089] In this manner, the computing device may determine the failure probability as a failure prediction result.
[0090] For example, if the computing device determines that the failure probability of cloud server 1 sending a failure within the next 48 hours is 0.8, then the failure prediction result of cloud server 1 can be determined to be 0.8.
[0091] Mode 2: The fault prediction result is predicted normal or predicted fault.
[0092] In this approach, the computing device can determine a preset threshold and, based on the preset threshold and the probability of failure, determine a fault prediction result. If the probability of failure is greater than or equal to the preset threshold, the fault prediction result can be determined to be a predicted failure; if the probability of failure is less than the preset threshold, the fault prediction result can be determined to be a predicted normal condition.
[0093] For example, if the computing device determines that the failure probability of cloud server 1 sending a failure within the next 48 hours is 0.8, and if the preset threshold is 0.6, then since the failure probability 0.8 is greater than the preset threshold 0.6, the fault prediction result can be determined to be a predicted failure.
[0094] In an embodiment of the present application, a computing device can obtain an initial sequence corresponding to multiple abnormal events of a target device, determine multiple target subsequences within the initial sequence, and then determine a fault prediction result for the target device based on the multiple target subsequences. Because the initial sequence includes event information for each abnormal event, compared to the statistical information of each abnormal event in the prior art, the initial sequence can more accurately represent each abnormal event. Furthermore, the computing device can determine multiple target subsequences with a sequence length less than a first threshold within an extremely long initial sequence. When performing fault prediction based on the multiple target subsequences, each target subsequence can be processed more accurately, thereby comprehensively improving the accuracy of fault prediction for the target device.
[0095] Below, in Figure 2 Based on the embodiment shown, combined Figure 4 , the above fault prediction method is explained in detail.
[0096] Figure 4 A flowchart of another fault prediction method provided by an exemplary embodiment of the present application. Figure 4 , methods may include:
[0097] S401. Acquire multiple abnormal events.
[0098] Optionally, the computing device may acquire multiple logs generated by the target device in real time, and determine multiple abnormal logs from the multiple logs, and further determine multiple abnormal events corresponding to the multiple abnormal logs based on expert knowledge and regular expressions.
[0099] Optionally, expert knowledge is stored in the computing device. The expert knowledge may include a plurality of predefined abnormal logs. For example, a log beginning with "Mce" may be predefined as an abnormal log.
[0100] For any log, the computing device can determine whether the log meets the requirements of multiple predefined abnormal log types. If the log meets any of the predefined abnormal log types, the log can be determined to be an abnormal log; if the log does not meet any of the predefined abnormal log types, the log can be determined to be a normal log.
[0101] For any exception log, the exception log may record the exception description information and the time of occurrence.
[0102] Optionally, the computing device may include multiple regular expressions. The multiple regular expressions may be preset. For any regular expression, the regular expression may correspond to a preset abnormal event. Different regular expressions may correspond to different preset abnormal events.
[0103] For example, regular expression 1 can be "Mce.*," where "Mce" represents an error, "." represents any character, and "*" represents any number of occurrences of a character.
[0104] For example, if there are 100 regular expressions, the 100 regular expressions may correspond to 100 preset abnormal events, and the 100 preset abnormal events are all different.
[0105] For any exception log, the exception event corresponding to the exception log can be determined in the following way: the computing device can determine the exception description information in the exception log, and determine the target regular expression that the exception description information conforms to among multiple regular expressions, and then the preset exception event corresponding to the target regular expression can be determined as the exception event corresponding to the exception log.
[0106] For example, for exception log 1, if the computing device determines that the exception description information in exception log 1 is "mce:[Hardware Error]:Machine check events logged", if the computing device determines that the exception description information conforms to regular expression 1, then the preset exception event 1 corresponding to regular expression 1 can be determined as exception event 1 corresponding to exception log 1, assuming that exception event 1 can be expressed as "dmesg_unrecover_mce".
[0107] For example, if a computing device can obtain 8,000 exception logs from cloud server 1, namely, exception log 1, exception log 2, ..., exception log 8000, the computing device can use the above method to determine 8,000 abnormal events corresponding to these 8,000 abnormal logs, namely, abnormal event 1, abnormal event 2, ..., abnormal event 8000. These 8,000 abnormal events may include the same abnormal event. For example, abnormal event 1 and abnormal event 5 may be the same abnormal event.
[0108] S402: Determine the event information and occurrence time of each abnormal event.
[0109] Since any exception log records the exception description information and the occurrence time, after determining the exception event corresponding to the exception log, the occurrence time recorded in the exception log can be determined as the occurrence time of the corresponding exception event.
[0110] For example, if the occurrence time recorded in the exception log 1 is 2024 / 3 / 18 / 14:00:00, and the exception log 1 corresponds to the exception event 1, then the occurrence time of the exception event 1 can be determined to be 2024 / 3 / 18 / 14:00:00.
[0111] Since the computing device may have a preset abnormal event library. The abnormal event library may include multiple preset abnormal events and a preset number corresponding to each preset abnormal event. Therefore, for any abnormal event, the computing device may query the abnormal event library based on the abnormal event to determine the preset number corresponding to the abnormal event, and then determine the preset number corresponding to the abnormal event as the event information of the abnormal event.
[0112] For example, if the computing device identifies 8,000 abnormal events, namely abnormal event 1, abnormal event 2, ..., abnormal event 8000, and if the abnormal event library is as shown in Table 1, the computing device can query the abnormal event library to determine the event information of each of the 8,000 abnormal events, i.e., the preset numbers. Assume that the event information of the 8,000 abnormal events can be determined as shown in Table 2.
[0113] S403 , sorting the event information of the multiple abnormal events in reverse order of occurrence time to obtain an initial sequence.
[0114] Since any abnormal event has a corresponding occurrence time, the computing device can sort the event information of multiple abnormal events in reverse order of the occurrence time, that is, from the latest to the earliest occurrence time, to obtain an initial sequence.
[0115] The occurrence times of the abnormal events corresponding to the event information in the initial sequence may be arranged in reverse order.
[0116] For example, if there are 8000 abnormal events, namely abnormal event 1, abnormal event 2, ..., abnormal event 8000, and the corresponding occurrence time and event information of the 8000 abnormal events are shown in Table 4:
[0117] Table 4
[0118]
[0119]
[0120] Then, the event information of multiple abnormal events can be sorted in the order of occurrence from latest to earliest, and the event information of the 8000 abnormal events can be sorted as follows: 095, …, 031, …, 006, …, 011, …, 049, …, 125, …, 032, …, 003, 001. Then, the electronic device can determine that the initial sequence 1 is [095, …, 031, …, 006, …, 011, …, 049, …, 125, …, 032, …, 003, 001].
[0121] Optionally, a start symbol [start] may be added before the initial sequence. The start symbol [start] may be used to indicate the beginning of the initial sequence.
[0122] For example, the initial sequence 1 can also be as follows:
[0123] [start,095,…,031,…,006,…,011,…,049,…,125,…,032,…,003,001].
[0124] S404: Determine multiple initial subsequences in the initial sequence.
[0125] In an optional embodiment, multiple initial subsequences can be determined in the initial sequence in the following manner: multiple segmentation lengths are determined; for any segmentation length L, the first L event information in the initial sequence is determined as the initial subsequence corresponding to the segmentation length, where L can be an integer greater than or equal to 1.
[0126] The segmentation length may be represented by the number of event information in the initial subsequence. The segmentation length may be less than or equal to the number of event information included in the initial sequence.
[0127] For example, if the segmentation length is 200, it means that the initial subsequence corresponding to the segmentation length includes 200 event information.
[0128] Optionally, multiple segmentation lengths can be represented by “L1, L2, L3, ..., L n " indicates that the segmentation length can be preset manually or automatically determined by the computing device according to the sequence length of the initial sequence.
[0129] For example, if the sequence length of the initial sequence is 8000, the segmentation length L1 may be 2000, the segmentation length L2 may be 4000, and the segmentation length L3 may be 8000.
[0130] Next, combine Figure 5 , the determination of the initial subsequence in the initial sequence is explained.
[0131] Figure 5 Schematic diagram of determining a target subsequence in an initial sequence provided by an exemplary embodiment of the present application. Figure 5 , the initial sequence 1 can be [095,…,031,…,006,…,011,…,049,…,125,…,032,…,003,001], and the initial sequence 1 includes 8000 event information. Therefore, the initial sequence 1 includes 8000 bits, that is, the 0th bit to the 7999th bit.
[0132] If the computing device can determine three segmentation lengths, namely segmentation length L1 = 2000, segmentation length L2 = 4000, and segmentation length L3 = 8000, then the computing device can determine the first 2000 event information in the initial sequence 1 according to the segmentation length L1, that is, the 2000 event information corresponding to the 0th to the 1999th bit, and determine the 2000 event information as the initial subsequence 1 corresponding to the segmentation length L1, then the initial subsequence 1 can be [095,…,031,…,006,…,011,…,049,…,125]; for the segmentation length L2, the computing device can determine the first 4000 event information in the initial sequence 1, that is, the 0th The computing device may determine the 4000 event information corresponding to the 3999th to 4999th bits, and determine the 4000 event information as the initial subsequence 2 corresponding to the segmentation length L2. The initial subsequence 2 may be [095, …, 031, …, 006, …, 011, …, 049, …, 125, …, 032]. For the segmentation length L3, since the segmentation length L3 and the sequence length of the initial sequence are both 8000, the computing device may determine the initial sequence 1 as the initial subsequence 3 corresponding to the segmentation length 3. The initial subsequence 3 may be [095, …, 031, …, 006, …, 011, …, 049, …, 125, …, 032, …, 003, 001]. The computing device may then determine three initial subsequences in the initial sequence 1, namely, initial subsequence 1, initial subsequence 2, and initial subsequence 3.
[0133] S405 , performing sampling processing on each initial subsequence to obtain multiple target subsequences.
[0134] For any initial subsequence, in an optional embodiment, a target subsequence corresponding to the initial subsequence can be obtained in the following manner: determining a sampling step length corresponding to the initial subsequence based on the segmentation length corresponding to the initial subsequence; determining an offset value corresponding to the initial subsequence; and sampling the initial subsequence according to the offset value and the sampling step length to obtain a target subsequence corresponding to the initial subsequence.
[0135] For any segmentation length, the segmentation length has a corresponding sampling step. Optionally, the sampling step can be represented by S.
[0136] For example, the segmentation length L1 may correspond to the sampling step length S1; the segmentation length L2 may correspond to the sampling step length S2; ...; the segmentation length L n Can correspond to the sampling step S n .
[0137] The ratio of the segmentation length corresponding to the initial subsequence to the sampling step size may be a preset value. If the preset value is represented by K, that is:
[0138]
[0139] For example, if the segmentation length L1 is 2000, the sampling step S1 may be 10; if the segmentation length L2 is 4000, the sampling step S2 may be 20; if the segmentation length L3 is 8000, the sampling step S3 may be 40.
[0140] The offset value can be used to determine the initial sampling position when performing sampling processing in the initial subsequence. For example, if the offset value is 2, the initial sampling position when performing sampling processing in the initial subsequence can be determined to be the second position, that is, sampling processing starts from the second position.
[0141] Optionally, a random index strategy can be used to determine the offset value corresponding to the initial subsequence. The offset value can be an integer greater than or equal to 0 and less than the sampling step size, that is, the offset value can be [0, n -1]. That is to say, when sampling the initial subsequence, the initial sampling position is not always the 0th position, but in [0, n -1].
[0142] For example, if the sampling step S2 is 20, then when sampling is performed in the initial subsequence 2 according to the sampling step S2, the offset value can be in the range of [0, 19], that is, the initial sampling position can be the 0th, 1st, 2nd, ..., or 19th bit in the initial subsequence 2; if the sampling step S3 is 40, then when sampling is performed in the initial subsequence 3 according to the sampling step S3, the offset value can be in the range of [0, 39], that is, the initial sampling position can be the 0th, 1st, 2nd, ..., or 39th bit in the initial subsequence 3.
[0143] For any initial subsequence, after the computing device determines the offset value and sampling step corresponding to the initial subsequence, it can sample the initial subsequence according to the offset value and sampling step to obtain a target subsequence corresponding to the initial subsequence.
[0144] The target subsequence may include a preset value of event information, that is, the sequence length of the target subsequence is a preset value K. The sequence lengths of multiple target subsequences are the same.
[0145] Alternatively, the target subsequence can be represented by q.
[0146] For example, Figure 5In the example, for the initial subsequence 1, if the segmentation length L1 corresponding to the initial subsequence 1 is 2000, the corresponding sampling step S1 can be 10, and the corresponding offset value can be 0. Then the computing device can sample the initial subsequence 1 from the 0th bit in the initial subsequence 1 according to the sampling step S1 of 10 (i.e., sampling once every 10 bits) to obtain the target subsequence 1. The target subsequence 1 is q1 = [031, 006, 011, 049, ..., 125]. The target subsequence 1 can include 200 event information, that is, the sequence length of the target subsequence 1 is 200, as shown in FIG. Figure 5 As shown in .
[0147] For the initial subsequence 2, if the segmentation length L2 corresponding to the initial subsequence 2 is 4000, the corresponding sampling step S2 is 2 (i.e., sampling once every 20 bits). If the corresponding offset value is 0, the computing device can sample the initial subsequence 2 from the 0th bit in the initial subsequence 2 according to the sampling step S2 of 20 to obtain the target subsequence 2. The target subsequence 2 can be q2 = [006, 049, ..., 125, ..., 032]. The target subsequence 2 can include 200 event information, that is, the sequence length of the target subsequence 2 is 200, as shown in FIG. Figure 5 As shown in .
[0148] For the initial subsequence 3, if the segmentation length L3 corresponding to the initial subsequence 3 is 8000, the corresponding sampling step S3 is 40 (i.e., sampling is performed once every 40 bits). If the corresponding offset value is 0, the initial subsequence 3 can be sampled from bit 0 in the initial subsequence 3 according to the sampling step S3 of 40 to obtain the target subsequence 3. The target subsequence 3 can be q3 = [049,…,125,…,032,…,001]. The target subsequence 3 can include 200 event information, that is, the sequence length of the target subsequence 3 is 200. Figure 5 As shown in .
[0149] like Figure 5 As shown in , the sequence lengths of target subsequence 1, target subsequence 2, and target subsequence 3 are the same, which is 200.
[0150] S406 : For any target subsequence, determine the intermediate feature corresponding to the target subsequence.
[0151] Optionally, for any target subsequence, a [cls] identifier may be added before the target subsequence to obtain a target input subsequence. The [cls] identifier may be used to indicate the beginning of the target input subsequence.
[0152] For example, if the target subsequence 1 is q1 = [031, 006, 011, 049, ..., 125], [cls] can be added before the target subsequence 1 to obtain the target input subsequence 1 as [cls, 031, 006, 011, 049, ..., 125].
[0153] Optionally, the target input subsequence can be processed through an embedding layer in the target model to obtain intermediate features.
[0154] Since the embedding layer is preset with a D*M mapping matrix E, the target input subsequence can be mapped and transformed according to the mapping matrix E in the embedding layer to obtain the intermediate features corresponding to the target sub-input sequence, that is, the intermediate features corresponding to the target subsequence.
[0155] Optionally, since the mapping matrix E includes the eigenvalues of M preset abnormal events in D event dimensions, the computing device can determine multiple eigenvalues of the K abnormal events in the mapping matrix E based on the event information of the K abnormal events in the target input sequence; and can randomly initialize the eigenvalues of "cls" in the D event dimensions to obtain intermediate features corresponding to the target input sequence. Where M is greater than or equal to K.
[0156] Alternatively, the intermediate features may be represented by a matrix A of D*(K+1).
[0157] For example, if the target subsequence 1 is q1 = [031, 006, 011, 049, ..., 125], and the target subsequence 1 includes 200 event information, then the corresponding target input subsequence 1 can be [cls, 031, 006, 011, 049, ..., 125]. If D is 512, if the target model is Figure 3 As shown in , the target model's embedding layer 1 can be used to map the target input subsequence 1 according to the mapping matrix E to obtain the intermediate feature 1. The intermediate feature 1 can be represented as a 512*201 matrix A1. Assume that the matrix A1 can be shown as follows:
[0158]
[0159] Matrix A can include 512 rows and 201 columns. The eigenvalue of the first column is the randomly initialized eigenvalue of "cls" on the 512 event dimensions; the eigenvalue of the second column is the eigenvalue corresponding to "031" on the 512 event dimensions; ...; the eigenvalue of the 201st column is the eigenvalue corresponding to "125" on the 512 event dimensions.
[0160] Similarly, the target input subsequence 2 corresponding to the target subsequence 2 can be mapped and transformed through the embedding layer 2 to obtain the intermediate feature 2. It is assumed that the intermediate feature 2 can be expressed as the matrix A2. The target input subsequence 3 corresponding to the target subsequence 3 can be mapped and transformed through the embedding layer 3 to obtain the intermediate feature 3. It is assumed that the intermediate feature 3 can be expressed as the matrix A3.
[0161] S407 : Perform feature extraction processing on the intermediate features according to the association information between the event features in the intermediate features to obtain sequence features corresponding to the target subsequence.
[0162] Optionally, feature extraction processing can be performed on the intermediate features through the encoding layer in the target model to obtain sequence features.
[0163] Since the intermediate features include a column of eigenvalues corresponding to "cls", and when the intermediate features are subjected to feature extraction processing through the coding layer in the target model, the correlation between the various abnormal events in the target subsequence can be calculated based on the various eigenvalues in the intermediate features, that is, the column of eigenvalues corresponding to "cls" has been correlated with the multiple eigenvalues corresponding to the multiple abnormal events in the intermediate features. Therefore, after the intermediate features are subjected to feature extraction processing through the coding layer, the target features corresponding to the target subsequence can be obtained, and the target features may include the correlation eigenvalues between the various abnormal events, as well as the eigenvalues corresponding to "cls". The eigenvalues corresponding to "cls" can express the overall characteristics of the target subsequence. The computing device can determine the eigenvalues corresponding to "cls" in the target features, and determine the eigenvalues corresponding to "cls" as the sequence features corresponding to the target subsequence.
[0164] Optionally, the sequence features can be obtained by the D*1 column matrix q cls express.
[0165] For example, if the intermediate feature 1 is as shown in the above matrix A1, if the target model is as Figure 3 As shown in , the intermediate feature 1 can be extracted by the coding layer 1 to obtain the sequence feature 1 corresponding to the target subsequence 1. The sequence feature 1 corresponding to the target subsequence 1 can be obtained by the column matrix It is expressed as follows:
[0166]
[0167] Similarly, feature extraction processing can be performed on the intermediate feature 2 through the encoding layer 2 to obtain the sequence feature 2 corresponding to the target subsequence 2. The sequence feature 2 can be expressed as a column matrix The intermediate feature 3 can be extracted through the encoding layer 3 to obtain the sequence feature 3 corresponding to the target subsequence 3. The sequence feature 3 can be expressed as a column matrix
[0168] S408: Determine the weight value of each target subsequence.
[0169] Optionally, the sequence features corresponding to each target subsequence may be processed by a fully connected layer in the target model and the feature fusion layer to obtain a weight value of each target subsequence.
[0170] Optionally, if the weight value is represented by w, the fully connected layer may be preset with formula (1) as follows:
[0171] w=Softmax(WQ) Formula (1)
[0172] Among them, Softmax represents the activation function; W represents the weight matrix; if there are m target subsequences, then
[0173]
[0174] For example, if there are three target subsequences, among which target subsequence 1 corresponds to sequence feature 1, target subsequence 2 corresponds to sequence feature 2, and target subsequence 3 corresponds to sequence feature 3, then the three sequence features can be processed respectively by formula (1) to obtain the weight value 1 of target subsequence 1, the weight value 2 of target subsequence 2, and the weight value 3 of target subsequence 2, as shown in Table 3.
[0175] S409: Determine the failure probability of the target device failing in a future period according to the sequence feature corresponding to each target subsequence and the weight value of each target subsequence.
[0176] Optionally, the sequence features of each target subsequence and the weight value of each target subsequence may be processed by a feature fusion layer in the target model to obtain the fault probability.
[0177] For example, if the target model is Figure 3 As shown in , the computing device can perform fusion calculation through the fusion layer in the feature fusion layer using formula (2), and formula (2) can be shown as follows:
[0178]
[0179] Wherein, the value of i is 1, 2, ..., m, m is the number of target subsequences, m is an integer greater than or equal to 1, Rep represents the failure probability; w i Represents the weight value of the i-th target subsequence; Represents the sequence features of the i-th target subsequence.
[0180] Formula (2) indicates that the weight values of the m target subsequences are multiplied by the corresponding sequence features respectively, and then added together to obtain the weighted sum Rep, where Rep is the failure probability.
[0181] For example, if there are 3 target subsequences, target subsequence 1 corresponds to sequence feature 1. The target subsequence 2 corresponds to the sequence feature 2: And the target subsequence 3 corresponds to the sequence feature 3 If the weight values of the three target subsequences are as shown in Table 3, they can be calculated using formula (2):
[0182]
[0183] Assume that Rep=0.8 can be calculated. If the future period is the next 48 hours, then it can be determined that the failure probability of cloud server 1 failing in the next 48 hours is 0.8.
[0184] S410: Determine a fault prediction result according to the fault probability.
[0185] For example, if the fault prediction result includes a fault probability, if the computing device determines that the fault probability of cloud server 1 sending a fault within the next 48 hours is 0.8, the computing device determines that the fault prediction result of cloud server 1 is 0.8.
[0186] For example, if the fault prediction result is predicted normal or predicted fault, if the computing device determines that the failure probability of cloud server 1 sending a fault within the next 48 hours is 0.8, if the preset threshold is 0.6, then since the failure probability 0.8 is greater than the preset threshold 0.6, it can be determined that the fault prediction result is predicted fault.
[0187] In the technical solution of the present application, multiple target subsequences with sequence lengths less than a first threshold can be determined in an ultra-long initial sequence, and the multiple target subsequences can be input into the target model for processing, which greatly increases the amount of model information and reduces the model calculation complexity.
[0188] It should be noted that in Figure 4 The various processing steps (S401 to S410) shown in the embodiment do not constitute a specific limitation on the fault prediction process. In other embodiments of the present application, the fault prediction process may include: Figure 4 The embodiments may include more or fewer steps. For example, the fault prediction process may include Figure 4 Some steps in the embodiment, or Figure 4 Some steps in the embodiment may be replaced by steps with the same functions, or Figure 4 Some steps in the embodiments may be split into multiple steps, etc.
[0189] In an embodiment of the present application, a computing device can obtain multiple abnormal events and determine the event information and occurrence time of each abnormal event. The computing device can sort the event information of multiple abnormal events in reverse order of the occurrence time to obtain an initial sequence, and determine multiple initial subsequences in the initial sequence, and then sample each initial subsequence separately to obtain multiple target subsequences. The computing device can determine the intermediate features corresponding to any target subsequence, and based on the correlation information between the event features in the intermediate features, perform feature extraction on the intermediate features to obtain sequence features corresponding to the target subsequence. The computing device can determine the weight value of each target subsequence, and based on the sequence features corresponding to each target subsequence and the weight value of each target subsequence, determine the failure probability of the target device in the future time period, and then determine the failure prediction result based on the failure probability. Since the initial sequence includes the event information of each abnormal event, and the initial sequence is arranged in reverse chronological order, it contains the event order information of the abnormal events. Compared with the statistical information of each abnormal event in the prior art, the initial sequence can more accurately express each abnormal event, which is conducive to the target model extracting richer features; and multiple target subsequences with sequence lengths less than the first threshold can be determined in the ultra-long initial sequence. When fault prediction is performed based on multiple target subsequences, the computational complexity of the target model is reduced, and each target subsequence can be processed more accurately; therefore, the accuracy of fault prediction for the target device is comprehensively improved.
[0190] It should be noted that, through steps S401 to S410, the initial model can also be trained to obtain the target model. The structure of the initial model can be as follows: Figure 3 shown.
[0191] During the model training process, multiple initial sequences can be obtained through steps S401 to S403, and the multiple initial sequences can be divided into positive samples (i.e., faulty samples) and negative samples (i.e., normal samples). Each sample is labeled to determine the labeling result of each sample. The labeling result can be faulty or normal.
[0192] Optionally, for any fault sample, the duration between the occurrence of each abnormal event and the time of device downtime can be determined. If this duration is greater than a preset impact duration, the abnormal event can be marked as 0, indicating that the abnormal event is likely unrelated to the device downtime. If this duration is less than or equal to the preset impact duration, the abnormal event can be marked as 1, indicating that the abnormal event is likely related to the device downtime.
[0193] The preset impact duration can be manually set. It indicates the duration during which abnormal events occurring may cause device downtime. For example, the preset impact duration can be 48 hours.
[0194] For any sample, steps S404 and S405 can be executed (in step S405, multiple sampling processes can be performed according to the random index strategy) to obtain multiple target subsequences corresponding to the sample, and then steps S406 to S410 can be executed on the multiple target subsequences through the initial model to obtain the fault prediction result corresponding to the sample.
[0195] The computing device can compare the fault prediction result corresponding to each sample with the labeled result, and use the gradient descent algorithm to backpropagate the loss gradient to update the model parameters of the initial model to obtain the target model.
[0196] During the model training process, multiple target subsequences can be determined from the ultra-long initial sequence, and the multiple target subsequences can be input into the initial model for processing, which can increase the amount of model information and reduce the computational complexity of the initial model; and a random indexing strategy can be used to determine the offset value, and the target subsequence is obtained by sampling according to the offset value and the sampling step size, so that the representation of the target subsequence can be more generalized, so that the initial model can be fully learned; in the initial model, the sequence features of multiple target subsequences can be fused with each other through the feature fusion layer, which improves the initial model's ability to learn the overall features of the ultra-long sequence and improves the overall performance of the initial model, thereby training a target model with better prediction performance.
[0197] The target model in this application has two major advantages over the pre-trained Logarithmic Bidirectional Encoder Representations from Transformers (LogBERT) model: (1) it does not require direct learning of the original log text, but instead learns from a pre-processed abnormal event library; (2) based on the segmentation method, it can support initial sequences of more than 8000 lengths. The target model can process longer initial sequences, thereby obtaining a larger amount of information, ensuring computational efficiency while improving accuracy and recall.
[0198] Compared with the extreme gradient boosting (eXtreme Gradient Boosting, XGBoost) model, the target model of this application also has two major advantages: (1) The BERT-based algorithm has fully demonstrated its feature extraction capabilities in fields such as natural language processing, and is more convenient and applicable than the manual feature extraction of XGBoost; (2) The feature information extracted by XGBoost is not rich, for example, it does not contain the sequential information of abnormal events, the information between abnormal events, etc., while the target model of this application can effectively integrate the sequential information of abnormal events and the information between abnormal events.
[0199] To sum up, through the technical solution of the present application, the sequence length of the initial sequence can be expanded more effectively, so that the target model can incorporate more abnormal information to extract more representative feature expressions, thereby making the performance of the trained classification layer better, improving the accuracy and recall rate of fault prediction, and being able to find cloud servers that are about to crash in the cloud computing system faster, more and more accurately for operation and maintenance, thereby reducing the downtime rate or reducing the losses caused to users by the downtime, and greatly increasing the stability and reliability of the cloud computing system.
[0200] Figure 6 This is a schematic diagram of the structure of a fault prediction device provided in an embodiment of the present application. Figure 6 The fault prediction device 10 may include: an acquisition module 11, a first determination module 12 and a second determination module 13, wherein:
[0201] The acquisition module 11 is used to acquire an initial sequence corresponding to multiple abnormal events of the target device, wherein the initial sequence includes event information of each abnormal event;
[0202] The first determining module 12 is configured to determine a plurality of target subsequences in the initial sequence, wherein the number of event information included in the target subsequences is less than or equal to a first threshold;
[0203] The second determining module 13 is configured to determine a fault prediction result of the target device according to the multiple target subsequences.
[0204] The fault prediction device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar and will not be repeated here.
[0205] In a possible implementation, the amount of event information included in the initial sequence is greater than the first threshold; and the first determining module 12 is specifically configured to:
[0206] determining a plurality of initial subsequences in the initial sequence;
[0207] Sampling is performed on each initial subsequence to obtain the multiple target subsequences.
[0208] In a possible implementation, the occurrence times of the abnormal events corresponding to the event information in the initial sequence are arranged in reverse order; and the first determining module 12 is specifically configured to:
[0209] determining a plurality of segmentation lengths, wherein the segmentation lengths are less than or equal to the number of event information included in the initial sequence;
[0210] For any segmentation length L, the first L event information in the initial sequence is determined as the initial subsequence corresponding to the segmentation length, where L is an integer greater than or equal to 1.
[0211] In a possible implementation, for any initial subsequence, the first determining module 12 is specifically configured to:
[0212] Determining a sampling step length corresponding to the initial subsequence according to a segmentation length corresponding to the initial subsequence, wherein a ratio of the segmentation length corresponding to the initial subsequence to the sampling step length is a preset value;
[0213] Determine an offset value corresponding to the initial subsequence, where the offset value is an integer greater than or equal to 0 and less than the sampling step size;
[0214] The initial subsequence is sampled according to the offset value and the sampling step size to obtain a target subsequence corresponding to the initial subsequence.
[0215] In a possible implementation manner, the second determining module 13 is specifically configured to:
[0216] Determine the sequence features corresponding to each target subsequence and the weight value of each target subsequence;
[0217] Determining a failure probability of the target device failing in a future time period based on the sequence feature corresponding to each target subsequence and the weight value of each target subsequence;
[0218] The fault prediction result is determined according to the fault probability.
[0219] In a possible implementation, for any target subsequence, the second determining module 13 is specifically configured to:
[0220] Determining intermediate features corresponding to the target subsequence, where the intermediate features include event features of each abnormal event corresponding to the target subsequence, and the event features include feature values of the abnormal event in multiple event dimensions;
[0221] According to the association information between the event features in the intermediate features, feature extraction processing is performed on the intermediate features to obtain sequence features corresponding to the target subsequence.
[0222] In a possible implementation manner, the second determining module 13 is specifically configured to:
[0223] Adding a start marker to the target subsequence to obtain a target input subsequence;
[0224] Processing the target input subsequence through an embedding layer in a target model to obtain the intermediate features;
[0225] In a possible implementation manner, the second determining module 13 is specifically configured to:
[0226] Performing feature extraction processing on the intermediate features through the encoding layer in the target model to obtain the sequence features;
[0227] In a possible implementation manner, the second determining module 13 is specifically configured to:
[0228] The sequence features corresponding to each target subsequence and the weight value of each target subsequence are processed by the feature fusion layer in the target model to obtain the fault probability.
[0229] In a possible implementation, the acquisition module 11 is specifically configured to:
[0230] Obtaining the multiple abnormal events;
[0231] Determine the event information and occurrence time of each abnormal event;
[0232] The event information of the plurality of abnormal events is sorted in reverse order of occurrence time to obtain the initial sequence.
[0233] The fault prediction device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar and will not be repeated here.
[0234] Figure 7 A schematic diagram of the structure of a computing device is provided for an exemplary embodiment of the present application. Figure 7 The computing device 20 may include a processor 21 and a memory 22. Exemplarily, the processor 21 and the memory 22 are interconnected via a bus 23.
[0235] The memory 22 stores computer-executable instructions;
[0236] The processor 21 executes the computer-executable instructions stored in the memory 22 , so that the processor 21 performs the method shown in the above method embodiment.
[0237] Accordingly, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the method described in the above method embodiment.
[0238] Accordingly, an embodiment of the present application may also provide a computer program product, including a computer program, which, when executed by a processor, may implement the method shown in the above method embodiment.
[0239] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0240] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0241] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0242] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0243] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0244] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0245] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0246] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0247] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A fault prediction method, characterized in that: include: Acquire an initial sequence corresponding to a plurality of abnormal events of a target device, wherein the initial sequence includes event information of each abnormal event; Determining a plurality of target subsequences in the initial sequence, wherein the amount of event information included in the target subsequences is less than or equal to a first threshold; A fault prediction result of the target device is determined according to the multiple target subsequences.
2. A fault prediction method, characterized in that: include: Obtaining an initial sequence corresponding to multiple abnormal events of a target device, wherein the initial sequence includes event information of each abnormal event, and the target device is a cloud server; Determining a plurality of target subsequences in the initial sequence, wherein the amount of event information included in the target subsequences is less than or equal to a first threshold; A fault prediction result of the target device is determined according to the multiple target subsequences.
3. The method according to claim 1 or 2, characterized in that The amount of event information included in the initial sequence is greater than the first threshold; Determining a plurality of target subsequences in the initial sequence includes: determining a plurality of initial subsequences in the initial sequence; Sampling is performed on each initial subsequence to obtain the multiple target subsequences.
4. The method according to claim 3, characterized in that The occurrence time of the abnormal events corresponding to each event information in the initial sequence is arranged in reverse order; Determining a plurality of initial subsequences in the initial sequence includes: determining a plurality of segmentation lengths, wherein the segmentation lengths are less than or equal to the number of event information included in the initial sequence; For any segmentation length L, the first L event information in the initial sequence is determined as the initial subsequence corresponding to the segmentation length L, where L is an integer greater than or equal to 1.
5. The method according to claim 3 or 4, characterized in that For any initial subsequence, sampling processing is performed on the initial subsequence to obtain a target subsequence corresponding to the initial subsequence, including: Determining a sampling step length corresponding to the initial subsequence according to a segmentation length corresponding to the initial subsequence, wherein a ratio of the segmentation length corresponding to the initial subsequence to the sampling step length is a preset value; Determine an offset value corresponding to the initial subsequence, where the offset value is an integer greater than or equal to 0 and less than the sampling step size; The initial subsequence is sampled according to the offset value and the sampling step size to obtain a target subsequence corresponding to the initial subsequence.
6. The method according to any one of claims 1 to 5, characterized in that Determining a fault prediction result of the target device according to the multiple target subsequences includes: Determine the sequence features corresponding to each target subsequence and the weight value of each target subsequence; Determining a failure probability of the target device failing in a future time period based on the sequence feature corresponding to each target subsequence and the weight value of each target subsequence; The fault prediction result is determined according to the fault probability.
7. The method according to claim 6, characterized in that For any target subsequence, determining the sequence feature corresponding to the target subsequence includes: Determining intermediate features corresponding to the target subsequence, where the intermediate features include event features of each abnormal event corresponding to the target subsequence, and the event features include feature values of the abnormal event in multiple event dimensions; According to the association information between the event features in the intermediate features, feature extraction processing is performed on the intermediate features to obtain sequence features corresponding to the target subsequence.
8. The method according to claim 7, characterized in that Determining the intermediate features corresponding to the target subsequence includes: Adding a start marker to the target subsequence to obtain a target input subsequence; Processing the target input subsequence through an embedding layer in a target model to obtain the intermediate features; Performing feature extraction processing on the intermediate features based on association information between event features in the intermediate features to obtain sequence features corresponding to the target subsequence includes: Performing feature extraction processing on the intermediate features through the encoding layer in the target model to obtain the sequence features; Determining the failure probability of the target device failing in a future time period according to the sequence feature corresponding to each target subsequence and the weight value of each target subsequence includes: The sequence features corresponding to each target subsequence and the weight value of each target subsequence are processed by the feature fusion layer in the target model to obtain the fault probability.
9. The method according to any one of claims 1 to 8, characterized in that Obtain the initial sequence corresponding to multiple abnormal events of the target device, including: Obtaining the multiple abnormal events; Determine the event information and occurrence time of each abnormal event; The event information of the plurality of abnormal events is sorted in reverse order of occurrence time to obtain the initial sequence.
10. A fault prediction device, characterized in that: include: an acquisition module, a first determination module, and a second determination module, wherein: The acquisition module is used to acquire an initial sequence corresponding to multiple abnormal events of the target device, wherein the initial sequence includes event information of each abnormal event; The first determining module is configured to determine a plurality of target subsequences in the initial sequence, wherein the number of event information included in the target subsequences is less than or equal to a first threshold; The second determination module is configured to determine a fault prediction result of the target device according to the multiple target subsequences.
11. A computing device, characterized in that include: at least one processor; as well as a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the computing device to perform the method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the method according to any one of claims 1 to 9 is implemented.
13. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.