Disclosure of Invention
The present application aims to solve at least one of the technical problems existing in the prior art. Therefore, the application provides a defect diagnosis method, a defect diagnosis system, electronic equipment and a storage medium for primary equipment, which can improve the accuracy of primary equipment fault diagnosis.
An embodiment of the primary device-based defect diagnosis method according to the first aspect of the present application includes:
acquiring equipment defect data of primary equipment to be diagnosed;
Inputting the equipment defect data into a trained defect diagnosis model to obtain a defect diagnosis result of the primary equipment;
wherein the training of the defect diagnosis model comprises:
Acquiring a plurality of training attribute data of a plurality of training devices to be trained;
Preprocessing the training attribute data to obtain training defect data;
and training a preset diagnosis model according to the plurality of training defect data to obtain the defect diagnosis model. The defect diagnosis method of the primary equipment has at least the following beneficial effects:
Acquiring equipment attribute data, historical defect data and historical operation data of primary equipment to be diagnosed, preprocessing the acquired equipment attribute data, the historical defect data and the historical operation data to obtain a plurality of pieces of equipment defect data, constructing a defect database according to the plurality of pieces of equipment defect data, constructing a defect diagnosis model based on the defect database, training the defect diagnosis model to obtain a trained defect diagnosis model, and inputting the plurality of pieces of equipment defect data into the trained defect diagnosis model to obtain a defect diagnosis result of the primary equipment.
According to some embodiments of the application, the training attribute data includes device attribute data, historical defect data, and historical operating data;
Correspondingly, the preprocessing the training attribute data to obtain training defect data includes:
processing the equipment attribute data, the historical defect data and the historical operation data to obtain a plurality of pieces of equipment defect data;
And cleaning the data of the plurality of equipment defect data, removing abnormal data, and obtaining the cleaned plurality of equipment defect data.
According to some embodiments of the application, the method further comprises: constructing a defect database according to the plurality of equipment defect data;
the constructing a defect database according to the plurality of equipment defect data comprises the following steps:
calculating text similarity of the plurality of device defect data in a text distributed manner;
extracting a plurality of key defect data from the plurality of equipment defect data according to the text similarity;
Acquiring a plurality of historical defect data;
carrying out structuring treatment on the plurality of historical defect data according to a preset standard to obtain a plurality of treated historical defect data;
text labeling is carried out on the plurality of key defect data according to the plurality of historical defect data and a plurality of preset defect characteristics, so that a plurality of labeled key defect data are obtained;
And constructing a defect database according to the marked plurality of key defect data.
According to some embodiments of the application, the method further comprises: constructing a preset diagnosis model based on the defect database;
The constructing a preset diagnosis model based on the defect database comprises the following steps:
acquiring a preset service diagnosis model;
extracting a preset diagnosis index from the business diagnosis model;
acquiring a preset equipment word segmentation rule;
Performing word segmentation processing on the defect index description based on the equipment word segmentation rule to obtain a standard diagnosis index;
Acquiring a preset defect corpus model;
inputting the standard diagnosis indexes into the defect corpus model to obtain trained standard diagnosis indexes;
And constructing a convolutional neural network according to the trained standard diagnosis indexes by using a convolutional neural network algorithm to obtain a preset diagnosis model.
According to some embodiments of the application, training a preset diagnostic model according to the plurality of training defect data to obtain the defect diagnostic model includes:
Extracting a history domain sample and a target domain sample from the preset diagnosis model;
Inputting the history domain sample and the target domain sample into the preset diagnosis model through forward propagation to obtain target characteristics;
Optimizing the target features through a cross entropy loss function to obtain optimized target features;
Training the preset diagnosis model according to the optimized target characteristics to obtain a defect diagnosis model.
According to some embodiments of the application, the inputting the device defect data into the trained defect diagnosis model to obtain the defect diagnosis result of the target device includes:
inputting the plurality of device defect data into the trained defect diagnostic model;
And classifying the defect input of the equipment by using a classifier in the defect diagnosis model to obtain a defect diagnosis result of the primary equipment, wherein the defect diagnosis result comprises defect severity, defect diagnosis reason and defect management measures.
According to some embodiments of the application, the method further comprises:
Classifying the equipment defect degree of the primary equipment according to the defect severity, the defect diagnosis reason and the defect management measure to obtain a classification result;
Obtaining the equipment risk level of the primary equipment according to the classification result;
and predicting the development trend of the primary equipment within a preset time range according to the equipment risk grade.
A primary device-based defect diagnosis system according to an embodiment of a second aspect of the present application includes:
The acquisition module is used for: the acquisition module is used for acquiring equipment defect data of primary equipment to be diagnosed;
The generation module is used for: the generating module is used for inputting the equipment defect data into a trained defect diagnosis model to obtain a defect diagnosis result of the primary equipment.
An electronic device according to an embodiment of a third aspect of the present application includes:
at least one processor, and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions that are executed by the at least one processor to cause the at least one processor to implement a method for defect diagnosis of a primary device according to any one of the embodiments of the first aspect of the present application when the instructions are executed.
A computer readable storage medium according to an embodiment of a fourth aspect of the present application includes:
The computer-readable storage medium stores computer-executable instructions for performing the defect diagnosis method of the primary device according to the embodiment of the first aspect of the present application.
Additional aspects and advantages of the application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the application.
In the description of the present application, the descriptions of the terms "one embodiment," "some embodiments," "illustrative embodiments," "examples," "specific examples," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
In the operation process of the equipment, the primary equipment fault diagnosis is significant for guaranteeing the safe operation of the equipment, and once the primary equipment has an accident, economic loss and casualties can be brought. In recent years, due to rapid development of sensor technology and computers, fault diagnosis is paid attention to in industry and academia gradually, and at present, a traditional feature extraction mode and a method for learning a classification mode thereof are generally adopted to conduct fault diagnosis research on primary equipment, but the above methods are all implemented by taking extracted equipment fault information as input of a machine learning model, because the equipment fault information is generally extracted by relying on staff in a field patrol mode, the probability of finding the primary equipment on site by relying on staff is lower, the input equipment fault information is not comprehensive enough, the result of fault diagnosis on the primary equipment is not comprehensive enough, and the accuracy of fault diagnosis on the primary equipment is low.
Based on the above, the application provides a defect diagnosis method, a system, an electronic device and a storage medium of a primary device, which can acquire device attribute data, historical defect data and historical operation data of the primary device to be diagnosed, preprocess the acquired device attribute data, the acquired historical defect data and the acquired historical operation data to obtain a plurality of device defect data, construct a defect database according to the plurality of device defect data, construct a defect diagnosis model based on the defect database, train the defect diagnosis model to obtain a trained defect diagnosis model, and input the plurality of device defect data into the trained defect diagnosis model to obtain a defect diagnosis result of the primary device.
In a first aspect, an embodiment of the present application provides a defect diagnosis method based on a primary device.
In some embodiments, a defect diagnosis method of an embodiment of the present application includes: acquiring equipment defect data of primary equipment to be diagnosed, and inputting the equipment defect data into a trained defect diagnosis model to obtain a defect diagnosis result of the primary equipment; wherein, the training of defect diagnosis model includes: acquiring a plurality of training attribute data of a plurality of training devices to be trained; preprocessing a plurality of training attribute data to obtain a plurality of training defect data; and training the preset diagnosis model according to the plurality of training defect data to obtain a defect diagnosis model.
The training attribute data mentioned in the embodiment of the application comprises equipment attribute data, historical defect data and historical operation data.
Referring to fig. 1, fig. 1 is a first flowchart of a defect diagnosis method of a primary device according to some embodiments of the present application, which specifically includes the steps of:
s100, acquiring equipment attribute data, historical defect data and historical operation data of primary equipment to be diagnosed;
S200, preprocessing equipment attribute data, historical defect data and historical operation data to obtain a plurality of pieces of equipment defect data;
s300, constructing a defect database according to a plurality of equipment defect data;
S400, constructing a defect diagnosis model based on a defect database;
s500, training a defect diagnosis model to obtain a trained defect diagnosis model;
s600, inputting the defect data of the plurality of devices into the trained defect diagnosis model to obtain a defect diagnosis result of the primary device.
In step S100, device attribute data, history defect data, and history operation data of the primary device to be diagnosed are acquired. The electrical device that is directly used for producing and using electric energy and has a higher voltage than the control loop, that is, the secondary device, is referred to as a primary device, and it should be noted that "primary" mainly refers to "primary" in power production, and "secondary" mainly refers to "primary" for controlling the device, and "primary" is used for modifying the device, mainly for reflecting that the voltage level of the device belonging to the primary or the device is higher than that of the secondary device. The device attribute data of the embodiment of the application mainly comprise device types, device names, device codes, manufacturers and device models of devices and the like, and by acquiring different device attribute data, different types of equipment can be classified and managed according to different equipment attribute data, and targeted defect diagnosis can be carried out on different equipment, so that the accuracy of defect diagnosis is improved. The historical defect data of the embodiment of the application refers to the historical monitoring record of the primary equipment to be diagnosed, and mainly comprises the equipment name, defect type, defect description, major class, manufacturer, delivery year and month, equipment model, operation date, defect reason type, defect reason, defect appearance, discovery time, defect position, processing measures and the like of the primary equipment. The historical operation data of the embodiment of the application mainly comprises data which can reflect the operation condition of primary equipment, such as voltage, three-phase unbalanced current, voltage class, dielectric loss, equivalent capacitance, reference voltage alarm, three-phase unbalanced current alarm, dielectric loss alarm, full current alarm, equivalent capacitance alarm, communication state, operation state, equipment self-checking abnormality, partial discharge, iron core current and the like of the primary equipment, wherein the equipment attribute data, the historical defect data and the historical operation data of the primary equipment are used as data sources of a defect database.
In step S200, the device attribute data, the historical defect data and the historical operation data are preprocessed to obtain a plurality of device defect data, the preprocessing mainly comprises data fusion of the device attribute data, the historical defect data and the historical operation data, and the fused data is processed to obtain standardized device defect data required by a user.
In some embodiments, as shown in fig. 2, step S200 specifically includes the steps of:
s210, processing equipment attribute data, historical defect data and historical operation data to obtain a plurality of pieces of equipment defect data;
s220, cleaning the data of the plurality of equipment defect data, removing abnormal data, and obtaining the cleaned plurality of equipment defect data.
In step S210, the device attribute data, the historical defect data and the historical operation data are processed to obtain a plurality of device defect data, where the processing includes data fusion of the device attribute data, the historical defect data and the historical operation data, and in the embodiment of the present application, three fusion modes may be adopted: front-end fusion (early-fusion) or data-level fusion (data-level fusion), back-end fusion (late-fusion) or decision-level fusion (decision-level fusion) and intermediate fusion (intermediate-fusion). Front-end fusion is to fuse multiple independent data sets into a single feature vector, then input the single feature vector into a machine learning classifier, and since front-end fusion of multi-modal data often fails to fully utilize complementarity among the multi-modal data, and the original data of the front-end fusion often contains a large amount of redundant information, the multi-modal front-end fusion method is often combined with a feature extraction method to reject redundant information, such as Principal Component Analysis (PCA), maximum correlation minimum redundancy algorithm (mRMR), automatic decoder (Autoencoders), etc., n-dimensional features are mapped onto k-dimensions, which are brand-new orthogonal features also called principal components, the k-dimensional feature is reconstructed based on the original n-dimensional feature, PCA is to sequentially find a group of mutually orthogonal coordinate axes from the original space, the selection of the new coordinate axes is closely related to the data, wherein the first new coordinate axis selection is the direction with the largest variance in the original data, the second new coordinate axis selection is the direction with the largest variance in the plane orthogonal to the first coordinate axis, the third axis is the plane with the largest variance in the plane orthogonal to the 1 st and 2 nd axes, and so on, n coordinate axes can be obtained, as most variances are contained in the previous k coordinate axes, only the previous k coordinate axes with the largest variance are reserved, Therefore, the dimension reduction processing of the data characteristics is realized, the dimension reduction processing of the front-end fused original data can be performed through PCA, and a large amount of redundant information contained in the original data is removed. The back-end fusion is to fuse the output scores of the classifiers trained by the data of different modes respectively, because the errors of the fusion model come from different classifiers, and the errors from different classifiers are not related to each other and do not affect each other, and do not cause further accumulation of the errors, the back-end fusion modes comprise maximum value fusion (max-fusion), average value fusion (average-fusion), bayes rule fusion (Bayes' rule based), ensemble learning (ensemble learning) and the like, wherein the ensemble learning is taken as a typical representation of the back-end fusion mode, The integrated learning is a model for obtaining a final result based on the results of a plurality of trainers, for example, a random forest model is a typical integrated learning method, n class trees are constructed in a random forest, and the final result is obtained according to the results of all the trees. The middle fusion is to convert different modal data into high-dimensional feature expression firstly, then fuse the high-dimensional feature expression in a middle layer of a model, taking a neural network as an example, converting the original data into the high-dimensional feature expression by the aid of the neural network firstly, then obtaining commonality of the different modal data in a high-dimensional space, and flexibly selecting a fusion position by the aid of the middle fusion method.
In step S220, the plurality of device defect data are subjected to data cleaning, abnormal data are removed, and a plurality of cleaned device defect data are obtained, wherein the device defect data are mainly cleaned and de-duplicated for the conditions of duplication, deletion, messy code and the like of the device defect data, the duplication of the device defect data mainly refers to the content of a plurality of pieces of device defect data, the repeated device defect data need to be removed, the device defect data mainly refers to the condition that the device defect data has field deletion, the device defect data with field deletion need to be positioned, and the missing field is repaired, the messy code of the device defect data mainly refers to the device defect data processing process, part or all of characters cannot be read due to the use of non-corresponding character sets, the device defect data with field messy code need to be positioned, and the field of messy code repair is repaired, in addition, the device defect data may have noise data, the device defect data may also have the problems of full-angle rotation half-angle, english case error and the like, and the full-angle refers to the two standard character positions occupied by one character, and the half-angle refers to the character position occupied by one standard character position. Aiming at the problems, the application needs to clean the data of a plurality of equipment defect data, and the cleaning process is as follows:
1. Ensuring the data integrity of equipment defect data, cleaning the equipment defect data according to a preset data cleaning rule, executing an improved cleaning algorithm on the data obtained by the cleaning rule, for example, distributing weight to each field on the basis of a basic neighbor sorting algorithm and a multi-pass neighbor sorting algorithm, and calculating weighted similarity of similar repeated records, wherein the fields with higher weight have high similarity. Because of the repeated information contained in a large number of databases, a large amount of time and grabbing cost are consumed, repeated records should be removed preferentially in the data screening process, only one piece of effective data is reserved, in the actual network data grabbing process, data stored in the background can be arranged in advance, then the newly generated equipment defect data is subjected to the de-duplication operation, and the data integrity of the equipment defect data is ensured. In practical application, multiple de-duplication modes such as de-duplication according to a main key or de-duplication according to a rule can be considered, de-duplication according to the main key means that repeatedly recorded equipment defect data is removed by sql or excel, de-duplication according to the rule means that de-duplication is performed on data with complex duplication conditions by writing a series of rules, if de-duplication is performed on the equipment defect data from different channels, matching can be performed on the equipment defect data through the same key information, and then merging de-duplication is performed.
2. The method solves the problem of data consistency of equipment defect data, wherein the data consistency mainly comprises the normalization of data records and the consistency of data logic, the main standard for distinguishing the consistency of the data records is the consistency of data coding and formatting problems and data constraint, a data system is firstly required to be established, and the measurement of an index system is required to be focused, the index system refers to an organic whole formed by a plurality of relatively independent and mutually-connected statistical indexes reflecting the overall quantity characteristics of the data, in the statistical research, if the overall appearance of the whole data is required to be explained, only one index is often insufficient because only the quantity characteristics of a certain aspect of the whole are reflected, a plurality of related indexes are required to be used at the same time, and the unified whole formed by the plurality of related and mutually-independent indexes is the index system. In the actual operation process, the problem that the content of the data records is inconsistent is frequently found out from the database, and some equipment defect data can be manually related to the database to solve the problem of consistency, for example, data entry errors can be corrected by comparing the data records with data records stored in history.
3. The problem that noise data appear in equipment defect data is solved, noise refers to random errors and changes of measured variables, and the equipment defect data can be smoothly denoised through a Bin method, a cluster analysis method, a man-machine combination checking method, a regression method and the like. The Bin method is to perform smoothing processing on a group of sorted data by using surrounding points of data points to be smoothed, the sorted data are distributed into a plurality of barrels, namely Bins, the dividing method of the Bin is generally two, namely, the number of elements in each Bin is equal, the dividing method of the Bin is another equal-width method, namely, the value interval of each Bin is the same, firstly, the price data are sorted, then, the price data are divided into a plurality of bins with equal heights, namely, each Bin contains 3 values, finally, the average value of each Bin can be utilized for smoothing, the boundary of each Bin can be utilized for smoothing, when the average value is utilized for smoothing, the equipment defect data in the first Bin are replaced by the average value of the Bin, when the boundary is utilized for smoothing, the boundary of the Bin is formed by the maximum value and the minimum value, and all values in the Bin can be replaced by the boundary value of each Bin, so as to obtain the equipment defect data after denoising. The cluster analysis method is to aggregate similar or adjacent equipment defect data together to form various cluster sets, mark the equipment defect data outside the cluster sets as abnormal data, and reject the marked abnormal data to obtain denoised equipment defect data. The man-machine combined checking method is that the abnormal mode in the handwriting symbol library is assisted to be identified by utilizing the method based on the information theory, the identified abnormal mode can be output to a list, then the user checks each abnormal mode in the list, finally confirms a useless mode, eliminates abnormal equipment defect data according to the confirmed useless mode, and obtains denoised equipment defect data. The regression method is that by means of a linear regression method, including a multivariable regression method, a fitting relation among a plurality of variables can be obtained, so that the purpose of predicting the value of another variable by using a plurality of variable values is achieved, and the fitting function obtained by the regression analysis method can help smooth equipment defect data and remove noise of the equipment defect data.
In step S300, a defect database is constructed according to the plurality of device defect data, and the defect database lays a foundation for a subsequent device defect diagnosis model.
In some embodiments, as shown in fig. 3, step S300 specifically includes the steps of:
S310, calculating text similarity of a plurality of device defect data by using text distribution;
S320, extracting a plurality of key defect data from a plurality of device defect data according to the text similarity;
s330, acquiring a plurality of historical defect data;
S340, carrying out structuring treatment on the plurality of historical defect data according to a preset standard to obtain a plurality of treated historical defect data;
S350, text labeling is carried out on the plurality of key defect data according to the plurality of historical defect data and the preset plurality of defect characteristics, and a plurality of labeled key defect data are obtained;
S360, constructing a defect database according to the marked multiple key defect data.
In step S310, the text similarity of the defect data of multiple devices is calculated in a distributed manner by using the text, and since the text is composed of characters and punctuation, the computer cannot efficiently process the real text, and in order to solve the problem, a formalized method is required to represent the real text, and the text is usually converted into a vector for representation, and the method is applied to two modes of layering (HIERARCHICAL SOFTMAX) and negative sampling (NEGATIVE SAMPLING), so that the neural network language model with original numerous parameters and huge calculation amount becomes easy to calculate, including two models and two methods, and it is required to be explained that the two models are applied to the neural network language model. The two models refer to CBOW (continuous bag-of-words) model and Skip-Gram model, wherein CBOW model predicts the middle word by the words of the context, and Skip-Gram model predicts the possible word before and after by a specific word. The two methods refer to a hierarchical method and a negative sampling method, wherein the hierarchical method is a method for accelerating the calculation of the probability distribution of words by constructing an effective tree structure such as a Huffman tree, the negative sampling method is a method for reducing the calculation amount by randomly extracting a negative sample and taking part in each iteration together with a positive sample to become a classification problem, the text similarity of a plurality of equipment defects can be calculated through the two models and the two methods, the language model represented by the word vector of each word in the equipment defect data can be trained, and each dimension of the word vector represents the semantic feature of the word learned by the model, so that the establishment of a subsequent defect diagnosis model is facilitated.
In step S320, a plurality of key defect data are extracted from the plurality of device defect data according to the text similarity, and since the text similarity represents the key information of the primary device about the device defect to a certain extent, the plurality of key defect data are extracted from the plurality of device defect data according to the text similarity, that is, the key defect data with higher text similarity is selected, so that the efficiency of primary device defect detection can be improved.
In step S330, a plurality of historical defect data, that is, data detected in previous device detection records of a plurality of primary devices, is obtained, and mainly includes a device name, a defect type, a defect description, a major class, a manufacturer, a factory year and month, a device model, a commissioning date, a defect cause class, a defect cause, a defect appearance, a discovery time, a defect part, a processing measure, and the like of the primary devices.
In step S340, the plurality of history defect data is structured according to a preset standard to obtain a plurality of processed history defect data, wherein the structured processing includes text preprocessing such as word segmentation processing and the like, the application adopts an NLP (natural language processing ) word segmentation algorithm to segment the plurality of history defect data, the NLP word segmentation algorithm is mainly divided into two types according to the core idea, the first is word segmentation based on a dictionary, sentences are segmented into words according to the dictionary, and then the best combination mode of the words is searched; the second is word segmentation based on words, namely, the words are formed by words, sentences are divided into individual words, then the words are combined into words, the optimal segmentation strategy is found, and meanwhile, the word segmentation strategy can be converted into a sequence labeling problem. The dictionary-based word segmentation can adopt a shortest path word segmentation algorithm, the shortest path word segmentation algorithm firstly matches all words in a sentence to form a word graph, then searches the shortest path from a starting point to a terminal point as an optimal combination mode, sets the weight of each word in the word graph to be equal, and when solving the shortest path problem of the DAG graph, the shortest path between two points needs to be utilized to contain the shortest path between other peaks on the path, for example, S- > A- > B- > E is the shortest path from S to E, S- > A- > B is the shortest path from S to B, otherwise, C exists to enable d (S- > C- > B) < d (S- > A- > B), and the shortest path from S to E also becomes S- > C- > B- > E, which is contradictory, so that the optimal substructure property can be utilized to further optimize the word segmentation algorithm according to the greedy-state algorithm or the two dynamic solution algorithm. The word segmentation based on the word can adopt an HMM hidden Markov model, wherein the HMM model considers that two sequences exist when the problem of sequence labeling is solved, one is an observation sequence, namely a sentence which is observed by people explicitly, the sequence label is a hidden state sequence, namely the observation sequence is X, the hidden state sequence is Y, and the causal relationship is Y- > X, so that the labeling result Y is obtained, the probability of X, the probability of Y and the probability of P (X|Y) are calculated, namely a probability distribution model of P (X, Y) is established, and the word segmentation processing is carried out on a plurality of historical defect data according to the probability distribution model.
In step S350, text labeling is performed on the plurality of critical defect data according to the plurality of historical defect data and the preset plurality of defect features, so as to obtain a plurality of labeled critical defect data, the preset plurality of defect features are used for judging which parts of the primary equipment may have defects according to the attribute of the primary equipment, or judging possible defect problems of the primary equipment according to the operation state of the primary equipment, deep parsing is performed on the defect problems, and text labeling is performed on the plurality of critical defect data by using the plurality of defect features, so that the accuracy of positioning defects of the primary equipment can be improved.
In step S360, a defect database is constructed according to the labeled plurality of critical defect data, and since the labeled plurality of critical defect data has undergone standardization processing, the labeled plurality of critical defect data may be generated to conform to a data format stored in the database, for example, the labeled plurality of critical defect data is constructed in a format of a variable name corresponding to a data type. In addition, before the defect database is constructed, manual labeling can be performed, for example, the defect appearance, the defect position, the defect reason and the processing measure of the primary equipment are manually labeled according to the historical defect report of the primary equipment, the manual labeling is mainly performed according to text contents such as defect description, defect reason, processing condition description and the like in the defect record, judgment is performed by combining with the experience of a business expert, and a plurality of key defect data meeting the business requirement are screened.
In step S400, a defect diagnosis model for performing intelligent diagnosis of defects of the primary device is constructed based on the defect database.
In some embodiments, as shown in fig. 4, step S400 specifically includes the steps of:
S410, acquiring a preset service diagnosis model;
S420, extracting a preset diagnosis index from the service diagnosis model;
S430, acquiring a preset equipment word segmentation rule;
s440, performing word segmentation processing on the defect index description based on the equipment word segmentation rule to obtain a standard diagnosis index;
S450, acquiring a preset defect corpus model;
s460, inputting the standard diagnosis indexes into a defect corpus model to obtain trained standard diagnosis indexes;
S470, constructing a convolutional neural network according to the trained standard diagnosis indexes by using a convolutional neural network algorithm to obtain a defect diagnosis model.
In step S410, a preset service diagnosis model is obtained, which is a defect diagnosis model pre-constructed according to possible equipment defects of a preset primary equipment, and the defect diagnosis model meeting the actual requirements can be trained by combining specific operation conditions of the primary equipment and the service diagnosis model.
In step S420, the preset diagnostic index is extracted from the service diagnostic model, and the preset diagnostic index mainly includes the equipment type, the defect part, the defect component, and the like of the primary equipment, and since the obtained preset diagnostic index is not necessarily subjected to the standardized processing, the preset diagnostic index is further required to be processed in the next step.
In step S430, a preset device word segmentation rule is obtained, and since the chinese text is different from the english text, there is no natural boundary between words, and therefore, word segmentation needs to be performed on the chinese text before text representation, the user can set a proper word segmentation according to the actual defect detection experience, and a plurality of word segments are assembled to construct a word segmentation library, and a proper device word segmentation rule is set to provide word segmentation basis for subsequent word segments.
In step S440, the defect index description is subjected to word segmentation based on the device word segmentation rule, so as to obtain a standard diagnosis index, and after the word segmentation, keywords of a plurality of defect indexes can be obtained and can be used as input of a defect corpus model.
In step S450, a preset defect corpus model is obtained, and the defect corpus model is constructed according to a large number of preprocessed primary equipment defect records, so as to lay a foundation for subsequent training of standard diagnostic indexes.
In step S460, the standard diagnostic index is input into the defect corpus model to obtain a trained standard diagnostic index, and since the defect corpus model already contains a plurality of primary device defect records, the standard diagnostic index is input into the defect corpus, and then the word vector and dimension of the word of the standard diagnostic index are trained to obtain the trained standard diagnostic index.
In step S470, a convolutional neural network algorithm is utilized to construct a convolutional neural network according to a trained standard diagnosis index to obtain a defect diagnosis model, in the embodiment of the present application, a four-layer convolutional neural network is constructed, including an input layer, a convolutional layer, a pooling layer and an output layer, it should be noted that in the embodiment of the present application, the input layer, the convolutional layer, the pooling layer and the full-connection layer are all one-dimensional CNNs (convolutional neural networks, convolutional Neural Network), and the defect diagnosis model is obtained according to the trained standard diagnosis index and the constructed convolutional neural network. In addition, the convolution layer of the application comprises a group of trainable filters, and is characterized in that the weight sharing (WEIG HTS SHA RING) that is, the same convolution kernel is input once by traversing with a fixed step length, the weight sharing reduces the network parameters of the convolution layer, avoids the overfitting caused by excessive parameters, reduces the memory required by the system and reduces the load of a computer; the pooling layer (Pooling Layer) performs downsampling operation, and the main purpose is to reduce the parameters of the neural network, retain the main characteristics, prevent overfitting and improve the generalization capability of the model; the fully connected layer classifies the features extracted in the previous step and plays a role of a classifier in the whole neural network. The method comprises the steps of firstly spreading the output of the last pooling layer into one-dimensional characteristic vectors as the input of a full-connection layer.
In step S500, the defect diagnosis model is trained, and a trained defect diagnosis model is obtained.
In some embodiments, as shown in fig. 5, step S500 specifically includes the steps of:
s510, extracting a history domain sample and a target domain sample from the defect diagnosis model;
S520, inputting the history domain sample and the target domain sample into a defect diagnosis model through forward propagation to obtain target characteristics;
S530, optimizing the target characteristics through a cross entropy loss function to obtain optimized target characteristics;
S540, training the defect diagnosis model according to the optimized target characteristics to obtain a trained defect diagnosis model.
In step S510, a history domain sample and a target domain sample are extracted from the defect diagnosis model, the history domain sample including a plurality of health states of the history detection primary device, and the target domain sample including a plurality of health states of the real-time detection primary device.
In step S520 to step S540, the history domain sample and the target domain sample are input into the defect diagnosis model through forward propagation, so as to obtain target features, the target features are optimized through the cross entropy loss function, the optimized target features are obtained, and the defect diagnosis model is trained according to the optimized target features, so that a trained defect diagnosis model is obtained. The target features are obtained through a classifier preset in a defect diagnosis model, classification errors of the target features can be optimized through a cross entropy loss function, and a specific cross entropy loss function formula is as follows:
Where m is the batch size of the history field samples; j is the fault class; i [. Cndot. ] is an index function, and the value rule is as follows: and (3) obtaining optimized target characteristics by inputting the I [ value is true ] =1 and the I [ value is false ] =0, and continuously inputting the optimized target characteristics into the defect model for training to obtain a trained defect diagnosis model.
In step S600, a plurality of defect data of the device are input into a trained defect diagnosis model to obtain a defect diagnosis result of the primary device, that is, the processed defect index data is used as an input layer of the convolutional neural network, the quantized defect text is classified through a classifier of the convolutional neural network, a corresponding classification result is output to form a final defect diagnosis model, and then the defect diagnosis model is trained to enable a loss function of a training set to be in a descending trend and no overfitting occurs.
In some embodiments, as shown in fig. 6, step S600 specifically includes the steps of:
s610, inputting a plurality of equipment defect data into a trained defect diagnosis model;
S620, classifying the equipment defect input by using a classifier in the defect diagnosis model to obtain a defect diagnosis result of the primary equipment.
In step S610, a plurality of device defect data is input into a trained defect diagnosis model.
In step S620, the device defect input is classified by using the classifier in the defect diagnosis model, so as to obtain a defect diagnosis result of the primary device, where the defect diagnosis result includes defect severity, defect diagnosis reason and defect management measure.
In some embodiments, as shown in fig. 7, the defect diagnosis method of the primary device according to the present application specifically further includes the steps of:
s700, classifying the defect degree of the primary equipment according to the defect severity, the defect diagnosis reason and the defect management measures to obtain a classification result;
S800, obtaining the equipment risk level of the primary equipment according to the classification result;
s900, predicting the development trend of primary equipment in a preset time range according to the equipment risk level.
In step S700, the defect degree of the primary device is classified according to the defect severity, the defect diagnosis reason and the defect management measure to obtain a classification result, the classification may use a method of evaluating the weights of the indexes, for example, the method corresponds to a plurality of weight indexes under different parameters, the user may perform weight scoring according to the specific defect condition of the primary device in combination with a plurality of weight indexes, the defect degree of the primary device is classified according to the weight scoring condition to obtain a classification result, and in practical application, the classification result may be obtained by classifying according to the loss degree of the primary device, etc., which will not be described herein.
In step S800, the device risk level of the primary device is obtained according to the classification result, and in practical application, the risk of the primary device can be evaluated by combining an entropy method, and the risk of the primary device is classified according to the high-low level, so as to provide a referential value for device maintenance.
In step S900, according to the risk level of the device, the development trend of the primary device in the preset time range is predicted, so that the defect condition of the primary device can be predicted in advance, and the primary device can be processed in time, thereby improving the service life of the primary device.
In the embodiment of the application, equipment attribute data, historical defect data and historical operation data of primary equipment to be diagnosed are acquired, the acquired equipment attribute data, the historical defect data and the historical operation data are preprocessed to obtain a plurality of pieces of equipment defect data, a defect database is constructed according to the plurality of pieces of equipment defect data, a defect diagnosis model is constructed based on the defect database, the defect diagnosis model is trained to obtain a trained defect diagnosis model, and the plurality of pieces of equipment defect data are input into the trained defect diagnosis model to obtain a defect diagnosis result of the primary equipment.
In a second aspect, an embodiment of the present application further provides a defect diagnosis system based on a primary device, including an acquisition module and a generation module, where the acquisition module is configured to acquire device defect data of the primary device to be diagnosed; the generating module is used for inputting the equipment defect data into the trained defect diagnosis model to obtain a defect diagnosis result of the primary equipment.
In a third aspect, the embodiment of the application also provides electronic equipment.
In some embodiments, an electronic device includes: at least one processor, and a memory communicatively coupled to the at least one processor; the memory stores instructions that are executed by the at least one processor to cause the at least one processor to implement the defect diagnosis method for any one of the primary devices according to the embodiments of the present application when executing the instructions.
The processor and the memory may be connected by a bus or other means.
The memory is used as a non-transitory computer readable storage medium for storing a non-transitory software program and a non-transitory computer executable program, such as the defect diagnosis method of the primary device described in the embodiments of the present application. The processor implements the above-described defect diagnosis method of the primary device by running a non-transitory software program and instructions stored in a memory.
The memory may include a memory program area and a memory data area, wherein the memory program area may store an operating system, at least one application program required for a function; the storage data area may store a defect diagnosis method for performing the above-described primary device. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory remotely located relative to the processor, the remote memory being connectable to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
A non-transitory software program and instructions required to implement the above-described defect diagnosis method of a primary device are stored in a memory, which when executed by one or more processors, performs the defect diagnosis method of a primary device mentioned in the above-described embodiments of the first aspect.
In a fourth aspect, embodiments of the present application also provide a computer-readable storage medium.
In some embodiments, a computer-readable storage medium stores computer-executable instructions for performing the defect diagnosis method of the primary device mentioned in the embodiments of the first aspect.
In some embodiments, the storage medium stores computer-executable instructions that are executed by one or more control processors, e.g., by one of the processors in the electronic device, to cause the one or more processors to perform the method of diagnosing defects in the primary device.
The above described apparatus embodiments are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, i.e. may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
The embodiments of the present application have been described in detail with reference to the accompanying drawings, but the present application is not limited to the above embodiments, and various changes can be made within the knowledge of one of ordinary skill in the art without departing from the spirit of the present application. Furthermore, embodiments of the application and features of the embodiments may be combined with each other without conflict.