A method for calculating the time of gas chromatograph by multi-eigenvalue-gru algorithm
By using the multi-eigenvalue-GRU algorithm to collect gas chromatograph data with a scientific instrument current sensor, and performing feature value extraction and model training, the accuracy and management efficiency problems of gas chromatograph current data analysis in existing technologies are solved, and efficient operation status prediction and machine time statistics are achieved.
Patent Information
- Application Number
- CN202211428284.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-15
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2042-11-15
AI Technical Summary
The current methods for recording the usage of scientific instruments are mainly indirect, resulting in significant discrepancies between the data and the actual situation. There is a lack of effective management and analysis methods, especially for the analysis of current data from gas chromatographs, which lacks specificity and accuracy.
The multi-feature-GRU algorithm is adopted to collect current data of gas chromatograph through scientific instrument current sensor, perform data labeling and feature value extraction, train GRU network model to generate model file, and realize automated operation status prediction and machine time statistics.
It enables accurate prediction of the operating status and machine time statistics of scientific instruments such as gas chromatographs, reduces model training costs, and improves the accuracy of current data classification and the efficiency of automated management.
Smart Images

Figure CN116049729B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of data analysis, and particularly relates to a gas chromatograph machine time calculation method based on a multi-characteristic value-GRU algorithm. BACKGROUND
[0002] Scientific instruments are the eyes of scientists and the bright pearl of high-end manufacturing industry. In the process of scientific research, two main demands are faced, one is method and the other is scientific instrument. Without matching scientific instruments, scientific methods can only stay at the theoretical level and cannot be proved through experiments. With the attention of the state to university scientific research, the investment in scientific instruments of universities is also increasing. According to the statistics of the Ministry of Education on the development of national education, the total value of scientific instruments and equipment in universities has been growing for nearly ten years, reaching 1228.83 billion yuan in 2020. Such a large number of scientific instruments brings a big problem, that is, how to manage them and record their use. Through scientific management methods, the maximum value of scientific instruments can be brought, so the management of scientific instruments needs to be reformed.
[0003] At present, except for some extremely precise scientific instruments that have the function of recording use, the main recording method is still indirect recording, such as recording the use time of teachers and students or the use time of the laboratory. This kind of method is divorced from the scientific instrument itself, and the recorded data is quite different from the real situation, so the actual value is not great.
[0004] Therefore, on the basis of obtaining the current data of scientific instruments through current sensors, targeted data analysis can obtain more accurate running conditions of scientific instruments themselves. For this kind of data analysis method, clustering algorithm or classification algorithm is often used for data analysis, and this analysis process is often a special analysis based on a single scientific instrument, which often has limitations. In actual use of scientific instruments, they can often be divided into several categories, and each category has similar instrument structure, use steps and running conditions, that is, this kind of scientific instrument has the same current data rule. Then a classification discussion can be carried out, and a running analysis model of the scientific instrument of this category can be obtained based on the analysis of a category of scientific instruments, so as to reduce the cost of model training and improve the accuracy of current data classification. SUMMARY
[0005] In order to solve the above problems, the present application provides a method for calculating the machine time of a gas chromatograph based on a multi-feature value-GRU algorithm. The current data of the gas chromatograph is collected by a scientific instrument current sensor. The current data of the gas chromatograph is labeled, and each feature value and combination is extracted as a training sample. The GRU algorithm structure is used for model training. Finally, according to the actual accuracy, the feature value type combination and algorithm model of the gas chromatograph are determined. After obtaining the above algorithm model, the specific feature value combination is calculated by loading the algorithm model, and the automatic operation state prediction can be realized, and the corresponding machine time data can be calculated.
[0006] To achieve the above purpose, the method comprises the following steps:
[0007] A, data set establishment:
[0008] A-1, obtaining complete running current data of a plurality of gas chromatograph scientific instruments from a scientific instrument management system.
[0009] A-2, generating an initial sample set, and labeling each current data point in A-1.
[0010] B, GRU network model training for multi-feature values of gas chromatograph scientific instruments:
[0011] B-1, first, according to the preset window, the current data is divided, and the feature value is extracted, and the data characteristics of the time sequence current data are found. According to the preset feature value combination K t , and the current data sequence S t of the window size is composed, and the label L t of the current data point is mapped, and the sample set Sample t of this moment is generated.
[0012] The feature value includes a position feature value and a discrete feature value.
[0013] B-2, the sample set generated in B-1 is shuffled and randomly selected, and is divided into a training set and a test set.
[0014] B-3, building a GRU network model.
[0015] B-4, setting an optimization function, a loss function and a verification function, training the GRU network model built in B-3, and saving.
[0016] The optimization function adopts NAdam, that is, the combination of NAG algorithm and Adam, the loss function adopts Cross-Entropy function for multi-classification, the verification function compares the true results and test results of the whole test set, and finally the overall accuracy is obtained.
[0017] C, the running state prediction and machine time statistics of the gas chromatograph type scientific instrument:
[0018] C-1, obtain current data.
[0019] C-2, the current data is divided according to the preset window, and the corresponding characteristic value is extracted.
[0020] C-3, through the GRU network model saved by B-4, the current data sequence of each time is predicted, and state mapping is performed.
[0021] C-4, according to the prediction result, classification statistics is carried out, the time of different states is counted, and the corresponding machine time data is counted.
[0022] The present application has the beneficial effects: in the present application, the complete running current data of the gas chromatograph type scientific instrument is first obtained, and the state label is carried out according to the actual situation, the feature values such as average value, median, range and coefficient of variation are extracted according to the preset window size, the feature value combination is carried out, and finally the corresponding model file is generated through the GRU algorithm structure. Subsequently, only the corresponding running current data needs to be input, the same current data division and feature value extraction are carried out, the running state prediction can be carried out, and the corresponding machine time condition can be obtained on this basis, and the accurate use condition of the scientific instrument is obtained. After sufficient and complete data training, manual classification is not required, and the present application has certain engineering value. BRIEF DESCRIPTION OF DRAWINGS
[0023] Figure 1 is part of the running current data of the gas chromatograph type scientific instrument;
[0024] Figure 2 is a classical gas chromatograph type scientific instrument structure diagram;
[0025] Figure 3 is a complete flow chart of data preprocessing and model training;
[0026] Figure 4 is a complete flow chart of running state prediction and machine time statistics;
[0027] Figure 5 is a GRU algorithm structure diagram. DETAILED DESCRIPTION
[0028] To make the objectives, technical solutions and advantages of the present invention clearer, a further detailed description will be provided below in conjunction with the accompanying drawings and examples. In the following text, the unit for describing the magnitude of current is (A) ampere.
[0029] like Figure 2 As shown, a gas chromatograph (GC) is a scientific instrument mainly composed of a carrier gas system, an injection system, a detection system, a recording system, and a chromatographic column. In practical use, the sample vaporizes and enters the chromatographic column via the carrier gas. The components travel at different speeds within the column, and after a certain column length, they are separated and sequentially enter the detector. The resulting ion current is amplified and displayed as chromatographic peaks on the recorder. Observations show that most gas chromatographs operate similarly, with the separation system being the primary operating system during separation. The instrument operates intensely, resulting in significant current fluctuations. However, different models will have different operating current magnitudes. Therefore, a GRU algorithm combined with eigenvalue combinations can be used to train a targeted model for gas chromatographs, finding eigenvalue combinations that match the characteristics of their operating current data.
[0030] The present invention is based on a large amount of current data collected by a current sensor in a scientific instrument. The specific steps are as follows:
[0031] A. Dataset creation:
[0032] A-1. Obtain complete operating current data for multiple gas chromatographs from the scientific instrument management system.
[0033] A-2. Generate an initial sample set and label each current data point in A-1.
[0034] like Figure 3 As shown, in step A-1, the current data is manually extracted to ensure that the data is sufficient and complete, including typical operating cycles, and there are obvious differences between different states.
[0035] In step A-2, based on the current data obtained in A-1, the current data of each liquid chromatograph is labeled according to the actual situation.
[0036] like Figure 1As shown, the current data of a certain gas chromatograph is S = {0.00, 0.00, 0.00, 0.01, 0.01, 0.02, 0.00, 0.67, 0.37, 0.63, 0.41, 0.31, 1.34, 1.24, 1.18, 1.34, 0.67, 0.67}, and after the processing of A-2 above, the corresponding label set C = {0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}.
[0037] B. GRU network model training for multiple feature values of gas chromatograph type scientific instruments, mainly including the following three steps:
[0038] B-1. Current data is divided according to the preset window, and the corresponding feature values are extracted.
[0039] B-2. Randomly divide the sample set into a training set and a test set.
[0040] B-3. Build a GRU network model.
[0041] B-4. Set the optimization function, loss function and evaluation function, train the GRU network model built in B-3, and save.
[0042] In step B-1, first, the current data is divided according to the preset window, and the feature values are extracted to find the data characteristics of the time series current data. According to the preset feature value combination K t , and the current data sequence S t of the window size is mapped with the label L t of the current data point to generate the sample set Sample t at this moment. The feature values include:
[0043] (1) Position feature value
[0044] Average value Average size of data in the window. Where n is the number of samples, X i is the i-th current data.
[0045]
[0046] Median Overall average level of data in the window. Where n is the number of samples, X n / 2 is the middle current data when n is odd, and (X n / 2 + X n+1 / 2 ) / 2 is the average value of the middle current data when n is even.
[0047]
[0048] Median, the maximum value X of data in the window max and the minimum value X min of the average value.
[0049]
[0050] (2) Discrete characteristic value
[0051] Range R, the absolute value of the difference between the maximum value X of data in the window max and the minimum value X min .
[0052] R = |X max - X min |
[0053] Deviation square sum S, the square sum of the difference between the data in the window and the average value .
[0054]
[0055] Unbiased deviation s 2 , the average value of the deviation square sum S of the data in the window.
[0056]
[0057] Standard deviation s, the square root of the unbiased deviation s 2 of the data in the window.
[0058]
[0059] Coefficient of variation C v , the ratio of the standard deviation s of the data in the window and the average value .
[0060]
[0061] Finally, the sample set at this moment is:
[0062] Sample k = [{S K , K1 t , K2 t …}, L t ]
[0063] Where the current data sequence S t is connected with the data before the time of the current i t at the moment t. If the current data before t is less than the window size w, then the current at t is copied until the size of the current sequence S t at t reaches the window size w.
[0064] S t ={i t-w ,i t-w+1 ,…,i t-1 ,i t}
[0065] where K1 t ,K2 t …,is the feature value combination at time t, L t is the data label at time t.
[0066] Then the final sample set Seq is:
[0067] Seq={Sample0,Sample1,Sample2,…,Sample n-1 ,Sample n}
[0068] In step B-2, for the sample set Seq generated in B-1, shuffle and randomly select, finally determine 80% of the data amount as the training set, and 20% of the data amount as the test set.
[0069] In step B-3, the GRU network model, the specific structure is shown in Figure 5 , mainly including update gate and reset gate, the specific formula is as follows:
[0070] Update gate is responsible for how much state information at previous time affects the current time state, controls the previous time state information h t-1 , the greater the value indicates the greater the influence of the previous time state information h t-1 . W z is the weight, x t is the current time input, and is passed through the sigmoid activation function σ(·).
[0071] z t =σ(W z ·[h t-1 ,x t ])
[0072] Reset gate is responsible for combining the current input with the previous memory, controls the degree of ignoring the previous time state information h t-1 , the smaller the value indicates the more ignored, the less affected. W r is the weight, x t is the current time input, and is passed through the sigmoid activation function.
[0073] r t =σ(W r ·[h t-1 ,x t ])
[0074] candidate hidden layer, by resetting gate r t with the state information h t-1 convolution is performed, and the candidate data is recorded to the current hidden state, and saved t concatenation is performed, and the tanh activation function is passed through.
[0075]
[0076] output information, through z t control how much information is forgotten from the hidden layer h t-1 of the previous sequence, and how much hidden layer information of the current sequence is added
[0077]
[0078] In step B-4, the optimization function is responsible for adjusting the parameters of each gate of GRU, the loss function is responsible for making the predicted value tend to the true value, and the evaluation function is responsible for completing the test set accuracy after training.
[0079] The optimization function uses NAdam, which is a combination of NAG algorithm and Adam. The parameter meanings are as follows, the gradient g t at time t, Loss is the loss, the exponential decay rate of the matrix β, the first order momentum of the gradient m t , the second order momentum of the gradient v t , the learning rate is α, the parameter to be updated θ t , and since numerical stability needs to be maintained, an additional constant ∈ needs to be added.
[0080]
[0081] m t = β1m t-1 + (1-β1)g t
[0082] v t = β2v t-1 + (1-β2)g t 2
[0083]
[0084]
[0085]
[0086] The loss function uses the Cross-Entropy function for multi-classification, which obtains the difference between the predicted result and the true result y.
[0087]
[0088] The verification function compares the actual results and test results for the entire test set to obtain the overall accuracy R (∈[0,1]). Here, N is the total number of test sets, TW is the number of accurately predicted states as working, TS is the number of accurately predicted states as working, and TN is the number of accurately predicted states as shut down.
[0089]
[0090] C. Steps for predicting the operating status and calculating machine time for gas chromatographs and similar scientific instruments:
[0091] C-1, Obtain current data.
[0092] C-2. Segment the current data according to the preset window and extract the corresponding feature values.
[0093] C-3. Using the GRU network model saved in B-4, predict the current sequence at each time step and perform state mapping.
[0094] C-4. Based on the prediction results, compile the corresponding machine time data.
[0095] like Figure 4 As shown, in step C-2, the current data is segmented according to the preset window and feature values are extracted. The window size is consistent with the size during training, and the feature value combination is consistent with the combination during training.
[0096] In step C-3, prediction is performed using the GRU network model to obtain the predicted results of the current sequence at time t, and then mapped to the current sequence at time t.
[0097] In step C-4, based on the prediction results of step C-3, classification statistics are performed to determine the time of different states, and finally the usage time of the scientific instrument can be obtained.
[0098] As can be seen from the actual training results in Table 1, the results of not extracting feature values from the sample set are not good, and there are significant differences between different combinations of feature values. Specifically, the prediction results of feature value combinations including the sum of squared deviations (S) are all unsatisfactory, which is due to the drastically different operating currents of different gas chromatographs; while the prediction results of feature value combinations including the coefficient of variation (C) are also unsatisfactory. v The eigenvalue combination prediction results are relatively good because the coefficient of variation represents the degree of dispersion of a certain data segment after eliminating scale and dimensions, thus unifying the dispersion of different states of different gas chromatographs. Furthermore, using the coefficient of variation C... v Add average value to the main eigenvalue combination Or the range R can make the prediction better. However, in the characteristic value combination dominated by the coefficient of variation C v There is also the problem of overfitting, that is, there is a certain gap between the prediction results of the training set and the prediction results of the test set, so it is necessary to select more stable, accurate and smaller gap characteristic value combination. In summary, it can be seen that the GRU algorithm for gas chromatograph scientific instruments can select the characteristic value combination of the coefficient of variation C v , standard deviation s and average value .
[0099] Table 1
[0100]
[0101] So far, a gas chromatograph machine time calculation method of multi-characteristic value-GRU algorithm is realized. The running data current of the classical gas chromatograph scientific instrument is obtained first, and the state label is performed, the current data sequence is cut according to the window size, and the characteristic value is obtained, the sample set is generated, and the training set and the test set are randomly generated. The model is trained through the GRU algorithm structure, and the best model characteristic value combination and the model file are obtained according to the evaluation function. The current data collected subsequently only needs to be cut into current data sequence and characteristic value extraction according to the preset window size, load the model data for prediction, and the running condition of the gas chromatograph scientific instrument can be obtained.
Claims
1. A method for calculating the retention time of a gas chromatograph using a multi-eigenvalue-GRU algorithm, characterized in that The method comprises the following steps: A, data set establishment; A-1, obtaining complete running current data of a plurality of gas chromatograph scientific instruments from a scientific instrument management system; A-2, generating an initial sample set, and labeling each current data point in A-1; B, GRU network model training for multiple characteristic values of the gas chromatograph scientific instruments; B-1, first, the current data is divided according to a preset window, and the characteristic values are extracted to find the data characteristics of the current data; Based on the preset eigenvalue combination K t and the current data sequence S of that window size t This forms the sample set for that moment, and is associated with the label L of that current data point. t Perform mapping to generate the sample set at that moment. t ; B-2, the sample set generated in B-1 is shuffled and randomly selected, and is divided into a training set and a test set; B-3, building a GRU model; B-4, setting an optimization function, a loss function and a verification function, training the GRU network model built in B-3, and saving; C, running state prediction and machine time statistics for the gas chromatograph scientific instruments; C-1, obtaining current data; C-2, dividing the current data according to a preset window, and extracting corresponding characteristic values; C-3, predicting each time current data sequence through the GRU network model saved in B-4, and performing state mapping; C-4, according to the prediction result, classifying and counting, counting the time of different states, and counting the corresponding machine time data.
2. The method of claim 1, wherein the method is a multi-eigenvalue-GRU algorithm for gas chromatograph machine time calculation. The characteristic values in B-1 include position characteristic values and discrete characteristic values.
3. The method of claim 2, wherein the method is a multi-eigenvalue-GRU algorithm for gas chromatograph machine time calculation. The position characteristic values include mean, median and median value; The discrete characteristic values include range, sum of squared deviations, unbiased deviation, standard deviation and coefficient of variation.
4. The method of claim 1, wherein the method is a method of calculating the retention time of a gas chromatograph using a multi-eigenvalue-GRU algorithm. If the current data before the t time is not enough for the preset window size in B-1, then the current data at the t time is copied until the current data sequence S t size reaches the preset window size.
5. The method of claim 1, wherein: In B-4, the optimization function adopts NAdam, that is, the combination of NAG algorithm and Adam, the loss function adopts Cross-Entropy cross-entropy function for multi-classification, and the verification function compares the true result and the test result of the entire test set to finally obtain the overall accuracy.
6. The method of claim 1, wherein: In C-2, the window size, characteristic value combination and B-1 remain the same.
Citation Information
Patent Citations
Methods and systems for data collection, learning, and streaming of machine signals for analytics and maintenance using the industrial internet of things
CN112703457A
Devices and methods for remotely managing chronic medical conditions
US20200135334A1