Disclosure of Invention
The machine learning model iteration method and system of the intelligent operation and maintenance system provided by the invention can be applied to the intelligent operation and maintenance system facing rail traffic, effectively manage the full life cycle of the machine learning model, continuously improve the reasoning accuracy of the model and truly realize intelligent operation and maintenance.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
the machine learning model iteration method of the intelligent operation and maintenance system comprises the steps of firstly carrying out offline modeling, then carrying out online model reasoning and iterative updating, wherein the offline machine learning system comprises the functions of sample labeling, data management, model training, model management, model verification, model release and the like, an edge computing equipment set comprises edge equipment such as a robot, an environment monitoring sensor and an equipment monitoring sensor, and the intelligent operation and maintenance system comprises an online machine learning system and an intelligent display system; the offline machine learning system realizes offline modeling, provides the trained model for the intelligent operation and maintenance system, and the intelligent operation and maintenance system acquires perception data of the edge equipment in real time, performs reasoning by using the model constructed offline and the model iterated online, and displays results in the intelligent display system.
Further, the off-line modeling stage includes the following steps;
step one, collecting data collected by the field robot and the sensor, and preprocessing the data, wherein the preprocessing comprises data cleaning, data format unification and the like. For the image and the point cloud data types, eliminating repeated, overexposed, underexposed, blurred, non-target areas and other data; for the categories of the digital data and the character data, unifying list formats, and eliminating abnormal data; for the audio data category, eliminating abnormal data, unifying specification, data compression and the like;
and step two, defining labels and corresponding categories, and manually marking the cleaned data. For the image and the point cloud category, rectangular frames or outline labels are adopted on the image and the point cloud, and text label information is generated; for the category of digital and character data, adding a column of tag information on the original format; and for the audio data types, classifying the audio data types into different catalogues or setting text label information, and reading the setting type labels through software. For the category with fewer defects, a data augmentation algorithm can be adopted for expansion;
and thirdly, training by using the prepared data and adopting different machine learning algorithms according to different data types and identification requirements thereof, constructing different machine learning models, and forming a machine learning model set. Constructing models such as target detection, defect detection and the like according to the image and point cloud data types; constructing models of regression, classification and the like of the digital and character data types; for the audio data category, constructing models such as anomaly detection, fault diagnosis and the like;
step four, verifying the accuracy rate of the machine learning model set by adopting a verification set, and if the accuracy rate is greater than S1 and the false detection rate is less than W1, issuing a model for online reasoning; otherwise, repeating the first to third steps until the accuracy meets the requirement.
Further, the online reasoning and model iteration stage includes the steps of,
as the defects of various scenes in the rail traffic industry are fewer, the model identification accuracy of the prior training is not high and more false detection and missing detection exist. The model iteration is divided into two stages, mainly comprising manual auxiliary labeling and model iteration, algorithm autonomous labeling and model iteration, and the main steps are as follows:
step one, deploying an offline trained machine learning model set R to an intelligent operation and maintenance system. Operating an intelligent operation and maintenance system, collecting data of a robot or a sensor, and automatically preprocessing the data according to priori knowledge;
and step two, inputting the processed various data into each corresponding machine learning model, and reasoning each model to obtain a corresponding result. The intelligent operation and maintenance system interface displays all results through viewing, listening and reasoning results, and different data types are different in display effect, including image and point cloud identification, data distribution and audio effect;
and step three, switching to a manual annotation page of the intelligent operation and maintenance system, and importing an reasoning result and corresponding data. Judging the image and the point cloud category data by visually checking the frame selected or marked targets on the image and the point cloud; for the digital and character class data, judging according to the prior knowledge of the data distribution of the abnormal class; and for the audio data, specifically judging according to the prior knowledge of the sound and the listening test condition. Manually checking each reasoning result and corresponding data, and executing the fourth step if the accuracy is smaller than S2; otherwise, turning to the step six;
step four, executing manual auxiliary labeling operation: 1. case of correct reasoning result: for the image and the point cloud category data, fine tuning is carried out on the autonomous identification rectangular frame and outline results with deviation larger than a threshold value, and whether the autonomous identification labeling results are reserved; for digital and character or audio class data, the inferred result is free from the situation such as image and point cloud target frame selection deviation, and the autonomously-identified labeling result is reserved; 2. for the case of missed detection: adding a labeling frame or outline of the target for the image and the point cloud class data; for character or audio class data, modifying the normal label into a label corresponding to the fault class; 3. in the case of false detection, deleting false mark frames or outlines for the image and the point cloud class data; for character or audio category data, the error category is modified to a normal label. The corrected data are merged into an iterative training set X;
step five, the training system calls the latest machine learning model set, incremental iterative training is carried out on the model by utilizing an iterative training set X of manual auxiliary labeling, various indexes such as Loss, accuracy, false detection rate and the like are monitored in the training process, training is stopped after the various indexes meet the set rules, the model is saved and updated, and the step two is returned;
and step six, entering an algorithm autonomous labeling and model autonomous iteration stage. And (3) processing the online collected data according to the first step, inputting the online collected data into a machine learning model set for reasoning, and outputting the result the same as the second step, wherein the step of automatically identifying and completing the labeling result and the original data by utilizing each model. The intelligent operation and maintenance system interface displays all results through visual, audible and reasoning results, and different data types have different display effects;
and step seven, the training system calls the latest machine learning model set, and incremental iterative training is carried out on each model by utilizing the data autonomously marked by the algorithm. Monitoring various indexes of the training process, particularly when the accuracy rate on the verification set is not lower than the accuracy rate before iteration and the false detection rate is not higher than the accuracy rate before iteration, considering the current autonomous iteration behavior as qualified, and updating by adopting a machine learning model after iteration; otherwise, still adopting a machine learning model before iteration;
and step eight, continuing the step six to the step seven until the life cycle of the intelligent operation and maintenance system is ended.
In yet another aspect, the invention also discloses a computer readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of the method as described above.
In yet another aspect, the invention also discloses a computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of the method as above.
According to the technical scheme, the iterative method and the iterative system of the machine learning model of the intelligent operation and maintenance system aim to overcome the influence caused by dynamic change of distribution in a time sequence, so that a model with time sequence invariance is learned by using time sequence emission data of a mobile source, and the tail gas concentration prediction under the dynamic change of the time sequence data distribution is realized.
Compared with the prior art, the invention has the beneficial effects that:
the existing intelligent operation and maintenance systems are generally divided into two types:
1. the technical scheme provides an autonomous iteration scheme and system without the iteration function of a machine learning model, and self-learning capability is injected into an intelligent operation and maintenance system.
2. The method combines short-term manual assistance and long-term autonomous model iteration and evaluation to realize a new machine model iteration method according to the characteristics of the rail traffic industry, so that the labor investment can be greatly reduced, and the accuracy of a system can be continuously improved.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention.
As shown in fig. 1 and fig. 2, the machine learning model iteration method of the intelligent operation and maintenance system according to the present embodiment is divided into two phases, wherein the first phase is offline modeling, and the second phase is online model reasoning and iterative updating, as shown in fig. 2, and the specific steps are as follows:
the machine learning model iteration method of the intelligent operation and maintenance system described in this embodiment is implemented under the system framework shown in fig. 3: the system comprises an offline machine learning system (comprising functions of sample labeling, data management, model training, model management, model verification, model release and the like), an edge computing device set (comprising edge devices such as robots, environment monitoring sensors, device monitoring sensors and the like), and an intelligent operation and maintenance system (comprising an online machine learning system and an intelligent display system). The offline machine learning system realizes offline modeling, the trained model is provided for the intelligent operation and maintenance system, the intelligent operation and maintenance system collects perception data of the edge equipment in real time, the offline constructed model and the online iterative model are utilized for reasoning, the display result is displayed in the intelligent display system, and the specific implementation steps are divided into two parts:
a first part: offline modeling stage
Step one, collecting data collected by a field robot (such as a train intelligent inspection robot, a power distribution room station inspection robot, a track area inspection robot and the like), and a sensor (such as a main transformer on-line monitoring sensor, a GIS on-line monitoring sensor, a high-voltage cable on-line monitoring sensor, a train track side comprehensive detection system sensor and the like), preprocessing the data, including data cleaning, data format unification and the like. For the image and the point cloud data types, eliminating repeated, overexposed, underexposed, blurred, non-target areas and other data; for the categories of the digital data and the character data, unifying list formats, and eliminating abnormal data; for the audio data category, eliminating abnormal data, unifying specification, data compression and the like;
and step two, defining labels and corresponding categories, and manually marking the cleaned data (marking modes can adopt open source and self-grinding marking software). For the image and the point cloud data category, rectangular frames or outline labels are adopted to generate text label information; for the character data category, adding a column of label information on the original format; and for the audio data types, classifying the audio data types into different catalogues or setting text label information, and reading the setting type labels through software. For the category with fewer defects, a data augmentation algorithm can be adopted for expansion;
and thirdly, training by using the prepared 70% data and adopting different machine learning algorithms according to different data types and identification requirements thereof, and constructing different machine learning models to form a machine learning model set.
1) And constructing models such as target detection, defect detection and the like according to the image and the point cloud data types. In the example, a deep learning algorithm based on example segmentation is adopted for training a bolt loosening detection model for a train part image acquired by a robot, and a loss function is shown in the following formula:
wherein,represents->And->The euclidean distance between the two,Yfor a tag that is a match between two samples,Nfor the number of samples, m is the distance threshold, +.>Is a parameter matrix.
2) And constructing models such as regression, classification and the like of the character data types. In the embodiment, a classification model is obtained by training a classification algorithm based on deep learning. In the process of data generation, standard Gaussian distribution is applied to generate abnormal gradient values, and the gradient values are added to the calculated gradient of the model to improve the single classification distinguishing strength of the model.
The calculation mode of the abnormal gradient value generated by Gaussian distribution is shown as follows:
where x is the raw data, σ is the standard deviation (here taken as 1), and μ is the mean (here taken as 0).
The algorithm adds the learning process of the abnormal gradient value in the training, and can be expressed as the following formula:
in the method, in the process of the invention,θas a parameter of the model, it is possible to provide,xas the original value of the value,hto generate a gradient of the light beam,las a function of the loss,ηis a parameter (value between 0 and 1) that controls the range of generated data.
3) And constructing models such as anomaly detection, fault diagnosis and the like for the audio data types. In this example, the fault diagnosis algorithm performs feature learning by using a deep CNN network, and the loss function is represented by the following formula:
wherein,Nas a total number of samples,d 2 for the euclidean distance between pairs of samples,ybelonging to the group of {0,1},y=0 means that they do not belong to the same class,y=1 means that the sample pairs belong to the same class; thus, the larger the distance between the different classes, the smaller the loss; the smaller the distance between the same class, the smaller the loss. This serves to reduce the inter-class spacing while expanding the inter-class spacing to at leastmarginIs a target of (a).
Step four, adopting 30% of data as a verification set to verify the accuracy of the machine learning model set, and if the accuracy is more than 90% and the false detection rate is less than 5%, issuing a model for online reasoning; otherwise, repeating the first to third steps until the accuracy meets the requirement.
A second part: on-line reasoning and model iteration stage
As the defects of various scenes in the rail traffic industry are fewer, the model identification accuracy of the prior training is not high and more false detection and missing detection exist. The model iteration is divided into two stages, mainly comprising manual auxiliary labeling and model iteration, algorithm autonomous labeling and model iteration, and the main steps are as follows:
step one, deploying an offline trained machine learning model set R to an online machine learning system in an intelligent operation and maintenance system. The online machine learning system may be invoked by the intelligent presentation system for a software library or communicatively interact with the intelligent presentation system for a binary. The intelligent operation and maintenance system is operated, data such as robots and sensors are collected, automatic data preprocessing is carried out according to priori knowledge, and the data normalization, the automatic abnormal data elimination and the like are included;
and step two, inputting the processed various data into each corresponding machine learning model, and reasoning each model to obtain a corresponding result. The intelligent operation and maintenance system interface displays all results through viewing, listening and reasoning results, and different data types and different display effects are achieved, including image and point cloud identification, data distribution and audio effects.
In the example, the bolt looseness of the train part collected by the robot is identified, and the method comprises two steps of registration and model reasoning.
In the registration stage, the feature matching relationship between every 2 feature points consists of 2 parts, and the similarity score and the matchability score are as follows:
similarity score:
,/>
for the pixel of image A, +.>Is the pixel point of the template image B, +.>Is the similarity score of the point of the image A to be identified and the pixel point of the image B.
The matable score:
is pixel point +.>The matching score corresponding to the pixel point. Combining the similar score with the matchable score to obtain a local matching matrix as
For the similarity score of pixel k in A and pixel j in B, +.>For the similarity score of pixel k in B and pixel i in A, +.>Matching score corresponding to i pixel points of A +.>Matching score corresponding to j pixels of B>The matching value of the pixel point k in the A and the pixel point j in the B is obtained. When->Greater than the threshold t and greater than the other values of the rows and columns, i.e., the similarity of two points is higher than the other points in the two images, then the two points are in matching relationship. After the matching relation of all clicks is determined, the transformation relation of two images can be determined, and then the images to be identified are converted into template images to obtain an image Ix.
In the model reasoning stage, ix is input into an offline trained model for reasoning, and a reasoning result is obtained.
And step three, switching to a manual annotation page of the intelligent operation and maintenance system, and importing an reasoning result and corresponding data. Judging the image and the point cloud category data by visually checking the frame selected or marked targets on the image and the point cloud; judging the character class data according to the prior knowledge of the data distribution of the abnormal class; and for the audio data, specifically judging according to the prior knowledge of the sound and the listening test condition. Manually checking each reasoning result and corresponding data, and executing the fourth step if the accuracy is less than 95%; otherwise, turning to the step six;
step four, executing manual auxiliary labeling operation: 1. case of correct reasoning result: for the image and the point cloud category data, fine tuning is carried out on the autonomous identification rectangular frame and outline results with deviation larger than a threshold value, and whether the autonomous identification labeling results are reserved; for character or audio class data, the inferred result is free from the situation such as image and point cloud target frame selection deviation, and the autonomously-identified labeling result is reserved; 2. for the case of missed detection: adding a labeling frame or outline of the target for the image and the point cloud class data; for character or audio class data, modifying the normal label into a label corresponding to the fault class; 3. in the case of false detection, deleting false mark frames or outlines for the image and the point cloud class data; for character or audio category data, the error category is modified to a normal label. The corrected data are merged into an iterative training set X;
step five, the training system calls the latest machine learning model set, incremental iterative training is carried out on the model by utilizing an iterative training set X of manual auxiliary labeling, various indexes such as Loss, accuracy, false detection rate and the like are monitored in the training process, training is stopped after the various indexes meet the set rules, the model is saved and updated, and the step two is returned;
and step six, entering an algorithm autonomous labeling and model autonomous iteration stage. And (3) processing the online collected data according to the first step, inputting the online collected data into a machine learning model set for reasoning, and outputting the result the same as the second step, wherein the step of automatically identifying and completing the labeling result and the original data by utilizing each model. The intelligent operation and maintenance system interface displays all results through visual, audible and reasoning results, and different data types have different display effects;
and step seven, the training system calls the latest machine learning model set, and incremental iterative training is carried out on each model by utilizing the data autonomously marked by the algorithm. Monitoring various indexes of the training process, particularly when the accuracy rate on the verification set is not lower than the accuracy rate before iteration and the false detection rate is not higher than the accuracy rate before iteration, considering the current autonomous iteration behavior as qualified, and updating by adopting a machine learning model after iteration; otherwise, still adopting a machine learning model before iteration;
and step eight, continuing the step six to the step seven until the life cycle of the intelligent operation and maintenance system is finished, wherein the reasoning accuracy of the model can approach or even reach 100%.
In summary, the technical scheme provides an autonomous iteration scheme and system, and self-learning capability is injected into an intelligent operation and maintenance system; according to the rail transit industry characteristics, the novel machine model iteration method is realized by combining short-term manual assistance and long-term autonomous model iteration and evaluation, so that the manual investment can be greatly reduced, and the accuracy of a system can be continuously improved.
In yet another aspect, the invention also discloses a computer readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of the method as described above.
In yet another aspect, the invention also discloses a computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of the method as above.
In yet another embodiment provided herein, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform the machine learning model iteration method of any one of the intelligent operation and maintenance systems of the above embodiments.
It may be understood that the system provided by the embodiment of the present invention corresponds to the method provided by the embodiment of the present invention, and explanation, examples and beneficial effects of the related content may refer to corresponding parts in the above method.
The embodiment of the application also provides an electronic device, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus,
a memory for storing a computer program;
and the processor is used for realizing the machine learning model iteration method of the intelligent operation and maintenance system when executing the program stored in the memory.
The communication bus mentioned by the above electronic device may be a peripheral component interconnect standard (english: peripheral Component Interconnect, abbreviated: PCI) bus or an extended industry standard architecture (english: extended Industry Standard Architecture, abbreviated: EISA) bus, or the like. The communication bus may be classified as an address bus, a data bus, a control bus, or the like.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, abbreviated as RAM) or nonvolatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; it may also be a digital signal processor (English: digital Signal Processing; DSP; for short), an application specific integrated circuit (English: application Specific Integrated Circuit; ASIC; for short), a Field programmable gate array (English: field-Programmable Gate Array; FPGA; for short), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.