CN116739154A - Fault prediction method and related equipment thereof - Google Patents
Fault prediction method and related equipment thereof Download PDFInfo
- Publication number
- CN116739154A CN116739154A CN202310611808.2A CN202310611808A CN116739154A CN 116739154 A CN116739154 A CN 116739154A CN 202310611808 A CN202310611808 A CN 202310611808A CN 116739154 A CN116739154 A CN 116739154A
- Authority
- CN
- China
- Prior art keywords
- faults
- fault information
- historical fault
- target
- model
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/213—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0464—Convolutional networks [CNN, ConvNet]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/20—Administration of product repair or maintenance
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Human Resources & Organizations (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Strategic Management (AREA)
- Economics (AREA)
- Evolutionary Biology (AREA)
- Health & Medical Sciences (AREA)
- Marketing (AREA)
- Entrepreneurship & Innovation (AREA)
- Quality & Reliability (AREA)
- Software Systems (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Tourism & Hospitality (AREA)
- General Business, Economics & Management (AREA)
- Mathematical Physics (AREA)
- Operations Research (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Development Economics (AREA)
- Game Theory and Decision Science (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本申请公开了一种故障预测方法及其相关设备,在针对设备进行故障预测的过程中,所考虑的因素较为全面,这样最终得到的设备的故障预测结果可具备较高的准确度。本申请的方法包括:获取目标设备的历史故障信息,历史故障信息用于指示目标设备在第1个时刻至第T‑1个时刻中发生过的N个故障,T≥2,N≥2;基于历史故障信息,获取N个故障之间的因果关系以及N个故障的权重,N个故障的权重用于指示N个故障的重要程度;基于历史故障信息、N个故障之间的因果关系以及N个故障的权重,获取目标设备在第T个时刻中发生N个故障的概率。
This application discloses a fault prediction method and related equipment. In the process of fault prediction for equipment, relatively comprehensive factors are considered, so that the final fault prediction result of the equipment can have high accuracy. The method of this application includes: obtaining historical fault information of the target device. The historical fault information is used to indicate N faults that have occurred in the target device from the first moment to the T-1 moment, T≥2, N≥2; Based on historical fault information, the causal relationship between N faults and the weight of N faults are obtained. The weight of N faults is used to indicate the importance of N faults; based on historical fault information, the causal relationship between N faults and The weight of N faults is used to obtain the probability of N faults occurring in the target device at the T-th moment.
Description
技术领域Technical field
本申请实施例涉及人工智能(artificial intelligence,AI)技术领域,尤其涉及一种故障预测方法及其相关设备。The embodiments of the present application relate to the technical field of artificial intelligence (AI), and in particular, to a fault prediction method and related equipment.
背景技术Background technique
设备故障预测,指设备的故障尚未发生,通过AI技术中的神经网络模型,基于设备的某些信息来预测设备是否可能发生某种或某些故障,以向设备工程师告知故障预测结果,从而使得设备工程师基于故障预测结果可及时维修设备。Equipment failure prediction refers to the fact that the equipment failure has not yet occurred. Through the neural network model in AI technology, it is predicted whether a certain or certain failures may occur in the equipment based on certain information of the equipment, so as to inform the equipment engineers of the failure prediction results, thus making Equipment engineers can repair equipment in time based on fault prediction results.
相关技术中,可先获取设备的历史故障信息,历史故障信息用于指示设备在过去曾经发生过的多个故障,并把历史故障信息输入至神经网络模型中。接着,神经网络模型可对历史故障信息进行一系列的处理,从而得到设备在未来发生这多个故障的概率,也就是设备的故障预测结果。至此,则完成了针对设备的故障预测。In related technologies, historical fault information of the equipment can be obtained first. The historical fault information is used to indicate multiple faults that have occurred in the equipment in the past, and the historical fault information can be input into the neural network model. Then, the neural network model can perform a series of processing on the historical fault information to obtain the probability of multiple faults occurring in the equipment in the future, which is the fault prediction result of the equipment. At this point, the fault prediction for the equipment is completed.
上述过程中,神经网络模型在针对设备进行故障预测的过程中,也就是对设备的历史故障信息进行处理的过程中,通常只考虑设备在过去曾经发生过的多个故障在故障预测过程中所付出的贡献度,所考虑的因素较为单一,这样会导致最终得到的设备的故障预测结果不够准确。In the above process, when the neural network model performs fault prediction on the equipment, that is, when processing the historical fault information of the equipment, it usually only considers the multiple faults that have occurred in the equipment in the past. The degree of contribution paid and the factors considered are relatively single, which will lead to the final failure prediction result of the equipment being inaccurate.
发明内容Contents of the invention
本申请实施例提供了一种故障预测方法及其相关设备,在针对设备进行故障预测的过程中,所考虑的因素较为全面,这样最终得到的设备的故障预测结果可具备较高的准确度。Embodiments of the present application provide a fault prediction method and related equipment. In the process of fault prediction for the equipment, relatively comprehensive factors are considered, so that the final fault prediction result of the equipment can have high accuracy.
本申请实施例提供了一种故障预测方法,该方法通过目标模型实现,该方法包括:The embodiment of the present application provides a fault prediction method, which is implemented through a target model. The method includes:
当需要针对目标设备进行故障预测时,可先获取目标设备的历史故障信息并将目标设备的历史故障信息输入至目标模型中,其中,目标设备的历史故障信息用于指示目标设备在第1个时刻至第T-1个时刻中发生过的N个故障,T≥2,N≥2。When it is necessary to perform fault prediction for the target device, the historical fault information of the target device can be obtained first and input into the target model. The historical fault information of the target device is used to indicate that the target device is in the first N faults that have occurred from time to time T-1, T≥2, N≥2.
得到目标设备的历史故障信息后,可将目标设备的历史故障信息输入至目标模型,目标模型可对目标设备的历史故障信息进行处理,从而得到目标设备在第1个时刻至第T-1个时刻中所发生过的N个故障之间的因果关系以及N个故障的权重。其中,N个故障的权重用于指示在对目标设备进行故障预测的过程中N个故障所发挥的作用,也就是N个故障的重要程度。After obtaining the historical fault information of the target equipment, the historical fault information of the target equipment can be input into the target model. The target model can process the historical fault information of the target equipment, thereby obtaining the target equipment's historical fault information from the 1st moment to the T-1th time. The causal relationship between N faults that have occurred in time and the weight of N faults. Among them, the weight of N faults is used to indicate the role played by N faults in the process of fault prediction of the target device, that is, the importance of N faults.
得到N个故障之间的因果关系以及N个故障的权重后,目标模型可对目标设备的历史故障信息、N个故障之间的因果关系以及N个故障的权重进行处理,从而得到目标设备在第T个时刻中发生N个故障的概率,也就是目标设备的故障预测结果。至此,则完成了针对目标设备的故障预测。After obtaining the causal relationship between N faults and the weights of N faults, the target model can process the historical fault information of the target equipment, the causal relationships between N faults, and the weights of N faults, thereby obtaining the target equipment's fault information. The probability of N faults occurring at the T moment is the fault prediction result of the target device. At this point, the fault prediction for the target device is completed.
从上述方法可以看出:当需要针对目标设备进行故障预测时,可先获取目标设备的历史故障信息并将目标设备的历史故障信息输入至目标模型中,目标设备的历史故障信息用于指示目标设备在第1个时刻至第T-1个时刻中发生过的N个故障。然后,目标模型可对目标设备的历史故障信息进行处理,从而得到N个故障之间的因果关系以及N个故障的权重。最后,目标模型可对目标设备的历史故障信息、N个故障之间的因果关系以及N个故障的权重进行处理,从而得到目标设备在第T个时刻中发生N个故障的概率。前述过程中,目标模型在针对目标设备进行故障预测的过程中,不仅考虑目标设备在第1个时刻至第T-1个时刻中发生过的N个故障之间的因果关系,还考虑了N个故障的权重(也就是N个故障在针对目标设备的故障预测过程中的重要程度),所考虑的因素较为全面,这样最终得到的目标设备的故障预测结果(即目标设备在第T个时刻中发生N个故障的概率)可具备较高的准确度。It can be seen from the above method: when it is necessary to perform fault prediction on the target device, the historical fault information of the target device can be obtained first and input into the target model. The historical fault information of the target device is used to indicate the target. N faults that have occurred in the equipment from the 1st time to the T-1th time. Then, the target model can process the historical fault information of the target equipment to obtain the causal relationship between N faults and the weight of N faults. Finally, the target model can process the historical fault information of the target device, the causal relationship between N faults, and the weight of the N faults, thereby obtaining the probability of N faults occurring in the target device at the T-th moment. In the foregoing process, the target model not only considers the causal relationship between the N faults that have occurred in the target device from the first moment to the T-1 moment, but also considers the N fault prediction process for the target device. The weight of each fault (that is, the importance of N faults in the fault prediction process for the target device), the factors considered are relatively comprehensive, so that the final fault prediction result of the target device (that is, the target device at the T-th moment The probability of N faults occurring in ) can have high accuracy.
在一种可能实现的方式中,基于历史故障信息,获取N个故障之间的因果关系以及N个故障的权重包括:对历史故障信息进行第一特征提取,得到N个故障之间的因果关系;从历史故障信息中提取子历史故障信息,子历史故障信息用于指示目标设备在第T-w个时刻至第T-1个时刻中发生过的P个故障,N个故障包含P个故障,N≥P≥1,T>w≥1;对N个故障之间的因果关系以及子历史故障信息进行第二特征提取,得到N个故障的权重。前述实现方式中,在接收到目标设备的历史故障信息后,目标模型可对目标设备的历史故障信息进行第一特征提取,从而得到目标设备在第1个时刻至第T-1个时刻中所发生过的N个故障之间的因果关系。得到N个故障之间的因果关系后,目标模型可从目标设备的历史故障信息中提取出目标设备的子历史故障信息,目标设备的子历史故障信息用于指示目标设备在第T-w个时刻至第T-1个时刻中发生过的P个故障。得到N个故障之间的因果关系以及目标设备的子历史故障信息后,目标模型可对N个故障之间的因果关系以及子历史故障信息进行第二特征提取,从而准确得到N个故障的权重。In one possible implementation method, based on historical fault information, obtaining the causal relationship between N faults and the weight of the N faults includes: performing first feature extraction on the historical fault information to obtain the causal relationship between the N faults. ; Extract sub-historical fault information from historical fault information. Sub-historical fault information is used to indicate P faults that have occurred in the target device from the T-wth moment to the T-1th moment. N faults include P faults, N ≥P≥1, T>w≥1; perform second feature extraction on the causal relationship between N faults and sub-historical fault information to obtain the weights of N faults. In the foregoing implementation, after receiving the historical fault information of the target device, the target model can perform a first feature extraction on the historical fault information of the target device, thereby obtaining the characteristics of the target device from the 1st moment to the T-1th moment. The causal relationship between N faults that have occurred. After obtaining the causal relationship between N faults, the target model can extract the sub-historical fault information of the target device from the historical fault information of the target device. The sub-historical fault information of the target device is used to indicate that the target device has arrived at the T-wth time. P faults occurred at time T-1. After obtaining the causal relationship between N faults and the sub-historical fault information of the target equipment, the target model can perform second feature extraction on the causal relationship between the N faults and the sub-historical fault information, thereby accurately obtaining the weights of the N faults. .
在一种可能实现的方式中,基于历史故障信息、N个故障之间的因果关系以及N个故障的权重,获取目标设备在第T个时刻中发生N个故障的概率包括:基于N个故障之间的因果关系以及N个故障的权重,获取N个故障中的M个故障之间的因果关系,N≥M≥1;基于历史故障信息以及M个故障之间的因果关系,获取目标设备在第T个时刻中发生N个故障的概率。前述实现方式中,目标模型可先对N个故障之间的因果关系以及N个故障的权重进行处理,从而得到N个故障中的M个故障之间的因果关系,M个故障之间的因果关系也可称为目标设备的故障证据链,用于为目标设备的故障预测结果提供解释说明。得到M个故障之间的因果关系后,目标模型还可对目标设备的历史故障信息以及M个故障之间的因果关系进行处理,从而得到目标设备在第T个时刻中发生N个故障的概率,也就是目标设备的故障预测结果。那么,目标设备的故障证据链和目标设备的故障预测结果可作为目标模型的两个输出,从而为用户提供针对目标设备的故障预测服务以及针对目标设备的故障预测的可视化说明。In one possible implementation method, based on historical fault information, the causal relationship between N faults, and the weight of the N faults, obtaining the probability of N faults occurring in the target device at the T-th moment includes: based on the N faults The causal relationship between N faults and the weight of N faults are used to obtain the causal relationship between M faults among the N faults, N≥M≥1; based on the historical fault information and the causal relationship between the M faults, the target device is obtained The probability that N faults occur at the T moment. In the aforementioned implementation method, the target model can first process the causal relationship between N faults and the weight of the N faults, thereby obtaining the causal relationship between M faults among the N faults, and the causal relationship between the M faults. The relationship can also be called the fault evidence chain of the target device, which is used to provide explanations for the fault prediction results of the target device. After obtaining the causal relationship between M faults, the target model can also process the historical fault information of the target device and the causal relationship between the M faults, thereby obtaining the probability of N faults occurring in the target device at the T-th moment. , which is the fault prediction result of the target device. Then, the fault evidence chain of the target device and the fault prediction result of the target device can be used as two outputs of the target model, thereby providing users with a fault prediction service for the target device and a visual explanation of the fault prediction for the target device.
在一种可能实现的方式中,基于N个故障之间的因果关系以及N个故障的权重,获取N个故障中的M个故障之间的因果关系包括:在N个故障之间的因果关系中,将权重小于第一权重阈值的N-M个故障剔除,得到N个故障中的M个故障之间的因果关系。前述实现方式中,在得到目标设备的子历史故障信息、N个故障的权重以及N个故障之间的因果关系后,目标模型可在N个故障之间的因果关系中,将权重小于第一权重阈值的N-M个故障剔除,从而得到N个故障中的M个故障之间的因果关系,值得注意的是,此时,这M个故障之间的因果关系上附带有这M个故障的权重,也就是说,目标设备的故障证据链不仅包含了这M个故障之间的因果关系,还包含这M个故障的权重,这样可以为用户提供更具细节的故障预测的解释说明。In a possible implementation manner, based on the causal relationship between N faults and the weight of the N faults, obtaining the causal relationship between M faults among the N faults includes: the causal relationship between the N faults In , N-M faults whose weights are less than the first weight threshold are eliminated, and the causal relationships between M faults among the N faults are obtained. In the aforementioned implementation, after obtaining the sub-historical fault information of the target device, the weights of N faults, and the causal relationships between the N faults, the target model can assign a weight smaller than the first in the causal relationship between the N faults. N-M faults with weight threshold are eliminated, thereby obtaining the causal relationship between M faults among the N faults. It is worth noting that at this time, the causal relationship between these M faults is accompanied by the weight of these M faults. , that is to say, the fault evidence chain of the target device not only contains the causal relationship between the M faults, but also includes the weights of the M faults, which can provide users with more detailed explanations of fault prediction.
在一种可能实现的方式中,基于历史故障信息以及M个故障之间的因果关系,获取目标设备在第T个时刻中发生N个故障的概率包括:对M个故障之间的因果关系以及子历史故障信息进行第三特征提取,得到目标设备在第T个时刻中发生N个故障的概率。前述实现方式中,在得到M个故障之间的因果关系后,目标模型可对M个故障之间的因果关系以及目标设备的子历史故障信息进行第三特征提取,从而准确得到目标设备在第T个时刻中发生N个故障的概率。In one possible implementation method, based on historical fault information and the causal relationship between the M faults, obtaining the probability of N faults occurring in the target device at the T-th moment includes: analyzing the causal relationships between the M faults and The third feature extraction is performed on the sub-historical fault information to obtain the probability of N faults occurring in the target equipment at the T-th moment. In the foregoing implementation, after obtaining the causal relationship between the M faults, the target model can perform third feature extraction on the causal relationship between the M faults and the sub-historical fault information of the target device, thereby accurately obtaining the target device in the first The probability of N faults occurring in T moments.
在一种可能实现的方式中,第一特征提取或第二特征提取包含以下至少一种:基于循环神经网络的特征提取以及基于卷积神经网络的特征提取。前述实现方式中,目标模型可包含循环神经网络以及卷积神经网络中的至少一种,故目标模型所实现的第一特征提取或第二特征提取包含基于循环神经网络的特征提取以及基于卷积神经网络的特征提取中的至少一种。In a possible implementation manner, the first feature extraction or the second feature extraction includes at least one of the following: feature extraction based on a recurrent neural network and feature extraction based on a convolutional neural network. In the aforementioned implementation manner, the target model may include at least one of a recurrent neural network and a convolutional neural network. Therefore, the first feature extraction or the second feature extraction implemented by the target model includes feature extraction based on the recurrent neural network and convolution-based feature extraction. At least one of feature extraction by neural networks.
在一种可能实现的方式中,第三特征提取包含以下至少一种:基于循环神经网络的特征提取、基于时间卷积网络的特征提取以及基于多层感知机的特征提取。前述实现方式中,目标模型可包含循环神经网络、时间卷积网络以及多层感知机中的至少一种,故目标模型所实现的第三特征提取或第四特征提取包含基于循环神经网络的特征提取、基于时间卷积网络的特征提取以及基于多层感知机的特征提取中的至少一种。In a possible implementation manner, the third feature extraction includes at least one of the following: feature extraction based on a recurrent neural network, feature extraction based on a temporal convolutional network, and feature extraction based on a multi-layer perceptron. In the foregoing implementation, the target model may include at least one of a recurrent neural network, a temporal convolutional network, and a multi-layer perceptron, so the third feature extraction or the fourth feature extraction implemented by the target model includes features based on the recurrent neural network. At least one of extraction, feature extraction based on temporal convolutional network, and feature extraction based on multi-layer perceptron.
本申请实施例的第二方面提供了一种模型训练方法,该方法包括:获取目标设备的历史故障信息,历史故障信息用于指示目标设备在第1个时刻至第T-1个时刻中发生过的N个故障,T≥2,N≥2;将历史故障信息输入至待训练模型,得到目标设备在第T个时刻中发生N个故障的概率,待训练模型用于:基于历史故障信息,获取N个故障之间的因果关系以及N个故障的权重,N个故障的权重用于指示N个故障的重要程度;基于历史故障信息、N个故障之间的因果关系以及N个故障的权重,获取目标设备在第T个时刻中发生N个故障的概率;基于概率对待训练模型进行训练,从而得到目标模型。The second aspect of the embodiment of the present application provides a model training method. The method includes: obtaining historical fault information of the target device. The historical fault information is used to indicate that the target device has occurred between the 1st moment and the T-1th moment. There have been N faults, T≥2, N≥2; input the historical fault information into the model to be trained, and obtain the probability of N faults occurring in the target equipment at the T-th moment. The model to be trained is used to: Based on the historical fault information , obtain the causal relationship between N faults and the weight of N faults. The weight of N faults is used to indicate the importance of N faults; based on historical fault information, the causal relationship between N faults and the Weight, obtain the probability of N failures occurring in the target device at the T-th moment; train the model to be trained based on the probability to obtain the target model.
上述方法训练得到的目标模型,具备故障预测功能。具体地,当需要针对目标设备进行故障预测时,可先获取目标设备的历史故障信息并将目标设备的历史故障信息输入至目标模型中,目标设备的历史故障信息用于指示目标设备在第1个时刻至第T-1个时刻中发生过的N个故障。然后,目标模型可对目标设备的历史故障信息进行处理,从而得到N个故障之间的因果关系以及N个故障的权重。最后,目标模型可对目标设备的历史故障信息、N个故障之间的因果关系以及N个故障的权重进行处理,从而得到目标设备在第T个时刻中发生N个故障的概率。前述过程中,目标模型在针对目标设备进行故障预测的过程中,不仅考虑目标设备在第1个时刻至第T-1个时刻中发生过的N个故障之间的因果关系,还考虑了N个故障的权重(也就是N个故障在针对目标设备的故障预测过程中的重要程度),所考虑的因素较为全面,这样最终得到的目标设备的故障预测结果(即目标设备在第T个时刻中发生N个故障的概率)可具备较高的准确度。The target model trained by the above method has fault prediction function. Specifically, when it is necessary to perform fault prediction for the target device, the historical fault information of the target device can be obtained first and input into the target model. The historical fault information of the target device is used to indicate that the target device is in the first stage. N faults that have occurred from time to time T-1. Then, the target model can process the historical fault information of the target equipment to obtain the causal relationship between N faults and the weight of N faults. Finally, the target model can process the historical fault information of the target device, the causal relationship between N faults, and the weight of the N faults, thereby obtaining the probability of N faults occurring in the target device at the T-th moment. In the foregoing process, the target model not only considers the causal relationship between the N faults that have occurred in the target device from the first moment to the T-1 moment, but also considers the N fault prediction process for the target device. The weight of each fault (that is, the importance of N faults in the fault prediction process for the target device), the factors considered are relatively comprehensive, so that the final fault prediction result of the target device (that is, the target device at the T-th moment The probability of N faults occurring in ) can have high accuracy.
在一种可能实现的方式中,待训练模型,用于:对历史故障信息进行第一特征提取,得到N个故障之间的因果关系;从历史故障信息中提取子历史故障信息,子历史故障信息用于指示目标设备在第T-w个时刻至第T-1个时刻中发生过的P个故障,N个故障包含P个故障,N≥P≥1,T>w≥1;对N个故障之间的因果关系以及子历史故障信息进行第二特征提取,得到N个故障的权重。In one possible implementation method, the model to be trained is used to: extract the first feature from historical fault information to obtain the causal relationship between N faults; extract sub-historical fault information from the historical fault information, and sub-historical fault information. The information is used to indicate P faults that have occurred in the target equipment from the T-wth moment to the T-1th moment. N faults include P faults, N≥P≥1, T>w≥1; for N faults The second feature extraction is performed on the causal relationship between the faults and the sub-historical fault information to obtain the weights of N faults.
在一种可能实现的方式中,待训练模型,用于:基于N个故障之间的因果关系以及N个故障的权重,获取N个故障中的M个故障之间的因果关系,N≥M≥1;基于历史故障信息以及M个故障之间的因果关系,获取目标设备在第T个时刻中发生N个故障的概率。In a possible implementation method, the model to be trained is used to: obtain the causal relationship between M faults among the N faults based on the causal relationship between N faults and the weight of the N faults, N≥M ≥1; Based on historical fault information and the causal relationship between M faults, obtain the probability of N faults occurring in the target equipment at the T moment.
在一种可能实现的方式中,待训练模型,用于:在N个故障之间的因果关系中,将权重小于第一权重阈值的N-M个故障剔除,得到N个故障中的M个故障之间的因果关系。In one possible implementation method, the model to be trained is used to: among the causal relationships between N faults, eliminate N-M faults whose weights are less than the first weight threshold, and obtain M faults among the N faults. causal relationship between.
在一种可能实现的方式中,待训练模型,用于:对M个故障之间的因果关系以及子历史故障信息进行第三特征提取,得到目标设备在第T个时刻中发生N个故障的概率。In one possible implementation method, the model to be trained is used to: extract the third feature of the causal relationship between M faults and sub-historical fault information, and obtain the results of N faults occurring in the target equipment at the T-th moment. Probability.
在一种可能实现的方式中,待训练模型,还用于:在M个故障之间的因果关系中,将权重小于第二权重阈值的M-K个故障剔除,得到M个故障中的K个故障之间的因果关系,M>K≥1;对K个故障之间的因果关系以及子历史故障信息进行第四特征提取,得到目标设备在第T个时刻中发生N个故障的新概率;基于概率对待训练模型进行训练,从而得到目标模型包括:基于概率以及新概率,对待训练模型进行训练,从而得到目标模型。In one possible implementation method, the model to be trained is also used to: among the causal relationships between M faults, eliminate M-K faults whose weights are less than the second weight threshold, and obtain K faults among the M faults. The causal relationship between K faults, M>K≥1; perform fourth feature extraction on the causal relationship between K faults and sub-historical fault information, and obtain the new probability of N faults occurring in the target equipment at the T-th moment; based on Training the model to be trained with probability to obtain the target model includes: training the model to be trained based on probability and new probability to obtain the target model.
在一种可能实现的方式中,第一特征提取或第二特征提取包含以下至少一种:基于循环神经网络的特征提取以及基于卷积神经网络的特征提取。In a possible implementation manner, the first feature extraction or the second feature extraction includes at least one of the following: feature extraction based on a recurrent neural network and feature extraction based on a convolutional neural network.
在一种可能实现的方式中,第三特征提取或第四特征提取包含以下至少一种:基于循环神经网络的特征提取、基于时间卷积网络的特征提取以及基于多层感知机的特征提取。In a possible implementation manner, the third feature extraction or the fourth feature extraction includes at least one of the following: feature extraction based on recurrent neural networks, feature extraction based on temporal convolutional networks, and feature extraction based on multi-layer perceptrons.
本申请实施例的第三方面提供了一种故障预测装置,该装置包含目标模型,该装置包括:第一获取模块,用于获取目标设备的历史故障信息,历史故障信息用于指示目标设备在第1个时刻至第T-1个时刻中发生过的N个故障,T≥2,N≥2;第二获取模块,用于基于历史故障信息,获取N个故障之间的因果关系以及N个故障的权重,N个故障的权重用于指示N个故障的重要程度;第三获取模块,用于基于历史故障信息、N个故障之间的因果关系以及N个故障的权重,获取目标设备在第T个时刻中发生N个故障的概率。The third aspect of the embodiment of the present application provides a fault prediction device, which includes a target model. The device includes: a first acquisition module for acquiring historical fault information of the target equipment, and the historical fault information is used to indicate that the target equipment is in use. N faults that have occurred from the first moment to the T-1 moment, T≥2, N≥2; the second acquisition module is used to obtain the causal relationship between the N faults and N based on historical fault information. The weight of N faults is used to indicate the importance of N faults; the third acquisition module is used to obtain the target device based on historical fault information, the causal relationship between N faults and the weight of N faults. The probability that N faults occur at the T moment.
从上述装置可以看出:当需要针对目标设备进行故障预测时,可先获取目标设备的历史故障信息并将目标设备的历史故障信息输入至目标模型中,目标设备的历史故障信息用于指示目标设备在第1个时刻至第T-1个时刻中发生过的N个故障。然后,目标模型可对目标设备的历史故障信息进行处理,从而得到N个故障之间的因果关系以及N个故障的权重。最后,目标模型可对目标设备的历史故障信息、N个故障之间的因果关系以及N个故障的权重进行处理,从而得到目标设备在第T个时刻中发生N个故障的概率。前述过程中,目标模型在针对目标设备进行故障预测的过程中,不仅考虑目标设备在第1个时刻至第T-1个时刻中发生过的N个故障之间的因果关系,还考虑了N个故障的权重(也就是N个故障在针对目标设备的故障预测过程中的重要程度),所考虑的因素较为全面,这样最终得到的目标设备的故障预测结果(即目标设备在第T个时刻中发生N个故障的概率)可具备较高的准确度。It can be seen from the above device that when it is necessary to perform fault prediction on the target device, the historical fault information of the target device can be obtained first and input into the target model. The historical fault information of the target device is used to indicate the target. N faults that have occurred in the equipment from the 1st time to the T-1th time. Then, the target model can process the historical fault information of the target equipment to obtain the causal relationship between N faults and the weight of N faults. Finally, the target model can process the historical fault information of the target device, the causal relationship between N faults, and the weight of the N faults, thereby obtaining the probability of N faults occurring in the target device at the T-th moment. In the foregoing process, the target model not only considers the causal relationship between the N faults that have occurred in the target device from the first moment to the T-1 moment, but also considers the N fault prediction process for the target device. The weight of each fault (that is, the importance of N faults in the fault prediction process for the target device), the factors considered are relatively comprehensive, so that the final fault prediction result of the target device (that is, the target device at the T-th moment The probability of N faults occurring in ) can have high accuracy.
在一种可能实现的方式中,第二获取模块,用于:对历史故障信息进行第一特征提取,得到N个故障之间的因果关系;从历史故障信息中提取子历史故障信息,子历史故障信息用于指示目标设备在第T-w个时刻至第T-1个时刻中发生过的P个故障,N个故障包含P个故障,N≥P≥1,T>w≥1;对N个故障之间的因果关系以及子历史故障信息进行第二特征提取,得到N个故障的权重。In a possible implementation manner, the second acquisition module is used to: perform first feature extraction on historical fault information to obtain the causal relationship between N faults; extract sub-historical fault information, sub-history, from historical fault information Fault information is used to indicate P faults that have occurred in the target equipment from the T-wth moment to the T-1th moment. N faults include P faults, N≥P≥1, T>w≥1; for N The causal relationship between faults and sub-historical fault information are used for second feature extraction to obtain the weights of N faults.
在一种可能实现的方式中,第三获取模块,用于:基于N个故障之间的因果关系以及N个故障的权重,获取N个故障中的M个故障之间的因果关系,N≥M≥1;基于历史故障信息以及M个故障之间的因果关系,获取目标设备在第T个时刻中发生N个故障的概率。In a possible implementation manner, the third acquisition module is used to: obtain the causal relationship between M faults among the N faults based on the causal relationship between the N faults and the weight of the N faults, N≥ M≥1; Based on historical fault information and the causal relationship between M faults, obtain the probability of N faults occurring in the target equipment at the T moment.
在一种可能实现的方式中,第三获取模块,用于在N个故障之间的因果关系中,将权重小于第一权重阈值的N-M个故障剔除,得到N个故障中的M个故障之间的因果关系。In a possible implementation manner, the third acquisition module is used to eliminate N-M faults whose weights are less than the first weight threshold among the causal relationships between N faults, and obtain M faults among the N faults. causal relationship between.
在一种可能实现的方式中,第三获取模块,用于对M个故障之间的因果关系以及子历史故障信息进行第三特征提取,得到目标设备在第T个时刻中发生N个故障的概率。In a possible implementation manner, the third acquisition module is used to extract the third feature of the causal relationship between the M faults and the sub-historical fault information, and obtain the N faults of the target equipment at the T-th moment. Probability.
在一种可能实现的方式中,第一特征提取或第二特征提取包含以下至少一种:基于循环神经网络的特征提取以及基于卷积神经网络的特征提取。In a possible implementation manner, the first feature extraction or the second feature extraction includes at least one of the following: feature extraction based on a recurrent neural network and feature extraction based on a convolutional neural network.
在一种可能实现的方式中,第三特征提取包含以下至少一种:基于循环神经网络的特征提取、基于时间卷积网络的特征提取以及基于多层感知机的特征提取。In a possible implementation manner, the third feature extraction includes at least one of the following: feature extraction based on a recurrent neural network, feature extraction based on a temporal convolutional network, and feature extraction based on a multi-layer perceptron.
本申请实施例的第四方面提供了一种模型训练装置,该装置包括:获取模块,用于获取目标设备的历史故障信息,历史故障信息用于指示目标设备在第1个时刻至第T-1个时刻中发生过的N个故障,T≥2,N≥2;处理模块,用于将历史故障信息输入至待训练模型,得到目标设备在第T个时刻中发生N个故障的概率,待训练模型用于:基于历史故障信息,获取N个故障之间的因果关系以及N个故障的权重,N个故障的权重用于指示N个故障的重要程度;基于历史故障信息、N个故障之间的因果关系以及N个故障的权重,获取目标设备在第T个时刻中发生N个故障的概率;训练模块,用于基于概率对待训练模型进行训练,从而得到目标模型。The fourth aspect of the embodiment of the present application provides a model training device. The device includes: an acquisition module for acquiring historical fault information of the target device, and the historical fault information is used to indicate that the target device is at the first moment to the T-th moment. N faults that have occurred in one moment, T ≥ 2, N ≥ 2; the processing module is used to input historical fault information into the model to be trained, and obtain the probability of N faults occurring in the target equipment at the T moment, The model to be trained is used to: based on historical fault information, obtain the causal relationship between N faults and the weights of N faults. The weight of N faults is used to indicate the importance of N faults; based on historical fault information, N faults The causal relationship between the faults and the weight of N faults are used to obtain the probability of N faults occurring in the target device at the T-th moment; the training module is used to train the to-be-trained model based on probability to obtain the target model.
上述装置训练得到的目标模型,具备故障预测功能。具体地,当需要针对目标设备进行故障预测时,可先获取目标设备的历史故障信息并将目标设备的历史故障信息输入至目标模型中,目标设备的历史故障信息用于指示目标设备在第1个时刻至第T-1个时刻中发生过的N个故障。然后,目标模型可对目标设备的历史故障信息进行处理,从而得到N个故障之间的因果关系以及N个故障的权重。最后,目标模型可对目标设备的历史故障信息、N个故障之间的因果关系以及N个故障的权重进行处理,从而得到目标设备在第T个时刻中发生N个故障的概率。前述过程中,目标模型在针对目标设备进行故障预测的过程中,不仅考虑目标设备在第1个时刻至第T-1个时刻中发生过的N个故障之间的因果关系,还考虑了N个故障的权重(也就是N个故障在针对目标设备的故障预测过程中的重要程度),所考虑的因素较为全面,这样最终得到的目标设备的故障预测结果(即目标设备在第T个时刻中发生N个故障的概率)可具备较高的准确度。The target model trained by the above device has fault prediction function. Specifically, when it is necessary to perform fault prediction for the target device, the historical fault information of the target device can be obtained first and input into the target model. The historical fault information of the target device is used to indicate that the target device is in the first stage. N faults that have occurred from time to time T-1. Then, the target model can process the historical fault information of the target equipment to obtain the causal relationship between N faults and the weight of N faults. Finally, the target model can process the historical fault information of the target device, the causal relationship between N faults, and the weight of the N faults, thereby obtaining the probability of N faults occurring in the target device at the T-th moment. In the foregoing process, the target model not only considers the causal relationship between the N faults that have occurred in the target device from the first moment to the T-1 moment, but also considers the N fault prediction process for the target device. The weight of each fault (that is, the importance of N faults in the fault prediction process for the target device), the factors considered are relatively comprehensive, so that the final fault prediction result of the target device (that is, the target device at the T-th moment The probability of N faults occurring in ) can have high accuracy.
在一种可能实现的方式中,待训练模型,用于:对历史故障信息进行第一特征提取,得到N个故障之间的因果关系;从历史故障信息中提取子历史故障信息,子历史故障信息用于指示目标设备在第T-w个时刻至第T-1个时刻中发生过的P个故障,N个故障包含P个故障,N≥P≥1,T>w≥1;对N个故障之间的因果关系以及子历史故障信息进行第二特征提取,得到N个故障的权重。In one possible implementation method, the model to be trained is used to: extract the first feature from historical fault information to obtain the causal relationship between N faults; extract sub-historical fault information from the historical fault information, and sub-historical fault information. The information is used to indicate P faults that have occurred in the target equipment from the T-wth moment to the T-1th moment. N faults include P faults, N≥P≥1, T>w≥1; for N faults The second feature extraction is performed on the causal relationship between the faults and the sub-historical fault information to obtain the weights of N faults.
在一种可能实现的方式中,待训练模型,用于:基于N个故障之间的因果关系以及N个故障的权重,获取N个故障中的M个故障之间的因果关系,N≥M≥1;基于历史故障信息以及M个故障之间的因果关系,获取目标设备在第T个时刻中发生N个故障的概率。In a possible implementation method, the model to be trained is used to: obtain the causal relationship between M faults among the N faults based on the causal relationship between N faults and the weight of the N faults, N≥M ≥1; Based on historical fault information and the causal relationship between M faults, obtain the probability of N faults occurring in the target equipment at the T moment.
在一种可能实现的方式中,待训练模型,用于:在N个故障之间的因果关系中,将权重小于第一权重阈值的N-M个故障剔除,得到N个故障中的M个故障之间的因果关系。In one possible implementation method, the model to be trained is used to: among the causal relationships between N faults, eliminate N-M faults whose weights are less than the first weight threshold, and obtain M faults among the N faults. causal relationship between.
在一种可能实现的方式中,待训练模型,用于:对M个故障之间的因果关系以及子历史故障信息进行第三特征提取,得到目标设备在第T个时刻中发生N个故障的概率。In one possible implementation method, the model to be trained is used to: extract the third feature of the causal relationship between M faults and sub-historical fault information, and obtain the results of N faults occurring in the target equipment at the T-th moment. Probability.
在一种可能实现的方式中,待训练模型,还用于:在M个故障之间的因果关系中,将权重小于第二权重阈值的M-K个故障剔除,得到M个故障中的K个故障之间的因果关系,M>K≥1;对K个故障之间的因果关系以及子历史故障信息进行第四特征提取,得到目标设备在第T个时刻中发生N个故障的新概率;训练模块,用于基于概率以及新概率,对待训练模型进行训练,从而得到目标模型。In one possible implementation method, the model to be trained is also used to: among the causal relationships between M faults, eliminate M-K faults whose weights are less than the second weight threshold, and obtain K faults among the M faults. The causal relationship between them, M>K≥1; perform fourth feature extraction on the causal relationship between K faults and sub-historical fault information, and obtain the new probability of N faults occurring in the target equipment at the T-th moment; training The module is used to train the model to be trained based on probability and new probability to obtain the target model.
在一种可能实现的方式中,第一特征提取或第二特征提取包含以下至少一种:基于循环神经网络的特征提取以及基于卷积神经网络的特征提取。In a possible implementation manner, the first feature extraction or the second feature extraction includes at least one of the following: feature extraction based on a recurrent neural network and feature extraction based on a convolutional neural network.
在一种可能实现的方式中,第三特征提取或第四特征提取包含以下至少一种:基于循环神经网络的特征提取、基于时间卷积网络的特征提取以及基于多层感知机的特征提取。In a possible implementation manner, the third feature extraction or the fourth feature extraction includes at least one of the following: feature extraction based on recurrent neural networks, feature extraction based on temporal convolutional networks, and feature extraction based on multi-layer perceptrons.
本申请实施例的第三方面提供了一种故障预测装置,该装置包括存储器和处理器;存储器存储有代码,处理器被配置为执行代码,当代码被执行时,故障预测装置执行如第一方面或第一方面中任意一种可能的实现方式所述的方法。A third aspect of the embodiment of the present application provides a fault prediction device, which includes a memory and a processor; the memory stores codes, and the processor is configured to execute the code. When the code is executed, the fault prediction device performs the first step The method described in any possible implementation manner of the aspect or the first aspect.
本申请实施例的第四方面提供了一种模型训练装置,该装置包括存储器和处理器;存储器存储有代码,处理器被配置为执行代码,当代码被执行时,模型训练装置执行如第二方面或第二方面中任意一种可能的实现方式所述的方法。The fourth aspect of the embodiment of the present application provides a model training device, which includes a memory and a processor; the memory stores code, and the processor is configured to execute the code. When the code is executed, the model training device executes the second step The method described in any possible implementation manner of the aspect or the second aspect.
本申请实施例的第五方面提供了一种电路系统,该电路系统包括处理电路,该处理电路配置为执行如第一方面、第一方面中任意一种可能的实现方式、第二方面或第二方面中任意一种可能的实现方式所述的方法。A fifth aspect of the embodiments of the present application provides a circuit system. The circuit system includes a processing circuit. The processing circuit is configured to perform the first aspect, any one of the possible implementations of the first aspect, the second aspect, or the third aspect. The method described in any one of the possible implementation methods in the two aspects.
本申请实施例的第六方面提供了一种芯片系统,该芯片系统包括处理器,用于调用存储器中存储的计算机程序或计算机指令,以使得该处理器执行如第一方面、第一方面中任意一种可能的实现方式、第二方面或第二方面中任意一种可能的实现方式所述的方法。A sixth aspect of the embodiments of the present application provides a chip system. The chip system includes a processor for calling a computer program or computer instructions stored in a memory, so that the processor executes the steps described in the first aspect and the first aspect. Any possible implementation manner, the second aspect, or the method described in any possible implementation manner in the second aspect.
在一种可能的实现方式中,该处理器通过接口与存储器耦合。In one possible implementation, the processor is coupled to the memory through an interface.
在一种可能的实现方式中,该芯片系统还包括存储器,该存储器中存储有计算机程序或计算机指令。In a possible implementation, the chip system further includes a memory, and computer programs or computer instructions are stored in the memory.
本申请实施例的第七方面提供了一种计算机存储介质,该计算机存储介质存储有计算机程序,该程序在由计算机执行时,使得计算机实施如第一方面、第一方面中任意一种可能的实现方式、第二方面或第二方面中任意一种可能的实现方式所述的方法。A seventh aspect of the embodiments of the present application provides a computer storage medium. The computer storage medium stores a computer program. When the program is executed by a computer, the computer implements any one of the possible methods in the first aspect and the first aspect. The method described in the implementation, the second aspect, or any possible implementation of the second aspect.
本申请实施例的第八方面提供了一种计算机程序产品,该计算机程序产品存储有指令,该指令在由计算机执行时,使得计算机实施如第一方面、第一方面中任意一种可能的实现方式、第二方面或第二方面中任意一种可能的实现方式所述的方法。An eighth aspect of the embodiments of the present application provides a computer program product. The computer program product stores instructions. When the instructions are executed by a computer, the computer implements any one of the possible implementations of the first aspect and the first aspect. method, the second aspect, or any possible implementation manner of the second aspect.
本申请实施例中,当需要针对目标设备进行故障预测时,可先获取目标设备的历史故障信息并将目标设备的历史故障信息输入至目标模型中,目标设备的历史故障信息用于指示目标设备在第1个时刻至第T-1个时刻中发生过的N个故障。然后,目标模型可对目标设备的历史故障信息进行处理,从而得到N个故障之间的因果关系以及N个故障的权重。最后,目标模型可对目标设备的历史故障信息、N个故障之间的因果关系以及N个故障的权重进行处理,从而得到目标设备在第T个时刻中发生N个故障的概率。前述过程中,目标模型在针对目标设备进行故障预测的过程中,不仅考虑目标设备在第1个时刻至第T-1个时刻中发生过的N个故障之间的因果关系,还考虑了N个故障的权重(也就是N个故障在针对目标设备的故障预测过程中的重要程度),所考虑的因素较为全面,这样最终得到的目标设备的故障预测结果(即目标设备在第T个时刻中发生N个故障的概率)可具备较高的准确度。In the embodiment of the present application, when it is necessary to perform fault prediction on the target device, the historical fault information of the target device can be obtained first and input into the target model. The historical fault information of the target device is used to indicate the target device. N faults that have occurred from time 1 to time T-1. Then, the target model can process the historical fault information of the target equipment to obtain the causal relationship between N faults and the weight of N faults. Finally, the target model can process the historical fault information of the target device, the causal relationship between N faults, and the weight of the N faults, thereby obtaining the probability of N faults occurring in the target device at the T-th moment. In the foregoing process, the target model not only considers the causal relationship between the N faults that have occurred in the target device from the first moment to the T-1 moment, but also considers the N fault prediction process for the target device. The weight of each fault (that is, the importance of N faults in the fault prediction process for the target device), the factors considered are relatively comprehensive, so that the final fault prediction result of the target device (that is, the target device at the T-th moment The probability of N faults occurring in ) can have high accuracy.
附图说明Description of drawings
图1为人工智能主体框架的一种结构示意图;Figure 1 is a structural schematic diagram of the main framework of artificial intelligence;
图2a为本申请实施例提供的故障预测系统的一个结构示意图;Figure 2a is a schematic structural diagram of the fault prediction system provided by the embodiment of the present application;
图2b为本申请实施例提供的故障预测系统的另一结构示意图;Figure 2b is another structural schematic diagram of the fault prediction system provided by the embodiment of the present application;
图2c为本申请实施例提供的故障预测的相关设备的一个示意图;Figure 2c is a schematic diagram of related equipment for fault prediction provided by the embodiment of the present application;
图3为本申请实施例提供的系统100架构的一个示意图;Figure 3 is a schematic diagram of the architecture of the system 100 provided by the embodiment of the present application;
图4为本申请实施例提供的目标模型的一个结构示意图;Figure 4 is a schematic structural diagram of the target model provided by the embodiment of the present application;
图5为本申请实施例提供的故障预测方法的一个流程示意图;Figure 5 is a schematic flow chart of the fault prediction method provided by the embodiment of the present application;
图6为本申请实施例提供的决策解释模块的一个示意图;Figure 6 is a schematic diagram of the decision interpretation module provided by the embodiment of the present application;
图7为本申请实施例提供的决策链优化模块的一个示意图;Figure 7 is a schematic diagram of the decision chain optimization module provided by the embodiment of the present application;
图8为本申请实施例提供的因果图以及证据链的一个示意图;Figure 8 is a schematic diagram of the cause-and-effect diagram and evidence chain provided by the embodiment of the present application;
图9为本申请实施例提供的模型训练方法的一个流程示意图;Figure 9 is a schematic flow chart of the model training method provided by the embodiment of the present application;
图10为本申请实施例提供的故障预测装置的一个结构示意图;Figure 10 is a schematic structural diagram of a fault prediction device provided by an embodiment of the present application;
图11为本申请实施例提供的模型训练装置的一个结构示意图;Figure 11 is a schematic structural diagram of a model training device provided by an embodiment of the present application;
图12为本申请实施例提供的执行设备的一个结构示意图;Figure 12 is a schematic structural diagram of an execution device provided by an embodiment of the present application;
图13为本申请实施例提供的训练设备的一个结构示意图;Figure 13 is a schematic structural diagram of the training equipment provided by the embodiment of the present application;
图14为本申请实施例提供的芯片的一个结构示意图。Figure 14 is a schematic structural diagram of a chip provided by an embodiment of the present application.
具体实施方式Detailed ways
本申请实施例提供了一种故障预测方法及其相关设备,在针对设备进行故障预测的过程中,所考虑的因素较为全面,这样最终得到的设备的故障预测结果可具备较高的准确度。Embodiments of the present application provide a fault prediction method and related equipment. In the process of fault prediction for the equipment, relatively comprehensive factors are considered, so that the final fault prediction result of the equipment can have high accuracy.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,这仅仅是描述本申请的实施例中对相同属性的对象在描述时所采用的区分方式。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,以便包含一系列单元的过程、方法、系统、产品或设备不必限于那些单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它单元。The terms "first", "second", etc. in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the terms so used are interchangeable under appropriate circumstances, and are merely a way of distinguishing objects with the same attributes in describing the embodiments of the present application. Furthermore, the terms "include" and "having" and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, product or apparatus comprising a series of elements need not be limited to those elements, but may include not explicitly other elements specifically listed or inherent to such processes, methods, products or equipment.
设备故障预测,指设备的故障尚未发生,通过AI技术中的神经网络模型,基于设备的某些信息来预测设备是否可能发生某种或某些故障,以向设备工程师告知故障预测结果,从而使得设备工程师基于故障预测结果可及时维修设备。Equipment failure prediction refers to the fact that the equipment failure has not yet occurred. Through the neural network model in AI technology, it is predicted whether a certain or certain failures may occur in the equipment based on certain information of the equipment, so as to inform the equipment engineers of the failure prediction results, thus making Equipment engineers can repair equipment in time based on fault prediction results.
相关技术中,可先获取设备的历史故障信息,历史故障信息用于指示设备在过去曾经发生过的多个故障,并把历史故障信息输入至神经网络模型中。接着,神经网络模型可对历史故障信息进行一系列的处理,从而得到设备在未来发生这多个故障的概率,也就是设备的故障预测结果。至此,则完成了针对设备的故障预测。In related technologies, historical fault information of the equipment can be obtained first. The historical fault information is used to indicate multiple faults that have occurred in the equipment in the past, and the historical fault information can be input into the neural network model. Then, the neural network model can perform a series of processing on the historical fault information to obtain the probability of multiple faults occurring in the equipment in the future, which is the fault prediction result of the equipment. At this point, the fault prediction for the equipment is completed.
上述过程中,神经网络模型会针对用于指示设备曾经发生过的多个故障的历史故障信息进行复杂的处理,从而得到这多个故障的贡献度,再基于这多个故障的贡献度作进一步地处理,从而得到设备在未来发生这多个故障的概率。由此可见,神经网络模型在针对设备进行故障预测的过程中,仅考虑这多个故障在故障预测过程中所付出的贡献度,所考虑的因素较为单一,这样会导致最终得到的设备的故障预测结果不够准确。In the above process, the neural network model will perform complex processing on the historical fault information used to indicate multiple faults that have occurred in the equipment, thereby obtaining the contribution of these multiple faults, and then make further predictions based on the contribution of these multiple faults. Processed accordingly, the probability of multiple failures occurring in the equipment in the future can be obtained. It can be seen that in the process of fault prediction for equipment, the neural network model only considers the contribution of these multiple faults in the fault prediction process, and the factors considered are relatively single, which will lead to the failure of the final equipment. The forecast results are not accurate enough.
进一步地,相关技术提供的神经网络模型为一个黑盒子,只能通过一个数学领域中的线性模型来近似于设备的故障预测结果,那么,可将该线性模型的参数作为多个故障在故障预测过程中所付出的贡献度,这样一来,虽然可以粗略地解释历史故障信息与设备的故障预测结果之间的关系(也就是预测出了设备将会发生某个或某些故障,并大致解释为何设备会发生这些故障),但无法细致地解释历史故障信息与设备的故障预测结果之间的关系。Furthermore, the neural network model provided by the related technology is a black box, which can only approximate the fault prediction results of the equipment through a linear model in the mathematical field. Then, the parameters of the linear model can be used as multiple faults in fault prediction. The contribution made in the process, in this way, although the relationship between the historical fault information and the fault prediction results of the equipment can be roughly explained (that is, it is predicted that one or some faults will occur in the equipment, and roughly explained Why these failures occur in equipment), but the relationship between historical failure information and equipment failure prediction results cannot be explained in detail.
为了解决上述问题,本申请实施例提供了一种故障预测方法,该方法可结合人工智能(artificial intelligence,AI)技术实现。AI技术是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能的技术学科,AI技术通过感知环境、获取知识并使用知识获得最佳结果。换句话说,人工智能技术是计算机科学的一个分支,它企图了解智能的实质,并生产出一种新的能以人类智能相似的方式做出反应的智能机器。利用人工智能进行数据处理是人工智能常见的一个应用方式。In order to solve the above problem, embodiments of the present application provide a fault prediction method, which can be implemented in conjunction with artificial intelligence (artificial intelligence, AI) technology. AI technology is a technical discipline that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence. AI technology obtains the best results by perceiving the environment, acquiring knowledge and using knowledge. In other words, artificial intelligence technology is a branch of computer science that attempts to understand the nature of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Using artificial intelligence for data processing is a common application method of artificial intelligence.
首先对人工智能系统总体工作流程进行描述,请参见图1,图1为人工智能主体框架的一种结构示意图,下面从“智能信息链”(水平轴)和“IT价值链”(垂直轴)两个维度对上述人工智能主题框架进行阐述。其中,“智能信息链”反映从数据的获取到处理的一列过程。举例来说,可以是智能信息感知、智能信息表示与形成、智能推理、智能决策、智能执行与输出的一般过程。在这个过程中,数据经历了“数据—信息—知识—智慧”的凝练过程。“IT价值链”从人智能的底层基础设施、信息(提供和处理技术实现)到系统的产业生态过程,反映人工智能为信息技术产业带来的价值。First, the overall workflow of the artificial intelligence system is described. Please refer to Figure 1. Figure 1 is a structural schematic diagram of the main framework of artificial intelligence. The following is from the "intelligent information chain" (horizontal axis) and "IT value chain" (vertical axis) The above artificial intelligence theme framework is elaborated on in two dimensions. Among them, the "intelligent information chain" reflects a series of processes from data acquisition to processing. For example, it can be the general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, intelligent execution and output. In this process, the data has gone through the condensation process of "data-information-knowledge-wisdom". The "IT value chain" reflects the value that artificial intelligence brings to the information technology industry, from the underlying infrastructure of human intelligence and information (providing and processing technology implementation) to the systematic industrial ecological process.
(1)基础设施(1)Infrastructure
基础设施为人工智能系统提供计算能力支持,实现与外部世界的沟通,并通过基础平台实现支撑。通过传感器与外部沟通;计算能力由智能芯片(CPU、NPU、GPU、ASIC、FPGA等硬件加速芯片)提供;基础平台包括分布式计算框架及网络等相关的平台保障和支持,可以包括云存储和计算、互联互通网络等。举例来说,传感器和外部沟通获取数据,这些数据提供给基础平台提供的分布式计算系统中的智能芯片进行计算。Infrastructure provides computing power support for artificial intelligence systems, enables communication with the external world, and supports it through basic platforms. Communicate with the outside through sensors; computing power is provided by smart chips (hardware acceleration chips such as CPU, NPU, GPU, ASIC, FPGA, etc.); the basic platform includes distributed computing framework and network and other related platform guarantees and support, which can include cloud storage and Computing, interconnection networks, etc. For example, sensors communicate with the outside world to obtain data, which are provided to smart chips in the distributed computing system provided by the basic platform for calculation.
(2)数据(2)Data
基础设施的上一层的数据用于表示人工智能领域的数据来源。数据涉及到图形、图像、语音、文本,还涉及到传统设备的物联网数据,包括已有系统的业务数据以及力、位移、液位、温度、湿度等感知数据。Data from the upper layer of the infrastructure is used to represent data sources in the field of artificial intelligence. The data involves graphics, images, voice, and text, as well as IoT data of traditional devices, including business data of existing systems and sensory data such as force, displacement, liquid level, temperature, and humidity.
(3)数据处理(3)Data processing
数据处理通常包括数据训练,机器学习,深度学习,搜索,推理,决策等方式。Data processing usually includes data training, machine learning, deep learning, search, reasoning, decision-making and other methods.
其中,机器学习和深度学习可以对数据进行符号化和形式化的智能信息建模、抽取、预处理、训练等。Among them, machine learning and deep learning can perform symbolic and formal intelligent information modeling, extraction, preprocessing, training, etc. on data.
推理是指在计算机或智能系统中,模拟人类的智能推理方式,依据推理控制策略,利用形式化的信息进行机器思维和求解问题的过程,典型的功能是搜索与匹配。Reasoning refers to the process of simulating human intelligent reasoning in computers or intelligent systems, using formal information to perform machine thinking and problem solving based on reasoning control strategies. Typical functions are search and matching.
决策是指智能信息经过推理后进行决策的过程,通常提供分类、排序、预测等功能。Decision-making refers to the process of decision-making after intelligent information is reasoned, and usually provides functions such as classification, sorting, and prediction.
(4)通用能力(4) General ability
对数据经过上面提到的数据处理后,进一步基于数据处理的结果可以形成一些通用的能力,比如可以是算法或者一个通用系统,例如,翻译,文本的分析,计算机视觉的处理,语音识别,图像的识别等等。After the data is processed as mentioned above, some general capabilities can be formed based on the results of further data processing, such as algorithms or a general system, such as translation, text analysis, computer vision processing, speech recognition, and image processing. identification, etc.
(5)智能产品及行业应用(5) Intelligent products and industry applications
智能产品及行业应用指人工智能系统在各领域的产品和应用,是对人工智能整体解决方案的封装,将智能信息决策产品化、实现落地应用,其应用领域主要包括:智能终端、智能交通、智能医疗、自动驾驶、智慧城市等。Intelligent products and industry applications refer to the products and applications of artificial intelligence systems in various fields. They are the encapsulation of overall artificial intelligence solutions, productizing intelligent information decision-making and realizing practical applications. Its application fields mainly include: intelligent terminals, intelligent transportation, Smart healthcare, autonomous driving, smart cities, etc.
接下来介绍几种本申请的应用场景。Next, several application scenarios of this application will be introduced.
图2a为本申请实施例提供的故障预测系统的一个结构示意图,该故障预测系统包括用户设备以及数据处理设备。其中,用户设备包括手机、个人电脑或者信息处理中心等智能终端。用户设备为故障预测的发起端,作为故障预测请求的发起方,通常由用户通过用户设备发起请求。Figure 2a is a schematic structural diagram of a fault prediction system provided by an embodiment of the present application. The fault prediction system includes user equipment and data processing equipment. Among them, user equipment includes smart terminals such as mobile phones, personal computers, or information processing centers. The user equipment is the initiator of fault prediction. As the initiator of the fault prediction request, the user usually initiates the request through the user equipment.
上述数据处理设备可以是云服务器、网络服务器、应用服务器以及管理服务器等具有数据处理功能的设备或服务器。数据处理设备通过交互接口接收来自智能终端的故障预测请求,再通过存储数据的存储器以及数据处理的处理器环节进行机器学习,深度学习,搜索,推理,决策等方式的故障预测。数据处理设备中的存储器可以是一个统称,包括本地存储以及存储历史数据的数据库,数据库可以在数据处理设备上,也可以在其它网络服务器上。The above-mentioned data processing equipment may be a cloud server, a network server, an application server, a management server, and other equipment or servers with data processing functions. The data processing equipment receives the fault prediction request from the intelligent terminal through the interactive interface, and then performs fault prediction through machine learning, deep learning, search, reasoning, decision-making and other methods through the memory for storing data and the processor for data processing. The memory in the data processing device can be a general term, including local storage and a database that stores historical data. The database can be on the data processing device or on other network servers.
在图2a所示的故障预测系统中,用户设备可以接收用户的指令,例如用户设备可以获取用户输入/选择的目标设备的历史故障信息,然后向数据处理设备发起请求,使得数据处理设备针对来自用户设备的目标设备的历史故障信息执行故障预测处理,从而得到针对目标设备的故障预测结果。示例性的,用户设备可以获取用户输入的目标设备的历史故障信息(该信息用于指示目标设备在过去曾经发生的多个故障),然后用户设备可向数据处理设备发起故障预测请求,使得数据处理设备基于故障预测请求,对目标设备的历史故障信息进行一系列的处理,从而得到目标设备的故障预测结果,即目标设备在未来发生多个故障的概率。In the fault prediction system shown in Figure 2a, the user device can receive the user's instructions. For example, the user device can obtain the historical fault information of the target device input/selected by the user, and then initiate a request to the data processing device, so that the data processing device can respond to the request from the user. The historical fault information of the target device of the user equipment performs fault prediction processing, thereby obtaining a fault prediction result for the target device. For example, the user equipment can obtain the historical fault information of the target device input by the user (this information is used to indicate multiple faults that have occurred in the target device in the past), and then the user device can initiate a fault prediction request to the data processing device, so that the data Based on the fault prediction request, the processing device performs a series of processing on the historical fault information of the target device to obtain the fault prediction result of the target device, that is, the probability of multiple failures of the target device in the future.
在图2a中,数据处理设备可以执行本申请实施例的故障预测方法。In Figure 2a, the data processing device can execute the fault prediction method according to the embodiment of the present application.
图2b为本申请实施例提供的故障预测系统的另一结构示意图,在图2b中,用户设备直接作为数据处理设备,该用户设备能够直接获取来自用户的输入并直接由用户设备本身的硬件进行处理,具体过程与图2a相似,可参考上面的描述,在此不再赘述。Figure 2b is another schematic structural diagram of the fault prediction system provided by the embodiment of the present application. In Figure 2b, the user equipment directly serves as a data processing equipment. The user equipment can directly obtain input from the user and directly perform processing by the hardware of the user equipment itself. Processing, the specific process is similar to Figure 2a, please refer to the above description, and will not be repeated here.
在图2b所示的故障预测系统中,用户设备可以接收用户的指令,例如用户设备可以获取用户输入的目标设备的历史故障信息(该信息用于指示目标设备在过去曾经发生的多个故障),然后用户设备可对目标设备的历史故障信息进行一系列的处理,从而得到目标设备的故障预测结果,即目标设备在未来发生多个故障的概率。In the fault prediction system shown in Figure 2b, the user equipment can receive the user's instructions. For example, the user equipment can obtain the historical fault information of the target device input by the user (this information is used to indicate multiple faults that have occurred in the target device in the past). , and then the user device can perform a series of processing on the historical fault information of the target device to obtain the fault prediction result of the target device, that is, the probability of multiple failures of the target device in the future.
在图2b中,用户设备自身就可以执行本申请实施例的故障预测方法。In Figure 2b, the user equipment itself can execute the fault prediction method according to the embodiment of the present application.
图2c为本申请实施例提供的故障预测的相关设备的一个示意图。Figure 2c is a schematic diagram of related equipment for fault prediction provided by the embodiment of the present application.
上述图2a和图2b中的用户设备具体可以是图2c中的本地设备301或者本地设备302,图2a中的数据处理设备具体可以是图2c中的执行设备210,其中,数据存储系统250可以存储执行设备210的待处理数据,数据存储系统250可以集成在执行设备210上,也可以设置在云上或其它网络服务器上。The user equipment in Figure 2a and Figure 2b can be the local device 301 or the local device 302 in Figure 2c, and the data processing device in Figure 2a can be the execution device 210 in Figure 2c, where the data storage system 250 can To store the data to be processed by the execution device 210, the data storage system 250 can be integrated on the execution device 210, or can be set up on the cloud or other network servers.
图2a和图2b中的处理器可以通过神经网络模型或者其它模型(例如,基于支持向量机的模型)进行数据训练/机器学习/深度学习,并利用数据最终训练或者学习得到的模型针对图像执行故障预测应用,从而得到相应的处理结果。The processors in Figure 2a and Figure 2b can perform data training/machine learning/deep learning through neural network models or other models (for example, models based on support vector machines), and use the final trained or learned model to execute on the image using the data Fault prediction application to obtain corresponding processing results.
图3为本申请实施例提供的系统100架构的一个示意图,在图3中,执行设备110配置输入/输出(input/output,I/O)接口112,用于与外部设备进行数据交互,用户可以通过客户设备140向I/O接口112输入数据,所述输入数据在本申请实施例中可以包括:各个待调度任务、可调用资源以及其他参数。Figure 3 is a schematic diagram of the architecture of the system 100 provided by the embodiment of the present application. In Figure 3, the execution device 110 is configured with an input/output (I/O) interface 112 for data interaction with external devices. The user Data can be input to the I/O interface 112 through the client device 140. In this embodiment of the present application, the input data may include: various to-be-scheduled tasks, callable resources, and other parameters.
在执行设备110对输入数据进行预处理,或者在执行设备110的计算模块111执行计算等相关的处理(比如进行本申请中神经网络的功能实现)过程中,执行设备110可以调用数据存储系统150中的数据、代码等以用于相应的处理,也可以将相应处理得到的数据、指令等存入数据存储系统150中。When the execution device 110 preprocesses the input data, or when the calculation module 111 of the execution device 110 performs calculation and other related processing (such as implementing the function of the neural network in this application), the execution device 110 can call the data storage system 150 The data, codes, etc. in the system can be used for corresponding processing, and the data, instructions, etc. obtained by corresponding processing can also be stored in the data storage system 150 .
最后,I/O接口112将处理结果返回给客户设备140,从而提供给用户。Finally, the I/O interface 112 returns the processing results to the client device 140, thereby providing them to the user.
值得说明的是,训练设备120可以针对不同的目标或称不同的任务,基于不同的训练数据生成相应的目标模型/规则,该相应的目标模型/规则即可以用于实现上述目标或完成上述任务,从而为用户提供所需的结果。其中,训练数据可以存储在数据库130中,且来自于数据采集设备160采集的训练样本。It is worth mentioning that the training device 120 can generate corresponding target models/rules based on different training data for different goals or different tasks, and the corresponding target models/rules can be used to achieve the above goals or complete the above tasks. , thereby providing users with the desired results. The training data may be stored in the database 130 and come from training samples collected by the data collection device 160 .
在图3中所示情况下,用户可以手动给定输入数据,该手动给定可以通过I/O接口112提供的界面进行操作。另一种情况下,客户设备140可以自动地向I/O接口112发送输入数据,如果要求客户设备140自动发送输入数据需要获得用户的授权,则用户可以在客户设备140中设置相应权限。用户可以在客户设备140查看执行设备110输出的结果,具体的呈现形式可以是显示、声音、动作等具体方式。客户设备140也可以作为数据采集端,采集如图所示输入I/O接口112的输入数据及输出I/O接口112的输出结果作为新的样本数据,并存入数据库130。当然,也可以不经过客户设备140进行采集,而是由I/O接口112直接将如图所示输入I/O接口112的输入数据及输出I/O接口112的输出结果,作为新的样本数据存入数据库130。In the case shown in FIG. 3 , the user can manually enter the input data, and the manual input can be operated through the interface provided by the I/O interface 112 . In another case, the client device 140 can automatically send input data to the I/O interface 112. If requiring the client device 140 to automatically send input data requires the user's authorization, the user can set corresponding permissions in the client device 140. The user can view the results output by the execution device 110 on the client device 140, and the specific presentation form may be display, sound, action, etc. The client device 140 can also be used as a data collection end to collect the input data of the input I/O interface 112 and the output results of the output I/O interface 112 as new sample data, and store them in the database 130 . Of course, it is also possible to collect without going through the client device 140. Instead, the I/O interface 112 directly uses the input data input to the I/O interface 112 and the output result of the output I/O interface 112 as a new sample as shown in the figure. The data is stored in database 130.
值得注意的是,图3仅是本申请实施例提供的一种系统架构的示意图,图中所示设备、器件、模块等之间的位置关系不构成任何限制,例如,在图3中,数据存储系统150相对执行设备110是外部存储器,在其它情况下,也可以将数据存储系统150置于执行设备110中。如图3所示,可以根据训练设备120训练得到神经网络。It is worth noting that Figure 3 is only a schematic diagram of a system architecture provided by an embodiment of the present application. The positional relationship between the devices, devices, modules, etc. shown in the figure does not constitute any limitation. For example, in Figure 3, the data The storage system 150 is an external memory relative to the execution device 110. In other cases, the data storage system 150 can also be placed in the execution device 110. As shown in Figure 3, the neural network can be trained according to the training device 120.
本申请实施例还提供的一种芯片,该芯片包括神经网络处理器NPU。该芯片可以被设置在如图3所示的执行设备110中,用以完成计算模块111的计算工作。该芯片也可以被设置在如图3所示的训练设备120中,用以完成训练设备120的训练工作并输出目标模型/规则。An embodiment of the present application also provides a chip, which includes a neural network processor NPU. The chip can be disposed in the execution device 110 as shown in FIG. 3 to complete the calculation work of the calculation module 111. The chip can also be installed in the training device 120 as shown in Figure 3 to complete the training work of the training device 120 and output the target model/rules.
神经网络处理器NPU,NPU作为协处理器挂载到主中央处理器(centralprocessingunit,CPU)(host CPU)上,由主CPU分配任务。NPU的核心部分为运算电路,控制器控制运算电路提取存储器(权重存储器或输入存储器)中的数据并进行运算。Neural network processor NPU, NPU is mounted on the main central processing unit (CPU) (host CPU) as a co-processor, and the main CPU allocates tasks. The core part of the NPU is the arithmetic circuit. The controller controls the arithmetic circuit to extract the data in the memory (weight memory or input memory) and perform operations.
在一些实现中,运算电路内部包括多个处理单元(process engine,PE)。在一些实现中,运算电路是二维脉动阵列。运算电路还可以是一维脉动阵列或者能够执行例如乘法和加法这样的数学运算的其它电子线路。在一些实现中,运算电路是通用的矩阵处理器。In some implementations, the computing circuit includes multiple processing units (PE). In some implementations, the arithmetic circuit is a two-dimensional systolic array. The arithmetic circuit may also be a one-dimensional systolic array or other electronic circuit capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuit is a general-purpose matrix processor.
举例来说,假设有输入矩阵A,权重矩阵B,输出矩阵C。运算电路从权重存储器中取矩阵B相应的数据,并缓存在运算电路中每一个PE上。运算电路从输入存储器中取矩阵A数据与矩阵B进行矩阵运算,得到的矩阵的部分结果或最终结果,保存在累加器(accumulator)中。For example, assume there is an input matrix A, a weight matrix B, and an output matrix C. The arithmetic circuit fetches the corresponding data of matrix B from the weight memory and caches it on each PE in the arithmetic circuit. The operation circuit takes matrix A data and matrix B from the input memory to perform matrix operations, and the partial result or final result of the obtained matrix is stored in the accumulator (accumulator).
向量计算单元可以对运算电路的输出做进一步处理,如向量乘,向量加,指数运算,对数运算,大小比较等等。例如,向量计算单元可以用于神经网络中非卷积/非FC层的网络计算,如池化(pooling),批归一化(batch normalization),局部响应归一化(localresponse normalization)等。The vector calculation unit can further process the output of the arithmetic circuit, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. For example, the vector computing unit can be used for network calculations in non-convolutional/non-FC layers in neural networks, such as pooling, batch normalization, local response normalization, etc.
在一些实现种,向量计算单元能将经处理的输出的向量存储到统一缓存器。例如,向量计算单元可以将非线性函数应用到运算电路的输出,例如累加值的向量,用以生成激活值。在一些实现中,向量计算单元生成归一化的值、合并值,或二者均有。在一些实现中,处理过的输出的向量能够用作到运算电路的激活输入,例如用于在神经网络中的后续层中的使用。In some implementations, the vector computation unit can store the processed output vector into a unified buffer. For example, the vector calculation unit may apply a nonlinear function to the output of the arithmetic circuit, such as a vector of accumulated values, to generate activation values. In some implementations, the vector computation unit generates normalized values, merged values, or both. In some implementations, the processed output vector can be used as an activation input to an arithmetic circuit, such as for use in a subsequent layer in a neural network.
统一存储器用于存放输入数据以及输出数据。Unified memory is used to store input data and output data.
权重数据直接通过存储单元访问控制器(direct memory accesscontroller,DMAC)将外部存储器中的输入数据搬运到输入存储器和/或统一存储器、将外部存储器中的权重数据存入权重存储器,以及将统一存储器中的数据存入外部存储器。The weight data directly transfers the input data in the external memory to the input memory and/or the unified memory through the storage unit access controller (direct memory access controller, DMAC), stores the weight data in the external memory into the weight memory, and stores the weight data in the unified memory. The data is stored in external memory.
总线接口单元(bus interface unit,BIU),用于通过总线实现主CPU、DMAC和取指存储器之间进行交互。The bus interface unit (BIU) is used to realize the interaction between the main CPU, DMAC and instruction memory through the bus.
与控制器连接的取指存储器(instruction fetch buffer),用于存储控制器使用的指令;The instruction fetch buffer connected to the controller is used to store instructions used by the controller;
控制器,用于调用指存储器中缓存的指令,实现控制该运算加速器的工作过程。The controller is used to call instructions cached in the memory to control the working process of the computing accelerator.
一般地,统一存储器,输入存储器,权重存储器以及取指存储器均为片上(On-Chip)存储器,外部存储器为该NPU外部的存储器,该外部存储器可以为双倍数据率同步动态随机存储器(double data rate synchronous dynamic random accessmemory,DDRSDRAM)、高带宽存储器(high bandwidth memory,HBM)或其他可读可写的存储器。Generally, the unified memory, input memory, weight memory and instruction memory are all on-chip memories, and the external memory is a memory outside the NPU. The external memory can be a double data rate synchronous dynamic random access memory (double data rate). rate synchronous dynamic random access memory (DDRSDRAM), high bandwidth memory (high bandwidth memory, HBM) or other readable and writable memory.
由于本申请实施例涉及大量神经网络的应用,为了便于理解,下面先对本申请实施例涉及的相关术语及神经网络等相关概念进行介绍。Since the embodiments of the present application involve the application of a large number of neural networks, in order to facilitate understanding, the relevant terms involved in the embodiments of the present application and related concepts such as neural networks are first introduced below.
(1)神经网络(1)Neural network
神经网络可以是由神经单元组成的,神经单元可以是指以xs和截距1为输入的运算单元,该运算单元的输出可以为:The neural network can be composed of neural units. The neural unit can refer to an arithmetic unit that takes xs and intercept 1 as input. The output of the arithmetic unit can be:
其中,s=1、2、……n,n为大于1的自然数,Ws为xs的权重,b为神经单元的偏置。f为神经单元的激活函数(activation functions),用于将非线性特性引入神经网络中,来将神经单元中的输入信号转换为输出信号。该激活函数的输出信号可以作为下一层卷积层的输入。激活函数可以是sigmoid函数。神经网络是将许多个上述单一的神经单元联结在一起形成的网络,即一个神经单元的输出可以是另一个神经单元的输入。每个神经单元的输入可以与前一层的局部接受域相连,来提取局部接受域的特征,局部接受域可以是由若干个神经单元组成的区域。Among them, s=1, 2,...n, n is a natural number greater than 1, Ws is the weight of xs, and b is the bias of the neural unit. f is the activation function of the neural unit, which is used to introduce nonlinear characteristics into the neural network to convert the input signal in the neural unit into an output signal. The output signal of this activation function can be used as the input of the next convolutional layer. The activation function can be a sigmoid function. A neural network is a network formed by connecting many of the above-mentioned single neural units together, that is, the output of one neural unit can be the input of another neural unit. The input of each neural unit can be connected to the local receptive field of the previous layer to extract the features of the local receptive field. The local receptive field can be an area composed of several neural units.
神经网络中的每一层的工作可以用数学表达式y=a(Wx+b)来描述:从物理层面神经网络中的每一层的工作可以理解为通过五种对输入空间(输入向量的集合)的操作,完成输入空间到输出空间的变换(即矩阵的行空间到列空间),这五种操作包括:1、升维/降维;2、放大/缩小;3、旋转;4、平移;5、“弯曲”。其中1、2、3的操作由Wx完成,4的操作由+b完成,5的操作则由a()来实现。这里之所以用“空间”二字来表述是因为被分类的对象并不是单个事物,而是一类事物,空间是指这类事物所有个体的集合。其中,W是权重向量,该向量中的每一个值表示该层神经网络中的一个神经元的权重值。该向量W决定着上文所述的输入空间到输出空间的空间变换,即每一层的权重W控制着如何变换空间。训练神经网络的目的,也就是最终得到训练好的神经网络的所有层的权重矩阵(由很多层的向量W形成的权重矩阵)。因此,神经网络的训练过程本质上就是学习控制空间变换的方式,更具体的就是学习权重矩阵。The work of each layer in the neural network can be described by the mathematical expression y=a(Wx+b): From the physical level, the work of each layer in the neural network can be understood as five pairs of input spaces (input vectors) Set) operations to complete the transformation from input space to output space (i.e., row space to column space of matrix). These five operations include: 1. Dimension raising/reducing; 2. Enlarging/reducing; 3. Rotation; 4. Translation; 5. "Bend". Among them, the operations of 1, 2, and 3 are completed by Wx, the operation of 4 is completed by +b, and the operation of 5 is implemented by a(). The reason why the word "space" is used here is because the object to be classified is not a single thing, but a class of things. Space refers to the collection of all individuals of this type of thing. Among them, W is a weight vector, and each value in the vector represents the weight value of a neuron in the neural network of this layer. This vector W determines the spatial transformation from the input space to the output space described above, that is, the weight W of each layer controls how to transform the space. The purpose of training a neural network is to finally obtain the weight matrix of all layers of the trained neural network (a weight matrix formed by the vector W of many layers). Therefore, the training process of neural network is essentially to learn how to control spatial transformation, and more specifically, to learn the weight matrix.
因为希望神经网络的输出尽可能的接近真正想要预测的值,所以可以通过比较当前网络的预测值和真正想要的目标值,再根据两者之间的差异情况来更新每一层神经网络的权重向量(当然,在第一次更新之前通常会有初始化的过程,即为神经网络中的各层预先配置参数),比如,如果网络的预测值高了,就调整权重向量让它预测低一些,不断的调整,直到神经网络能够预测出真正想要的目标值。因此,就需要预先定义“如何比较预测值和目标值之间的差异”,这便是损失函数(loss function)或目标函数(objective function),它们是用于衡量预测值和目标值的差异的重要方程。其中,以损失函数举例,损失函数的输出值(loss)越高表示差异越大,那么神经网络的训练就变成了尽可能缩小这个loss的过程。Because you want the output of the neural network to be as close as possible to the value you really want to predict, you can compare the predicted value of the current network with the really desired target value, and then update each layer of the neural network based on the difference between the two. weight vector (of course, there is usually an initialization process before the first update, that is, pre-configuring parameters for each layer in the neural network). For example, if the predicted value of the network is high, adjust the weight vector to make it predict lower Some, constant adjustments are made until the neural network can predict the truly desired target value. Therefore, it is necessary to define in advance "how to compare the difference between the predicted value and the target value". This is the loss function (loss function) or objective function (objective function), which is used to measure the difference between the predicted value and the target value. Important equations. Among them, taking the loss function as an example, the higher the output value (loss) of the loss function, the greater the difference. Then the training of the neural network becomes a process of reducing this loss as much as possible.
(2)反向传播算法(2)Back propagation algorithm
神经网络可以采用误差反向传播(back propagation,BP)算法在训练过程中修正初始的神经网络模型中参数的大小,使得神经网络模型的重建误差损失越来越小。具体地,前向传递输入信号直至输出会产生误差损失,通过反向传播误差损失信息来更新初始的神经网络模型中参数,从而使误差损失收敛。反向传播算法是以误差损失为主导的反向传播运动,旨在得到最优的神经网络模型的参数,例如权重矩阵。The neural network can use the error back propagation (BP) algorithm to modify the size of the parameters in the initial neural network model during the training process, so that the reconstruction error loss of the neural network model becomes smaller and smaller. Specifically, forward propagation of the input signal until the output will produce an error loss, and the parameters in the initial neural network model are updated by backpropagating the error loss information, so that the error loss converges. The backpropagation algorithm is a backpropagation movement dominated by error loss, aiming to obtain the optimal parameters of the neural network model, such as the weight matrix.
(3)因果图(cause-effect graph)(3) Cause-effect graph
因果图为一种描述不同变量之间的影响关系的有向图,可包含多个节点与节点之间的连边,其中,节点可以指变量(例如,本申请实施例所涉及的故障),节点之间的连边可以指变量之间的关系(例如,本申请实施例所涉及的故障之间的关系)。A cause-and-effect diagram is a directed graph that describes the influence relationship between different variables. It can include multiple nodes and the edges between the nodes, where the nodes can refer to variables (for example, the faults involved in the embodiments of this application). The edges between nodes may refer to relationships between variables (for example, relationships between faults involved in the embodiments of this application).
(4)证据链(4)Evidence chain
证据链为一条单向链表,可以用于指示不同变量(例如,本申请实施例所涉及的故障)之间的因果关系。The evidence chain is a one-way linked list that can be used to indicate the causal relationship between different variables (for example, the faults involved in the embodiments of this application).
下面从神经网络的训练侧和神经网络的应用侧对本申请提供的方法进行描述。The method provided by this application is described below from the training side of the neural network and the application side of the neural network.
本申请实施例提供的模型训练方法,涉及数据序列的处理,具体可以应用于数据训练、机器学习、深度学习等方法,对训练数据(例如,本申请实施例提供的模型训练方法中的目标设备的历史故障信息)进行符号化和形式化的智能信息建模、抽取、预处理、训练等,最终得到训练好的神经网络(例如,本申请实施例提供的模型训练方法中的目标模型);并且,本申请实施例提供的故障预测方法可以运用上述训练好的神经网络,将输入数据(例如,本申请实施例提供的故障预测方法中的目标设备的历史故障信息)输入到所述训练好的神经网络中,得到输出数据(例如,本申请实施例提供的故障预测方法中的目标设备的故障预测结果)。需要说明的是,本申请实施例提供的模型训练方法和故障预测方法是基于同一个构思产生的发明,也可以理解为一个系统中的两个部分,或一个整体流程的两个阶段:如模型训练阶段和模型应用阶段。The model training method provided by the embodiment of the present application involves the processing of data sequences, and can be specifically applied to methods such as data training, machine learning, and deep learning. The training data (for example, the target device in the model training method provided by the embodiment of the present application) historical fault information) to perform symbolic and formalized intelligent information modeling, extraction, preprocessing, training, etc., and finally obtain a trained neural network (for example, the target model in the model training method provided by the embodiment of the present application); Moreover, the fault prediction method provided by the embodiment of the present application can use the above-trained neural network to input input data (for example, the historical fault information of the target device in the fault prediction method provided by the embodiment of the present application) into the trained neural network. In the neural network, output data (for example, the fault prediction result of the target device in the fault prediction method provided by the embodiment of the present application) is obtained. It should be noted that the model training method and fault prediction method provided in the embodiments of this application are inventions based on the same concept, and can also be understood as two parts in a system, or two stages of an overall process: such as model training phase and model application phase.
本申请实施例提供的故障预测方法可通过目标模型实现,图4为本申请实施例提供的目标模型的一个结构示意图,如图4所示,目标模型包括:决策解释模块以及决策链优化模块,其中,决策解释模块的输入端作为整个目标模型的输入端,决策解释模块的输出端与决策链优化模块的输入端连接,决策链优化模块的输出端作为整个目标模型的输出端。为了了解目标模型的工作流程,下文结合图5对目标模型的工作流程进行介绍,图5为本申请实施例提供的故障预测方法的一个流程示意图,如图5所示,该方法包括:The fault prediction method provided by the embodiment of the present application can be implemented through a target model. Figure 4 is a schematic structural diagram of the target model provided by the embodiment of the present application. As shown in Figure 4, the target model includes: a decision interpretation module and a decision chain optimization module. Among them, the input end of the decision explanation module serves as the input end of the entire target model, the output end of the decision interpretation module is connected to the input end of the decision chain optimization module, and the output end of the decision chain optimization module serves as the output end of the entire target model. In order to understand the workflow of the target model, the workflow of the target model is introduced below in conjunction with Figure 5. Figure 5 is a schematic flow chart of the fault prediction method provided by the embodiment of the present application. As shown in Figure 5, the method includes:
501、获取目标设备的历史故障信息,历史故障信息用于指示目标设备在第1个时刻至第T-1个时刻中发生过的N个故障,T≥2,N≥2。501. Obtain historical fault information of the target device. The historical fault information is used to indicate N faults that have occurred in the target device from the first moment to the T-1 moment, T≥2, N≥2.
本实施例中,当需要针对目标设备进行故障预测时,可先获取目标设备的历史故障信息,目标设备的历史故障信息可包含目标设备在第1个时刻发生的至少一个故障以及这些故障的发生次数,目标设备在第2时刻发生的至少一个故障以及这些故障的发生次数,...,目标设备在第T-1个时刻发生的至少一个故障以及这些故障的发生次数(T为大于或等于2的正整数),可以理解的是,目标设备在不同时刻之间所发生的故障既可以是完全相同的,也可以是部分相同的,还可以是完全不同的。如此一来,目标设备的历史故障信息可用于指示目标设备在第1个时刻至第T-1个时刻中发生过的N个故障(N为大于或等于2的正整数,这N个故障互不相同,故这N个故障可以理解为目标设备在第1个时刻至第T-1个时刻中所发生过的所有类型的故障)。In this embodiment, when it is necessary to perform fault prediction on the target device, the historical fault information of the target device can be obtained first. The historical fault information of the target device can include at least one fault that occurred in the target device at the first moment and the occurrence of these faults. Times, at least one fault occurred in the target equipment at the 2nd moment and the number of occurrences of these faults,..., at least one fault occurred in the target device at the T-1th moment and the number of occurrences of these faults (T is greater than or equal to A positive integer of 2), it can be understood that the faults that occur in the target equipment at different times can be completely the same, partially the same, or completely different. In this way, the historical fault information of the target device can be used to indicate N faults that have occurred in the target device from the 1st moment to the T-1th moment (N is a positive integer greater than or equal to 2. These N faults are mutually exclusive. are not the same, so these N faults can be understood as all types of faults that have occurred in the target device from the 1st moment to the T-1th moment).
例如,如图6所示(图6为本申请实施例提供的决策解释模块的一个示意图),在目标设备的历史故障信息X1:T-1中,X1:T-1包含了以下数据:目标设备在第1个时刻发生了故障v2,且发生了3次。目标设备在第2时刻发生了故障v2和故障v3,且分别发生了1次和2次。目标设备在第3时刻未发生故障,...,目标设备在第T-2时刻发生了故障v2和故障v3,且分别发生了2次和1次。目标设备在第T-1个时刻发生了故障v1和故障v2,且分别发生了1次和3次。由此可见,X1:T-1可用于指示目标设备在第1个时刻至第T-1个时刻中曾经发生过的故障v1、故障v2以及故障v3。For example, as shown in Figure 6 (Figure 6 is a schematic diagram of the decision interpretation module provided by the embodiment of the present application), in the historical fault information X 1:T-1 of the target device, X 1:T-1 contains the following data : The target device experienced fault v2 at the first moment, and it occurred three times. The target device experienced fault v2 and fault v3 at the second moment, and they occurred once and twice respectively. The target device did not fail at time 3,..., the target device experienced failure v2 and failure v3 at time T-2, and they occurred 2 times and 1 time respectively. The target device experienced fault v1 and fault v2 at time T-1, and they occurred once and three times respectively. It can be seen that X 1:T-1 can be used to indicate the fault v1, fault v2 and fault v3 that have occurred in the target device from the first moment to the T-1 moment.
应理解,本实施例中,目标设备发生过的故障可以呈现为目标设备发生过的告警事件,相应地,目标设备的历史故障信息可以呈现为目标设备的历史告警事件序列(通常是时间序列)。当然,目标设备发生过的故障和目标设备的历史故障信息也可通过其他方式呈现,此处不做限制。It should be understood that in this embodiment, the faults that have occurred in the target device can be presented as alarm events that have occurred in the target device. Correspondingly, the historical fault information of the target device can be presented as a sequence of historical alarm events (usually a time sequence) of the target device. . Of course, the faults that have occurred in the target device and the historical fault information of the target device can also be presented in other ways, without limitation here.
还应理解,本实施例中所涉及的时刻可以理解为一天、一个小时或一刻等等具备一定长度的时间片段,例如,第1个时刻可以理解为第1天,第2个时刻可以理解为第2天,...,第T-1个时刻可以理解为第T-1天,第T个时刻可以理解为第T天等等。It should also be understood that the time involved in this embodiment can be understood as a day, an hour or a moment, etc., with a certain length of time segment. For example, the first time can be understood as the first day, and the second time can be understood as Day 2,..., the T-1th moment can be understood as the T-1th day, the T-th moment can be understood as the T-th day, and so on.
502、基于历史故障信息,获取N个故障之间的因果关系以及N个故障的权重,N个故障的权重用于指示N个故障的重要程度。502. Based on the historical fault information, obtain the causal relationship between the N faults and the weights of the N faults. The weights of the N faults are used to indicate the importance of the N faults.
得到目标设备的历史故障信息后,可将目标设备的历史故障信息输入至目标模型,目标模型可对目标设备的历史故障信息进行处理,从而得到目标设备在第1个时刻至第T-1个时刻中所发生过的N个故障之间的因果关系(N个故障之间的因果关系通常以因果图的形式呈现)以及N个故障的权重。其中,N个故障的权重用于指示在对目标设备进行故障预测的过程中N个故障所发挥的作用,也就是N个故障的重要程度,一般地,故障的权重越大,说明故障越重要,故障的权重越小,说明故障越不重要。After obtaining the historical fault information of the target equipment, the historical fault information of the target equipment can be input into the target model. The target model can process the historical fault information of the target equipment, thereby obtaining the target equipment's historical fault information from the 1st moment to the T-1th time. The causal relationship between N faults that have occurred at a time (the causal relationship between N faults is usually presented in the form of a cause-and-effect diagram) and the weight of the N faults. Among them, the weight of N faults is used to indicate the role played by N faults in the process of fault prediction for the target device, that is, the importance of N faults. Generally speaking, the greater the weight of the fault, the more important the fault is. , the smaller the weight of a fault, the less important the fault is.
具体地,目标模型可通过以下方式获取N个故障之间的因果关系以及N个故障的权重:Specifically, the target model can obtain the causal relationship between N faults and the weight of N faults in the following way:
(1)在接收到目标设备的历史故障信息后,目标模型的决策解释模块可对目标设备的历史故障信息进行第一特征提取,从而得到目标设备在第1个时刻至第T-1个时刻中所发生过的N个故障之间的因果关系。进一步地,由于决策解释模块可包含循环神经网络以及卷积神经网络中的至少一种,故决策解释模块所实现的第一特征提取可包含基于循环神经网络的特征提取以及基于卷积神经网络的特征提取中的至少一种。(1) After receiving the historical fault information of the target device, the decision interpretation module of the target model can perform the first feature extraction on the historical fault information of the target device, thereby obtaining the target device's time from the 1st moment to the T-1th moment. The causal relationship between N faults that have occurred in . Further, since the decision interpretation module may include at least one of a recurrent neural network and a convolutional neural network, the first feature extraction implemented by the decision interpretation module may include feature extraction based on a recurrent neural network and a convolutional neural network-based feature extraction. At least one of feature extraction.
依旧如上述例子,在将X1:T-1输入至决策解释模块后,决策解释模块可对X1:T-1进行特征提取,从而得到因果图包含故障v1与故障v1之间的因果关系(该关系由故障v1指向故障v1,且取值为1,表明故障V1导致了自身的生成),故障v1与故障v2之间的因果关系(该关系由故障v1指向故障v2,且取值为0,表明故障V1未导致故障V2的生成),...,故障v3与故障v2之间的因果关系(该关系由故障v3指向故障v2,且取值为0,表明故障V3未导致故障V2的生成),故障v3与故障v3之间的因果关系(该关系由故障v3指向故障v3,且取值为1,表明故障V3导致了自身的生成)。Still as in the above example, after X 1:T-1 is input to the decision explanation module, the decision explanation module can extract features of X 1:T-1 to obtain a cause-and-effect diagram It includes the causal relationship between fault v1 and fault v1 (the relationship points from fault v1 to fault v1, and the value is 1, indicating that fault V1 caused its own generation), the causal relationship between fault v1 and fault v2 (the relationship From fault v1 to fault v2, and the value is 0, indicating that fault V1 did not lead to the generation of fault V2),..., the causal relationship between fault v3 and fault v2 (the relationship is from fault v3 to fault v2, and takes The value is 0, indicating that fault V3 did not cause the generation of fault V2), the causal relationship between fault v3 and fault v3 (the relationship points from fault v3 to fault v3, and the value is 1, indicating that fault V3 caused its own generation) .
(2)得到N个故障之间的因果关系后,决策解释模块可从目标设备的历史故障信息中提取出目标设备的子历史故障信息,目标设备的子历史故障信息用于指示目标设备在第T-w个时刻至第T-1个时刻中发生过的P个故障。需要说明的是,w为小于T,且大于或等于1的正整数,故第T-w个时刻通常是位于第1个时刻之后的某个时刻,N个故障包含P个故障。P通常是小于或等于N,且大于或等于1的正整数,故目标设备在第T-w个时刻至第T-1个时刻中发生过的P个故障是互不相同的故障,且这P个故障可以是目标设备在第1个时刻至第T-1个时刻中发生过的N个故障中的一部分故障或全部故障。(2) After obtaining the causal relationship between N faults, the decision interpretation module can extract the sub-historical fault information of the target device from the historical fault information of the target device. The sub-historical fault information of the target device is used to indicate that the target device is in the P faults that have occurred from T-w time to T-1 time. It should be noted that w is a positive integer less than T and greater than or equal to 1, so the T-wth time is usually a time after the first time, and N faults include P faults. P is usually a positive integer less than or equal to N and greater than or equal to 1. Therefore, the P faults that have occurred in the target equipment from the T-wth moment to the T-1th moment are mutually different faults, and these P faults The fault may be part or all of the N faults that have occurred in the target device from the first time to the T-1 time.
依旧如上述例子,在X1:T-1中,决策解释模块可从中抽取出目标设备的子历史故障信息XT-w:T-1,XT-w:T-1包含了以下数据:目标设备在第T-w个时刻发生了故障v3,且发生了2次,...,目标设备在第T-2时刻发生了故障v2和故障v3,且分别发生了2次和1次。目标设备在第T-1个时刻发生了故障v1和故障v2,且分别发生了1次和3次。由此可见,XT-w:T-1可用于指示目标设备在第T-w个时刻至第T-1个时刻中曾经发生过的故障v1、故障v2以及故障v3。Still as the above example, in X 1:T-1 , the decision interpretation module can extract the sub-historical fault information X Tw:T-1 of the target device. X Tw:T-1 contains the following data: The target device is in the Fault v3 occurred at Tw times, and occurred twice,..., the target device experienced fault v2 and fault v3 at T-2 time, and occurred twice and once respectively. The target device experienced fault v1 and fault v2 at time T-1, and they occurred once and three times respectively. It can be seen that X Tw:T-1 can be used to indicate the fault v1, fault v2 and fault v3 that have occurred in the target device from the Twth moment to the T-1th moment.
(3)得到N个故障之间的因果关系以及目标设备的子历史故障信息后,决策解释模块可对N个故障之间的因果关系以及子历史故障信息进行第二特征提取,从而得到N个故障的权重。得到N个故障的权重后,决策解释模块可将目标设备的子历史故障信息、N个故障的权重以及N个故障之间的因果关系发送至决策链优化模块。进一步地,由于决策解释模块可包含循环神经网络以及卷积神经网络中的至少一种,故决策解释模块所实现的第二特征提取可包含基于循环神经网络的特征提取以及基于卷积神经网络的特征提取中的至少一种。(3) After obtaining the causal relationship between N faults and the sub-historical fault information of the target equipment, the decision interpretation module can perform second feature extraction on the causal relationship between the N faults and the sub-historical fault information, thereby obtaining N The weight of the fault. After obtaining the weights of the N faults, the decision interpretation module can send the sub-historical fault information of the target equipment, the weights of the N faults, and the causal relationships between the N faults to the decision chain optimization module. Further, since the decision interpretation module may include at least one of a recurrent neural network and a convolutional neural network, the second feature extraction implemented by the decision interpretation module may include feature extraction based on a recurrent neural network and a convolutional neural network-based feature extraction. At least one of feature extraction.
依旧如上述例子,得到以及XT-w:T-1后,决策解释模块可对/>以及XT-w:T-1进行特征提取,从而得到权重μT-1,μT-1包含故障v1的权重、故障v2的权重以及故障v3的权重,其中,故障v1的权重为0.3,故障v2的权重为0.1,且故障v3的权重为0.5。此后,决策解释模块可将XT-w:T-1以及μT-1发送至决策链优化模块。Still as in the above example, we get and X Tw:T-1 , the decision interpretation module can and _ _ The weight of is 0.1, and the weight of fault v3 is 0.5. Thereafter, the decision interpretation module can X Tw:T-1 and μ T-1 are sent to the decision chain optimization module.
503、基于历史故障信息、N个故障之间的因果关系以及N个故障的权重,获取目标设备在第T个时刻中发生N个故障的概率。503. Based on historical fault information, the causal relationship between N faults, and the weights of N faults, obtain the probability that N faults occur in the target device at the T-th moment.
得到N个故障之间的因果关系以及N个故障的权重后,目标模型可对目标设备的历史故障信息、N个故障之间的因果关系以及N个故障的权重进行处理,从而得到目标设备在第T个时刻中发生N个故障的概率,也就是目标设备的故障预测结果。至此,则完成了针对目标设备的故障预测。After obtaining the causal relationship between N faults and the weights of N faults, the target model can process the historical fault information of the target equipment, the causal relationships between N faults, and the weights of N faults, thereby obtaining the target equipment's fault information. The probability of N faults occurring at the T moment is the fault prediction result of the target device. At this point, the fault prediction for the target device is completed.
具体地,目标模型可通过以下方式获取目标设备在第T个时刻中发生N个故障的概率:Specifically, the target model can obtain the probability of N failures occurring in the target device at the T-th moment in the following way:
(1)目标模型可先对N个故障之间的因果关系以及N个故障的权重进行处理,从而得到N个故障中的M个故障之间的因果关系。需要说明的是,M为大于或等于1,且小于或等于N的正整数,故这M个故障是互不相同的故障,且这M个故障可以是目标设备在第1个时刻至第T-1个时刻中发生过的N个故障中的一部分故障或全部故障。值得注意的是,这M个故障之间的因果关系也可称为目标设备的故障证据链,该证据链用于为目标设备的故障预测结果提供可视化的解释说明,作为目标模型的其中一个输出。(1) The target model can first process the causal relationship between N faults and the weight of N faults, thereby obtaining the causal relationship between M faults among the N faults. It should be noted that M is a positive integer greater than or equal to 1 and less than or equal to N, so these M faults are different faults, and these M faults can be caused by the target device from the 1st moment to the Tth moment. - Some or all of the N faults that have occurred in one moment. It is worth noting that the causal relationship between these M faults can also be called the fault evidence chain of the target device. This evidence chain is used to provide a visual explanation for the fault prediction results of the target device as one of the outputs of the target model. .
(2)得到这M个故障之间的因果关系后,目标模型还可对目标设备的历史故障信息以及这M个故障之间的因果关系进行处理,从而得到目标设备在第T个时刻中发生N个故障的概率,也就是目标设备的故障预测结果,目标设备的故障预测结果作为目标模型的另一个输出。(2) After obtaining the causal relationship between the M faults, the target model can also process the historical fault information of the target device and the causal relationship between the M faults, thereby obtaining the occurrence of the target device at the T-th moment. The probability of N faults is the fault prediction result of the target device. The fault prediction result of the target device is used as another output of the target model.
更具体地,目标模型可通过以下方式获取M个故障之间的因果关系:More specifically, the target model can obtain the causal relationship between M faults in the following way:
在得到目标设备的子历史故障信息、N个故障的权重以及N个故障之间的因果关系后,决策链优化模块可在N个故障之间的因果关系中,将权重小于第一权重阈值(该阈值的大小可根据实际需求进行设置,此处不做限制)的N-M个故障剔除,从而得到N个故障中的M个故障之间的因果关系,值得注意的是,此时,这M个故障之间的因果关系上附带有这M个故障的权重,也就是说,目标设备的故障证据链不仅包含了这M个故障之间的因果关系,还包含这M个故障的权重,故目标设备的故障证据链不仅可以解释目标设备在第T个时刻最可能发生的某个故障(该故障通常就是这M个故障中的某个故障,且位于这M个故障之间的因果关系的末端),还可解释造成这个故障的其余故障(也就是这M个故障中除这个故障之外的其余故障)以及其余故障在该过程中的贡献度(也就是权重)。After obtaining the sub-historical fault information of the target device, the weights of the N faults, and the causal relationships between the N faults, the decision chain optimization module can set the weight to be less than the first weight threshold ( The size of this threshold can be set according to actual needs, and there are no restrictions here.) N-M faults are eliminated, so as to obtain the causal relationship between M faults among the N faults. It is worth noting that at this time, these M faults The causal relationship between faults is accompanied by the weight of these M faults. That is to say, the fault evidence chain of the target device not only contains the causal relationship between these M faults, but also includes the weight of these M faults. Therefore, the target The device's fault evidence chain can not only explain the most likely fault of the target device at the T-th moment (the fault is usually one of the M faults, and is located at the end of the causal relationship between the M faults ), it can also explain the other faults that caused this fault (that is, the rest of the M faults except this fault) and the contribution of the other faults in the process (that is, the weight).
依旧如上述例子,如图7所示(图7为本申请实施例提供的决策链优化模块的一个示意图),得到XT-w:T-1以及μT-1后,决策链优化模块可在/>中,将权重小于0.15的故障Still as the above example, as shown in Figure 7 (Figure 7 is a schematic diagram of the decision chain optimization module provided by the embodiment of the present application), we get After X Tw:T-1 and μ T-1 , the decision chain optimization module can be found at/> , assign faults with weights less than 0.15
剔除,也就是将故障v2剔除。那么,可得到新因果图包含故障v1与故障v1之间的因果关系(该关系取值为0.3,因为叠加了故障v1的权重),故障v1与故障v3之间的因果关系(该关系取值为0,因为该关系原取值为0),故障v3与故障v1之间的因果关系(该关系取值为0.5,因为叠加了故障v3的权重),故障v3与故障v3之间的因果关系(该Eliminate, that is, eliminate fault v2. Then, we can get a new causal diagram It includes the causal relationship between fault v1 and fault v1 (the value of this relationship is 0.3, because the weight of fault v1 is superimposed), the causal relationship between fault v1 and fault v3 (the value of this relationship is 0, because the relationship is originally takes a value of 0), the causal relationship between fault v3 and fault v1 (the relationship takes a value of 0.5, because the weight of fault v3 is superimposed), the causal relationship between fault v3 and fault v3 (the
关系取值为0.5,因为叠加了故障v3的权重)。可见,提供了一条针对目标设备的最优的故障证据链,由故障v3指向故障v1,表明故障v3导致故障v1的生成,且在该过程故障v3的贡献度为0.5。The relationship takes a value of 0.5 because the weight of fault v3 is superimposed). visible, An optimal fault evidence chain for the target device is provided, from fault v3 to fault v1, indicating that fault v3 leads to the generation of fault v1, and the contribution of fault v3 in the process is 0.5.
更具体地,目标模型可通过以下方式获取目标设备在第T个时刻中发生N个故障的概率:More specifically, the target model can obtain the probability of N failures occurring in the target device at the T-th moment in the following way:
在得到M个故障之间的因果关系后,决策链优化模块可对M个故障之间的因果关系以及目标设备的子历史故障信息进行第三特征提取,从而得到目标设备在第T个时刻中发生N个故障的概率,可以理解的是,故障证据链中的M个故障也就包含了N个故障中概率最大的故障,即目标设备在第T个时刻中最可能发生的故障。进一步地,由于决策链优化模块可包含循环神经网络、时间卷积网络以及多层感知机中的至少一种,故决策解释模块所实现的第三特征提取可包含基于循环神经网络的特征提取、基于时间卷积网络的特征提取以及基于多层感知机的特征提取中的至少一种。After obtaining the causal relationship between the M faults, the decision chain optimization module can perform third feature extraction on the causal relationship between the M faults and the sub-historical fault information of the target device, thereby obtaining the target device's performance at the T-th moment. As for the probability of N faults, it can be understood that the M faults in the fault evidence chain also include the fault with the highest probability among the N faults, that is, the most likely fault of the target device at the T-th moment. Further, since the decision chain optimization module may include at least one of a recurrent neural network, a temporal convolutional network, and a multi-layer perceptron, the third feature extraction implemented by the decision interpretation module may include feature extraction based on the recurrent neural network, At least one of feature extraction based on temporal convolutional network and feature extraction based on multi-layer perceptron.
依旧如上述例子,得到后,决策链优化模块可对XT-w:T-1以及/>进行特征提取,从而得到目标设备的故障预测结果/>包含目标设备在第T个时刻发生故障v1的概率,目标设备在第T个时刻发生故障v2的概率,目标设备在第T个时刻发生故障v3的概率。Still as in the above example, we get Finally, the decision chain optimization module can optimize X Tw:T-1 and/> Perform feature extraction to obtain the fault prediction results of the target equipment/> It includes the probability that the target device fails v1 at the T-th time, the probability that the target device fails v2 at the T-th time, and the probability that the target device fails v3 at the T-th time.
此外,还可将本申请实施例提供的目标模型与相关技术提供的神经网络模型进行比较,比较结果如表1所示:In addition, the target model provided by the embodiment of the present application can also be compared with the neural network model provided by related technologies. The comparison results are shown in Table 1:
表1Table 1
基于表1可知,在同一个数据集上进行测试,与相关技术提供的模型比较,本申请实施例提供的目标模型在各项指标上均具备更好的表现,也就是说,本申请实施例提供的目标模型具备更优的性能,能够为用户提供更优质的故障预测服务。Based on Table 1, it can be seen that when tested on the same data set, compared with the models provided by related technologies, the target model provided by the embodiment of the present application has better performance in various indicators. In other words, the target model provided by the embodiment of the present application has better performance in various indicators. The provided target model has better performance and can provide users with better fault prediction services.
为了进一步理解本申请实施例所涉及的因果图以及故障证据链,下文结合图8对二者做进一步的介绍。如图8所示(图8为本申请实施例提供的因果图以及证据链的一个示意图),目标模型在基于历史告警事件序列进行告警事件预测的过程中,可得到因果图,该因果图包含多个告警事件之间的因果关系。那么,基于用户的不同需求,目标模型可预测出2019年5月30的告警事件证据链,还可预测出2018年11月18日的告警事件证据链。In order to further understand the cause-and-effect diagram and fault evidence chain involved in the embodiment of this application, the two are further introduced below in conjunction with Figure 8. As shown in Figure 8 (Figure 8 is a schematic diagram of the cause and effect diagram and the evidence chain provided by the embodiment of the present application), in the process of predicting alarm events based on the historical alarm event sequence, the target model can obtain a cause and effect diagram, which contains Causal relationships between multiple alarm events. Then, based on the different needs of users, the target model can predict the evidence chain of the alarm event on May 30, 2019, and can also predict the evidence chain of the alarm event on November 18, 2018.
本申请实施例中,当需要针对目标设备进行故障预测时,可先获取目标设备的历史故障信息并将目标设备的历史故障信息输入至目标模型中,目标设备的历史故障信息用于指示目标设备在第1个时刻至第T-1个时刻中发生过的N个故障。然后,目标模型可对目标设备的历史故障信息进行处理,从而得到N个故障之间的因果关系以及N个故障的权重。最后,目标模型可对目标设备的历史故障信息、N个故障之间的因果关系以及N个故障的权重进行处理,从而得到目标设备在第T个时刻中发生N个故障的概率。前述过程中,目标模型在针对目标设备进行故障预测的过程中,不仅考虑目标设备在第1个时刻至第T-1个时刻中发生过的N个故障之间的因果关系,还考虑了N个故障的权重(也就是N个故障在针对目标设备的故障预测过程中的重要程度),所考虑的因素较为全面,这样最终得到的目标设备的故障预测结果(即目标设备在第T个时刻中发生N个故障的概率)可具备较高的准确度。In the embodiment of the present application, when it is necessary to perform fault prediction on the target device, the historical fault information of the target device can be obtained first and input into the target model. The historical fault information of the target device is used to indicate the target device. N faults that have occurred from time 1 to time T-1. Then, the target model can process the historical fault information of the target equipment to obtain the causal relationship between N faults and the weight of N faults. Finally, the target model can process the historical fault information of the target device, the causal relationship between N faults, and the weight of the N faults, thereby obtaining the probability of N faults occurring in the target device at the T-th moment. In the foregoing process, the target model not only considers the causal relationship between the N faults that have occurred in the target device from the first moment to the T-1 moment, but also considers the N fault prediction process for the target device. The weight of each fault (that is, the importance of N faults in the fault prediction process for the target device), the factors considered are relatively comprehensive, so that the final fault prediction result of the target device (that is, the target device at the T-th moment The probability of N faults occurring in ) can have high accuracy.
进一步地,目标设备不仅可以输出目标设备的故障预测结果(即目标设备在第T个时刻中发生N个故障的概率),还可输出目标设备的故障证据链(即N个故障中的M个故障之间的因果关系),由于目标设备的故障证据链包含N个故障中最有可能发生的某个故障与导致该故障的其余故障之间的因果关系,因此,目标设备的故障证据链可以充分且仔细地解释目标设备的故障预测结果与目标设备的历史故障信息之间的关系。Further, the target device can not only output the fault prediction result of the target device (i.e., the probability of N faults occurring in the target device at the T-th moment), but also output the fault evidence chain of the target device (i.e., M of the N faults) Causal relationship between faults), because the fault evidence chain of the target device contains the causal relationship between the most likely fault among the N faults and the remaining faults that caused the fault, therefore, the fault evidence chain of the target device can Fully and carefully explain the relationship between the target device's fault prediction results and the target device's historical fault information.
以上是对本申请实施例提供的故障预测方法所进行的详细说明,以下将对本申请实施例提供的模型训练方法进行介绍,图9为本申请实施例提供的模型训练方法的一个流程示意图,如图9所示,该方法包括:The above is a detailed description of the fault prediction method provided by the embodiment of the present application. The model training method provided by the embodiment of the present application will be introduced below. Figure 9 is a schematic flow chart of the model training method provided by the embodiment of the present application, as shown in Fig. As shown in 9, the method includes:
901、获取目标设备的历史故障信息,历史故障信息用于指示目标设备在第1个时刻至第T-1个时刻中发生过的N个故障,T≥2,N≥2。901. Obtain historical fault information of the target device. The historical fault information is used to indicate N faults that have occurred in the target device from the first moment to the T-1 moment, T≥2, N≥2.
本实施例中,当需要对待训练模型进行训练时,可先获取一批训练数据,该批训练数据包含目标设备的历史故障信息,目标设备的历史故障信息用于指示目标设备在第1个时刻至第T-1个时刻中发生过的N个故障,T≥2,N≥2。需要说明的是,目标设备在第T个时刻中发生N个故障的真实概率是已知的。In this embodiment, when it is necessary to train the model to be trained, a batch of training data can be obtained first. This batch of training data contains historical fault information of the target device. The historical fault information of the target device is used to indicate that the target device is at the first moment. To the N faults that have occurred at time T-1, T≥2, N≥2. It should be noted that the true probability of N failures occurring in the target device at the T-th moment is known.
902、将历史故障信息输入至待训练模型,得到目标设备在第T个时刻中发生N个故障的概率,待训练模型用于:基于历史故障信息,获取N个故障之间的因果关系以及N个故障的权重,N个故障的权重用于指示N个故障的重要程度;基于历史故障信息、N个故障之间的因果关系以及N个故障的权重,获取目标设备在第T个时刻中发生N个故障的概率。902. Input the historical fault information into the model to be trained, and obtain the probability of N faults occurring in the target equipment at the T-th moment. The model to be trained is used to: based on the historical fault information, obtain the causal relationship between the N faults and N The weight of N faults, the weight of N faults is used to indicate the importance of N faults; based on historical fault information, the causal relationship between N faults and the weight of N faults, obtain the occurrence of the target device at the T-th moment The probability of N failures.
得到目标设备的历史故障信息后,可将历史故障信息输入至待训练模型。接着,待训练模型可基于历史故障信息,获取N个故障之间的因果关系以及N个故障的权重,N个故障的权重用于指示N个故障的重要程度。然后,待训练模型可基于历史故障信息、N个故障之间的因果关系以及N个故障的权重,获取目标设备在第T个时刻中发生N个故障的(预测)概率。After obtaining the historical fault information of the target device, the historical fault information can be input into the model to be trained. Then, the model to be trained can obtain the causal relationship between the N faults and the weights of the N faults based on historical fault information. The weights of the N faults are used to indicate the importance of the N faults. Then, the model to be trained can obtain the (predicted) probability of N faults occurring in the target device at the T-th moment based on historical fault information, the causal relationship between the N faults, and the weights of the N faults.
在一种可能实现的方式中,待训练模型,用于:对历史故障信息进行第一特征提取,得到N个故障之间的因果关系;从历史故障信息中提取子历史故障信息,子历史故障信息用于指示目标设备在第T-w个时刻至第T-1个时刻中发生过的P个故障,N个故障包含P个故障,N≥P≥1,T>w≥1;对N个故障之间的因果关系以及子历史故障信息进行第二特征提取,得到N个故障的权重。In one possible implementation method, the model to be trained is used to: extract the first feature from historical fault information to obtain the causal relationship between N faults; extract sub-historical fault information from the historical fault information, and sub-historical fault information. The information is used to indicate P faults that have occurred in the target equipment from the T-wth moment to the T-1th moment. N faults include P faults, N≥P≥1, T>w≥1; for N faults The second feature extraction is performed on the causal relationship between the faults and the sub-historical fault information to obtain the weights of N faults.
在一种可能实现的方式中,待训练模型,用于:基于N个故障之间的因果关系以及N个故障的权重,获取N个故障中的M个故障之间的因果关系,N≥M≥1;基于历史故障信息以及M个故障之间的因果关系,获取目标设备在第T个时刻中发生N个故障的概率。In a possible implementation method, the model to be trained is used to: obtain the causal relationship between M faults among the N faults based on the causal relationship between N faults and the weight of the N faults, N≥M ≥1; Based on historical fault information and the causal relationship between M faults, obtain the probability of N faults occurring in the target equipment at the T moment.
在一种可能实现的方式中,待训练模型,用于:在N个故障之间的因果关系中,将权重小于第一权重阈值的N-M个故障剔除,得到N个故障中的M个故障之间的因果关系。In one possible implementation method, the model to be trained is used to: among the causal relationships between N faults, eliminate N-M faults whose weights are less than the first weight threshold, and obtain M faults among the N faults. causal relationship between.
在一种可能实现的方式中,待训练模型,用于:对M个故障之间的因果关系以及子历史故障信息进行第三特征提取,得到目标设备在第T个时刻中发生N个故障的概率。In one possible implementation method, the model to be trained is used to: extract the third feature of the causal relationship between M faults and sub-historical fault information, and obtain the results of N faults occurring in the target equipment at the T-th moment. Probability.
在一种可能实现的方式中,待训练模型,还用于:在M个故障之间的因果关系中,将权重小于第二权重阈值的M-K个故障剔除,得到M个故障中的K个故障之间的因果关系;对K个故障之间的因果关系以及子历史故障信息进行第四特征提取,得到目标设备在第T个时刻中发生N个故障的新概率。需要说明的是,在得到M个故障之间的因果关系后,待训练模型可在M个故障之间的因果关系中,将权重小于第二权重阈值(该阈值通常大于第一权重阈值,该阈值的大小可根据实际需求进行设置,此处不做限制)的M-K个故障剔除(K为大于或等于1,且小于M的正整数),从而得到M个故障中的K个故障之间的因果关系,值得注意的是,这K个故障之间的因果关系上附带有这K个故障的权重,以此作为目标设备的新故障证据链,即目标设备的新故障证据链不仅包含了这K个故障之间的因果关系,还包含这K个故障的权重,这K个故障通常是M个故障中的一部分故障。然后,待训练模型可对K个故障之间的因果关系以及目标设备的子历史故障信息进行第四特征提取,从而得到目标设备在第T个时刻中发生N个故障的新(预测)概率,也就是目标设备的新的故障预测结果。In one possible implementation method, the model to be trained is also used to: among the causal relationships between M faults, eliminate M-K faults whose weights are less than the second weight threshold, and obtain K faults among the M faults. The fourth feature extraction is performed on the causal relationship between K faults and sub-historical fault information to obtain the new probability of N faults occurring in the target equipment at the T-th moment. It should be noted that after obtaining the causal relationship between the M faults, the model to be trained can set the weight in the causal relationship between the M faults to be less than the second weight threshold (this threshold is usually greater than the first weight threshold, the The size of the threshold can be set according to actual needs, and there are no restrictions here.) M-K faults are eliminated (K is a positive integer greater than or equal to 1 and less than M), so as to obtain the difference between K faults among M faults. Causal relationship. It is worth noting that the causal relationship between these K faults is accompanied by the weight of these K faults, which is used as the new fault evidence chain of the target device. That is, the new fault evidence chain of the target device not only includes these The causal relationship between K faults also includes the weight of these K faults. These K faults are usually part of the M faults. Then, the model to be trained can perform the fourth feature extraction on the causal relationship between K faults and the sub-historical fault information of the target device, thereby obtaining the new (predicted) probability of N faults occurring in the target device at the T-th moment, That is, the new fault prediction result of the target device.
在一种可能实现的方式中,第一特征提取或第二特征提取包含以下至少一种:基于循环神经网络的特征提取以及基于卷积神经网络的特征提取。In a possible implementation manner, the first feature extraction or the second feature extraction includes at least one of the following: feature extraction based on a recurrent neural network and feature extraction based on a convolutional neural network.
在一种可能实现的方式中,第三特征提取或第四特征提取包含以下至少一种:基于循环神经网络的特征提取、基于时间卷积网络的特征提取以及基于多层感知机的特征提取。In a possible implementation manner, the third feature extraction or the fourth feature extraction includes at least one of the following: feature extraction based on recurrent neural networks, feature extraction based on temporal convolutional networks, and feature extraction based on multi-layer perceptrons.
关于步骤902的介绍,可参考图5所示实施例中步骤502至步骤503的相关说明部分,此处不再赘述。For the introduction of step 902, please refer to the relevant descriptions of steps 502 to 503 in the embodiment shown in FIG. 5, which will not be described again here.
903、基于概率对待训练模型进行训练,从而得到目标模型。903. Train the to-be-trained model based on probability to obtain the target model.
得到目标设备在第T个时刻中发生N个故障的概率后,可利用目标设备在第T个时刻中发生N个故障的概率对待训练模型进行训练,直至满足模型训练条件,从而得到图5所示实施例中的目标模型。After obtaining the probability of N faults occurring in the target equipment at the T-th time, the probability of N failures occurring in the target equipment at the T-th time can be used to train the model to be trained until the model training conditions are met, thus obtaining the results shown in Figure 5. The target model in the example is shown.
具体地,可通过以下方式来对待训练模型进行训练:Specifically, the model to be trained can be trained in the following ways:
得到目标设备在第T个时刻中发生N个故障的概率以及目标设备在第T个时刻中发生N个故障的新概率后,由于目标设备在第T个时刻中发生N个故障的真实概率已知,可通过预置的第一损失函数对目标设备在第T个时刻中发生N个故障的概率以及目标设备在第T个时刻中发生N个故障的真实概率进行计算,从而得到第一损失,第一损失用于指示目标设备在第T个时刻中发生N个故障的概率以及目标设备在第T个时刻中发生N个故障的真实概率之间的差异,并通过预置的第二损失函数对目标设备在第T个时刻中发生N个故障的概率以及目标设备在第T个时刻中发生N个故障的新概率进行计算,从而得到第二损失,第二损失用于指示目标设备在第T个时刻中发生N个故障的概率以及目标设备在第T个时刻中发生N个故障的新概率之间的差异。然后,可利用第一损失以及第二损失构建目标损失。After obtaining the probability of N failures occurring in the target equipment at the T-th time and the new probability of N failures occurring in the target equipment in the T-th time, since the true probability of N failures occurring in the target equipment in the T-th time has been It is known that the probability of N faults occurring on the target equipment at the T-th moment and the true probability of N faults occurring on the target equipment at the T-th moment can be calculated through the preset first loss function, thereby obtaining the first loss , the first loss is used to indicate the difference between the probability of N faults occurring in the target device at the T-th moment and the true probability of N faults occurring in the target device at the T-th moment, and through the preset second loss The function calculates the probability that the target device has N faults at the T-th moment and the new probability that the target device has N faults at the T-th moment, thereby obtaining the second loss. The second loss is used to indicate that the target device is in The difference between the probability of N failures occurring at the T-th time and the new probability of N failures occurring on the target device at the T-th time. Then, the first loss and the second loss can be used to construct the target loss.
得到目标损失后,可利用目标损失更新待训练模型的参数,得到更新参数后的待训练模型,并利用下一批训练数据对更新参数后的待训练模型继续进行训练,直至满足模型训练条件(例如,目标损失满足优化目的,其中,第一损失的优化目的为令第一损失尽可能小,第二损失的优化目的为令第二损失尽可能大等等),从而得到目标模型。After obtaining the target loss, the target loss can be used to update the parameters of the model to be trained to obtain the model to be trained with updated parameters, and use the next batch of training data to continue training the model to be trained with updated parameters until the model training conditions are met ( For example, the target loss satisfies the optimization purpose, wherein the optimization purpose of the first loss is to make the first loss as small as possible, the optimization purpose of the second loss is to make the second loss as large as possible, etc.), thereby obtaining the target model.
本申请实施例训练得到的目标模型,具备故障预测功能。具体地,当需要针对目标设备进行故障预测时,可先获取目标设备的历史故障信息并将目标设备的历史故障信息输入至目标模型中,目标设备的历史故障信息用于指示目标设备在第1个时刻至第T-1个时刻中发生过的N个故障。然后,目标模型可对目标设备的历史故障信息进行处理,从而得到N个故障之间的因果关系以及N个故障的权重。最后,目标模型可对目标设备的历史故障信息、N个故障之间的因果关系以及N个故障的权重进行处理,从而得到目标设备在第T个时刻中发生N个故障的概率。前述过程中,目标模型在针对目标设备进行故障预测的过程中,不仅考虑目标设备在第1个时刻至第T-1个时刻中发生过的N个故障之间的因果关系,还考虑了N个故障的权重(也就是N个故障在针对目标设备的故障预测过程中的重要程度),所考虑的因素较为全面,这样最终得到的目标设备的故障预测结果(即目标设备在第T个时刻中发生N个故障的概率)可具备较高的准确度。The target model trained in the embodiment of this application has a fault prediction function. Specifically, when it is necessary to perform fault prediction for the target device, the historical fault information of the target device can be obtained first and input into the target model. The historical fault information of the target device is used to indicate that the target device is in the first stage. N faults that have occurred from time to time T-1. Then, the target model can process the historical fault information of the target equipment to obtain the causal relationship between N faults and the weight of N faults. Finally, the target model can process the historical fault information of the target device, the causal relationship between N faults, and the weight of the N faults, thereby obtaining the probability of N faults occurring in the target device at the T-th moment. In the foregoing process, the target model not only considers the causal relationship between the N faults that have occurred in the target device from the first moment to the T-1 moment, but also considers the N fault prediction process for the target device. The weight of each fault (that is, the importance of N faults in the fault prediction process for the target device), the factors considered are relatively comprehensive, so that the final fault prediction result of the target device (that is, the target device at the T-th moment The probability of N faults occurring in ) can have high accuracy.
以上是对本申请实施例提供的故障预测方法以及模型训练方法所进行的详细说明,以下将对本申请实施例提供的故障预测装置以及模型训练装置进行介绍。图10为本申请实施例提供的故障预测装置的一个结构示意图,如图10所示,该装置包括:The above is a detailed description of the fault prediction method and model training method provided by the embodiment of the present application. The fault prediction device and the model training device provided by the embodiment of the present application will be introduced below. Figure 10 is a schematic structural diagram of a fault prediction device provided by an embodiment of the present application. As shown in Figure 10, the device includes:
第一获取模块1001,用于获取目标设备的历史故障信息,历史故障信息用于指示目标设备在第1个时刻至第T-1个时刻中发生过的N个故障,T≥2,N≥2;The first acquisition module 1001 is used to obtain historical fault information of the target device. The historical fault information is used to indicate N faults that have occurred in the target device from the 1st moment to the T-1th moment, T≥2, N≥ 2;
第二获取模块1002,用于基于历史故障信息,获取N个故障之间的因果关系以及N个故障的权重,N个故障的权重用于指示N个故障的重要程度;The second acquisition module 1002 is used to obtain the causal relationship between N faults and the weights of N faults based on historical fault information. The weights of N faults are used to indicate the importance of N faults;
第三获取模块1003,用于基于历史故障信息、N个故障之间的因果关系以及N个故障的权重,获取目标设备在第T个时刻中发生N个故障的概率。The third acquisition module 1003 is used to obtain the probability of N faults occurring in the target device at the T-th time based on historical fault information, the causal relationship between the N faults, and the weights of the N faults.
本申请实施例中,当需要针对目标设备进行故障预测时,可先获取目标设备的历史故障信息并将目标设备的历史故障信息输入至目标模型中,目标设备的历史故障信息用于指示目标设备在第1个时刻至第T-1个时刻中发生过的N个故障。然后,目标模型可对目标设备的历史故障信息进行处理,从而得到N个故障之间的因果关系以及N个故障的权重。最后,目标模型可对目标设备的历史故障信息、N个故障之间的因果关系以及N个故障的权重进行处理,从而得到目标设备在第T个时刻中发生N个故障的概率。前述过程中,目标模型在针对目标设备进行故障预测的过程中,不仅考虑目标设备在第1个时刻至第T-1个时刻中发生过的N个故障之间的因果关系,还考虑了N个故障的权重(也就是N个故障在针对目标设备的故障预测过程中的重要程度),所考虑的因素较为全面,这样最终得到的目标设备的故障预测结果(即目标设备在第T个时刻中发生N个故障的概率)可具备较高的准确度。In the embodiment of the present application, when it is necessary to perform fault prediction on the target device, the historical fault information of the target device can be obtained first and input into the target model. The historical fault information of the target device is used to indicate the target device. N faults that have occurred from time 1 to time T-1. Then, the target model can process the historical fault information of the target equipment to obtain the causal relationship between N faults and the weight of N faults. Finally, the target model can process the historical fault information of the target device, the causal relationship between N faults, and the weight of the N faults, thereby obtaining the probability of N faults occurring in the target device at the T-th moment. In the foregoing process, the target model not only considers the causal relationship between the N faults that have occurred in the target device from the first moment to the T-1 moment, but also considers the N fault prediction process for the target device. The weight of each fault (that is, the importance of N faults in the fault prediction process for the target device), the factors considered are relatively comprehensive, so that the final fault prediction result of the target device (that is, the target device at the T-th moment The probability of N faults occurring in ) can have high accuracy.
在一种可能实现的方式中,第二获取模块1002,用于:对历史故障信息进行第一特征提取,得到N个故障之间的因果关系;从历史故障信息中提取子历史故障信息,子历史故障信息用于指示目标设备在第T-w个时刻至第T-1个时刻中发生过的P个故障,N个故障包含P个故障,N≥P≥1,T>w≥1;对N个故障之间的因果关系以及子历史故障信息进行第二特征提取,得到N个故障的权重。In a possible implementation manner, the second acquisition module 1002 is used to: perform first feature extraction on historical fault information to obtain the causal relationship between N faults; extract sub-historical fault information from the historical fault information, and Historical fault information is used to indicate P faults that have occurred in the target equipment from the T-wth moment to the T-1th moment. N faults include P faults, N≥P≥1, T>w≥1; for N The second feature extraction is performed on the causal relationship between faults and sub-historical fault information to obtain the weights of N faults.
在一种可能实现的方式中,第三获取模块1003,用于:基于N个故障之间的因果关系以及N个故障的权重,获取N个故障中的M个故障之间的因果关系,N≥M≥1;基于历史故障信息以及M个故障之间的因果关系,获取目标设备在第T个时刻中发生N个故障的概率。In a possible implementation manner, the third acquisition module 1003 is configured to: based on the causal relationship between N faults and the weight of the N faults, obtain the causal relationship between M faults among the N faults, N ≥M≥1; Based on historical fault information and the causal relationship between M faults, obtain the probability of N faults occurring in the target equipment at the T-th moment.
在一种可能实现的方式中,第三获取模块1003,用于在N个故障之间的因果关系中,将权重小于第一权重阈值的N-M个故障剔除,得到N个故障中的M个故障之间的因果关系。In a possible implementation manner, the third acquisition module 1003 is used to eliminate N-M faults whose weights are less than the first weight threshold among the causal relationships between N faults, and obtain M faults among the N faults. causal relationship between.
在一种可能实现的方式中,第三获取模块1003,用于对M个故障之间的因果关系以及子历史故障信息进行第三特征提取,得到目标设备在第T个时刻中发生N个故障的概率。In a possible implementation manner, the third acquisition module 1003 is used to extract the third feature of the causal relationship between the M faults and the sub-historical fault information to obtain N faults occurring in the target equipment at the T-th moment. The probability.
在一种可能实现的方式中,第一特征提取或第二特征提取包含以下至少一种:基于循环神经网络的特征提取以及基于卷积神经网络的特征提取。In a possible implementation manner, the first feature extraction or the second feature extraction includes at least one of the following: feature extraction based on a recurrent neural network and feature extraction based on a convolutional neural network.
在一种可能实现的方式中,第三特征提取包含以下至少一种:基于循环神经网络的特征提取、基于时间卷积网络的特征提取以及基于多层感知机的特征提取。In a possible implementation manner, the third feature extraction includes at least one of the following: feature extraction based on a recurrent neural network, feature extraction based on a temporal convolutional network, and feature extraction based on a multi-layer perceptron.
图11为本申请实施例提供的模型训练装置的一个结构示意图,如图11所示,该装置包括:Figure 11 is a schematic structural diagram of a model training device provided by an embodiment of the present application. As shown in Figure 11, the device includes:
获取模块1101,用于获取目标设备的历史故障信息,历史故障信息用于指示目标设备在第1个时刻至第T-1个时刻中发生过的N个故障,T≥2,N≥2;The acquisition module 1101 is used to obtain historical fault information of the target device. The historical fault information is used to indicate N faults that have occurred in the target device from the 1st moment to the T-1th moment, T≥2, N≥2;
处理模块1102,用于将历史故障信息输入至待训练模型,得到目标设备在第T个时刻中发生N个故障的概率,待训练模型用于:基于历史故障信息,获取N个故障之间的因果关系以及N个故障的权重,N个故障的权重用于指示N个故障的重要程度;基于历史故障信息、N个故障之间的因果关系以及N个故障的权重,获取目标设备在第T个时刻中发生N个故障的概率;The processing module 1102 is used to input historical fault information into the model to be trained to obtain the probability of N faults occurring in the target device at the T-th moment. The model to be trained is used to: based on the historical fault information, obtain the probability of N faults between the N faults. Causal relationship and the weight of N faults. The weight of N faults is used to indicate the importance of N faults; based on historical fault information, the causal relationship between N faults and the weight of N faults, obtain the target device at T The probability of N faults occurring at a moment;
训练模块1103,用于基于概率对待训练模型进行训练,从而得到目标模型。The training module 1103 is used to train the model to be trained based on probability to obtain the target model.
本申请实施例训练得到的目标模型,具备故障预测功能。具体地,当需要针对目标设备进行故障预测时,可先获取目标设备的历史故障信息并将目标设备的历史故障信息输入至目标模型中,目标设备的历史故障信息用于指示目标设备在第1个时刻至第T-1个时刻中发生过的N个故障。然后,目标模型可对目标设备的历史故障信息进行处理,从而得到N个故障之间的因果关系以及N个故障的权重。最后,目标模型可对目标设备的历史故障信息、N个故障之间的因果关系以及N个故障的权重进行处理,从而得到目标设备在第T个时刻中发生N个故障的概率。前述过程中,目标模型在针对目标设备进行故障预测的过程中,不仅考虑目标设备在第1个时刻至第T-1个时刻中发生过的N个故障之间的因果关系,还考虑了N个故障的权重(也就是N个故障在针对目标设备的故障预测过程中的重要程度),所考虑的因素较为全面,这样最终得到的目标设备的故障预测结果(即目标设备在第T个时刻中发生N个故障的概率)可具备较高的准确度。The target model trained in the embodiment of this application has a fault prediction function. Specifically, when it is necessary to perform fault prediction for the target device, the historical fault information of the target device can be obtained first and input into the target model. The historical fault information of the target device is used to indicate that the target device is in the first stage. N faults that have occurred from time to time T-1. Then, the target model can process the historical fault information of the target equipment to obtain the causal relationship between N faults and the weight of N faults. Finally, the target model can process the historical fault information of the target device, the causal relationship between N faults, and the weight of the N faults, thereby obtaining the probability of N faults occurring in the target device at the T-th moment. In the foregoing process, the target model not only considers the causal relationship between the N faults that have occurred in the target device from the first moment to the T-1 moment, but also considers the N fault prediction process for the target device. The weight of each fault (that is, the importance of N faults in the fault prediction process for the target device), the factors considered are relatively comprehensive, so that the final fault prediction result of the target device (that is, the target device at the T-th moment The probability of N faults occurring in ) can have high accuracy.
在一种可能实现的方式中,待训练模型,用于:对历史故障信息进行第一特征提取,得到N个故障之间的因果关系;从历史故障信息中提取子历史故障信息,子历史故障信息用于指示目标设备在第T-w个时刻至第T-1个时刻中发生过的P个故障,N个故障包含P个故障,N≥P≥1,T>w≥1;对N个故障之间的因果关系以及子历史故障信息进行第二特征提取,得到N个故障的权重。In one possible implementation method, the model to be trained is used to: extract the first feature from historical fault information to obtain the causal relationship between N faults; extract sub-historical fault information from the historical fault information, and sub-historical fault information. The information is used to indicate P faults that have occurred in the target equipment from the T-wth moment to the T-1th moment. N faults include P faults, N≥P≥1, T>w≥1; for N faults The second feature extraction is performed on the causal relationship between the faults and the sub-historical fault information to obtain the weights of N faults.
在一种可能实现的方式中,待训练模型,用于:基于N个故障之间的因果关系以及N个故障的权重,获取N个故障中的M个故障之间的因果关系,N≥M≥1;基于历史故障信息以及M个故障之间的因果关系,获取目标设备在第T个时刻中发生N个故障的概率。In a possible implementation method, the model to be trained is used to: obtain the causal relationship between M faults among the N faults based on the causal relationship between N faults and the weight of the N faults, N≥M ≥1; Based on historical fault information and the causal relationship between M faults, obtain the probability of N faults occurring in the target equipment at the T moment.
在一种可能实现的方式中,待训练模型,用于:在N个故障之间的因果关系中,将权重小于第一权重阈值的N-M个故障剔除,得到N个故障中的M个故障之间的因果关系。In one possible implementation method, the model to be trained is used to: among the causal relationships between N faults, eliminate N-M faults whose weights are less than the first weight threshold, and obtain M faults among the N faults. causal relationship between.
在一种可能实现的方式中,待训练模型,用于:对M个故障之间的因果关系以及子历史故障信息进行第三特征提取,得到目标设备在第T个时刻中发生N个故障的概率。In one possible implementation method, the model to be trained is used to: extract the third feature of the causal relationship between M faults and sub-historical fault information, and obtain the results of N faults occurring in the target equipment at the T-th moment. Probability.
在一种可能实现的方式中,待训练模型,还用于:在M个故障之间的因果关系中,将权重小于第二权重阈值的M-K个故障剔除,得到M个故障中的K个故障之间的因果关系,M>K≥1;对K个故障之间的因果关系以及子历史故障信息进行第四特征提取,得到目标设备在第T个时刻中发生N个故障的新概率;训练模块1103,用于基于概率以及新概率,对待训练模型进行训练,从而得到目标模型。In one possible implementation method, the model to be trained is also used to: among the causal relationships between M faults, eliminate M-K faults whose weights are less than the second weight threshold, and obtain K faults among the M faults. The causal relationship between them, M>K≥1; perform fourth feature extraction on the causal relationship between K faults and sub-historical fault information, and obtain the new probability of N faults occurring in the target equipment at the T-th moment; training Module 1103 is used to train the model to be trained based on the probability and the new probability to obtain the target model.
在一种可能实现的方式中,第一特征提取或第二特征提取包含以下至少一种:基于循环神经网络的特征提取以及基于卷积神经网络的特征提取。In a possible implementation manner, the first feature extraction or the second feature extraction includes at least one of the following: feature extraction based on a recurrent neural network and feature extraction based on a convolutional neural network.
在一种可能实现的方式中,第三特征提取或第四特征提取包含以下至少一种:基于循环神经网络的特征提取、基于时间卷积网络的特征提取以及基于多层感知机的特征提取。In a possible implementation manner, the third feature extraction or the fourth feature extraction includes at least one of the following: feature extraction based on recurrent neural networks, feature extraction based on temporal convolutional networks, and feature extraction based on multi-layer perceptrons.
需要说明的是,上述装置各模块/单元之间的信息交互、执行过程等内容,由于与本申请方法实施例基于同一构思,其带来的技术效果与本申请方法实施例相同,具体内容可参考本申请实施例前述所示的方法实施例中的叙述,此处不再赘述。It should be noted that the information interaction, execution process, etc. between the modules/units of the above-mentioned device are based on the same concept as the method embodiments of the present application, and the technical effects they bring are the same as those of the method embodiments of the present application. The specific content can be Refer to the description in the method embodiments shown above in the embodiments of the present application, which will not be described again here.
本申请实施例还涉及一种执行设备,图12为本申请实施例提供的执行设备的一个结构示意图。如图12所示,执行设备1200具体可以表现为手机、平板、笔记本电脑、智能穿戴设备、服务器等,此处不做限定。其中,执行设备1200上可部署有图10对应实施例中所描述的故障预测装置,用于实现图5对应实施例中故障预测的功能。具体的,执行设备1200包括:接收器1201、发射器1202、处理器1203和存储器1204(其中执行设备1200中的处理器1203的数量可以一个或多个,图12中以一个处理器为例),其中,处理器1203可以包括应用处理器12031和通信处理器12032。在本申请的一些实施例中,接收器1201、发射器1202、处理器1203和存储器1204可通过总线或其它方式连接。The embodiment of the present application also relates to an execution device. Figure 12 is a schematic structural diagram of the execution device provided by the embodiment of the present application. As shown in Figure 12, the execution device 1200 can be embodied as a mobile phone, a tablet, a laptop, a smart wearable device, a server, etc., and is not limited here. The fault prediction device described in the corresponding embodiment of FIG. 10 may be deployed on the execution device 1200 to implement the function of fault prediction in the corresponding embodiment of FIG. 5 . Specifically, the execution device 1200 includes: a receiver 1201, a transmitter 1202, a processor 1203 and a memory 1204 (the number of processors 1203 in the execution device 1200 may be one or more, one processor is taken as an example in Figure 12) , wherein the processor 1203 may include an application processor 12031 and a communication processor 12032. In some embodiments of the present application, the receiver 1201, the transmitter 1202, the processor 1203, and the memory 1204 may be connected through a bus or other means.
存储器1204可以包括只读存储器和随机存取存储器,并向处理器1203提供指令和数据。存储器1204的一部分还可以包括非易失性随机存取存储器(non-volatile randomaccess memory,NVRAM)。存储器1204存储有处理器和操作指令、可执行模块或者数据结构,或者它们的子集,或者它们的扩展集,其中,操作指令可包括各种操作指令,用于实现各种操作。Memory 1204 may include read-only memory and random access memory and provides instructions and data to processor 1203 . A portion of memory 1204 may also include non-volatile random access memory (NVRAM). The memory 1204 stores processor and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, where the operating instructions may include various operating instructions for implementing various operations.
处理器1203控制执行设备的操作。具体的应用中,执行设备的各个组件通过总线系统耦合在一起,其中总线系统除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都称为总线系统。The processor 1203 controls the execution of operations of the device. In specific applications, various components of the execution device are coupled together through a bus system. In addition to the data bus, the bus system may also include a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, various buses are called bus systems in the figure.
上述本申请实施例揭示的方法可以应用于处理器1203中,或者由处理器1203实现。处理器1203可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器1203中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器1203可以是通用处理器、数字信号处理器(digital signal processing,DSP)、微处理器或微控制器,还可进一步包括专用集成电路(application specific integratedcircuit,ASIC)、现场可编程门阵列(field-programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。该处理器1203可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器1204,处理器1203读取存储器1204中的信息,结合其硬件完成上述方法的步骤。The methods disclosed in the above embodiments of the present application can be applied to the processor 1203 or implemented by the processor 1203. The processor 1203 may be an integrated circuit chip with signal processing capabilities. During the implementation process, each step of the above method can be completed by instructions in the form of hardware integrated logic circuits or software in the processor 1203 . The above-mentioned processor 1203 may be a general-purpose processor, a digital signal processor (DSP), a microprocessor or a microcontroller, and may further include an application specific integrated circuit (ASIC) or a field programmable gate. Array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The processor 1203 can implement or execute the various methods, steps and logical block diagrams disclosed in the embodiments of this application. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly implemented by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other mature storage media in this field. The storage medium is located in the memory 1204. The processor 1203 reads the information in the memory 1204 and completes the steps of the above method in combination with its hardware.
接收器1201可用于接收输入的数字或字符信息,以及产生与执行设备的相关设置以及功能控制有关的信号输入。发射器1202可用于通过第一接口输出数字或字符信息;发射器1202还可用于通过第一接口向磁盘组发送指令,以修改磁盘组中的数据;发射器1202还可以包括显示屏等显示设备。The receiver 1201 may be configured to receive input numeric or character information and generate signal inputs related to performing relevant settings and functional controls of the device. The transmitter 1202 can be used to output numeric or character information through the first interface; the transmitter 1202 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; the transmitter 1202 can also include a display device such as a display screen .
本申请实施例中,在一种情况下,处理器1203,用于通过图5对应实施例中的目标模型,获取目标设备的故障预测结果。In the embodiment of the present application, in one case, the processor 1203 is configured to obtain the fault prediction result of the target device through the target model in the corresponding embodiment of FIG. 5 .
本申请实施例还涉及一种训练设备,图13为本申请实施例提供的训练设备的一个结构示意图。如图13所示,训练设备1300由一个或多个服务器实现,训练设备1300可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(centralprocessing units,CPU)1313(例如,一个或一个以上处理器)和存储器1332,一个或一个以上存储应用程序1342或数据1344的存储介质1330(例如一个或一个以上海量存储设备)。其中,存储器1332和存储介质1330可以是短暂存储或持久存储。存储在存储介质1330的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对训练设备中的一系列指令操作。更进一步地,中央处理器1313可以设置为与存储介质1330通信,在训练设备1300上执行存储介质1330中的一系列指令操作。The embodiment of the present application also relates to a training device. Figure 13 is a schematic structural diagram of the training device provided by the embodiment of the present application. As shown in Figure 13, the training device 1300 is implemented by one or more servers. The training device 1300 may vary greatly due to different configurations or performance, and may include one or more central processing units (CPUs) 1313 ( For example, one or more processors) and memory 1332, one or more storage media 1330 (eg, one or more mass storage devices) storing applications 1342 or data 1344. Among them, the memory 1332 and the storage medium 1330 may be short-term storage or persistent storage. The program stored in the storage medium 1330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the training device. Furthermore, the central processor 1313 may be configured to communicate with the storage medium 1330 and execute a series of instruction operations in the storage medium 1330 on the training device 1300 .
训练设备1300还可以包括一个或一个以上电源1326,一个或一个以上有线或无线网络接口1350,一个或一个以上输入输出接口1358;或,一个或一个以上操作系统1341,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。The training device 1300 may also include one or more power supplies 1326, one or more wired or wireless network interfaces 1350, one or more input and output interfaces 1358; or, one or more operating systems 1341, such as Windows ServerTM, Mac OS XTM , UnixTM, LinuxTM, FreeBSDTM and so on.
具体的,训练设备可以执行图9对应实施例中的模型训练方法,从而得到目标模型。Specifically, the training device can execute the model training method in the corresponding embodiment of Figure 9 to obtain the target model.
本申请实施例还涉及一种计算机存储介质,该计算机可读存储介质中存储有用于进行信号处理的程序,当其在计算机上运行时,使得计算机执行如前述执行设备所执行的步骤,或者,使得计算机执行如前述训练设备所执行的步骤。Embodiments of the present application also relate to a computer storage medium. The computer-readable storage medium stores a program for performing signal processing. When the program is run on a computer, it causes the computer to perform the steps performed by the aforementioned execution device, or, The computer is caused to perform the steps performed by the aforementioned training device.
本申请实施例还涉及一种计算机程序产品,该计算机程序产品存储有指令,该指令在由计算机执行时使得计算机执行如前述执行设备所执行的步骤,或者,使得计算机执行如前述训练设备所执行的步骤。Embodiments of the present application also relate to a computer program product that stores instructions that, when executed by a computer, cause the computer to perform the steps performed by the foregoing execution device, or cause the computer to perform the steps performed by the foregoing training device. A step of.
本申请实施例提供的执行设备、训练设备或终端设备具体可以为芯片,芯片包括:处理单元和通信单元,所述处理单元例如可以是处理器,所述通信单元例如可以是输入/输出接口、管脚或电路等。该处理单元可执行存储单元存储的计算机执行指令,以使执行设备内的芯片执行上述实施例描述的数据处理方法,或者,以使训练设备内的芯片执行上述实施例描述的数据处理方法。可选地,所述存储单元为所述芯片内的存储单元,如寄存器、缓存等,所述存储单元还可以是所述无线接入设备端内的位于所述芯片外部的存储单元,如只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)等。The execution device, training device or terminal device provided by the embodiment of the present application may specifically be a chip. The chip includes: a processing unit and a communication unit. The processing unit may be, for example, a processor. The communication unit may be, for example, an input/output interface. Pins or circuits, etc. The processing unit can execute the computer execution instructions stored in the storage unit, so that the chip in the execution device executes the data processing method described in the above embodiment, or so that the chip in the training device executes the data processing method described in the above embodiment. Optionally, the storage unit is a storage unit within the chip, such as a register, cache, etc. The storage unit may also be a storage unit located outside the chip in the wireless access device, such as Read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (random access memory, RAM), etc.
具体的,请参阅图14,图14为本申请实施例提供的芯片的一个结构示意图,所述芯片可以表现为神经网络处理器NPU 1400,NPU 1400作为协处理器挂载到主CPU(Host CPU)上,由Host CPU分配任务。NPU的核心部分为运算电路1403,通过控制器1404控制运算电路1403提取存储器中的矩阵数据并进行乘法运算。Specifically, please refer to Figure 14. Figure 14 is a schematic structural diagram of a chip provided by an embodiment of the present application. The chip can be represented as a neural network processor NPU 1400. The NPU 1400 serves as a co-processor and is mounted to the Host CPU. ), the Host CPU allocates tasks. The core part of the NPU is the arithmetic circuit 1403. The arithmetic circuit 1403 is controlled by the controller 1404 to extract the matrix data in the memory and perform multiplication operations.
在一些实现中,运算电路1403内部包括多个处理单元(Process Engine,PE)。在一些实现中,运算电路1403是二维脉动阵列。运算电路1403还可以是一维脉动阵列或者能够执行例如乘法和加法这样的数学运算的其它电子线路。在一些实现中,运算电路1403是通用的矩阵处理器。In some implementations, the computing circuit 1403 internally includes multiple processing units (Process Engine, PE). In some implementations, arithmetic circuit 1403 is a two-dimensional systolic array. The arithmetic circuit 1403 may also be a one-dimensional systolic array or other electronic circuit capable of performing mathematical operations such as multiplication and addition. In some implementations, arithmetic circuit 1403 is a general-purpose matrix processor.
举例来说,假设有输入矩阵A,权重矩阵B,输出矩阵C。运算电路从权重存储器1402中取矩阵B相应的数据,并缓存在运算电路中每一个PE上。运算电路从输入存储器1401中取矩阵A数据与矩阵B进行矩阵运算,得到的矩阵的部分结果或最终结果,保存在累加器(accumulator)1408中。For example, assume there is an input matrix A, a weight matrix B, and an output matrix C. The arithmetic circuit obtains the corresponding data of matrix B from the weight memory 1402 and caches it on each PE in the arithmetic circuit. The operation circuit takes matrix A data and matrix B from the input memory 1401 to perform matrix operations, and the partial result or final result of the matrix is stored in an accumulator (accumulator) 1408 .
统一存储器1406用于存放输入数据以及输出数据。权重数据直接通过存储单元访问控制器(Direct Memory Access Controller,DMAC)1405,DMAC被搬运到权重存储器1402中。输入数据也通过DMAC被搬运到统一存储器1406中。The unified memory 1406 is used to store input data and output data. The weight data directly passes through the storage unit access controller (Direct Memory Access Controller, DMAC) 1405, and the DMAC is transferred to the weight memory 1402. Input data is also transferred to unified memory 1406 via DMAC.
BIU为Bus Interface Unit即,总线接口单元1413,用于AXI总线与DMAC和取指存储器(Instruction Fetch Buffer,IFB)1409的交互。BIU is the Bus Interface Unit, that is, the bus interface unit 1413, which is used for the interaction between the AXI bus and the DMAC and the Instruction Fetch Buffer (IFB) 1409.
总线接口单元1413(Bus Interface Unit,简称BIU),用于取指存储器1409从外部存储器获取指令,还用于存储单元访问控制器1405从外部存储器获取输入矩阵A或者权重矩阵B的原数据。The Bus Interface Unit 1413 (BIU for short) is used to fetch the memory 1409 to obtain instructions from the external memory, and is also used for the storage unit access controller 1405 to obtain the original data of the input matrix A or the weight matrix B from the external memory.
DMAC主要用于将外部存储器DDR中的输入数据搬运到统一存储器1406或将权重数据搬运到权重存储器1402中或将输入数据数据搬运到输入存储器1401中。DMAC is mainly used to transfer the input data in the external memory DDR to the unified memory 1406 or the weight data to the weight memory 1402 or the input data to the input memory 1401 .
向量计算单元1407包括多个运算处理单元,在需要的情况下,对运算电路1403的输出做进一步处理,如向量乘,向量加,指数运算,对数运算,大小比较等等。主要用于神经网络中非卷积/全连接层网络计算,如Batch Normalization(批归一化),像素级求和,对预测标签平面进行上采样等。The vector calculation unit 1407 includes multiple arithmetic processing units, and if necessary, further processes the output of the arithmetic circuit 1403, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. It is mainly used for non-convolutional/fully connected layer network calculations in neural networks, such as Batch Normalization, pixel-level summation, upsampling of the predicted label plane, etc.
在一些实现中,向量计算单元1407能将经处理的输出的向量存储到统一存储器1406。例如,向量计算单元1407可以将线性函数;或,非线性函数应用到运算电路1403的输出,例如对卷积层提取的预测标签平面进行线性插值,再例如累加值的向量,用以生成激活值。在一些实现中,向量计算单元1407生成归一化的值、像素级求和的值,或二者均有。在一些实现中,处理过的输出的向量能够用作到运算电路1403的激活输入,例如用于在神经网络中的后续层中的使用。In some implementations, vector calculation unit 1407 can store the processed output vectors to unified memory 1406 . For example, the vector calculation unit 1407 can apply a linear function; or a nonlinear function to the output of the operation circuit 1403, such as linear interpolation on the prediction label plane extracted by the convolution layer, or a vector of accumulated values, to generate an activation value. . In some implementations, vector calculation unit 1407 generates normalized values, pixel-wise summed values, or both. In some implementations, the processed output vector can be used as an activation input to the arithmetic circuit 1403, such as for use in a subsequent layer in a neural network.
控制器1404连接的取指存储器(instruction fetch buffer)1409,用于存储控制器1404使用的指令;An instruction fetch buffer 1409 connected to the controller 1404 is used to store instructions used by the controller 1404;
统一存储器1406,输入存储器1401,权重存储器1402以及取指存储器1409均为On-Chip存储器。外部存储器私有于该NPU硬件架构。The unified memory 1406, input memory 1401, weight memory 1402 and instruction fetch memory 1409 are all On-Chip memories. External memory is private to the NPU hardware architecture.
其中,上述任一处提到的处理器,可以是一个通用中央处理器,微处理器,ASIC,或一个或多个用于控制上述程序执行的集成电路。The processor mentioned in any of the above places can be a general central processing unit, a microprocessor, an ASIC, or one or more integrated circuits used to control the execution of the above programs.
另外需说明的是,以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。另外,本申请提供的装置实施例附图中,模块之间的连接关系表示它们之间具有通信连接,具体可以实现为一条或多条通信总线或信号线。In addition, it should be noted that the device embodiments described above are only illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physically separate. The physical unit can be located in one place, or it can be distributed across multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the device embodiments provided in this application, the connection relationship between modules indicates that there are communication connections between them, which can be specifically implemented as one or more communication buses or signal lines.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件的方式来实现,当然也可以通过专用硬件包括专用集成电路、专用CPU、专用存储器、专用元器件等来实现。一般情况下,凡由计算机程序完成的功能都可以很容易地用相应的硬件来实现,而且,用来实现同一功能的具体硬件结构也可以是多种多样的,例如模拟电路、数字电路或专用电路等。但是,对本申请而言更多情况下软件程序实现是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在可读取的存储介质中,如计算机的软盘、U盘、移动硬盘、ROM、RAM、磁碟或者光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,训练设备,或者网络设备等)执行本申请各个实施例所述的方法。Through the above description of the embodiments, those skilled in the art can clearly understand that the present application can be implemented by software plus necessary general hardware. Of course, it can also be implemented by dedicated hardware including dedicated integrated circuits, dedicated CPUs, dedicated memories, Special components, etc. to achieve. In general, all functions performed by computer programs can be easily implemented with corresponding hardware. Moreover, the specific hardware structures used to implement the same function can also be diverse, such as analog circuits, digital circuits or special-purpose circuits. circuit etc. However, for this application, software program implementation is a better implementation in most cases. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or that contributes to the existing technology. The computer software product is stored in a readable storage medium, such as a computer floppy disk. , U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., including several instructions to cause a computer device (which can be a personal computer, training device, or network device, etc.) to execute the steps described in various embodiments of this application. method.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、训练设备或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、训练设备或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的训练设备、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(Solid State Disk,SSD))等。The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, the computer instructions may be transferred from a website, computer, training device, or data The center transmits to another website site, computer, training equipment or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store, or a data storage device such as a training device or a data center integrated with one or more available media. The available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, solid state disk (Solid State Disk, SSD)), etc.
Claims (20)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310611808.2A CN116739154A (en) | 2023-05-26 | 2023-05-26 | Fault prediction method and related equipment thereof |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310611808.2A CN116739154A (en) | 2023-05-26 | 2023-05-26 | Fault prediction method and related equipment thereof |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN116739154A true CN116739154A (en) | 2023-09-12 |
Family
ID=87912486
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310611808.2A Pending CN116739154A (en) | 2023-05-26 | 2023-05-26 | Fault prediction method and related equipment thereof |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116739154A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117250942A (en) * | 2023-11-15 | 2023-12-19 | 成都态坦测试科技有限公司 | Fault prediction method, device, equipment and storage medium for determining model |
| CN119151323A (en) * | 2024-11-21 | 2024-12-17 | 成都秦川物联网科技股份有限公司 | Equipment security risk prediction method, system and equipment based on industrial Internet of things |
-
2023
- 2023-05-26 CN CN202310611808.2A patent/CN116739154A/en active Pending
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117250942A (en) * | 2023-11-15 | 2023-12-19 | 成都态坦测试科技有限公司 | Fault prediction method, device, equipment and storage medium for determining model |
| CN117250942B (en) * | 2023-11-15 | 2024-02-27 | 成都态坦测试科技有限公司 | Fault prediction method, device, equipment and storage medium for determining model |
| WO2025103072A1 (en) * | 2023-11-15 | 2025-05-22 | 成都态坦测试科技有限公司 | Fault prediction method and apparatus, model determination method and apparatus, and device and storage medium |
| CN119151323A (en) * | 2024-11-21 | 2024-12-17 | 成都秦川物联网科技股份有限公司 | Equipment security risk prediction method, system and equipment based on industrial Internet of things |
| CN119151323B (en) * | 2024-11-21 | 2025-03-14 | 成都秦川物联网科技股份有限公司 | Equipment security risk prediction method, system and equipment based on industrial Internet of things |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112070207A (en) | Model training method and device | |
| CN112541159A (en) | Model training method and related equipment | |
| US20240185568A1 (en) | Image Classification Method and Related Device Thereof | |
| CN115238909A (en) | Data value evaluation method based on federal learning and related equipment thereof | |
| CN116739154A (en) | Fault prediction method and related equipment thereof | |
| WO2022111387A1 (en) | Data processing method and related apparatus | |
| US20250284880A1 (en) | Summary Generation Method and Related Device Thereof | |
| WO2023197857A1 (en) | Model partitioning method and related device thereof | |
| CN113627421B (en) | An image processing method, a model training method and related equipment | |
| CN116312489A (en) | A kind of model training method and related equipment | |
| US20250148523A1 (en) | Item Recommendation Method and Related Device Thereof | |
| WO2024140630A1 (en) | Model training method and related device | |
| US20250245978A1 (en) | Image processing method and related device thereof | |
| CN117011620A (en) | Target detection method and related equipment thereof | |
| WO2023185541A1 (en) | Model training method and related device | |
| CN117061733A (en) | Video evaluation method and related equipment thereof | |
| CN116343004A (en) | Image processing method and related equipment thereof | |
| CN116259311A (en) | Voice processing method and related equipment thereof | |
| US20240265256A1 (en) | Model training method and related device | |
| WO2024199404A1 (en) | Consumption prediction method and related device | |
| CN117422122A (en) | Model training method and related equipment thereof | |
| CN116681596A (en) | Object model rotation method and related equipment | |
| WO2023197910A1 (en) | User behavior prediction method and related device thereof | |
| CN115984963A (en) | Action counting method and related equipment thereof | |
| CN116309226A (en) | Image processing method and related equipment thereof |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |