A method for constructing a large sample two-dimensional image dataset of VOC responses
The sliding sampling window technology reconstructs a large sample two-dimensional image dataset from the VOC timing response data, which solves the problem of single sample features and timing correlation damage in traditional methods, realizes the equality of the dataset and rich structural information, and promotes the application of deep learning models in the VOC recognition field.
Patent Information
- Application Number
- CN202310589727.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-24
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2043-05-24
AI Technical Summary
The traditional VOC response sample data set construction method has single sample features and is difficult to obtain on a large scale. The traditional one-dimensional data to two-dimensional image method destroys the timing correlation between data points, limiting the application of convolutional neural networks in the field of VOC recognition.
The sliding sampling window technology is used to continuously resample data from the VOC timing response data at each point and reconstruct it into two-dimensional image sample data. By setting the resampling range and sample length, the sliding sampling window technology is used to continuously resample data points and rearrange data points to build a large sample two-dimensional image dataset.
It significantly reduces labor and time costs, reduces random errors and human factors interference, and the data obtained is balanced and has rich structural information. It is suitable for two-dimensional convolutional neural networks, promoting the application of deep learning models in the field of VOC recognition.
Smart Images

Figure CN116630705B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of VOC identification technology, and in particular to a method for constructing a large sample two-dimensional image data set of VOC responses. Background Art
[0002] Volatile organic compounds (VOCs) are flammable, explosive, and highly irritating. Qualitative and quantitative identification of VOCs is of great significance to human health and production safety. Metal oxide semiconductor (MOS) gas sensors, with their advantages of simple processing, low cost, high sensitivity, and rapid response, are crucial components for VOC detection. Dynamic temperature modulation can significantly improve the cross-sensitivity of semiconductor gas sensors to VOCs and enhance the discrimination between the response patterns of different VOC types and concentrations. By applying a periodically varying heating temperature to the semiconductor gas sensor, the sensor's temporal response to different VOC types and concentrations can be measured under this temperature regime. The type and concentration of the VOC can be determined by the trend and amplitude of the VOC's temporal response curve. The temporal response curves for different VOC types exhibit different trends; however, the temporal response curves for the same VOC type but different concentrations exhibit similar trends, but the amplitude increases with increasing concentration. VOC time series response sample data can be obtained by resampling the VOC time series response data. With the help of the VOC time series response sample data set and machine learning algorithms, a VOC response recognition model can be constructed to achieve intelligent recognition of VOC types and concentrations.
[0003] With the development of deep learning theory, more and more deep learning models with excellent performance in pattern recognition have been developed. Convolutional neural networks have been widely used in various end-to-end deep learning models due to their efficient feature extraction capabilities. Initially, convolutional neural networks were mainly used to extract image features, but with the deepening of research, people found that convolutional neural networks are also suitable for extracting semantic features and audio features. In particular, two-dimensional convolutional neural networks have been widely used in fields such as image processing and natural language processing. Two-dimensional convolutional neural networks have the following requirements for input data: 1) The number of samples is sufficient to support network training; 2) The samples are rich in features and the sample distribution is balanced; 3) There is structural information between adjacent pixels in the sample data.
[0004] The traditional method for constructing a sample dataset for VOC responses is to extract only one VOC time-series response sample data corresponding to a single-cycle temperature modulation pattern from each VOC time-series response data. The sample features are single and difficult to obtain on a large scale. In order to meet the input data requirements of a two-dimensional convolutional neural network, the VOC time-series response sample data needs to be converted into a two-dimensional image format. However, the traditional method of converting one-dimensional data to two-dimensional images destroys the temporal correlation between data points, resulting in the converted image data being uninterpretable. This severely limits the application of deep learning models such as convolutional neural networks in the field of VOC recognition. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to address the deficiencies of the above-mentioned prior art and provide a method for constructing a large sample two-dimensional image dataset of VOC responses.
[0006] In order to solve the above technical problems, the technical solution adopted by the present invention includes the following process:
[0007] Step 1: Determine the temperature modulation mode of the semiconductor gas sensor, including waveform, duty cycle, maximum current value, maximum voltage value, minimum voltage value, and period T t ;
[0008] Step 2: Based on the temperature modulation mode of step 1, cyclic temperature modulation is performed on the semiconductor gas sensor to obtain a VOC timing response of the semiconductor gas sensor, and the VOC timing response is sampled at a fixed sampling frequency f to obtain VOC timing response data;
[0009] Step 3: Set the resampling range T r and sample length T c , resample the VOC time series response data to obtain VOC time series response sample data;
[0010] Step 3.1: Modulate the cycle T of the temperature mode t Set the resampling range T for the base r , T r With T t The relationship satisfies the following formula:
[0011] T r =nT t
[0012] Where n is the number of temperature modulation mode cycles included in the resampling range;
[0013] Step 3.2: Modulate the cycle T of the mode with temperature t Set the sample length T for the cardinality c , T c With T tThe relationship satisfies the following formula:
[0014] T c =mT t
[0015] Where m is the ratio of the sample length to the temperature modulation mode period, satisfying 0<m<n;
[0016] Step 3.3: Set a sliding sampling window on the time axis of the VOC timing response data. The sampling window width is the sample length T c , the sliding step is one data point, and the VOC time series response data is continuously resampled data point by data point. The sampling window starts from the first data point of the VOC time series response data and slides along the time axis. Each time it slides, all the data points in the sampling window are intercepted as a VOC time series response sample data. Each sample data contains fT c data points, within the resampling range T r Total interception n s VOC time series response sample data, n s Satisfies the following formula:
[0017] n s =(T r -T c )f+1;
[0018] Step 4: Rearrange the data points of each VOC time series response sample data to convert it into two-dimensional image sample data of the VOC response;
[0019] Step 4.1: Define each VOC time series response sample data as a c A one-dimensional matrix D with elements for each data point is as follows:
[0020]
[0021] Among them, d i is the data point of the VOC timing response sample data, i=1,2,3,...,fT c ;
[0022] Step 4.2: Define the two-dimensional image sample data of VOC response as a The two-dimensional matrix V;
[0023] Step 4.3: Based on the elements in the one-dimensional matrix D, obtain the values of each element of the two-dimensional matrix V according to the following correspondence:
[0024] V i,j =D 1,i+j-1 ,
[0025] Among them, V i,j is the element in the i-th row and j-th column of the matrix V; D 1,i+j-1 is the element in the 1st row and the i+j-1th column of the matrix D;
[0026] Each two-dimensional matrix V contains elements, the specific form is as follows:
[0027]
[0028] Among them, d i is the data point of the VOC timing response sample data, i=1,2,3,...,fT c -1; In order to construct the two-dimensional matrix V as The matrix of fT c Data points were discarded;
[0029] Step 4.4: Normalize all element values in the matrix V to [0,1]. The normalization formula is as follows:
[0030]
[0031] Among them, V max and V min are the maximum and minimum values of all sampled data points respectively;
[0032] Step 4.5: Multiply all element values in the matrix V by 255 to obtain the final two-dimensional image sample data of the VOC response;
[0033] Step 5: Consider each concentration of each type of VOC as a category. The VOC recognition task of h types and k concentrations contains a total of h×k VOC categories, with labels of 0, 1, 2, ..., h×k-1. Assign category labels to each two-dimensional image sample data of VOC response according to the type and concentration of VOC, and summarize them to form a large sample two-dimensional image dataset of VOC responses.
[0034] The beneficial effects of adopting the above technical solution are: the present invention provides a method for constructing a large-sample two-dimensional image dataset of VOC response, which uses a sliding sampling window technology to continuously resample the VOC time series response data point by data point to obtain a large-sample dataset of VOC time series response. Compared with the current method, it has the following advantages: 1) Compared with the traditional method of constructing a sample dataset of VOC response, the present invention obtains a large-sample dataset of VOC response by continuously resampling data point by data point, which can significantly reduce manpower and time costs and effectively reduce the interference of random errors and human factors on sample data; 2) The obtained VOC time series response sample data are evenly distributed and the time series response sample data of VOC of different types and concentrations show significant differences. By rearranging the data points of the VOC time-series response sample data, it is converted from a one-dimensional form into a two-dimensional image form suitable for a two-dimensional convolutional neural network, and then aggregated to form a large sample two-dimensional image dataset of VOC responses. Compared with the traditional method of converting one-dimensional data into two-dimensional images, the method of rearranging the sample data points proposed in the present invention is simpler and more effective. Each pixel in the obtained two-dimensional image sample data of the VOC response has a temporal correlation with the pixels around it, which greatly enriches the structural information of the two-dimensional image sample data of the VOC response. The present invention provides favorable conditions for the application of deep learning models such as convolutional neural networks in the field of VOC recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 Constructing a flow chart for a large sample 2D image dataset of VOC responses in an example of the present invention;
[0036] Figure 2 This is the temperature modulation mode of the ZnO gas sensor in the example of the present invention;
[0037] Figure 3 The time series response data of the ZnO gas sensor in the present invention to 5 VOCs at 300 ppm under cyclic temperature modulation: (a) ethanol, (b) ether, (c) acetone, (d) butanone, and (e) phenylethylamine;
[0038] Figure 4 A schematic diagram of resampling VOC time series response data to obtain VOC time series response sample data using a sliding sampling window technique in an example of the present invention;
[0039] Figure 5 The first, 50th, 100th, and 150th VOC time series response sample data are extracted from the time series response data of five VOCs at 300 ppm in the present invention: (a) ethanol, (b) ether, (c) acetone, (d) butanone, and (e) phenylethylamine.
[0040] Figure 6Part of the two-dimensional image sample data of VOC response converted from the VOC time-series response sample data of 300 ppm ethanol in an example of the present invention: (a) the first two-dimensional image sample data, (b) the 50th two-dimensional image sample data, (c) the 100th two-dimensional image sample data, and (d) the 150th two-dimensional image sample data; DETAILED DESCRIPTION
[0041] The following embodiments of the present invention are described in further detail with reference to the accompanying drawings and examples. The following examples are used to illustrate the present invention but are not intended to limit the scope of the present invention.
[0042] In this embodiment, VOC is exemplified by 300ppm of ethanol, ether, acetone, butanone and phenylethylamine gases, and semiconductor gas sensors are exemplified by ZnO gas sensors. Figure 1 As shown, the specific process includes:
[0043] Step 1: Determine the temperature modulation mode of the semiconductor gas sensor, such as Figure 2 As shown, the temperature modulation mode parameters of the ZnO gas sensor are determined as follows: rectangular wave, period T t 40s, maximum current 1A, minimum voltage 2V, maximum voltage 5V, duty cycle 50%;
[0044] Step 2: Based on the temperature modulation mode of step 1, cyclic temperature modulation is performed on the semiconductor gas sensor to obtain a VOC timing response of the semiconductor gas sensor, and the VOC timing response is sampled at a fixed sampling frequency f to obtain VOC timing response data;
[0045] In this embodiment, a temperature modulation voltage is continuously applied to the ZnO gas sensor for 4 cycles. The timing responses of the ZnO gas sensor to 300 ppm of ethanol, ether, acetone, butanone, and phenylethylamine gases are obtained under cyclic temperature modulation. The VOC timing responses are sampled at a sampling frequency of 5 Hz to obtain VOC timing response data, as shown in FIG. Figure 3 As shown;
[0046] Step 3: Set the resampling range T r and sample length T c , resample the VOC time series response data to obtain VOC time series response sample data;
[0047] Step 3.1: Modulate the cycle T of the temperature mode t Set the resampling range T for the base r , T r With T t The relationship satisfies the following formula:
[0048] Tr =nT t
[0049] Where n is the number of temperature modulation mode cycles included in the resampling range;
[0050] Step 3.2: Modulate the cycle T of the mode with temperature t Set the sample length T for the cardinality c , T c With T t The relationship satisfies the following formula:
[0051] T c =mT t
[0052] Where m is the ratio of the sample length to the temperature modulation mode period, satisfying 0<m<n;
[0053] Step 3.3: Set a sliding sampling window on the time axis of the VOC timing response data. The sampling window width is the sample length T c , the sliding step is one data point, and the VOC time series response data is continuously resampled data point by data point. The sampling window starts from the first data point of the VOC time series response data and slides along the time axis. Each time it slides, all the data points in the sampling window are intercepted as a VOC time series response sample data. Each sample data contains fT c data points, within the resampling range T r Total interception n s VOC time series response sample data, n s Satisfies the following formula:
[0054] n s =(T r -T c )f+1
[0055] In this embodiment, the resampling range T r Set to 4T t , sample length T c Set to T t , in 4T t Within the resampling range, with a width of T t The sliding sampling window of is used to continuously resample the time series response data of 300ppm ethanol, ether, acetone, butanone and phenylethylamine gases obtained in step 2 point by point to obtain VOC time series response sample data. Each sample data contains 200 sampling points. For each VOC, 601 VOC time series response sample data can be obtained. For the five VOCs, a total of 3005 VOC time series response sample data can be obtained. The resampling process is as follows: Figure 4 As shown, some VOC timing response sample data are as follows Figure 5 As shown;
[0056] Step 4: Rearrange the data points of each VOC time series response sample data to convert it into two-dimensional image sample data of the VOC response;
[0057] Step 4.1: Define each VOC time series response sample data as a c A one-dimensional matrix D with elements for each data point is as follows:
[0058] D 1×fTc =[d1,d2,d3,...,d fTc ]
[0059] Among them, d i is the data point of the VOC timing response sample data, i=1,2,3,...,fT c ;
[0060] Step 4.2: Define the two-dimensional image sample data of VOC response as a The two-dimensional matrix V;
[0061] Step 4.3: Based on the elements in the one-dimensional matrix D, obtain the values of each element of the two-dimensional matrix V according to the following correspondence:
[0062] V i,j =D 1,i+j-1 ,
[0063] Among them, V i,j is the element in the i-th row and j-th column of the matrix V; D 1,i+j-1 is the element in the 1st row and the i+j-1th column of the matrix D;
[0064] Each two-dimensional matrix V contains elements, the specific form is as follows:
[0065]
[0066] Among them, d i is the data point of the VOC timing response sample data, i=1,2,3,...,fT c -1; In order to construct the two-dimensional matrix V as The matrix of fT c Data points were discarded;
[0067] In this embodiment, the one-dimensional matrix D corresponding to each VOC time series response sample data contains a total of 200 elements, and the specific form is as follows:
[0068] D 1×200=[d1,d2,d3,...,d 200 ]
[0069] Among them, d i is the data point of the VOC timing response sample data, i=1,2,3,...,200;
[0070] The two-dimensional image sample data of the VOC response is defined as a 100×100 two-dimensional matrix V. Each two-dimensional matrix V contains a total of 10,000 elements. The specific form is as follows:
[0071]
[0072] Among them, d i is the data point of the VOC time series response sample data, i = 1, 2, 3, ..., 199; the 200th data point is discarded;
[0073] Step 4.4: Normalize all element values in the matrix V to [0,1]. The normalization formula is as follows:
[0074]
[0075] Among them, V max and V min are the maximum and minimum values of all sampled data points respectively;
[0076] Step 4.5: Multiply all element values in the matrix V by 255 to obtain the final two-dimensional image sample data of the VOC response;
[0077] In this embodiment, the two-dimensional image sample data of the VOC response of some 300ppm ethanol, ether, acetone, butanone and phenylethylamine gases are as follows: Figure 6 shown.
[0078] Step 5: Consider each concentration of each type of VOC as a category. The VOC recognition task of h types and k concentrations contains a total of h×k VOC categories, with labels of 0, 1, 2, ..., h×k-1. Assign category labels to each two-dimensional image sample data of VOC response according to the type and concentration of VOC, and summarize them to form a large sample two-dimensional image dataset of VOC responses.
[0079] In this example, the gas recognition task of 300 ppm ethanol, ether, acetone, butanone, and phenylethylamine includes five VOC categories. After assigning category labels to the two-dimensional image sample data of each VOC category, they are aggregated into a large sample two-dimensional image dataset of these five VOC categories. The label format is shown in Table 1.
[0080] Table 1 Category labels of two-dimensional image sample data of five VOC responses
[0081]
[0082] In summary, the method of this embodiment mainly realizes a method for constructing a large-sample two-dimensional image dataset of VOC response. First, the sliding sampling window technology is used to continuously resample the VOC time series response data point by data point to obtain large-sample data of VOC time series response, which can significantly reduce manpower and time costs and effectively reduce the interference of random errors and human factors on the sample data; the obtained VOC time series response sample data are evenly distributed and the VOC time series response sample data of different types and concentrations show significant differences. Then, by rearranging the data points of the VOC time series response sample data, it is converted into a two-dimensional image form, which is simpler and more effective than the traditional method of converting one-dimensional data to two-dimensional image. Each pixel point in the obtained two-dimensional image sample data of VOC response has a time series correlation with the pixel points around it, which greatly enriches the structural information of the two-dimensional image sample data of VOC response. The method for constructing a large-sample two-dimensional image dataset of VOC response proposed in the present invention provides favorable conditions for the application of deep learning models such as convolutional neural networks in the field of VOC recognition.
[0083] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some or all of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope defined by the claims of the present invention.
Claims
1. A method for constructing a large sample two-dimensional image dataset of VOC responses, characterized by: The steps include: Step 1: Determine the temperature modulation mode of the semiconductor gas sensor, including waveform, duty cycle, maximum current value, maximum voltage value, minimum voltage value, and period T t ; Step 2: Based on the temperature modulation mode described in step 1, cyclic temperature modulation is performed on the semiconductor gas sensor to obtain a VOC timing response of the semiconductor gas sensor, and the VOC timing response is sampled at a fixed sampling frequency f to obtain VOC timing response data; Step 3: Set the resampling range T r and sample length T c , resample the VOC time series response data in step 2 to obtain VOC time series response sample data; Step 3.1: Modulate the cycle T of the temperature mode t Set the resampling range T for the base r ; The resampling range T r With the period T of the temperature modulation mode t The relationship satisfies: T r =nT t Where n is the number of temperature modulation mode cycles included in the resampling range; Step 3.2: Modulate the cycle T of the mode with temperature t Set the sample length T for the cardinality c ; The sample length T c With the period T of the temperature modulation mode t The relationship satisfies: T c =mT t Where m is the ratio of the sample length to the temperature modulation mode period, satisfying 0<m<n; Step 3.3: Set a sliding sampling window on the time axis of the VOC timing response data. The sampling window width is the sample length T c , the sliding step is one data point, and the VOC time series response data is continuously resampled data point by data point. The sampling window starts from the first data point of the VOC time series response data and slides along the time axis. Each time it slides, all data points in the sampling window are intercepted as a VOC time series response sample data; Each piece of VOC time series response sample data includes fT c data points, within the resampling range T r A total of n s VOC time series response sample data, n s satisfy: n s =(T r -T c )f+1 Step 4: Rearrange the data points of the VOC time series response sample data in step 3 to convert it into two-dimensional image sample data of the VOC response; Step 4.1: Define each VOC time series response sample data as a c One-dimensional matrix D of elements, where each matrix element is one data point; The specific form of the one-dimensional matrix D is as follows: Among them, d i is the data point of the VOC timing response sample data, i=1,2,3,...,fT c ; Step 4.2: Define the two-dimensional image sample data of VOC response as a The two-dimensional matrix V; Step 4.3: Based on the elements in the one-dimensional matrix D, obtain the values of each element of the two-dimensional matrix V according to the corresponding relationship; The corresponding relationship between the element values of the two-dimensional matrix V and the element values of the one-dimensional matrix D is as follows: V i,j =D 1,i+j-1 , Among them, V i,j is the element in the i-th row and j-th column of the matrix V; D 1,i+j-1 is the element in the 1st row and the i+j-1th column of the matrix D; The two-dimensional matrix V contains elements, the specific form is as follows: Among them, d i is the data point of the VOC timing response sample data, i=1,2,3,...,fT c -1; discard the first fT c data points; Step 4.4: Normalize all element values in the matrix V to [0,1]. The normalization formula is as follows: Among them, V max and V min are the maximum and minimum values of all sampled data points respectively; Step 4.5: Multiply all element values in the matrix V by 255 to obtain the final two-dimensional image sample data of the VOC response; Step 5: Consider each concentration of each type of VOC as a category. The VOC recognition task of h types and k concentrations contains a total of h×k VOC categories, with labels of 0, 1, 2, ..., h×k-1, respectively. Assign category labels to the two-dimensional image sample data of the VOC response described in step 4 according to the type and concentration of the VOC, and summarize them to form a large sample two-dimensional image dataset of VOC responses.
Citation Information
Patent Citations
Bioelectric signal classification method based on time-frequency transformation and data enhancement technology
CN111449644A
Gas detection model training method and device based on electronic nose, medium and equipment
CN115984624A