Method for correcting defective machine and related device
By using the correction neural network model to convert the output data of the problem machine into standard output data, the problem of difficult to correct the output data of the problem machine in the prior art is solved, and efficient and accurate data correction effect is achieved.
Patent Information
- Application Number
- CN202311281586.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2025-03-28
AI Technical Summary
The prior art is difficult to effectively correct the output data of the problem machine, causing deviations in the temperature, humidity or spectral measurement results of the detection object.
The correction neural network model is used to convert the output data to be corrected by the problem machine into the standard output data of the standard machine. The model includes a convolution module, a batch normalization layer, a discard layer, a fully connected layer and a changing shape layer. It is trained by training sample data until the output meets the preset target loss.
It realizes effective correction of the output data of the problem machine, and improves the convenience and accuracy of obtaining standard output data from the problem machine.
Smart Images

Figure CN119720112A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a correction method for a problematic machine and a related device. Background Art
[0002] The machine is generally used to measure various information of the inspection object, such as the temperature, humidity or spectrum of the inspection object. However, as the machine is used for a longer time, more and more problems will occur. For example, the temperature, humidity or spectrum of the measured object will deviate, making the output of the problematic machine unable to be used as direct measurement information of the inspection object.
[0003] How to correct the problematic output data of the detection object is a problem that needs to be solved urgently. Summary of the invention
[0004] The embodiment of the present invention provides a correction method and related device for a problem machine, which is used to correct the output data to be corrected of the problem machine to the standard output of a standard machine, thereby realizing the correction of the output data to be corrected in the problem machine.
[0005] A first aspect of an embodiment of the present application provides a method for correcting a problem machine, comprising:
[0006] Acquire output data to be corrected of the problematic machine, wherein the output data to be corrected includes at least one of the temperature, humidity and spectrum of the detection object;
[0007] The output data to be corrected of the problematic machine is input into the correction neural network model to obtain the standard output data generated by the correction neural network model, wherein the correction neural network model is used to convert the output data to be corrected of the problematic machine into the standard output data of a standard machine.
[0008] Preferably, the rectified neural network model comprises a convolution module, a batch normalization layer, a dropout layer, a fully connected layer and a reshape layer;
[0009] Inputting the output data to be corrected of the problematic machine into the correction neural network model to obtain the standard output data generated by the correction neural network model, including:
[0010] Inputting the output data to be corrected of the problematic machine into the convolution module to extract data features of the output data to be corrected;
[0011] Inputting the data features of the output data to be corrected into the batch normalization layer to perform normalization on the data features of the output data to be corrected;
[0012] Inputting the normalized data features of the output data to be corrected into the discard layer to discard invalid data in the data features;
[0013] Inputting the data features after discarding the invalid data into the fully connected layer to fit the data features after discarding the invalid data;
[0014] The fitted data features are input into the shape-changing layer to obtain standard output data corresponding to the standard machine, wherein the number of the standard output data is equal to the number of the output data to be corrected.
[0015] Preferably, before inputting the output data to be corrected of the problematic machine into the correction neural network model, the method further comprises:
[0016] Acquire training sample data, wherein the sample data includes output data to be corrected in the problem machine and standard output data in the standard machine for each of the multiple detection objects;
[0017] Inputting the output data to be corrected in the training sample data into the corrected neural network model to obtain a first output generated by the corrected neural network model;
[0018] Calculating the loss between the first output and the standard output according to a preset loss function;
[0019] The corrected neural network model is trained according to the loss and back propagation algorithm until the output of the corrected neural network model meets the target loss.
[0020] Preferably, before inputting the training sample data into the corrected neural network model for training, the method further comprises:
[0021] Cleaning the training sample data, wherein the cleaning includes: deleting at least one of outliers, deleting invalid values, and filling missing values;
[0022] For the cleaned training sample data, the data identification code is used to match the output data to be corrected and the standard output data of the same detection object one by one.
[0023] Preferably, after the data identification code is used to match the output data to be corrected and the standard output data of the same detection object one by one, the method further includes:
[0024] Calculating the correlation between the output data to be corrected and the standard output data of the target detection object, wherein the target detection object is any one of the multiple detection objects;
[0025] If the correlation is less than a preset correlation threshold, the output data to be corrected and the standard output data of the target detection object are deleted.
[0026] Preferably, the correction neural network model is trained according to the loss and back propagation algorithm, including:
[0027] When the parameters of the rectified neural network model are updated according to the loss and back propagation algorithm, the learning rate of the gradient update is optimized using the Adamw optimizer.
[0028] Preferably, the method further comprises:
[0029] Deploy one of the corrected neural network models on each of the n working nodes, and the initialization parameters of the corrected neural network models are the same, wherein n is greater than or equal to 2;
[0030] Dividing the training sample data into n groups of sample data on average;
[0031] Using a set of sample data on each working node, updating the parameters of the corrected neural network model;
[0032] After updating the parameters of the corrected neural network model m times on each working node, n updated corrected neural network models are obtained;
[0033] Calculate the average value of the model parameters of the n updated rectified neural network models;
[0034] The average values of the model parameters are used as the final model parameters of the corrected neural network model.
[0035] A second aspect of the embodiment of the present application provides a correction device for a problematic machine, comprising:
[0036] An acquisition unit, used for acquiring output data to be corrected of the problematic machine, wherein the output data to be corrected includes at least one of the temperature, humidity and spectrum of the detection object;
[0037] A correction unit is used to input the output data to be corrected of the problem machine into the correction neural network model to obtain standard output data generated by the correction neural network model, wherein the correction neural network model is used to convert the output data to be corrected of the problem machine into standard output data of a standard machine.
[0038] Preferably, the rectified neural network model comprises a convolution module, a batch normalization layer, a dropout layer, a fully connected layer and a reshape layer;
[0039] Correction unit, specifically used for:
[0040] Inputting the output data to be corrected of the problematic machine into the convolution module to extract data features of the output data to be corrected;
[0041] Inputting the data features of the output data to be corrected into the batch normalization layer to perform normalization on the data features of the output data to be corrected;
[0042] Inputting the normalized data features of the output data to be corrected into the discard layer to discard invalid data in the data features;
[0043] Inputting the data features after discarding the invalid data into the fully connected layer to fit the data features after discarding the invalid data;
[0044] The fitted data features are input into the shape-changing layer to obtain standard output data corresponding to the standard machine, wherein the number of the standard output data is equal to the number of the output data to be corrected.
[0045] Preferably, the acquisition unit is further used for:
[0046] Before inputting the output data to be corrected of the problem machine into the correction neural network model, obtaining training sample data, wherein the sample data includes the output data to be corrected of each detection object in the problem machine and the standard output data in the standard machine;
[0047] A generating unit, configured to input the output data to be corrected in the training sample data into the corrected neural network model to obtain a first output generated by the corrected neural network model;
[0048] A calculation unit, configured to calculate a loss between the first output and the standard output according to a preset loss function;
[0049] A training unit is used to train the corrected neural network model according to the loss and the back propagation algorithm until the output of the corrected neural network model meets the target loss.
[0050] Preferably, the device further comprises:
[0051] A cleaning unit, configured to clean the training sample data, wherein the cleaning includes: deleting at least one of abnormal values, deleting invalid values, and filling missing values;
[0052] The matching unit is used to match the output data to be corrected and the standard output data of the same detection object one by one using the data identification code for the cleaned training sample data.
[0053] Preferably, the computing unit is further used for:
[0054] After the output data to be corrected and the standard output data of the same detection object are matched one by one using the data identification code, the correlation between the output data to be corrected and the standard output data of the target detection object is calculated, wherein the target detection object is any one of the multiple detection objects;
[0055] The deleting unit is used to delete the output data to be corrected and the standard output data of the target detection object if the correlation is less than a preset correlation threshold.
[0056] The training unit is specifically used for:
[0057] When the parameters of the rectified neural network model are updated according to the loss and back propagation algorithm, the learning rate of the gradient update is optimized using the Adamw optimizer.
[0058] The training unit is further used for:
[0059] Deploy one of the corrected neural network models on each of the n working nodes, and the initialization parameters of the corrected neural network models are the same, wherein n is greater than or equal to 2;
[0060] Dividing the training sample data into n groups of sample data on average;
[0061] Using a set of sample data on each working node, updating the parameters of the corrected neural network model;
[0062] After updating the parameters of the corrected neural network model m times on each working node, n updated corrected neural network models are obtained;
[0063] Calculate the average value of the model parameters of the n updated rectified neural network models;
[0064] The average values of the model parameters are used as the final model parameters of the corrected neural network model.
[0065] A third aspect of an embodiment of the present application provides a computer device, including a processor, which is used to implement the correction method for the problematic machine provided in the first aspect of the embodiment of the present application when executing a computer program stored in a memory.
[0066] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program is used to implement the correction method for the problematic machine provided in the first aspect of the embodiment of the present application.
[0067] It can be seen from the above technical solutions that the embodiments of the present invention have the following advantages:
[0068] In an embodiment of the present application, by inputting the output data to be corrected of the problematic machine into the correction neural network model, the standard output data generated by the correction neural network model can be obtained, thereby achieving the correction of the output data to be corrected of the problematic machine and improving the convenience of obtaining the standard output data from the problematic machine. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] Figure 1 A schematic diagram of an embodiment of a correction method for a problematic machine in an embodiment of the present application;
[0070] Figure 2 for Figure 1 A refinement of step 102 in the embodiment;
[0071] Figure 3 A schematic diagram of an embodiment of the training process of the correction neural network model in the embodiment of the present application;
[0072] Figure 4 This is a schematic diagram of an embodiment of performing preprocessing on training sample data in an embodiment of the present application;
[0073] Figure 5 For this application Figure 3 A refinement of step 304 in the embodiment;
[0074] Figure 6 It is a schematic diagram of an embodiment of a correction device for a problematic machine in an embodiment of the present application. DETAILED DESCRIPTION
[0075] The embodiment of the present invention provides a correction method and related device for a problem machine, which is used to correct the output data to be corrected of the problem machine to the standard output of a standard machine, thereby realizing the correction of the output data to be corrected in the problem machine.
[0076] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0077] The terms "first", "second", "third", "fourth", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0078] For ease of understanding, the following describes the correction method of the problem machine in the embodiment of the present application, please refer to Figure 1 , an embodiment of a method for correcting a problem machine in an embodiment of the present application includes:
[0079] 101. Obtain output data to be corrected of the problematic machine, wherein the output data to be corrected includes at least one of the temperature, humidity, and spectrum of the detection object;
[0080] The output data to be corrected of the problematic machine is obtained, wherein the output data to be corrected includes at least one of the temperature, humidity and spectrum of the detection object.
[0081] Specifically, when obtaining the output data to be corrected of the problematic machine, the output data to be corrected may be obtained actively from the problematic machine, or may be obtained passively from the problematic machine. There is no specific restriction on the method of obtaining the output data to be corrected.
[0082] Furthermore, when obtaining the output data to be corrected of the problematic machine, the output data to be corrected may be obtained locally from the problematic machine or from a third-party storage, and there is no specific restriction on the source of the output data to be corrected.
[0083] 102. Input the output data to be corrected of the problematic machine into the correction neural network model to obtain standard output data generated by the correction neural network model, wherein the correction neural network model is used to convert the output data to be corrected of the problematic machine into standard output data of a standard machine.
[0084] After obtaining the output data to be corrected of the problematic machine, the output data to be corrected of the problematic machine is input into the correction neural network model to obtain the standard output data generated by the correction neural network model, wherein the correction neural network model is used to convert the output data to be corrected of the problematic machine into the standard output data of a standard machine.
[0085] It should be noted that the standard machine here refers to a machine without any problems, and the standard output of the standard machine is the accurate output of the machine.
[0086] As for how the corrected neural network model outputs standard output data according to the output data to be corrected, the process will be described in the following embodiments and will not be repeated here.
[0087] In an embodiment of the present application, by inputting the output data to be corrected of the problematic machine into the correction neural network model, the standard output data generated by the correction neural network model can be obtained, thereby achieving the correction of the output data to be corrected of the problematic machine and improving the convenience of obtaining the standard output data from the problematic machine.
[0088] based on Figure 1 In the embodiment described above, step 102 is described in detail below. Specifically, the correction neural network model in the embodiment of the present application includes a convolution module, a batch normalization layer, a drop layer, a fully connected layer and a shape change layer. Please refer to Figure 2 , Figure 2 for Figure 1 The refinement steps of step 102 are as follows:
[0089] 201. Inputting the output data to be corrected of the problematic machine into the convolution module to extract data features of the output data to be corrected;
[0090] After obtaining the output data to be corrected of the problematic machine, the output data to be corrected is input into a convolution module to extract data features of the output data to be corrected, wherein the convolution module in the embodiment of the present application includes multiple convolution layers for extracting data features of the output data to be corrected.
[0091] 202. Inputting the data features of the output data to be corrected into the batch normalization layer to perform normalization on the data features of the output data to be corrected;
[0092] After extracting the data features of the output data to be corrected, in order to avoid ignoring some small data features in the data features of the output data to be corrected, the embodiment of the present application adds a batch normalization layer to the correction neural network model, wherein the function of the batch normalization layer is to normalize the data features of the output data to be corrected to ensure that the data features of the output data to be corrected can be taken into account in the model learning.
[0093] 203. Inputting the normalized data features of the output data to be corrected into the discard layer to discard invalid data in the data features;
[0094] After obtaining the normalized data features of the output data to be corrected, because some invalid data will be generated in the model learning process, in order to avoid wasting computing power due to invalid data, the embodiment of the present application adds a discard layer to the correction neural network model, wherein the discard layer includes a downsampling module for discarding invalid data in the data features, thereby saving computing power.
[0095] 204. Inputting the data features after discarding the invalid data into the fully connected layer to fit the data features after discarding the invalid data;
[0096] Because the fully connected layer is used to integrate the output features of the previous layers to obtain comprehensive features, the fully connected layer in the embodiment of the present application is used to input the data features after discarding invalid data into the fully connected layer to fit the data features after discarding the invalid data, so as to integrate the output features of the previous layers.
[0097] 205. Input the fitted data features into the shape-changing layer to obtain standard output data corresponding to the standard machine, wherein the number of the standard output data is equal to the number of the output data to be corrected.
[0098] Because the model is in the learning process and the data matrix in each layer is set, the number of fitted data features is different from the number of output data to be corrected. Therefore, in the embodiment of the present application, a shape changing layer is added to the correction neural network model to correct the number of data features after fitting to obtain a standard output corresponding to a standard machine, wherein the number of standard output data is equal to the number of output data to be corrected.
[0099] In the example of the present application, in order to improve the accuracy of the model, a batch normalization layer is set in the correction neural network model. The role of the batch normalization layer can prevent some small data features in the data features of the output data to be corrected from being ignored, thereby ensuring that the data features of the output data to be corrected can be learned in the model learning, thereby improving the accuracy of the correction neural network model.
[0100] Further, based on Figure 1 In the above embodiment, before the output data to be corrected of the problem machine is input into the correction neural network model, the correction neural network model needs to be trained. The training process of the correction neural network model is described below. Figure 3 , an embodiment of the training process of the correction neural network model in the embodiment of the present application includes:
[0101] 301. Acquire training sample data, where the sample data includes output data to be corrected of each of a plurality of detection objects in the problem machine and standard output data in the standard machine;
[0102] It is easy to understand that before training the correction neural network model, it is necessary to obtain training sample data, wherein the sample data includes the output data to be corrected of each of the multiple detection objects in the problem machine, and the standard output data in the standard machine.
[0103] For example, when the output data is a spectrum, the sample data includes a spectrum to be corrected of each of the multiple detection objects in the problem machine and a standard spectrum in the standard machine.
[0104] 302. Input the output data to be corrected in the training sample data into the corrected neural network model to obtain a first output generated by the corrected neural network model;
[0105] Furthermore, the output data to be corrected in the training sample data is input into the corrected neural network model to obtain a first output generated by the corrected neural network model, wherein the standard output data in the training sample data is used as a label of the output data to be corrected.
[0106] 303. Calculate the loss between the first output and the standard output according to a preset loss function;
[0107] After obtaining the first output generated by the corrected neural network model, the loss between the first output and the standard output is calculated according to a preset loss function, wherein the preset loss function includes an L1 loss function, an L2 loss function or a cross entropy function, etc. There is no specific limitation on the preset loss function here.
[0108] 304. Train the corrected neural network model according to the loss and back propagation algorithm until the output of the corrected neural network model meets the target loss.
[0109] After the loss between the first output and the standard output is obtained, the corrected neural network model is trained according to the loss and the back propagation algorithm until the output of the corrected neural network model meets the target loss.
[0110] Specifically, when the model parameters of the rectified neural network model are updated using the above-mentioned loss and back propagation algorithm, in order to prevent gradient explosion and improve the speed of gradient convergence, the embodiment of the present application uses the Adamw optimizer to optimize the learning rate of gradient update;
[0111] Among them, when using the Adamw optimizer to optimize the learning rate of gradient update, at least the following advantages are specific:
[0112] As an optimization algorithm for adaptive learning rate, Adamw optimizer can automatically adjust the learning rate of different parameters in the model, so as to better adapt to the changes in the gradients of different parameters, with faster training speed and better processing of sparse gradients.
[0113] Furthermore, the Adamw optimizer performs L2 regularization on larger weight updates, which can further improve the training effect of the model.
[0114] based on Figure 3 In the above embodiment, before using the training sample data to train the correction neural network model, the training sample data needs to be preprocessed to ensure the correctness of the training sample data. Figure 4 In the embodiment of the present application, one embodiment of performing preprocessing on the training sample data includes:
[0115] 401. Clean the training sample data, wherein the cleaning includes: deleting at least one of abnormal values, deleting invalid values, and filling missing values;
[0116] In actual situations, the training sample data may contain errors due to various accidents, such as omissions or unreasonable values. Therefore, in order to ensure the correctness of the training sample data, the embodiment of the present application needs to clean the training sample data before inputting the training sample data into the correction neural network model training, wherein the cleaning includes at least one of deleting outliers, deleting invalid values and filling missing values.
[0117] Specifically, when filling missing values, the embodiment of the present application adopts interpolation method to fill in, so as to ensure the correctness of the data.
[0118] 402. For the cleaned training sample data, use the data identification code to perform one-to-one matching between the output data to be corrected and the standard output data of the same detection object.
[0119] Because the training sample data in the present application includes the output data to be corrected and the standard output data of the same detection object, and in order to ensure the correspondence between the data, after completing the data cleaning, the embodiment of the present application uses the data identification code to match the corrected output data and the standard output data of the same detection object one by one.
[0120] The data identification code here may be a data ID or a data index code, etc., and no specific limitation is imposed on the data identification code here.
[0121] 403. Calculate the correlation between the output data to be corrected and the standard output data of the target detection object, wherein the target detection object is any one of the multiple detection objects;
[0122] After obtaining the corrected output data and standard output data of the same detection object, in order to further improve the correspondence between the data, the embodiment of the present application also calculates the correlation between the output data to be corrected and the standard output data of the target detection object, wherein the target detection object is any one of multiple detection objects.
[0123] Specifically, when calculating the correlation between the corrected output data and the standard output data of the same detection object, the correlation between the corrected output data and the standard output data of the same detection object can be represented by the helper difference and the correlation coefficient, or univariate regression and multivariate regression can be used to analyze the correlation between the corrected output data and the standard output data of the same detection object. There is no specific restriction on the algorithm for calculating the correlation here.
[0124] 404. If the correlation is less than a preset correlation threshold, delete the corrected output data and the standard output data.
[0125] In order to improve the correlation between the corrected output data and the standard output data of the same detection object, after obtaining the correlation between the corrected output data and the standard output data of the same detection object, it is determined whether the correlation is less than the preset correlation threshold. If so, it means that there is no correlation between the corrected output data and the standard output data of the detection object, and the corrected output data and the standard output data of the target detection object are deleted.
[0126] The embodiment of the present application provides a detailed description of the preprocessing process of the training sample data, and the cleaning operation, matching operation and correlation calculation operation in the preprocessing process can improve the matching between the corrected output data and the standard output data of the same detection object, thereby further improving the accuracy of the training sample data.
[0127] based on Figure 3 The embodiment described below Figure 3 For a detailed description of step 304 in the embodiment, please refer to Figure 5 , Figure 5 The detailed steps of step 304 are as follows:
[0128] 501. Deploy one of the corrected neural network models on each of the n working nodes, and the initialization parameters of the corrected neural network models are the same, wherein n is greater than or equal to 2;
[0129] In actual situations, in order to speed up the training of the corrected neural network model, the corrected neural network model can be deployed on multiple working nodes (one working node here corresponds to a processor or server), that is, a corrected neural network model is deployed on each working node, and the corrected neural network model is trained using part of the training samples on each working node.
[0130] For easier understanding, the following example is given:
[0131] Assuming n is 20, 20 corrected neural network models are deployed on 20 working nodes respectively, that is, one corrected neural network model is deployed on each working node, and the corrected neural network model on each working node uses the same initialization model parameters.
[0132] 502. Divide the training sample data into n groups of sample data on average;
[0133] Furthermore, the embodiment of the present application divides the training sample data into n groups of sample data. Assuming there are 10,000 training sample data and n is 20, the 10,000 training sample data are divided into 20 groups, wherein each group contains 500 sample data.
[0134] 503. Using a set of sample data on each working node, update the parameters of the corrected neural network model;
[0135] Furthermore, a set of sample data is used on each working node to update the parameters of the corrected neural network model.
[0136] For example, the 1st to 500th data are used to train the corrected neural network model deployed on the first working node, that is, to update the parameters of the corrected neural network model.
[0137] 504. After updating the parameters of the corrected neural network model m times on each working node, n updated corrected neural network models are obtained, 5≤m≤15;
[0138] Specifically, when multiple working nodes are used to train the corrected neural network model, if the parameter averaging method is used, the parameters of the n updated corrected neural network models are averaged. However, if the model parameters are updated once on each working node (that is, m=1), the average value of the model parameters in the n working nodes is calculated, which will cause large network data synchronization overhead and computing overhead, thereby bringing large additional overhead.
[0139] If m is large, the local parameters of each working node will be more diversified, which will lead to poor model effect after averaging.
[0140] Therefore, m in the embodiments of the present application is greater than or equal to 5 and less than or equal to 15.
[0141] 505. Calculate the average values of the model parameters of the n updated corrected neural network models;
[0142] After the parameters of the corrected neural network model are updated m (5≤m≤15) times on each working node, the average value of the model parameters of the n updated corrected neural network models is further calculated, and step 506 is executed according to the average value of the model parameters.
[0143] 506. Taking the average values of the model parameters as the final model parameters of the corrected neural network model.
[0144] After obtaining the average value of the model parameters of the corrected neural network model, the embodiment of the present application further uses the average value of the model parameters as the final model parameters of the corrected neural network model, thereby improving the training speed of the corrected neural network model and also improving the accuracy of the corrected neural network model.
[0145] The embodiment of the present application adopts a data parallel algorithm to train the same corrected neural network model on multiple different working nodes, thereby improving the training speed of the corrected neural network model while ensuring the accuracy of the corrected neural network model.
[0146] The correction method of the problem machine in the embodiment of the present application is described in detail above. Next, the correction device of the problem machine in the embodiment of the present application is described. Please refer to Figure 6 , an embodiment of the correction device of the problem machine in the embodiment of the present application includes:
[0147] An acquisition unit 601 is used to acquire output data to be corrected of the problematic machine, wherein the output data to be corrected includes at least one of the temperature, humidity and spectrum of the detection object;
[0148] The correction unit 602 is used to input the output data to be corrected of the problem machine into the correction neural network model to obtain the standard output data generated by the correction neural network model, wherein the correction neural network model is used to convert the output data to be corrected of the problem machine into the standard output data of the standard machine.
[0149] Preferably, the rectified neural network model comprises a convolution module, a batch normalization layer, a dropout layer, a fully connected layer and a reshape layer;
[0150] The correction unit 602 is specifically used for:
[0151] Inputting the output data to be corrected of the problematic machine into the convolution module to extract data features of the output data to be corrected;
[0152] Inputting the data features of the output data to be corrected into the batch normalization layer to perform normalization on the data features of the output data to be corrected;
[0153] Inputting the normalized data features of the output data to be corrected into the discard layer to discard invalid data in the data features;
[0154] Inputting the data features after discarding the invalid data into the fully connected layer to fit the data features after discarding the invalid data;
[0155] The fitted data features are input into the shape-changing layer to obtain standard output data corresponding to the standard machine, wherein the number of the standard output data is equal to the number of the output data to be corrected.
[0156] Preferably, the acquisition unit 601 is further used for:
[0157] Before inputting the output data to be corrected of the problem machine into the correction neural network model, obtaining training sample data, wherein the sample data includes the output data to be corrected of each detection object in the problem machine and the standard output data in the standard machine;
[0158] A generating unit 603 is used to input the output data to be corrected in the training sample data into the corrected neural network model to obtain a first output generated by the corrected neural network model;
[0159] A calculation unit 604, configured to calculate a loss between the first output and the standard output according to a preset loss function;
[0160] The training unit 605 is used to train the corrected neural network model according to the loss and the back propagation algorithm until the output of the corrected neural network model meets the target loss.
[0161] Preferably, the device further comprises:
[0162] A cleaning unit 606, configured to clean the training sample data, wherein the cleaning includes: deleting at least one of abnormal values, deleting invalid values, and filling missing values;
[0163] The matching unit 607 is used to use the data identification code to perform one-to-one matching between the output data to be corrected and the standard output data of the same detection object for the cleaned training sample data.
[0164] Preferably, the computing unit 604 is further configured to:
[0165] After the output data to be corrected and the standard output data of the same detection object are matched one by one using the data identification code, the correlation between the output data to be corrected and the standard output data of the target detection object is calculated, wherein the target detection object is any one of the multiple detection objects;
[0166] The deleting unit 608 is configured to delete the output data to be corrected and the standard output data of the target detection object if the correlation is less than a preset correlation threshold.
[0167] The training unit 605 is specifically used for:
[0168] When the parameters of the rectified neural network model are updated according to the loss and back propagation algorithm, the learning rate of the gradient update is optimized using the Adamw optimizer.
[0169] The training unit 605 is specifically used for:
[0170] Deploy one of the corrected neural network models on each of the n working nodes, and the initialization parameters of the corrected neural network models are the same, wherein n is greater than or equal to 2;
[0171] Dividing the training sample data into n groups of sample data on average;
[0172] Using a set of sample data on each working node, updating the parameters of the corrected neural network model;
[0173] After updating the parameters of the corrected neural network model m times on each working node, n updated corrected neural network models are obtained;
[0174] Calculate the average value of the model parameters of the n updated rectified neural network models;
[0175] The average values of the model parameters are used as the final model parameters of the corrected neural network model.
[0176] It should be noted that the functions of each unit in the embodiment of the present application are similar to Figures 1 to 5 The description in the embodiment is similar and will not be repeated here.
[0177] In an embodiment of the present application, the correction unit 602 inputs the output data to be corrected of the problem machine into the correction neural network model, and obtains the standard output data generated by the correction neural network model, thereby realizing the correction of the output data to be corrected of the problem machine and improving the convenience of obtaining standard output data from the problem machine.
[0178] The correction device of the problem machine in the embodiment of the present invention is described above from the perspective of modular functional entities. The computer device in the embodiment of the present invention is described below from the perspective of hardware processing:
[0179] The computer device is used to implement the function of the correction device of the problem machine. In an embodiment of the present invention, an embodiment of the computer device includes:
[0180] Processor and memory;
[0181] The memory is used to store a computer program, and when the processor is used to execute the computer program stored in the memory, the following steps can be implemented:
[0182] Acquire output data to be corrected of the problematic machine, wherein the output data to be corrected includes at least one of the temperature, humidity and spectrum of the detection object;
[0183] The output data to be corrected of the problematic machine is input into the correction neural network model to obtain the standard output data generated by the correction neural network model, wherein the correction neural network model is used to convert the output data to be corrected of the problematic machine into the standard output data of a standard machine.
[0184] In some embodiments of the present invention, the rectified neural network model includes a convolution module, a batch normalization layer, a dropout layer, a fully connected layer, and a reshape layer; the processor may also be used to implement the following steps:
[0185] Inputting the output data to be corrected of the problematic machine into the correction neural network model to obtain the standard output data generated by the correction neural network model, including:
[0186] Inputting the output data to be corrected of the problematic machine into the convolution module to extract data features of the output data to be corrected;
[0187] Inputting the data features of the output data to be corrected into the batch normalization layer to perform normalization on the data features of the output data to be corrected;
[0188] Inputting the normalized data features of the output data to be corrected into the discard layer to discard invalid data in the data features;
[0189] Inputting the data features after discarding the invalid data into the fully connected layer to fit the data features after discarding the invalid data;
[0190] The fitted data features are input into the shape-changing layer to obtain standard output data corresponding to the standard machine, wherein the number of the standard output data is equal to the number of the output data to be corrected.
[0191] In some embodiments of the present invention, before inputting the output data to be corrected of the problematic machine into the correction neural network model, the processor may also be used to implement the following steps:
[0192] Acquire training sample data, wherein the sample data includes output data to be corrected in the problem machine and standard output data in the standard machine for each of the multiple detection objects;
[0193] Inputting the output data to be corrected in the training sample data into the corrected neural network model to obtain a first output generated by the corrected neural network model;
[0194] Calculating the loss between the first output and the standard output according to a preset loss function;
[0195] The corrected neural network model is trained according to the loss and back propagation algorithm until the output of the corrected neural network model meets the target loss.
[0196] In some embodiments of the present invention, before inputting the training sample data into the rectified neural network model for training, the processor may also be used to implement the following steps:
[0197] Cleaning the training sample data, wherein the cleaning includes: deleting at least one of outliers, deleting invalid values, and filling missing values;
[0198] For the cleaned training sample data, the data identification code is used to match the output data to be corrected and the standard output data of the same detection object one by one.
[0199] In some embodiments of the present invention, after the data identification code is used to match the output data to be corrected and the standard output data of the same detection object one by one, the processor may also be used to implement the following steps:
[0200] Calculating the correlation between the output data to be corrected and the standard output data of the target detection object, wherein the target detection object is any one of the multiple detection objects;
[0201] If the correlation is less than a preset correlation threshold, the output data to be corrected and the standard output data of the target detection object are deleted.
[0202] In some embodiments of the present invention, the processor may also be used to implement the following steps:
[0203] When the parameters of the rectified neural network model are updated according to the loss and back propagation algorithm, the learning rate of the gradient update is optimized using the Adamw optimizer.
[0204] In some embodiments of the present invention, the processor may also be used to implement the following steps:
[0205] Deploy one of the corrected neural network models on each of the n working nodes, and the initialization parameters of the corrected neural network models are the same, wherein n is greater than or equal to 2;
[0206] Dividing the training sample data into n groups of sample data on average;
[0207] Using a set of sample data on each working node, updating the parameters of the corrected neural network model;
[0208] After updating the parameters of the corrected neural network model m times on each working node, n updated corrected neural network models are obtained;
[0209] Calculate the average value of the model parameters of the n updated rectified neural network models;
[0210] The average values of the model parameters are used as the final model parameters of the corrected neural network model.
[0211] It is understandable that when the processor in the computer device described above executes the computer program, it can also implement the functions of the various units in the above-mentioned corresponding device embodiments, which will not be repeated here. Exemplarily, the computer program can be divided into one or more modules / units, and the one or more modules / units are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments that can perform specific functions, and the instruction segments are used to describe the execution process of the computer program in the correction device of the problem machine. For example, the computer program can be divided into the various units in the correction device of the above-mentioned problem machine, and each unit can implement the specific functions described in the correction device of the corresponding problem machine.
[0212] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The computer device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that a processor and a memory are merely examples of computer devices and do not constitute a limitation of the computer device. The computer device may include more or fewer components, or a combination of certain components, or different components. For example, the computer device may also include input and output devices, network access devices, buses, and the like.
[0213] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the computer device, and uses various interfaces and lines to connect various parts of the entire computer device.
[0214] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the computer device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the terminal, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0215] The present invention also provides a computer-readable storage medium, which is used to implement the function of the correction device of the problem machine, and stores a computer program thereon. When the computer program is executed by a processor, the processor can be used to perform the following steps:
[0216] Acquire output data to be corrected of the problematic machine, wherein the output data to be corrected includes at least one of the temperature, humidity and spectrum of the detection object;
[0217] The output data to be corrected of the problematic machine is input into the correction neural network model to obtain the standard output data generated by the correction neural network model, wherein the correction neural network model is used to convert the output data to be corrected of the problematic machine into the standard output data of a standard machine.
[0218] In some embodiments of the present invention, the rectified neural network model includes a convolution module, a batch normalization layer, a dropout layer, a fully connected layer, and a reshape layer. When the computer program is executed by a processor, the processor can also be used to implement the following steps:
[0219] Inputting the output data to be corrected of the problematic machine into the correction neural network model to obtain the standard output data generated by the correction neural network model, including:
[0220] Inputting the output data to be corrected of the problematic machine into the convolution module to extract data features of the output data to be corrected;
[0221] Inputting the data features of the output data to be corrected into the batch normalization layer to perform normalization on the data features of the output data to be corrected;
[0222] Inputting the normalized data features of the output data to be corrected into the discard layer to discard invalid data in the data features;
[0223] Inputting the data features after discarding the invalid data into the fully connected layer to fit the data features after discarding the invalid data;
[0224] The fitted data features are input into the shape-changing layer to obtain standard output data corresponding to the standard machine, wherein the number of the standard output data is equal to the number of the output data to be corrected.
[0225] In some embodiments of the present invention, before the output data to be corrected of the problematic machine is input into the correction neural network model, when the computer program is executed by the processor, the processor may also be used to implement the following steps:
[0226] Acquire training sample data, wherein the sample data includes output data to be corrected in the problem machine and standard output data in the standard machine for each of the multiple detection objects;
[0227] Inputting the output data to be corrected in the training sample data into the corrected neural network model to obtain a first output generated by the corrected neural network model;
[0228] Calculating the loss between the first output and the standard output according to a preset loss function;
[0229] The corrected neural network model is trained according to the loss and back propagation algorithm until the output of the corrected neural network model meets the target loss.
[0230] In some embodiments of the present invention, before the training sample data is input into the rectified neural network model for training, when the computer program is executed by the processor, the processor may also be used to implement the following steps:
[0231] Cleaning the training sample data, wherein the cleaning includes: deleting at least one of outliers, deleting invalid values, and filling missing values;
[0232] For the cleaned training sample data, the data identification code is used to match the output data to be corrected and the standard output data of the same detection object one by one.
[0233] In some embodiments of the present invention, after the data identification code is used to match the output data to be corrected and the standard output data of the same detection object one by one, when the computer program is executed by the processor, the processor may also be used to implement the following steps:
[0234] Calculating the correlation between the output data to be corrected and the standard output data of the target detection object, wherein the target detection object is any one of the multiple detection objects;
[0235] If the correlation is less than a preset correlation threshold, the output data to be corrected and the standard output data of the target detection object are deleted.
[0236] In some embodiments of the present invention, when the computer program is executed by a processor, the processor may also be used to implement the following steps:
[0237] When the parameters of the rectified neural network model are updated according to the loss and back propagation algorithm, the learning rate of the gradient update is optimized using the Adamw optimizer.
[0238] In some embodiments of the present invention, when the computer program is executed by a processor, the processor may also be used to implement the following steps:
[0239] Deploy one of the corrected neural network models on each of the n working nodes, and the initialization parameters of the corrected neural network models are the same, wherein n is greater than or equal to 2;
[0240] Dividing the training sample data into n groups of sample data on average;
[0241] Using a set of sample data on each working node, updating the parameters of the corrected neural network model;
[0242] After updating the parameters of the corrected neural network model m times on each working node, n updated corrected neural network models are obtained;
[0243] Calculate the average value of the model parameters of the n updated rectified neural network models;
[0244] The average values of the model parameters are used as the final model parameters of the corrected neural network model.
[0245] It is understandable that if the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a corresponding computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned corresponding embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0246] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0247] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0248] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0249] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0250] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for correcting a problem machine, characterized in that: include: Acquire output data to be corrected of the problematic machine, wherein the output data to be corrected includes at least one of the temperature, humidity and spectrum of the detection object; The output data to be corrected of the problematic machine is input into the correction neural network model to obtain the standard output data generated by the correction neural network model, wherein the correction neural network model is used to convert the output data to be corrected of the problematic machine into the standard output data of a standard machine.
2. The method according to claim 1, characterized in that The rectified neural network model includes a convolution module, a batch normalization layer, a dropout layer, a fully connected layer, and a reshape layer; Inputting the output data to be corrected of the problematic machine into the correction neural network model to obtain the standard output data generated by the correction neural network model, including: Inputting the output data to be corrected of the problematic machine into the convolution module to extract data features of the output data to be corrected; Inputting the data features of the output data to be corrected into the batch normalization layer to perform normalization on the data features of the output data to be corrected; Inputting the normalized data features of the output data to be corrected into the discard layer to discard invalid data in the data features; Inputting the data features after discarding the invalid data into the fully connected layer to fit the data features after discarding the invalid data; The fitted data features are input into the shape-changing layer to obtain standard output data corresponding to the standard machine, wherein the number of the standard output data is equal to the number of the output data to be corrected.
3. The method according to claim 1, characterized in that Before inputting the output data to be corrected of the problematic machine into the correction neural network model, the method further includes: Acquire training sample data, wherein the sample data includes output data to be corrected in the problem machine and standard output data in the standard machine for each of the multiple detection objects; Inputting the output data to be corrected in the training sample data into the corrected neural network model to obtain a first output generated by the corrected neural network model; Calculating the loss between the first output and the standard output according to a preset loss function; The corrected neural network model is trained according to the loss and back propagation algorithm until the output of the corrected neural network model meets the target loss.
4. The method according to claim 3, characterized in that Before inputting the training sample data into the rectified neural network model for training, the method further includes: Cleaning the training sample data, wherein the cleaning includes: deleting at least one of outliers, deleting invalid values, and filling missing values; For the cleaned training sample data, the data identification code is used to match the output data to be corrected and the standard output data of the same detection object one by one.
5. The method according to claim 4, characterized in that After the data identification code is used to perform one-to-one matching between the output data to be corrected and the standard output data of the same detection object, the method further includes: Calculating the correlation between the output data to be corrected and the standard output data of the target detection object, wherein the target detection object is any one of the multiple detection objects; If the correlation is less than a preset correlation threshold, the output data to be corrected and the standard output data of the target detection object are deleted.
6. The method according to claim 3, characterized in that The corrected neural network model is trained according to the loss and back propagation algorithm, including: When the parameters of the rectified neural network model are updated according to the loss and back propagation algorithm, the learning rate of the gradient update is optimized using the Adamw optimizer.
7. The method according to claim 3, characterized in that The method further comprises: Deploy one of the corrected neural network models on each of the n working nodes, and the initialization parameters of the corrected neural network models are the same, wherein n is greater than or equal to 2; Dividing the training sample data into n groups of sample data on average; Using a set of sample data on each working node, updating the parameters of the corrected neural network model; After updating the parameters of the corrected neural network model m times on each working node, n updated corrected neural network models are obtained; Calculate the average value of the model parameters of the n updated rectified neural network models; The average values of the model parameters are used as the final model parameters of the corrected neural network model.
8. A correction device for a problematic machine, characterized in that: include: An acquisition unit, used for acquiring output data to be corrected of the problematic machine, wherein the output data to be corrected includes at least one of the temperature, humidity and spectrum of the detection object; A correction unit is used to input the output data to be corrected of the problem machine into the correction neural network model to obtain standard output data generated by the correction neural network model, wherein the correction neural network model is used to convert the output data to be corrected of the problem machine into standard output data of a standard machine.
9. A computer device comprising a processor, characterized in that: When the processor executes the computer program stored in the memory, the processor is used to implement the correction method of the problematic machine according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it is used to implement the correction method of the problematic machine according to any one of claims 1 to 7.