Training methods, usage methods and media for industrial analysis models
Through feature extraction and automatic model construction of encoders in industrial control systems, the problem of inaccurate analysis results caused by the solidified structure of neural network design is solved, and the management accuracy and model robustness of industrial processes are improved.
Patent Information
- Application Number
- CN202410190057.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-21
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-02-21
AI Technical Summary
In existing industrial control systems, the solid structure of neural network design cannot be flexibly adapted to actual application scenarios, resulting in the inability to obtain accurate analysis results when indicator data lacks features, affecting the precise control of industrial processes.
The encoder extracts features from historical data, generates target representations that contain complete information about missing time series groups, and automatically builds and trains industrial analysis models to ensure that the model can output accurate prediction values or control instructions when inputting sensor data.
It improves the accuracy and robustness of the industrial analysis model, achieves more precise industrial process management, reduces the consumption of computing resources, and saves a large amount of calculations caused by the redundant structure of the model.
Smart Images

Figure CN117743859B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to industrial control technology, and more particularly to a training method, a use method and a medium for an industrial analysis model. Background Art
[0002] In industrial control scenarios, multiple sensors are included to monitor different indicator data in industrial systems. In order to facilitate timely management and control, it is sometimes necessary to make predictions or intelligent management and control based on the indicator data monitored by the sensors. In known technologies, neural networks are often used to achieve the above goals. Specifically, the indicator data monitored by the sensors are input into the neural network to obtain corresponding prediction values or control instructions.
[0003] At present, the structure of neural networks is usually designed manually and cannot flexibly adapt to actual application scenarios. As a result, when indicator data lacks features, accurate analysis results cannot be obtained based on the indicator data, resulting in the defect of low accuracy, which in turn affects the precise control of industrial processes. Summary of the invention
[0004] The present application provides a training method, a use method and a medium for an industrial analysis model to improve the accuracy of the industrial analysis model and thereby improve the management precision of the industrial process.
[0005] In one aspect, the present application provides a method for training an industrial analysis model, which is applied to an industrial control system; the method comprises:
[0006] Acquire historical data, wherein the historical data includes a missing time series group, wherein the missing time series group includes original missing sequences collected by a preset number of sensors, and the preset number is any positive integer;
[0007] Extracting features from the historical data through a trained encoder to obtain a target representation for indicating complete information of the missing time series group; when the encoder is trained, obtaining the target representation when receiving the missing time series group is a training goal;
[0008] According to the target representation, at least one candidate model is automatically constructed, and a target model is determined based on at least one of the candidate models; the target model is a candidate model with the best evaluation result, the evaluation result is obtained based on a preset metric, and the preset metric is related to the analysis target of the model;
[0009] The label data corresponding to the target representation is obtained, and the target model is trained according to the target representation and the label data to obtain an industrial analysis model; the label data is related to the analysis target and is used to indicate the actual analysis result corresponding to the target representation; when the target model is trained, the label data is output as the training target when the target representation is input.
[0010] In a second aspect, the present application provides a method for using an industrial analysis model, which is applied to an industrial control system; the method comprises:
[0011] Acquire collected data, wherein the collected data includes a time series group collected by a preset number of sensors;
[0012] Extracting features from the time series group using a trained encoder to obtain a target representation containing complete information corresponding to the time series group;
[0013] The target representation is input into a trained industrial analysis model to obtain an analysis result; the industrial analysis model is obtained based on the training method of the industrial analysis model described in any one of the first aspects, and the analysis result is used to indicate a predicted value or a control instruction.
[0014] In a third aspect, the present application provides a training device for an industrial analysis model, the device comprising:
[0015] A first acquisition module is used to acquire historical data, wherein the historical data includes a missing time series group, and the missing time series group includes original missing sequences collected by a preset number of sensors, where the preset number is any positive integer;
[0016] A first extraction module is used to extract features from the historical data through a trained encoder to obtain a target representation for indicating complete information of the missing time series group; when the encoder is trained, the target representation is obtained as a training target when receiving the missing time series group;
[0017] A construction module, configured to automatically construct at least one candidate model according to the target representation, and determine a target model based on at least one of the candidate models; the target model is a candidate model with the best evaluation result, the evaluation result is obtained based on a preset metric, and the preset metric is related to the analysis target of the model;
[0018] A training module is used to obtain label data corresponding to the target representation, and train the target model according to the target representation and the label data to obtain an industrial analysis model; the label data is related to the analysis target and is used to indicate the actual analysis result corresponding to the target representation; when the target model is trained, the label data is output as the training target when the target representation is input.
[0019] In a fourth aspect, the present application provides a device for using an industrial analysis model, the device comprising:
[0020] A second acquisition module is used to acquire collected data, wherein the collected data includes a time series group collected by a preset number of sensors;
[0021] A second extraction module is used to extract features from the time series group using a trained encoder to obtain a target representation containing complete information corresponding to the time series group;
[0022] An analysis module is used to input the target representation into a trained industrial analysis model to obtain an analysis result; the industrial analysis model is obtained based on the training method of the industrial analysis model described in any one of the first aspects, and the analysis result is used to indicate a predicted value or a control instruction.
[0023] In a fifth aspect, the present application provides an electronic device, comprising: at least one processor and a memory;
[0024] The memory stores computer-executable instructions;
[0025] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method as described in any one of the first aspect or the second aspect above.
[0026] In a sixth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any one of the first or second aspects above.
[0027] The present application provides a training method, a method of using and a medium for an industrial analysis model. The method of the present application is applied to an industrial control system. Specifically, in the present application, the electronic device first extracts features from the acquired historical data based on an encoder to obtain a target representation with complete information of the missing time series group. Then, based on the obtained target representation, at least one candidate model is automatically constructed, and the candidate model with the best evaluation result is used as the target model. Finally, the target model is trained to obtain an industrial analysis model. Based on this, when the electronic device needs to predict or control based on the data monitored by any sensor, when receiving the time series group of the corresponding sensor, the time series group can be first extracted by the encoder to obtain the target representation containing complete information, and then the target representation is input into the industrial analysis model to obtain the corresponding analysis result. In the present application, the encoder can complete the features of the acquired sensor data, and further automatically construct and train the model based on the completed data, which is conducive to improving the robustness of the model. In the application process, feature extraction based on the encoder and then analysis are performed, which is conducive to obtaining more accurate prediction results or control results, and is conducive to realizing precise control of industrial processes. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0029] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;
[0030] Figure 2 A schematic diagram of a training method for an industrial analysis model provided in an embodiment of the present application Figure 1 ;
[0031] Figure 3 A schematic diagram of a training method for an industrial analysis model provided in an embodiment of the present application Figure 2 ;
[0032] Figure 4 A flowchart of a method for using an industrial analysis model provided in an embodiment of the present application;
[0033] Figure 5 A schematic diagram of the structure of a training device for an industrial analysis model provided in an embodiment of the present application;
[0034] Figure 6 A schematic diagram of the structure of a device for using an industrial analysis model provided in an embodiment of the present application;
[0035] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0036] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0037] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0038] With the development of computer technology and the application of advanced control systems, modern industrial system equipment and structures are becoming increasingly complex.
[0039] Industrial equipment is prone to accumulating a large amount of data in a short period of time due to the complex production process, large number of sensors and high sampling frequency. In practical applications, it is often necessary to perform analysis or control based on the data from the sensors. In known technologies, neural networks are often used to achieve analysis or control. Specifically, the neural network analyzes the collected indicator data to obtain analysis results. Among them, the structure of the neural network is usually manually designed, relying on expert experience and a large number of experimental designs. The analysis results can be predicted values or control instructions, etc.
[0040] In actual applications, due to the influence of the sensor itself or the data transmission link, the sensor indicator data received by the electronic device is sometimes data with missing features. At this time, the above-mentioned neural network will not be able to obtain accurate analysis results based on the data, resulting in the inability to achieve precise management of the industrial process.
[0041] Therefore, the present application provides a training method, a method of using, and a medium for an industrial analysis model to improve the accuracy of industrial process management. Specifically, in the present application, the encoder is trained so that when the encoder receives the missing time series group from the sensor, it can output a target representation corresponding to the missing time series group containing its complete information. Furthermore, the electronic device automatically constructs and trains the model based on the target representation output by the encoder. Based on this, when the electronic device needs to make predictions or controls based on sensor data, it can first perform feature extraction on the sensor data through the encoder to obtain a target representation with complete information, and input the target representation into the obtained industrial analysis model to obtain a more accurate prediction value or control instruction.
[0042] Figure 1 A schematic diagram of an application scenario provided in an embodiment of the present application, such as Figure 1 As shown, the method of the present application is applied to an industrial control system, which includes multiple sensors, each of which is used to monitor different indicator data in the industrial process. Figure 1 As shown, the industrial control system also includes any electronic device, which is connected to each sensor in communication to obtain corresponding indicator data. The electronic device includes a controller, an encoder and an industrial analysis model. When the controller needs to analyze the data based on the corresponding sensor, the encoder converts the acquired data of the corresponding sensor into a target representation with complete information, and inputs the target representation into the industrial analysis model to obtain an accurate prediction value or control instruction.
[0043] It can be understood that when the industrial analysis model is trained, the target representation corresponding to the corresponding sensor is input and the actual analysis value corresponding to the target representation is obtained as the training target.
[0044] In the following, some embodiments of the present application are described in detail in conjunction with the accompanying drawings. In the case where the embodiments do not conflict with each other, the following embodiments and features in the embodiments can be combined with each other.
[0045] This application provides a training method for an industrial analysis model. Figure 2 A schematic diagram of a training method for an industrial analysis model provided in an embodiment of the present application Figure 1 , the following combination Figure 2 The method of this embodiment is described in detail.
[0046] Specifically, Figure 2 As shown, the method provided in this embodiment includes:
[0047] S201, obtaining historical data.
[0048] Specifically, the historical data includes a missing time series group, and the missing time series group includes original missing sequences collected by a preset number of sensors, where the preset number is any positive integer.
[0049] It is understandable that in practical applications, sometimes it is necessary to analyze or obtain corresponding control instructions based on the index data collected by any sensor within a period of time, and sometimes it is necessary to analyze or obtain corresponding control instructions based on the index data collected by at least two sensors within a period of time. Exemplarily, sometimes it is necessary to predict the data at future moments through the time series of the past period of time collected by the temperature sensor, so that when the temperature exceeds the preset threshold at the future moment, the relevant process can be controlled in time to reduce the temperature and keep the temperature within a safe range. For another example, sometimes it is necessary to analyze and predict the health status of the blast furnace at future moments through the time series data of the temperature sensor, humidity sensor, etc. inside the blast furnace in the past period of time.
[0050] Therefore, in this embodiment, the preset number is an arbitrary positive integer, and the preset number is related to the analysis target and corresponds to the number of sensors required for the analysis target. Accordingly, the missing time series group includes the original missing sequences of the preset number of sensors. In this embodiment, for different analysis targets, the electronic device obtains the original missing sequences of different sensors as historical data for subsequent model construction, training, etc.
[0051] It is understood that when the electronic device receives the real-time data transmitted by each sensor, it stores the real-time data in the corresponding database or cloud platform. The electronic device obtains the historical data of each sensor based on the database or cloud platform. It is understood that the historical data includes the time series composed of the real-time data received by the corresponding sensor in the past period of time.
[0052] S202, extracting features from historical data using a trained encoder to obtain a target representation for indicating complete information of the missing time series group.
[0053] When the encoder is trained, the target representation is obtained when receiving the missing time series group as the training goal.
[0054] In this embodiment, the encoder is specifically based on a long short-term memory network encoder. This embodiment enables the encoder to have the ability to complete features of time series with missing values through adaptive reconstruction training of highly masked data.
[0055] S203: Automatically construct at least one candidate model according to the target representation, and determine the target model based on the at least one candidate model.
[0056] Among them, the target model is the candidate model with the best evaluation result, and the evaluation result is obtained based on the preset metric standard, which is related to the analysis goal of the model.
[0057] It is understandable that the target model is used to obtain the industrial analysis model. Therefore, when selecting the target model based on the candidate models, it is necessary to evaluate the candidate models based on preset metrics related to the analysis objectives of the industrial analysis model.
[0058] S204, obtaining label data corresponding to the target representation, and training the target model according to the target representation and the label data to obtain an industrial analysis model.
[0059] Among them, the label data is related to the analysis target and is used to indicate the actual analysis result corresponding to the target representation; when the target model is trained, the output label data is used as the training target when the target representation is input.
[0060] It is understandable that if the analysis goal is to predict the index data at a certain moment in the future based on the corresponding target representation, the target representation corresponding to the corresponding sensor and the corresponding real value of the index are used as training data, so that when the target representation is input, the corresponding real value of the index is output as the training goal, and the target model is trained to obtain the industrial analysis model. Similarly, if the analysis goal is to obtain the control instruction based on the target representation corresponding to the corresponding sensor, the corresponding target representation and the corresponding real control instruction are used as training data to train the target model to obtain the corresponding industrial analysis model, which will not be repeated here.
[0061] In this embodiment, the electronic device uses the trained encoder to extract features from the historical data to obtain the target representation. Based on the extracted target representation, a candidate model is automatically constructed to obtain the target model. Furthermore, the electronic device trains the target model based on the target representation to finally obtain the industrial analysis model.
[0062] In this embodiment, a multi-path based search space is established, and the target model is automatically constructed by searching the search space. Specifically, the process of neural network structure search can be regarded as two steps of iterative and nested learning: (1) generating some candidate neural network structures, which are trained and evaluated for performance; (2) learning from these generated neural network structures and their performance evaluation results, and updating the algorithm parameters of the generated network structure.
[0063] Furthermore, in order to enable the corresponding target model to have the corresponding analysis function, the target representation and the corresponding training target are obtained based on the encoder, and the target model is trained to obtain an industrial analysis model for predicting or controlling the corresponding indicators. It can be understood that the corresponding training target is used to achieve the corresponding analysis function. Exemplarily, if it is necessary to enable the target model to predict the indicator data at a certain moment in the future based on historical data, the target model is trained by inputting the target representation of the corresponding sensor and outputting the corresponding true value of the indicator as the corresponding training target.
[0064] In the method provided in this embodiment, the electronic device first extracts features from historical data through an encoder to obtain a target representation, then automatically constructs a target model based on the target representation, and finally obtains an industrial analysis model by training the target model.
[0065] Through the method of this embodiment, a high-precision industrial analysis model can be obtained, which is conducive to obtaining more accurate prediction values or control instructions, and is conducive to achieving precise control of industrial processes. In addition, in this embodiment, the corresponding model is automatically constructed based on historical data, which effectively saves a large amount of computing resources consumed due to the redundant structure of the model.
[0066] Figure 3 A schematic diagram of a training method for an industrial analysis model provided in an embodiment of the present application Figure 2 The method of this embodiment further illustrates the method of training encoders and industrial analysis models based on the above-mentioned embodiment. Figure 3 , the method of this embodiment is described in detail. Figure 3 As shown, the method provided in this embodiment includes:
[0067] S301, obtaining a complete time series group collected by a preset number of sensors, and performing a mask operation on the complete time series group in a preset manner to obtain a missing time series group.
[0068] The missing time series group lacks at least one sensor's time series, and / or at least one sensor's time series is a missing time series. It can be understood that the missing time series indicates that the real-time data of the sensor within a preset time is incomplete.
[0069] S302, taking the missing time series as the input of the encoder and the complete time series as the target output of the decoder corresponding to the encoder, and training the encoder and decoder to obtain the trained encoder and decoder, so that when the encoder receives the missing time series group, it outputs the target representation indicating the complete information of the missing time series group, and when the decoder receives the target representation, it outputs the complete time series group.
[0070] In this embodiment, the preset method is used to mask the complete time series group. The preset method may be used to randomly mask any complete time series in the complete time series group, or to randomly mask the entire complete time series.
[0071] This embodiment proposes two unsupervised and self-supervised learning tasks to train the encoder. Task 1 attempts to predict missing feature columns without considering the correlation of time series to explore the interdependence between features. Task 2 attempts to predict missing time series to capture the dynamic change relationship between time series data.
[0072] In this embodiment, Task 1 is implemented by an LSTM autoencoder based on a long short-term memory network (LSTM), and Task 2 is implemented by a DNN autoencoder based on a deep neural network (DNN).
[0073] In this embodiment, the encoder and decoder included in the LSTM autoencoder are both LSTM, and the encoder included in the DNN autoencoder is an LSTM encoder and the decoder is a DNN decoder. The encoder is used to convert the input sequence into a feature vector (hidden layer representation), and the decoder is used to reconstruct the hidden layer representation.
[0074] In this embodiment, in Task 1, when the encoder and decoder are trained, the missing time series group after masking the complete time series group is used as the real sequence group. Input to the trained encoder, the encoder can output the target representation containing the complete information of the missing time series group , Expressed as .Will Input into the trained decoder, so that the decoder can reconstruct the complete time series group before the mask based on the target representation, that is, the reconstructed sequence group , Expressed as .
[0075] In this embodiment, when executing Task 1 to train the encoder and decoder, the reconstruction loss is the mean square error between the real sequence group and the reconstructed sequence group, which is specifically expressed as: , where is used to indicate the reconstruction loss, B is used to indicate the number of samples in batch processing, that is, the number of real sequence groups or the corresponding reconstructed sequence groups in batch processing, J is used to indicate the number of real sequences contained in the real sequence group or the number of reconstructed sequences contained in the reconstructed sequence group, and j is used to indicate any real sequence in the real sequence group or any reconstructed sequence in the reconstructed sequence group, which is obtained based on the real-time data collected by any sensor within a preset time period; represents the jth true sequence in the true sequence group corresponding to the bth sample, represents the jth reconstructed sequence in the reconstructed sequence group corresponding to the bth sample.
[0076] Furthermore, when executing Task 2, the target representation of the hidden layer is It is connected in parallel with the masked true sequence group and input into the DNN autoencoder, which is specifically expressed as: , where s is the output of the DNN autoencoder, Concat means concatenation, and flatten means converting a tensor into a vector.
[0077] Mathematically speaking, we can define a mask with values of 0 and 1. , where D is used to represent the length of the real sequence; at this time, the input of the encoder in the DNN autoencoder is , the output is , the output of the decoder in the DNN autoencoder is , as shown below:
[0078] ;
[0079]
[0080] In the case of self-supervised learning, the last fully connected layer of the decoder is multiplied by M, because only masked features are considered during the self-supervised pre-training phase. Therefore, the actual output of the decoder is .
[0081] In this example, the self-supervised training loss As shown in the following formula, ,in, It is used to represent the jth reconstructed sequence in the reconstructed sequence group corresponding to the bth sample. It is used to represent the jth true sequence in the true sequence group corresponding to the bth sample. Used to represent the masking of the jth true sequence in the true sequence group corresponding to the bth sample.
[0082] Since the data characteristics of industrial processes and the representation of the hidden layer have different ranges, a normalization term is added In addition, in each iteration, Sampling from the Bernoulli distribution with probability p. In general, in the two-stage pre-training and Both can introduce the information of missing data, thereby focusing on the characteristics of imbalanced data during the training phase.
[0083] In this embodiment, self-supervised learning uses auxiliary tasks to mine supervisory information from massive unsupervised data, and trains the network through the constructed supervisory information. Therefore, the model can learn more effective representations through self-supervised training objectives, thereby improving the analysis accuracy of the model.
[0084] It is understandable that in order to reduce the reconstruction loss, the encoder tends to preserve as many temporal features as possible in the hidden layer representation to reduce the encoder's sensitivity to missing values and improve its robustness.
[0085] S303, obtaining historical data, and extracting features from the historical data using a trained encoder to obtain a target representation for indicating complete information of the missing time series group.
[0086] In this embodiment, the real-time data transmitted by each sensor is stored in the cloud platform, and the electronic device obtains the real-time data of the corresponding sensor within a preset time period through the cloud platform to form a time series as historical data.
[0087] It can be understood that after the training in the aforementioned steps, the encoder has the ability to obtain a target representation with complete information of the missing time series group when receiving the missing time series group from the sensor.
[0088] S304: Establish a multi-path based search space, and generate at least one candidate model based on the search space.
[0089] Specifically, in this embodiment, a hypernetwork is first constructed based on the search space. Specifically, the hypernetwork is used to generate the target model, and the hypernetwork includes L layers, each layer having m candidate operations. Secondly, the model parameters of the hypernetwork are iteratively updated, and in each iteration, a multi-path subnetwork structure is randomly sampled using Bernoulli sampling to obtain at least one candidate model.
[0090] S305, for any layer of the candidate model, the outputs of the sampled candidate operations are added together to obtain fused features; the fused features are standardized by the corresponding batch normalization layer in the hybrid batch normalization layer to obtain the target output of any layer; based on the back propagation algorithm and the training data, the candidate model is trained, and the weights of the corresponding connections in the hypernetwork are updated to obtain the candidate model that has completed the training.
[0091] S306, performing performance evaluation on the candidate model according to a preset metric to obtain an evaluation result of the candidate model.
[0092] Among them, the preset metric is used to measure the accuracy of the candidate model on the training set. The training set includes a large number of complete time series groups and label data corresponding to the complete time series groups. The label data is related to the analysis target of the target model and can be the true value at a certain moment in the future. It will not be repeated here.
[0093] S307, taking the candidate model with the highest accuracy on the training set as the target model.
[0094] In this embodiment, convolution kernels of different sizes can learn features and information of different scales, and multi-scale information fusion and multi-path structure are conducive to improving model performance, so a multi-path-based search space is established. This patent uses multiple independent batch normalization operations to transform feature maps of different combinations.
[0095] In the multi-path sampling search, a greedy strategy is used to gradually filter out inferior path combinations, so that the hypernetwork training can focus more on potential excellent path combinations. In order to make the excellent path combinations more fully trained, different path combinations can be evaluated by using preset metrics, and then the inferior path combinations can be gradually discarded.
[0096] Specifically, assuming that the hypernetwork contains L layers, the number of candidate operations in each layer is m, and L and m are both positive integers, then the hypernetwork structure can be divided into ,in, Indicates l The structure of the layers, Indicates l The i-th candidate operation in the layer, 1≤i≤m. Construct a kernel matrix for each candidate operation in each layer :
[0097]
[0098] Where diag represents a diagonal matrix, , , are similarity matrix and quality matrix respectively. Let Indicates l The layer outputs feature maps from m different candidate operations, defining the l Two operators in the layer and The similarity is , .
[0099] In the above formula, is a hyperparameter, Represents the subnetwork structure sampled from the hypernetwork, indicating the function Defined as: .
[0100] Candidate Operations The quality assessment function By all the subnetworks that contain it The expected value of accuracy is determined by , where E is used to represent mathematical expectation, Representing substructure The accuracy on the training set, the content after the symbol "" is conditional on the content before the symbol "".
[0101] The higher the score of the sampled candidate operation combination, the stronger the representation ability of the fusion feature, which is more conducive to the training of the hypernetwork. Therefore, during the training process, those candidate operation combinations with high diversity scores can be retained, and those with low diversity scores can be gradually discarded to achieve the purpose of narrowing the search space.
[0102] The search process of this part includes: first, build a hypernetwork based on the search space, which contains L layers, and each layer has m candidate operations. In each iteration, a multi-path subnetwork structure is randomly sampled using Bernoulli sampling. For the output of each layer of the substructure, the output of the sampled candidate operations is first added to obtain the fusion feature, and then the corresponding batch normalization layer in the hybrid batch normalization layer is used to normalize it to obtain the output of the layer. Next, the back propagation algorithm is used to train the sampled subnetwork on the training set and update the weights of the corresponding connections in the hypernetwork. After this update process, the entire hypernetwork is trained in an end-to-end manner. After a certain number of iterative training, the search space is reduced, so training and space shrinkage are performed alternately until the stopping condition is met.
[0103] Optionally, in this embodiment, the regularization method based on consistency loss and the mean teacher method are used to train the hypernetwork to solve the problem of feature offset and parameter offset respectively. This framework can improve the stability of the hypernetwork training process and alleviate the consistency offset phenomenon, thereby improving the effectiveness of the structure search method of a single training.
[0104] In order to ensure a stable input distribution of a given layer, that is, to improve the anti-interference ability of a given layer for dynamic input. Inspired by the consistency regularization method in the semi-supervised learning framework, for the same input data, it is proposed to penalize the inconsistency between network predictions through different sampling paths. Specifically, two supernetwork models with the same structure are constructed, denoted as Student supernet and Teacher supernet. Then the supernetwork training is performed. In each iteration, two paths in the student supernetwork are first randomly sampled, denoted as pathi and pathj. For the input data x, after random data enhancement, its output can be obtained through different paths, which is expressed as ,in , , f is the student network mapping function, , is random data augmentation.
[0105] On the other hand, two corresponding paths are also sampled from the teacher hypernetwork and , and get its output, expressed as ,in , , is the mapping function of the teacher network. After the two hypernetworks obtain predictions for the same input x in different sampling paths, the following cross-path consistency loss function is defined: , where X represents the training data set and C represents the consistency metric function, which is defined as: .
[0106] By minimizing the consistency loss of cross paths, the feature consistency deviation caused by different random paths during the iteration process can be reduced, and the distribution of hidden layer input features can be stabilized, thereby improving the anti-interference and sorting capabilities of the hypernetwork.
[0107] In addition to reducing the feature shift phenomenon, it is also necessary to solve the parameter shift problem caused by the contradictory updates between iterations. Inspired by the mean teacher model, this embodiment proposes to reduce parameter shift by smoothing the weight parameter updates of the hypernetwork between iterations. Specifically, after each iteration, the weight parameters of the teacher hypernetwork model are obtained by calculating the exponential sliding average of the student network weights, rather than simply copying them from the student model during model training. is represented by the mapping function f parameter of the t-th generation student hypernetwork, so the weight of the mean teacher model It can be defined as: ,in is the smoothing coefficient. Therefore, the weight of the teacher model integrates the historical gradient information of the student model, has stronger robustness, and can reduce parameter deviation.
[0108] In addition to the consistency loss between cross paths, the student hypernetwork model should also include supervised losses from data labels, using the cross entropy loss function, so the overall loss function of the student hypernetwork is: ,in is the weight coefficient of consistency loss, is the training loss for the downstream task. The value of starts from 0 and increases gradually with the number of iterations.
[0109] S308, obtaining label data corresponding to the target representation, and training the target model according to the target representation and the label data to obtain an industrial analysis model.
[0110] Among them, when the target model is trained, the output label data is used as the training target when the target representation is input.
[0111] Through the method provided in this embodiment, the encoder can be equipped with the ability to obtain the corresponding target representation containing complete information based on the missing time series group of the sensor. Based on the obtained target representation, the automatic construction and training of the analysis model is conducive to obtaining a more accurate analysis model, thereby facilitating the improvement of the control accuracy in the industrial process.
[0112] Figure 4 This is a flow chart of a method for using an industrial analysis model provided in an embodiment of the present application. The method of this embodiment further illustrates the method for using the industrial analysis model based on the above-mentioned embodiment. Figure 4 , the method of this embodiment is described in detail. Figure 4 As shown, the method provided in this embodiment includes:
[0113] S401, obtaining collected data.
[0114] Specifically, the collected data includes a time series group collected by a preset number of sensors.
[0115] It is understandable that the electronic device collects data based on the collection instruction to obtain the collected data, and the collection instruction can be automatically triggered by the electronic device according to a preset rule, or can be triggered in response to user needs. Specifically, in this embodiment, the collection instruction is used to instruct the collection of real-time data of the target sensor, and the time series corresponding to the corresponding sensor is formed according to the real-time data of the corresponding sensor to obtain a time series group.
[0116] S402, extracting features from the time series group through the trained encoder to obtain a target representation containing complete information corresponding to the time series group.
[0117] S403, inputting the target representation into the trained industrial analysis model to obtain an analysis result; the analysis result is used to indicate a predicted value or a control instruction.
[0118] It can be understood that the industrial analysis model is obtained after training based on the target representation corresponding to the complete time series of the corresponding number of sensors and the target label data corresponding to the target representation, so that the industrial analysis model outputs the corresponding analysis results when receiving the target representation of the corresponding sensor.
[0119] In this embodiment, when the electronic device receives the collected data, it inputs the collected data into the trained encoder so that the encoder performs feature extraction to obtain a target representation containing complete information. Further, the electronic device inputs the target representation into the industrial analysis model to obtain corresponding analysis results. Through the method of this embodiment, more accurate prediction values or control instructions can be obtained, which is conducive to improving the control accuracy of industrial processes.
[0120] The above-mentioned embodiments introduce a method for training an industrial analysis model and a method for using an industrial analysis model from the perspective of a method flow. The following embodiments introduce a device for training an industrial analysis model and a device for using an industrial analysis model from the perspective of a virtual module or a virtual unit. Please refer to the following embodiments for details.
[0121] Figure 5 A structural diagram of a training device for an industrial analysis model provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the device includes a first acquisition module 51, a first extraction module 52, a construction module 53 and a training module 54, wherein:
[0122] A first acquisition module 51 is used to acquire historical data, where the historical data includes a missing time series group, where the missing time series group includes original missing sequences collected by a preset number of sensors, where the preset number is any positive integer;
[0123] The first extraction module 52 is used to extract features from the historical data through the trained encoder to obtain a target representation for indicating the complete information of the missing time series group; when the encoder is trained, the target representation is obtained as a training target when receiving the missing time series group;
[0124] A construction module 53 is used to automatically construct at least one candidate model according to the target representation, and determine a target model based on the at least one candidate model; the target model is a candidate model with the best evaluation result, and the evaluation result is obtained based on a preset metric standard, and the preset metric standard is related to the analysis target of the model;
[0125] The training module 54 is used to obtain the label data corresponding to the target representation, and train the target model according to the target representation and the label data to obtain the industrial analysis model; the label data is related to the analysis target and is used to indicate the actual analysis result corresponding to the target representation; when the target model is trained, the output label data is used as the training target when the target representation is input.
[0126] In another possible implementation of the embodiment of the present application, the first extraction module 52 is further configured to:
[0127] Obtain a complete time series group collected by a preset number of sensors, and perform a mask operation on the complete time series group in a preset manner to obtain a missing time series group, where the missing time series group lacks a time series of at least one sensor, and / or the time series of at least one sensor is a missing time series;
[0128] The missing time series group is used as the input of the encoder and the complete time series group is used as the target output of the decoder corresponding to the encoder. The encoder and decoder are trained to obtain the trained encoder and decoder, so that the encoder outputs the target representation when receiving the missing time series group, and the decoder outputs the complete time series group when receiving the target representation.
[0129] In another possible implementation of the embodiment of the present application, the construction module 53 is specifically used to:
[0130] Establishing a multi-path based search space, and generating at least one candidate model based on the search space;
[0131] The performance of the candidate model is evaluated according to a preset metric standard to obtain an evaluation result of the candidate model; the preset metric standard is used to measure the accuracy of the candidate model on the training set, and the training set includes a large number of complete time series groups and label data corresponding to the complete time series groups;
[0132] The candidate model with the highest accuracy on the training set is used as the target model.
[0133] In another possible implementation manner of the embodiment of the present application, the construction module 53 is specifically used to:
[0134] A hypernetwork is constructed based on the search space; the hypernetwork is used to generate the target model, and the hypernetwork includes L layers, each layer has m candidate operations;
[0135] The model parameters of the hypernetwork are updated iteratively, and in each iteration, a multi-path subnetwork structure is randomly sampled using Bernoulli sampling to obtain at least one candidate model.
[0136] In another possible implementation of the embodiment of the present application, the construction module 53 is further used to:
[0137] For any layer of the candidate model, the fused features are obtained by adding the outputs of the sampled candidate operations;
[0138] The fused features are normalized by the corresponding batch normalization layer in the hybrid batch normalization layer to obtain the target output of any layer;
[0139] Based on the back-propagation algorithm and the training set, the candidate model is trained, and the weights of the corresponding connections in the hypernetwork are updated to obtain the candidate model that has completed the training.
[0140] Another possible implementation of the embodiment of the present application is to train the hypernetwork based on a consistency loss regularization method and a mean teacher method.
[0141] Figure 6 A schematic diagram of a device for using an industrial analysis model provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the device includes a second acquisition module 61, a second extraction module 62 and an analysis module 63, wherein:
[0142] A second acquisition module 61 is used to acquire collected data, where the collected data includes a time series group collected by a preset number of sensors;
[0143] The second extraction module 62 is used to extract features from the time series group through the trained encoder to obtain a target representation containing complete information corresponding to the time series group;
[0144] The analysis module 63 is used to input the target representation into the trained industrial analysis model to obtain the analysis result; the industrial analysis model is obtained based on the training method of the industrial analysis model, and the analysis result is used to indicate the prediction value or control instruction.
[0145] The embodiments of the present application provide an industrial analysis model training device and an industrial analysis model use device, which are respectively applicable to the above-mentioned industrial analysis model training method and industrial analysis model use method embodiments, and will not be repeated here.
[0146] An electronic device is provided in an embodiment of the present application. Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 7 As shown, Figure 7 The electronic device shown includes: a processor 71 and a memory 72. The processor 71 and the memory 72 are connected, such as through a bus 73. Optionally, the electronic device may further include a transceiver 74. It should be noted that in actual applications, the transceiver 74 is not limited to one, and the structure of the electronic device does not constitute a limitation on the embodiments of the present application.
[0147] The processor 71 may be a central processing unit (CPU), a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor 71 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0148] The bus 73 may include a path to transmit information between the above components. The bus 73 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus 73 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the figure, but it does not mean that there is only one bus 73 or only one type of bus 73.
[0149] The memory 72 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.
[0150] The memory 72 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 71. The processor 71 is used to execute the application code stored in the memory 72 to implement the contents shown in the above method embodiment.
[0151] The present application also provides a computer-readable storage medium, which may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes. Specifically, the computer-readable storage medium stores program instructions, and the program instructions are used to implement the methods in the above-mentioned embodiments.
[0152] A computer program product is also provided in an embodiment of the present application, including a computer program. When the computer program is executed by a processor, the technical solution of the above-mentioned method embodiment is implemented. The implementation principle and technical effect are similar and will not be repeated here.
[0153] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the claims.
[0154] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A training method for an industrial analysis model, characterized in that: Applied to industrial control systems; the method comprises: Acquire historical data, wherein the historical data includes a missing time series group, wherein the missing time series group includes original missing sequences collected by a preset number of sensors, and the preset number is any positive integer; Extracting features from the historical data through a trained encoder to obtain a target representation for indicating complete information of the missing time series group; when the encoder is trained, obtaining the target representation when receiving the missing time series group is a training goal; According to the target representation, at least one candidate model is automatically constructed, and a target model is determined based on at least one of the candidate models; the target model is a candidate model with the best evaluation result, the evaluation result is obtained based on a preset metric, and the preset metric is related to the analysis target of the model; Obtaining label data corresponding to the target representation, and training the target model according to the target representation and the label data to obtain an industrial analysis model; the label data is related to the analysis target and is used to indicate the actual analysis result corresponding to the target representation; when the target model is trained, when the target representation is input, the label data is output as a training target; Before extracting features from the historical data using the trained encoder, the method further includes: Acquire a complete time series group collected by a preset number of sensors, and perform a mask operation on the complete time series group in a preset manner to obtain the missing time series group, wherein the missing time series group lacks a time series of at least one sensor, and / or the time series of at least one sensor is a missing time series; Taking the missing time series group as the input of the encoder and the complete time series group as the target output of the decoder corresponding to the encoder, the encoder and the decoder are trained to obtain a trained encoder and decoder, so that the encoder outputs the target representation when receiving the missing time series group, and the decoder outputs the complete time series group when receiving the target representation; The step of automatically constructing at least one candidate model according to the target representation comprises: Establishing a multi-path based search space, and constructing a hypernetwork based on the search space; the hypernetwork is used to generate the target model, and the hypernetwork includes L layers, each layer has m candidate operations, and L and m are both positive integers; Iteratively updating the model parameters of the super network, and in each iteration, randomly sampling a multi-path sub-network structure using Bernoulli sampling to obtain at least one candidate model; Training the hypernetwork based on a consistency loss regularization method and a mean teacher method; Wherein, for any layer of the candidate model, the fusion feature is obtained by adding the outputs of the sampled candidate operations; The fused features are normalized by a corresponding batch normalization layer in the hybrid batch normalization layer to obtain a target output of any layer; Based on the back propagation algorithm and the training set, the candidate model is trained, and the weights of the corresponding connections in the hypernetwork are updated to obtain a candidate model that has completed the training.
2. The method according to claim 1, characterized in that The determining of the target model based on at least one of the candidate models comprises: Performing a performance evaluation on the candidate model according to the preset metric to obtain an evaluation result of the candidate model; the preset metric is used to measure the accuracy of the candidate model on a training set, wherein the training set includes a large number of complete time series groups and label data corresponding to the complete time series groups; The candidate model with the highest accuracy on the training set is used as the target model.
3. A method for using an industrial analysis model, characterized in that: Applied to industrial control systems; the method comprises: Acquire collected data, wherein the collected data includes a time series group collected by a preset number of sensors; Extracting features from the time series group using a trained encoder to obtain a target representation containing complete information corresponding to the time series group; The target representation is input into a trained industrial analysis model to obtain an analysis result; the industrial analysis model is obtained based on the training method of the industrial analysis model according to claim 1 or 2, and the analysis result is used to indicate a predicted value or a control instruction.
4. A training device for an industrial analysis model, characterized in that: The device comprises: A first acquisition module is used to acquire historical data, wherein the historical data includes a missing time series group, and the missing time series group includes original missing sequences collected by a preset number of sensors, where the preset number is any positive integer; A first extraction module is used to extract features from the historical data through a trained encoder to obtain a target representation for indicating complete information of the missing time series group; when the encoder is trained, the target representation is obtained as a training target when receiving the missing time series group; A construction module, configured to automatically construct at least one candidate model according to the target representation, and determine a target model based on at least one of the candidate models; the target model is a candidate model with the best evaluation result, the evaluation result is obtained based on a preset metric, and the preset metric is related to the analysis target of the model; A training module, used to obtain label data corresponding to the target representation, and train the target model according to the target representation and the label data to obtain an industrial analysis model; the label data is related to the analysis target and is used to indicate the actual analysis result corresponding to the target representation; when the target model is trained, when the target representation is input, the label data is output as a training target; The first acquisition module is further used to acquire a complete time series group collected by a preset number of sensors, and perform a mask operation on the complete time series group in a preset manner to obtain the missing time series group, wherein the missing time series group lacks a time series of at least one sensor, and / or the time series of at least one sensor is a missing time series; Taking the missing time series group as the input of the encoder and the complete time series group as the target output of the decoder corresponding to the encoder, the encoder and the decoder are trained to obtain a trained encoder and decoder, so that the encoder outputs the target representation when receiving the missing time series group, and the decoder outputs the complete time series group when receiving the target representation; The construction module is specifically used to establish a search space based on multiple paths, and to construct a super network based on the search space; the super network is used to generate the target model, and the super network includes L layers, each layer has m candidate operations, and L and m are both positive integers; Iteratively updating the model parameters of the super network, and in each iteration, randomly sampling a multi-path sub-network structure using Bernoulli sampling to obtain at least one candidate model; Training the hypernetwork based on a consistency loss regularization method and a mean teacher method; The construction module is further used to obtain a fusion feature by adding the outputs of the sampled candidate operations for any layer of the candidate model; The fused features are normalized by a corresponding batch normalization layer in the hybrid batch normalization layer to obtain a target output of any layer; Based on the back propagation algorithm and the training set, the candidate model is trained, and the weights of the corresponding connections in the hypernetwork are updated to obtain a candidate model that has completed the training.
5. A device for using an industrial analysis model, characterized in that: The device comprises: A second acquisition module is used to acquire collected data, wherein the collected data includes a time series group collected by a preset number of sensors; A second extraction module is used to extract features from the time series group using a trained encoder to obtain a target representation containing complete information corresponding to the time series group; An analysis module is used to input the target representation into a trained industrial analysis model to obtain an analysis result; the industrial analysis model is obtained based on the method described in claim 1 or 2, and the analysis result is used to indicate a predicted value or a control instruction.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the training method of the industrial analysis model as described in claim 1 or 2; or, the method for using the industrial analysis model as described in claim 3.
Citation Information
Patent Citations
Method and device for generating neural network model
CN111582453A
Traffic missing data complementation method based on space-time attention mechanism
CN113094357A
