Disclosure of Invention
The present application is directed to solving at least one of the problems in the prior art. Therefore, the application provides a method, a system, an electronic device and a storage medium for diagnosing the defect of the primary device, which can improve the accuracy of fault diagnosis of the primary device.
According to the defect diagnosis method based on the primary equipment in the first aspect embodiment of the application, the defect diagnosis method comprises the following steps:
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 plurality of training attribute data to obtain a plurality of 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 according to the embodiment of the application has at least the following beneficial effects:
the method comprises the steps of obtaining equipment attribute data, historical defect data and historical operation data of primary equipment to be diagnosed, preprocessing the obtained equipment attribute data, historical defect data and 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, 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 present application, the training attribute data includes equipment attribute data, historical defect data, and historical operating data;
correspondingly, the preprocessing the plurality of training attribute data to obtain a plurality of training defect data includes:
processing the equipment attribute data, the historical defect data and the historical operating data to obtain a plurality of pieces of equipment defect data;
and performing data cleaning on the plurality of equipment defect data, and eliminating abnormal data to obtain a plurality of cleaned 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 from the plurality of device defect data includes:
calculating the text similarity of the plurality of equipment defect data in a text distribution mode;
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;
structuring the plurality of historical defect data according to a preset standard to obtain a plurality of processed historical defect data;
performing text marking on the plurality of key defect data according to the plurality of historical defect data and a plurality of preset defect characteristics to obtain a plurality of marked key defect data;
and constructing a defect database according to the marked key defect data.
According to some embodiments of the application, the method further comprises: constructing a preset diagnosis model based on the defect database;
constructing a preset diagnosis model based on the defect database, wherein the preset diagnosis model comprises the following steps:
acquiring a preset service diagnosis model;
extracting preset diagnosis indexes from the service diagnosis model;
acquiring a preset device 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 index into the defect corpus model to obtain a trained standard diagnosis index;
and constructing a convolutional neural network according to the trained standard diagnostic index by using a convolutional neural network algorithm to obtain a preset diagnostic model.
According to some embodiments of the present application, the training a preset diagnosis model according to the plurality of training defect data to obtain the defect diagnosis model includes:
extracting a historical domain sample and a target domain sample from the preset diagnosis model;
inputting the historical domain sample and the target domain sample into the preset diagnosis model through forward propagation respectively to obtain target characteristics;
optimizing the target characteristics through a cross entropy loss function to obtain optimized target characteristics;
and training the preset diagnosis model according to the optimized target characteristics to obtain a defect diagnosis model.
According to some embodiments of the present application, the inputting the device defect data into a trained defect diagnosis model to obtain a defect diagnosis result of the target device includes:
inputting the plurality of equipment defect data into the trained defect diagnosis model;
classifying the equipment defect input 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 reasons 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 level.
A primary device based defect diagnosis system according to an embodiment of the second aspect of the present application, comprising:
an acquisition module: the acquisition module is used for acquiring equipment defect data of primary equipment to be diagnosed;
a generation module: and the generation 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 for execution by the at least one processor to cause the at least one processor, when executing the instructions, to implement a method for diagnosing a defect of a primary device according to any one of the embodiments of the first aspect of the present application.
A computer-readable storage medium according to a fourth aspect embodiment of the present application, comprising:
the computer-readable storage medium stores computer-executable instructions for performing a method for diagnosing defects of a primary device according to an embodiment of the first aspect of the present application.
Additional aspects and advantages of the present 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 present application.
Detailed Description
Reference will now be made in detail to the embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
In the description of the present application, reference to the description of the terms "one embodiment," "some embodiments," "an illustrative embodiment," "an example," "a specific example," or "some examples," etc., means 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, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. 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, primary equipment fault diagnosis is significant for guaranteeing the safe operation of the equipment, and once an accident occurs to the primary equipment, economic loss and casualties can be brought. In recent years, due to rapid development of sensor technology and computers, fault diagnosis is gradually emphasized in the industry and academia, at present, a traditional feature extraction mode and a learning classification mode method thereof are generally adopted to carry out fault diagnosis research on primary equipment, but the above methods all use extracted equipment fault information as input of a machine learning model, because the equipment fault information is generally extracted by depending on a worker in a field patrol mode, the probability of finding the primary equipment on the field by depending on the worker is low, the input equipment fault information is not comprehensive, the result of the primary equipment fault diagnosis is not comprehensive, and the accuracy of the primary equipment fault diagnosis is low.
Based on the above, the present application provides a defect diagnosis method, a system, an electronic device, and a storage medium for a primary device, which can obtain device attribute data, historical defect data, and historical operating data of the primary device to be diagnosed, preprocess the obtained device attribute data, historical defect data, and historical operating 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, the defect diagnosis method of the embodiments 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 the defect diagnosis model comprises the following steps: acquiring a plurality of training attribute data of a plurality of training devices to be trained; preprocessing the plurality of training attribute data to obtain a plurality of training defect data; and training a 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 operating data.
Referring to fig. 1, fig. 1 is a first flowchart of a method for diagnosing a defect 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 operating data of primary equipment to be diagnosed;
s200, preprocessing the equipment attribute data, the historical defect data and the historical operation data to obtain a plurality of pieces of equipment defect data;
s300, constructing a defect database according to the defect data of the plurality of devices;
s400, constructing a defect diagnosis model based on a defect database;
s500, training the 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, historical defect data, and historical operating data of a primary device to be diagnosed are acquired. It should be noted that "primary" mainly refers to "main circuit" in power generation, and "secondary" mainly refers to control "primary" and modifies the equipment with "primary", mainly to show that the voltage level of the equipment belonging to the main circuit or the equipment is higher than that of the secondary equipment. The equipment attribute data of the embodiment of the application mainly comprises the equipment type, the equipment name, the equipment code, the equipment manufacturer, the equipment model and the like, and by acquiring different equipment attribute data, the application can classify and manage different types of equipment according to different equipment attribute data, and can carry out targeted defect diagnosis on different equipment, so that the accuracy of defect diagnosis is improved. The historical defect data of the embodiment of the application refers to historical monitoring records of primary equipment to be diagnosed, and mainly comprises equipment names, defect types, defect descriptions, professional classes, manufacturers, delivery years, equipment models, commissioning dates, defect reason categories, defect reasons, defect representations, discovery time, defect parts, treatment 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 the voltage, three-phase unbalanced current, voltage grade, 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 abnormity, partial discharge, iron core current and the like of the primary equipment, wherein the equipment attribute data, historical defect data and 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 operating data are preprocessed to obtain a plurality of device defect data, where the preprocessing mainly includes performing data fusion on the device attribute data, the historical defect data, and the historical operating data, and processing the fused data 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 the equipment attribute data, the historical defect data and the historical operation data to obtain a plurality of pieces of equipment defect data;
and S220, performing data cleaning on the plurality of pieces of equipment defect data, and eliminating abnormal data to obtain the plurality of pieces of cleaned equipment defect data.
In step S210, the device attribute data, the historical defect data, and the historical operating data are processed to obtain a plurality of device defect data, where the processing includes performing data fusion on the device attribute data, the historical defect data, and the historical operating data, and in this embodiment, three fusion methods 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). The front-end fusion is to fuse a plurality of independent data sets into a single feature vector, and then input the single feature vector into a machine learning classifier, because the front-end fusion of multi-modal data often cannot fully utilize the complementarity among the multi-modal data, and the original data of the front-end fusion usually contains a large amount of redundant information, the multi-modal front-end fusion method is often combined with a feature extraction method to remove the redundant information, such as Principal Component Analysis (PCA), maximum correlation minimum redundancy algorithm (mrr), automatic decoders (Autoencoders), and the like, taking PCA as an example, to map n-dimensional features onto k-dimensional features, which are brand new orthogonal features also called principal components, and are k-dimensional features reconstructed on the basis of the original n-dimensional features, the PCA is to sequentially find a group of mutually orthogonal coordinate axes from the original space, and the selection of the new coordinate axes is closely related to the data itself, the first new coordinate axis is selected to be the direction with the largest square difference in the original data, the second new coordinate axis is selected to be the plane orthogonal to the first coordinate axis to enable the square difference to be the largest, the third axis is the plane orthogonal to the 1 st axis and the 2 nd axis to enable the square difference to be the largest, and the like, so that n coordinate axes can be obtained, most of the square differences are contained in the front k coordinate axes, only the front k coordinate axes containing most of the square differences are reserved, the dimension reduction processing of the data characteristics is achieved, the dimension reduction processing can be conducted on the original data fused at the front end through PCA, and a large amount of redundant information contained in the original data is removed. The back-end fusion is to fuse the classifier outputs respectively trained by different modal data into scores, because the errors of the fusion model come from different classifiers, while the errors from different classifiers are often not related and not influenced, further accumulation of errors is not caused, the back-end fusion mode comprises maximum value fusion (max-fusion), average value fusion (averaged-fusion), Bayes 'rule based fusion (Bayes' rule based), ensemble learning (ensemble learning) and the like, the ensemble learning is a model for obtaining a final result based on results of a plurality of trainers, for example, a random forest model is a typical ensemble learning method, n classes of trees are constructed in a random forest, and a final result is obtained according to results of all the trees. The intermediate fusion is to convert different modal data into high-dimensional feature expression, then perform fusion in an intermediate layer of a model, take a neural network as an example, the intermediate fusion firstly converts original data into the high-dimensional feature expression by using the neural network, then obtain the commonalities of the different modal data on a high-dimensional space, and flexibly select a fusion position by using an intermediate fusion method.
In step S220, data of a plurality of device defect data is cleaned, abnormal data is removed, and the cleaned plurality of device defect data is obtained, wherein the device defect data is mainly cleaned and de-duplicated for the situations of duplication, deletion, messy codes and the like of the device defect data, the duplication of the device defect data mainly refers to the same content of the plurality of device defect data, the duplicated device defect data needs to be removed, the device defect data deletion mainly refers to the situation that fields of the device defect data are deleted, the device defect data with the deleted fields needs to be located, the deleted fields are repaired, the device defect data messy codes mainly refers to the situation that during the processing of the device defect data, a part or all characters cannot be read due to the use of a non-corresponding character set, the device defect data with the messy codes of the fields needs to be located, and the messy code fields are repaired, the device defect data may have noise data, and the device defect data may also have problems of full angle to half angle, english size writing error and the like, and it should be noted that a full angle means that one character occupies two standard character positions, and a half angle means that one character occupies one standard character position. Aiming at the problems, the data cleaning needs to be carried out on the defect data of a plurality of devices, and the cleaning process is as follows:
1. the data integrity of the device defect data is ensured, the device defect data is cleaned according to a preset data cleaning rule, an improved cleaning algorithm is executed on the data obtained through the cleaning rule, for example, on the basis of a basic neighbor sorting algorithm and a multi-pass neighbor sorting algorithm, a weight is distributed to each field, the weighted similarity of similar repeated records is calculated, it needs to be noted that the field with the higher weight is high in similarity, the data integrity mentioned in the application mainly refers to the lack of the integrity of the data records and information, and due to the lack of the data information and the data records, the statistics result is inaccurate under the condition of no main record, so the integrity is the basis for ensuring the quality of the device defect data. Due to the fact that a large amount of repeated information contained in the database consumes a large amount of time and capturing cost, repeated records should be removed preferentially in the data screening process, only one piece of effective data is reserved, in the actual network data capturing process, data stored in a background can be sorted in advance, then, the newly generated equipment defect data are subjected to deduplication operation, and data integrity of the equipment defect data is guaranteed. In practical application, multiple deduplication modes such as deduplication according to a main key or deduplication according to rules can be considered, deduplication according to the main key means that repeatedly recorded equipment defect data is removed by using sql or excel, deduplication according to the rules means that data with complex repetition conditions are deduplicated by writing a series of rules, if the equipment defect data from different channels need to be deduplicated, the equipment defect data can be matched through the same key information, and then merging and deduplication are performed.
2. The data consistency problem of the defect data of the equipment is solved, wherein the data consistency mainly comprises the normalization of data records and the consistency of data logics, the main standard for distinguishing the data record consistency is the consistency of data coding and formatting problems and data constraints, the data consistency problem needs to be solved, a data system is firstly established, and the measurement of an index system needs to be focused, the index system is an organic whole consisting of a plurality of relatively independent and mutually connected statistical indexes which reflect the overall quantity characteristics of the data, in the statistical research, if the whole appearance of the whole data needs to be described, only one index is often insufficient because the index can only reflect the quantity characteristics of one aspect of the whole, a plurality of related indexes need to be simultaneously used at the time, and the plurality of related and mutually independent indexes form a unified whole, namely an index system. In the actual operation process, the problem of inconsistent data record contents is often found in the database, some device defect data can be manually solved by using the association between the data record contents and the outside, for example, a data entry error can be generally corrected by comparing the data entry error with a data record stored in history, and since the naming of the same attribute in different databases is not standardized, the occurrence of an inconsistent situation is often caused during data integration, so in the actual operation process, the naming of each attribute value needs to be standardized, and the problem of inconsistent device defect data is reduced.
3. The problem that noise data appear in the equipment defect data is solved, the noise refers to random errors and changes of measured variables, and the equipment defect data can be subjected to smooth denoising through a Bin method, a cluster analysis method, a man-machine combination inspection method, a regression method and the like. The Bin method is to smooth a group of sorted data by using surrounding points of data points to be smoothed, the sorted data is distributed into a plurality of buckets, that is, Bins, there are generally two methods for dividing Bin, one is a method of equal height, that is, the number of elements in each Bin is equal, the other is a method of equal width, that is, the spacing between values of each Bin is the same, firstly, the price data is sorted, then, the price data is divided into a plurality of Bins of equal height, that is, each Bin contains 3 numerical values, finally, either the mean value of each Bin is used for smoothing, or the boundary of each Bin is used for smoothing, when the mean value is used for smoothing, the device defect data in the first Bin is replaced by the mean value of the Bin, when the boundary is used for smoothing, for a given Bin, the maximum value and the minimum value form the boundary of the Bin, and the boundary value of each Bin is used for replacing all the values in the Bin, and obtaining the denoised equipment defect data. The cluster analysis method is to gather similar or adjacent equipment defect data together to form each cluster set, mark the equipment defect data outside the cluster sets as abnormal data, and eliminate the marked abnormal data to obtain the denoised equipment defect data. The man-machine combination inspection method is that a method based on information theory is utilized to help identify abnormal modes in a handwritten symbol library, the identified abnormal modes can be output to a list, then a user inspects all the abnormal modes in the list, finally, useless modes are confirmed, and abnormal equipment defect data are removed according to the confirmed useless modes to obtain the denoised equipment defect data. The regression method is that the fitting relation among a plurality of variables can be obtained by means of a linear regression method, including a multivariate regression method, so that the purpose of predicting the value of another variable by using a plurality of variable values is achieved, the fitting function obtained by the regression analysis method can help to smooth the defect data of the equipment, and the noise of the defect data of the equipment can be removed.
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 the text similarity of the defect data of the multiple devices in a text distribution mode;
s320, extracting a plurality of key defect data from the plurality of equipment defect data according to the text similarity;
s330, acquiring a plurality of historical defect data;
s340, performing structuralization processing on the plurality of historical defect data according to a preset standard to obtain a plurality of processed historical defect data;
s350, performing text labeling on the plurality of key defect data according to the plurality of historical defect data and a plurality of preset defect characteristics to obtain a plurality of labeled key defect data;
and S360, constructing a defect database according to the marked key defect data.
In step S310, the text similarity of the defect data of the multiple devices is calculated in a distributed manner by using a text, because the text is composed of characters and punctuations, a computer cannot efficiently process a real text, in order to solve the problem, a formal method is needed to represent the real text, and the text is usually converted into a vector for representation. Both models refer to the CBOW (continuous bag of words) model, which predicts the middle words by context words, and the Skip-Gram model, which predicts the possible words from one particular word before and after. The two methods refer to a hierarchical method and a negative sampling method, 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 negative samples and joining in each iteration together with positive samples to become a two-classification problem, the text similarity of a plurality of equipment defects can be calculated by the two models and the two methods, a language model represented by a word vector of each word in equipment defect data can be trained, and each dimension of the word vector represents the semantic features 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 about the device defect of the primary device 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 by a plurality of primary devices in previous device detection records, are obtained, which mainly include device names, defect types, defect descriptions, major industry types, manufacturers, year and month of factory shipment, device models, commissioning dates, defect cause types, defect causes, defect representations, discovery time, defect locations, processing measures, and the like of the primary devices.
In step S340, performing a structuring process on the plurality of historical defect data according to a preset standard to obtain a plurality of processed historical defect data, where the structuring process includes performing a text preprocessing on the plurality of historical defect data, such as a word segmentation process, and the like, and the present application adopts an NLP (Natural Language Processing) word segmentation algorithm to perform word segmentation on the plurality of historical defect data, where the NLP word segmentation algorithm is mainly divided into two types according to a core concept thereof, the first type is word segmentation based on a dictionary, a sentence is first segmented into words according to the dictionary, and then an optimal word combination mode is found; the second is word segmentation based on characters, i.e. constructing words by characters, firstly dividing sentences into one character, then combining characters into words, finding the optimal segmentation strategy, and simultaneously converting the optimal segmentation strategy into a sequence labeling problem. The word segmentation based on the dictionary can adopt a shortest path word segmentation algorithm, the shortest path word segmentation algorithm firstly matches all words in a word to form a word graph, then searches a shortest path from a starting point to an end point as an optimal combination mode, and sets the weight of each word in the word graph to be equal, when solving the shortest path problem of the DAG graph, the property that the shortest path between two points also includes the shortest path between other vertexes on the path is needed to be utilized, for example, S- > A- > B- > E is S to E to the shortest path, S- > A- > B is S to B to the shortest path, otherwise, C exists to enable d (S- > C- > B) < d (S- > A- > B), and the shortest path from S to E is also changed into S- > C- > B- > E, this is contradictory to the assumption, so the word segmentation algorithm can be further optimized according to two solving algorithms, namely a greedy algorithm and a dynamic programming, by using the optimal substructure property. The word segmentation based on the characters can adopt an HMM hidden Markov model, the HMM model considers that two sequences exist when the sequence labeling problem is solved, one is an observation sequence, namely a sentence which is observed by people, 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 to obtain a labeling result Y, the probability of X, the probability of Y and P (X | Y) must be calculated, namely a probability distribution model of P (X, Y) is established, and 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 key defect data according to the plurality of historical defect data and the plurality of preset defect features to obtain a plurality of labeled key defect data, where the plurality of preset defect features refer to determining which parts of the primary device may have defects according to attributes of the primary device, or determining possible defect problems of the primary device according to an operation state of the primary device, and deeply parsing the defect problems, and text labeling is performed on the plurality of key defect data by using the plurality of defect features, so that accuracy of defect positioning of the primary device can be improved.
In step S360, a defect database is built according to the labeled multiple pieces of key defect data, and since the labeled multiple pieces of key defect data have been subjected to standardization, it may generate a data format that conforms to the database storage, for example, a defect database is built by using the labeled multiple pieces of key defect data in a format corresponding to the data type of the variable name. In addition, before the defect database is constructed, manual labeling can be performed, for example, the primary equipment defect representation, the defect part, the defect reason and the processing measure are manually labeled according to the historical defect report of the primary equipment, the manual labeling is mainly performed according to the text contents of the defect description, the defect reason, the processing condition description and the like in the defect record, the judgment is performed by combining the experience of a service expert, and a plurality of key defect data meeting the service requirements are screened out.
In step S400, a defect diagnosis model is constructed based on the defect database, and the defect diagnosis model is used for intelligently diagnosing defects of the primary device.
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 business diagnosis model;
s430, acquiring a preset device 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 the defect corpus model to obtain the trained standard diagnosis indexes;
and S470, constructing a convolutional neural network according to the trained standard diagnostic indexes by using a convolutional neural network algorithm to obtain a defect diagnosis model.
In step S410, a preset service diagnosis model is obtained, where the preset service diagnosis model is a defect diagnosis model pre-constructed according to a preset device defect that may exist in the primary device, and the defect diagnosis model meeting the actual requirement can be trained by combining the specific operating condition of the primary device and the service diagnosis model.
In step S420, a preset diagnosis index is extracted from the service diagnosis model, where the preset diagnosis index mainly includes a device type, a defect portion, a defect component, and the like of the primary device, and since the obtained preset diagnosis index is not necessarily standardized, the preset diagnosis index needs to be further processed.
In step S430, a preset device word segmentation rule is obtained, since the chinese text is different from the english text, and there is no natural boundary of blank space between words, so that word segmentation needs to be performed on the chinese text before text representation, a user can set a proper word segmentation according to actual defect detection experience, and group a plurality of words to construct a word segmentation library, and set a proper device word segmentation rule to provide a word segmentation basis for subsequent word segmentation.
In step S440, a word segmentation process is performed on the defect index description based on the device word segmentation rule to obtain a standard diagnosis index, and after the word segmentation process, 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 device defect records, so as to lay a foundation for subsequent training of standard diagnostic indexes.
In step S460, the standard diagnostic indicators are input into the defect corpus model to obtain trained standard diagnostic indicators, and since the defect corpus model already contains a plurality of primary device defect records, the standard diagnostic indicators are input into the defect corpus, and then word vectors and dimensions of words of the standard diagnostic indicators are trained to obtain the trained standard diagnostic indicators.
In step S470, a Convolutional Neural Network is constructed according to the trained standard diagnostic index by using a Convolutional Neural Network algorithm to obtain a defect diagnosis model, in this embodiment, a four-layer Convolutional Neural Network is constructed, which includes an input layer, a Convolutional layer, a pooling layer, and an output layer, it should be noted that in this embodiment, the input layer, the Convolutional layer, the pooling layer, and the full connection layer are all one-dimensional CNNs (Convolutional Neural networks), and the defect diagnosis model is obtained according to the trained standard diagnostic index and the constructed Convolutional Neural Network. In addition, the convolutional layer comprises a group of trainable filters and is characterized in that weight sharing (weights Sha ring), namely the same convolutional core can be traversed once by a fixed step length for input, the weight sharing reduces network parameters of the convolutional layer, overfitting caused by excessive parameters is avoided, the memory required by the system is reduced, and the load of a computer is reduced; the down-sampling operation is carried out on a Pooling Layer (Pooling Layer), and the main purpose is to reduce parameters of a neural network, retain more main characteristics, prevent overfitting and improve the generalization capability of a model; the fully connected layer classifies the features extracted in the front and plays a role of a classifier in the whole neural network. The specific method is that the output of the last pooling layer is spread into a one-dimensional characteristic vector which is used as the input of the full-connection layer.
In step S500, the defect diagnosis model is trained to obtain a trained defect diagnosis model.
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 historical domain sample and the target domain sample into the defect diagnosis model through forward propagation respectively to obtain target characteristics;
s530, optimizing the target characteristics through a cross entropy loss function to obtain optimized target characteristics;
and S540, training the defect diagnosis model according to the optimized target characteristics to obtain the trained defect diagnosis model.
In step S510, a history domain sample including a plurality of health states of the history test primary device and a target domain sample including a plurality of health states of the real-time test primary device are extracted from the defect diagnosis model.
In steps S520 to S540, the historical domain sample and the target domain sample are respectively input into the defect diagnosis model by forward propagation to obtain target features, the target features are optimized by the cross entropy loss function to obtain optimized target features, and the defect diagnosis model is trained according to the optimized target features to obtain a trained defect diagnosis model. The target characteristics are obtained through a preset classifier in the defect diagnosis model, the classification errors of the target characteristics 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 domain samples; j is the failure category; i [. cndot ] is an index function, and the value rule is as follows: and obtaining the optimized target characteristics, and continuously inputting the optimized target characteristics into the defect model for training to obtain the trained defect diagnosis model.
In step S600, a 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, that is, processed defect index data are used as an input layer of the convolutional neural network, the defect text after quantization is classified by a classifier of the convolutional neural network, a corresponding classification result is output, a final defect diagnosis model is formed, and then the defect diagnosis model is trained to make a loss function of a training set in a downward trend without overfitting.
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;
and S620, 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.
In step S610, a plurality of device defect data are input into the trained defect diagnosis model.
In step S620, the classifier in the defect diagnosis model is used to classify the defect inputs of the device, 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 method for diagnosing a defect of a primary device according to the present application further includes:
s700, classifying the equipment 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;
and S900, predicting the development trend of the primary equipment within a preset time range according to the equipment risk level.
In step S700, the device defect degrees of the primary devices are classified according to defect severity, defect diagnosis reasons, and defect management measures to obtain classification results, where the classification may use a method of evaluating index weights, for example, the classification may correspond to multiple weight indexes under different parameters, a user may combine multiple weight indexes according to specific defect conditions of the primary devices to perform weight scoring, classify the device defect degrees of the primary devices according to the weight scoring conditions to obtain classification results, and in practical applications, the classification may be performed according to the wear degrees of the primary devices, etc. to obtain classification results, which is not described herein again.
In step S800, the equipment risk level of the primary equipment is obtained according to the classification result, and in practical application, the risk of the primary equipment may be evaluated by combining an entropy method, and the risk of the primary equipment is classified according to high, medium and low levels, so as to provide a reference value for equipment maintenance.
In step S900, the development trend of the primary equipment within the preset time range is predicted according to the equipment risk level, so that the defect condition of the primary equipment can be predicted in advance, and can be processed in time, thereby prolonging the service life of the primary equipment.
In the embodiment of the application, the device attribute data, the historical defect data and the historical operation data of the primary device to be diagnosed are obtained, the obtained device attribute data, the historical defect data and the historical operation data are preprocessed to obtain a plurality of device defect data, a defect database is built according to the plurality of device defect data, a defect diagnosis model is built based on the defect database, the defect diagnosis model is trained to obtain a trained defect diagnosis model, and the plurality of device defect data are input into the trained defect diagnosis model to obtain a defect diagnosis result of the primary device.
In a second aspect, an embodiment of the present application further provides a defect diagnosis system based on primary devices, including an obtaining module and a generating module, where the obtaining module is configured to obtain device defect data of a primary device to be diagnosed; the generation module is used for inputting the equipment defect data into the trained defect diagnosis model to obtain the defect diagnosis result of the primary equipment.
In a third aspect, an embodiment of the present application further provides an electronic device.
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, and the instructions are executed by the at least one processor, so that when the at least one processor executes the instructions, the defect diagnosis method of any one of the primary devices in the embodiment of the application is realized.
The processor and memory may be connected by a bus or other means.
The memory, as a non-transitory computer readable storage medium, may be used to store a non-transitory software program and a non-transitory computer executable program, such as the method for diagnosing defects of a primary device described in the embodiments of the present application. The processor implements the method for diagnosing a defect of a primary device described above by executing a non-transitory software program and instructions stored in the memory.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store a defect diagnosis method that performs the above-described primary device. Further, 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 located remotely from the processor, and these remote memories may be connected 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.
The non-transitory software programs and instructions required to implement the method for diagnosing defects of a primary device described above are stored in a memory and, when executed by one or more processors, perform the method for diagnosing defects of a primary device as mentioned in the first embodiment of the above-mentioned aspect.
In a fourth aspect, the present application further provides a computer-readable storage medium.
In some embodiments, the computer-readable storage medium stores computer-executable instructions for performing the method for diagnosing a defect of a primary equipment mentioned in the embodiments of the first aspect.
In some embodiments, the storage medium stores computer-executable instructions that, when executed by one or more control processors, for example, by a processor in the electronic device, cause the one or more processors to perform the method for diagnosing defects in the primary device.
The above-described embodiments of the apparatus 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 also 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 the present embodiment.
One 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 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 is well known to those of ordinary skill 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 accessed by a computer. In addition, 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 as known to those skilled in the art.
The embodiments of the present application have been described in detail with reference to the drawings, but the present application is not limited to the embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present application. Furthermore, the embodiments and features of the embodiments of the present application may be combined with each other without conflict.