Oxygen detection device and detection method
By analyzing the stationarity and feature retention of the oxygen concentration and gas pressure data, the differential order is adaptively selected for differential processing, which solves the problem of inaccurate prediction caused by unreasonable selection of the differential order in the existing oxygen concentration detection method, and achieves More accurate oxygen detection results.
Patent Information
- Application Number
- CN202410676739.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-05-29
AI Technical Summary
The existing oxygen concentration detection methods have unreasonable selection of differential orders during the differential processing, resulting in inaccurate prediction results, insufficient stationarity or loss of features, and increased noise.
By collecting oxygen concentration and gas pressure data, analyzing the degree of data stability and feature retention, adaptively selecting the optimal difference order for differential processing to ensure data stability and feature retention, and using the ARIMA model for prediction.
It achieves more accurate oxygen detection results, avoids insufficient stationarity and loss of features caused by improper selection of the difference order, and improves the accuracy of prediction.
Smart Images

Figure CN118243879B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to an oxygen detection device and a detection method. Background Art
[0002] In practice, oxygen concentration monitoring is crucial in various scenarios, especially when it is necessary to ensure personnel safety and monitor the environment. For example, in some industrial production environments, some processes may consume oxygen, and the oxygen concentration needs to be monitored; in closed spaces, such as pipelines and basements, due to limited space, oxygen concentration may be affected by many factors, so it needs to be monitored; in some environmental protection and ecological research, oxygen concentration monitoring is necessary to assess the quality of water, atmosphere or soil.
[0003] Existing methods often predict and analyze oxygen concentration, thereby predicting the change of oxygen concentration in advance, so as to achieve the purpose of early alarm processing. Among them, when using the differential integrated moving average autoregressive model (ARIMA) to predict and analyze oxygen concentration, in order to increase the stability of the original data, the original data is usually processed by one or more orders of difference. However, in the differential processing process, different differential orders may affect the characteristics of the original data. When the differential order is too small, the stability of the original data is insufficient. When the differential order is too large, it may cause the loss of original data characteristics or increase data noise. Therefore, when using existing methods to predict and analyze oxygen concentration, the unreasonable selection of differential order leads to less accurate prediction results, which in turn makes the oxygen detection results less accurate. Summary of the invention
[0004] In order to solve the technical problem that the oxygen detection results of the existing methods are relatively inaccurate, the purpose of the present invention is to provide an oxygen detection device and a detection method. The technical solutions adopted are as follows:
[0005] In a first aspect, the present invention provides an oxygen detection method, comprising the following steps:
[0006] Collect oxygen concentration data and gas pressure data at each moment in a set number of different time periods to form an oxygen concentration data sequence and a gas pressure data sequence respectively;
[0007] According to the correlation between the data balance and data fluctuation of the oxygen concentration data in every two adjacent time periods, the data stability of the oxygen concentration data sequence is obtained;
[0008] Determine whether to perform differential processing on the oxygen concentration data sequence according to the data stability; if so, perform differential processing on the oxygen concentration data sequence and the gas pressure data sequence respectively to obtain differential concentration data and differential pressure data under different differential orders;
[0009] According to the difference between the change of differential concentration data in each time period under each differential order and the change of each differential pressure data in the same time period, as well as the difference between the change of differential concentration data and the change of differential pressure data in two adjacent time periods, the degree of feature retention under each differential order is obtained;
[0010] Different differential orders are screened according to the degree of data stability and feature retention to determine the optimal differential order, and the oxygen concentration is predicted using the differential concentration data under the optimal differential order;
[0011] The oxygen detection results are obtained according to the prediction results.
[0012] Preferably, the feature retention degree under each differential order is obtained according to the difference between the change of the differential concentration data in each time period under each differential order and the change of each differential pressure data in the same time period, and the difference between the change of the differential concentration data and the change of the differential pressure data in two adjacent time periods, specifically including:
[0013] For any differential order, obtain the slope of each differential concentration data and the slope of each differential pressure data under the differential order;
[0014] The degree of feature retention under the difference order is obtained based on the difference between the slope of the differential concentration data in each time period and the slope of the differential pressure data in the corresponding time period, the difference between the slope of the differential concentration data in each time period and its adjacent time period, and the difference between the slope of the differential pressure data in each time period and its adjacent time period.
[0015] Preferably, the calculation formula for the feature retention degree under the difference order is specifically:
[0016] ;
[0017] in, represents the degree of feature preservation under the rth difference order, Indicates the total number of time periods, represents the mean of the slopes of all differential concentration data in the i-th time period under the r-th differential order, represents the mean value of the slope of all differential pressure data in the i-th time period under the r-th differential order, represents the mean of the slopes of all differential concentration data in the i+1th time period under the rth differential order, represents the mean of the slopes of all differential pressure data in the i-th time period under the r-th differential order, exp( ) represents an exponential function with the natural constant e as the base, and Norm( ) represents a linear normalization function.
[0018] Preferably, obtaining the data stability of the oxygen concentration data sequence according to the correlation between the data balance and data fluctuation of the oxygen concentration data in every two adjacent time periods specifically includes:
[0019] For any two adjacent time periods, the correlation coefficient between the any two adjacent time periods is obtained according to the difference between the mean of all oxygen concentration data in each time period and the mean of all oxygen concentration data in two adjacent time periods, and the variance of all oxygen concentration data in each time period; the mean of the correlation coefficient between every two adjacent time periods is normalized to obtain the data stability of the oxygen concentration data sequence.
[0020] Preferably, the calculation formula for the data stability is specifically:
[0021] ;
[0022] in, Indicates the data stability of the oxygen concentration data series, Indicates the total number of time periods, represents the mean value of all oxygen concentration data in the kth time period, represents the mean value of all oxygen concentration data in the k+1th time period, represents the mean of all oxygen concentration data in the kth time period and the k+1th time period, represents the variance of all oxygen concentration data in the kth time period, represents the variance of all oxygen concentration data in the k+1th time period, is the correlation coefficient between the kth time period and the k+1th time period, and Norm( ) represents the linear normalization function.
[0023] Preferably, judging whether to perform differential processing on the oxygen concentration data sequence according to the data stability specifically includes:
[0024] When the data stability is greater than or equal to a preset judgment threshold, differential processing is not performed on the oxygen concentration data sequence; when the data stability is less than the preset judgment threshold, differential processing can be performed on the oxygen concentration data sequence; the value of the judgment threshold is greater than 0 and less than 1.
[0025] Preferably, the method of screening different difference orders according to the data stability and feature retention to determine the optimal difference order specifically includes:
[0026] Calculate the data stationarity of the differential concentration data at each differential order;
[0027] The differential concentration data under all differential orders whose data stability is greater than or equal to the judgment threshold and whose feature retention is greater than or equal to the minimum value of the differential order corresponding to the preset retention threshold are taken as the optimal differential order.
[0028] Preferably, the method further comprises:
[0029] If the oxygen concentration data sequence is not subjected to differential processing, the oxygen concentration is predicted based on the oxygen concentration data sequence; and the oxygen detection result is obtained based on the prediction result.
[0030] Preferably, the prediction of oxygen concentration using differential concentration data under the optimal differential order is specifically as follows:
[0031] The oxygen concentration is predicted using the differential concentration data under the optimal difference order and the differential integrated moving average autoregressive model.
[0032] In a second aspect, the present invention provides an oxygen detection device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the computer program implements the steps of an oxygen detection method when executed by the processor.
[0033] The embodiments of the present invention have at least the following beneficial effects:
[0034] The present invention first collects oxygen concentration data and gas pressure data, takes into account the correlation between the two, and provides a data basis for the subsequent analysis of data change trends. Then, the correlation between the data balance and data fluctuation of the oxygen concentration data in each two adjacent time periods is analyzed to obtain the data stability of the oxygen concentration data sequence. The data stability reflects the stability of the oxygen concentration data from the change trend of the oxygen concentration data in the adjacent time periods. In order to make the data for predictive analysis more stable, the data stability can be used to determine whether the oxygen concentration data sequence meets the stability requirements and whether it is necessary to perform a part of the stabilization processing on the oxygen concentration data, that is, differential processing. Further, if differential processing is required, the changes in the differential concentration data and the differential pressure data under each differential order are analyzed respectively to obtain the feature retention degree under each differential order, which characterizes the degree to which the differential concentration data of the oxygen concentration data after differential processing under the corresponding differential order retains the original change trend characteristics. Finally, the optimal differential order is determined by combining the data stability and feature retention. This allows the differential concentration data under the optimal differential order to meet the stability requirements while retaining the data change characteristics to the maximum extent, thus realizing the adaptive acquisition operation of the differential order, further making the final prediction results more accurate and obtaining more accurate oxygen detection results. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0036] Figure 1 It is a step flow chart of an oxygen detection method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0037] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of an oxygen detection device and detection method proposed by the present invention, its specific implementation, structure, characteristics and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0038] Unless otherwise defined, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs. The following is a detailed description of a specific scheme of an oxygen detection device and detection method provided by the present invention in conjunction with the accompanying drawings.
[0039] Embodiment 1:
[0040] See also Figure 1 , which shows a flow chart of the steps of an oxygen detection method provided by an embodiment of the present invention, the method comprising the following steps:
[0041] Step 1: Collect oxygen concentration data and gas pressure data at each moment in a set number of different time periods to form an oxygen concentration data sequence and a gas pressure data sequence respectively.
[0042] In this embodiment, the oxygen concentration data and gas pressure data in the laboratory are collected in real time by using sensors, wherein the sensor for collecting oxygen concentration may be an electrochemical sensor, an infrared sensor or a laser absorption spectrum sensor, etc. Thus, the oxygen concentration data and gas pressure data at each moment in each time period can be obtained. In this embodiment, the length of a time period is set to one minute, the time interval between two adjacent moments in each time period is set to 2 seconds, and the value of the set number is set to 100, which can be set by the implementer according to the specific implementation scenario.
[0043] It should be noted that the oxygen concentration data sequence can be obtained by arranging the oxygen concentration data at each moment in a set number of time periods in a time sequence, and the gas pressure data sequence can be obtained by arranging the gas pressure data at each moment in a set number of time periods in a time sequence. It can be understood that this embodiment is described by taking the detection of oxygen in a laboratory as an example. In other embodiments, the implementer can process according to the specific implementation scenario.
[0044] Step 2: According to the correlation between the data balance and data fluctuation of the oxygen concentration data in every two adjacent time periods, the data stability of the oxygen concentration data sequence is obtained.
[0045] To use the ARIMA model to predict and analyze oxygen concentration data, the collected oxygen concentration data needs to be processed for stability. Generally, the collected data is differentially processed to obtain more stable data for prediction and analysis. Considering that the initially collected oxygen concentration data may have a higher stability, there is no need to perform differential processing to obtain more stable data, so the oxygen concentration can be analyzed.
[0046] The data stationarity feature needs to be analyzed by whether the mean, variance, autocorrelation structure, etc. of the oxygen concentration data remain consistent over time, that is, the degree of stationarity of the oxygen concentration data in each time period can be analyzed. The smaller the fluctuation range of the mean of the oxygen concentration data in a time period over time, the higher the data stationarity. Similarly, the smaller the variance of the oxygen concentration data in a time period changes over time, the higher the data stationarity. The closer the data changes in oxygen concentration data in different time periods, the higher the data stationarity of the oxygen concentration data. The higher the data stationarity, the more stable the oxygen concentration data is, and the more predictable the changes are. Therefore, there is no need to use the difference method to process its stationarity.
[0047] Based on this, the data stability of the oxygen concentration data sequence is obtained according to the correlation between the data balance and data fluctuation of the oxygen concentration data in every two adjacent time periods. Specifically, for any two adjacent time periods, the correlation coefficient between the any two adjacent time periods is obtained according to the difference between the mean of all oxygen concentration data in each time period and the mean of all oxygen concentration data in two adjacent time periods, and the variance of all oxygen concentration data in each time period; the mean of all correlation coefficients between every two adjacent time periods is normalized to obtain the data stability of the oxygen concentration data sequence.
[0048] In this embodiment, the calculation formula of the data stability can be expressed as:
[0049] ;
[0050] in, Indicates the data stability of the oxygen concentration data series, Indicates the total number of time periods, represents the mean value of all oxygen concentration data in the kth time period, represents the mean value of all oxygen concentration data in the k+1th time period, represents the mean of all oxygen concentration data in the kth time period and the k+1th time period, represents the variance of all oxygen concentration data in the kth time period, represents the variance of all oxygen concentration data in the k+1th time period, and Norm( ) represents the linear normalization function.
[0051] It represents the covariance between the oxygen concentration data in the kth time period and the k+1th time period, reflecting whether the change trends of the oxygen concentration data in two adjacent time periods are the same. When its value is greater than 0 and the larger it is, the more consistent the change trends of the oxygen concentration data in two adjacent time periods are.
[0052] It reflects the fluctuation of oxygen concentration data in two adjacent time periods. The larger the value, the greater the fluctuation of oxygen concentration data in two adjacent time periods. is the correlation coefficient between the kth time period and the k+1th time period. The closer the correlation coefficient is to 1, the more similar the changing trends of the oxygen concentration data in adjacent time periods are, which means that the overall data is more stable. The closer the value of the correlation coefficient is to 0, the more chaotic the changing trend of the oxygen concentration data in adjacent time periods is, and the lower the overall stability of the data is.
[0053] The data stability reflects the stability of the oxygen concentration data from the changing trend of the oxygen concentration data in adjacent time periods. The larger the value of the data stability, the greater the stability of the oxygen concentration data. The smaller the value of the data stability, the smaller the stability of the oxygen concentration data.
[0054] Step three, judging whether to perform differential processing on the oxygen concentration data sequence according to the degree of data stability; if so, performing differential processing on the oxygen concentration data sequence and the gas pressure data sequence respectively to obtain differential concentration data and differential pressure data under different differential orders.
[0055] The data stability reflects the stability of the oxygen concentration data from the changing trend of the oxygen concentration data in adjacent time periods. Based on the data stability, it can be judged whether the original data that has not been differentially processed can meet the stability requirements. When the oxygen concentration data in the original data can meet the stability requirements, it means that the original data is relatively stable and can be directly predicted and analyzed. When the oxygen concentration data in the original data cannot meet the stability requirements, it means that the original data is relatively unstable, and it is necessary to differentiate the oxygen concentration data to improve the stability of the data.
[0056] Based on this feature, it is determined whether to perform differential processing on the oxygen concentration data sequence according to the data stability. Specifically, when the data stability is greater than or equal to a preset judgment threshold, the oxygen concentration data sequence is not subjected to differential processing; when the data stability is less than the preset judgment threshold, the oxygen concentration data sequence can be subjected to differential processing; the value of the judgment threshold is greater than 0 and less than 1.
[0057] In this embodiment, the value of the judgment threshold is 0.9, and the implementer can set it according to the specific implementation scenario. When the data stability is greater than or equal to 0.9, it means that the change trend of the oxygen concentration data in all time periods is relatively close, and the greater the overall stability of the data, the oxygen concentration data sequence does not need to be differentially processed. When the data stability is less than 0.9, it means that the change trend of the oxygen concentration data in all time periods is quite different, and the smaller the overall stability of the data, the oxygen concentration data sequence needs to be differentially processed. Since the value of the data stability is a normalized value, the value range of the judgment threshold in this embodiment is (0,1). When the value of the judgment threshold is closer to 1, it means that the stability judgment is stricter, and when the value of the judgment threshold is closer to 0, it means that the stability judgment is looser.
[0058] Furthermore, if the oxygen concentration data sequence is not differentially processed, it means that the overall stability of the collected oxygen concentration data is higher, and the prediction analysis can be directly performed. Then, the oxygen concentration is predicted according to the oxygen concentration data sequence, and the oxygen detection result is obtained according to the prediction result. Specifically, the standard range of oxygen concentration in the laboratory is obtained. When the oxygen concentration in the prediction result exceeds the standard range, an early warning is issued, and relevant staff need to take measures in advance according to the early warning result. It should be noted that the standard range of oxygen concentration in different laboratories may be different, and the implementer needs to obtain it according to the specific implementation scenario. Among them, the method of predicting oxygen concentration based on the oxygen concentration data sequence can use the autoregressive moving average model (ARMA) for prediction, and this prediction method is a well-known technology and will not be introduced in detail here.
[0059] If the oxygen concentration data sequence needs to be differentially processed, it means that the overall stability of the oxygen concentration data collected at this time is low, and the oxygen concentration data sequence needs to be differentially processed to improve the overall stability of the data, that is, the oxygen concentration data sequence and the gas pressure data sequence are differentially processed respectively to obtain differential concentration data and differential pressure data under different differential orders.
[0060] Specifically, performing first-order difference processing on the oxygen concentration data sequence can obtain the first-order difference sequence of oxygen concentration data, which can also be recorded as differential concentration data under the first difference order. Differentiating the first-order difference sequence of oxygen concentration data can obtain the second-order difference sequence of oxygen concentration data, which can also be recorded as differential concentration data under the second difference order. And so on, differential concentration data under each different difference order can be obtained.
[0061] Then, according to the same method, the gas pressure data sequence can be differentially processed, and the differential pressure data under each different differential order can be obtained. It can be understood that each moment in each time period corresponds to an oxygen concentration data and a gas pressure data, and then after differential processing, each time period also has corresponding differential concentration data and differential pressure data under different differential orders.
[0062] In order to avoid the influence of improper selection of differential order in the process of stationarity processing, it is necessary to perform feature analysis on the differential concentration data and differential pressure data under each differential order to determine the degree of feature retention of data change trends under different differential orders, so as to adaptively obtain the differential order with the best stationarity effect.
[0063] Step 4: According to the difference between the change of differential concentration data in each time period under each differential order and the change of each differential pressure data in the same time period, as well as the difference between the change of differential concentration data and the change of differential pressure data in two adjacent time periods, the feature retention degree under each differential order is obtained.
[0064] Since there are irregular changes in single oxygen concentration data in different time periods, it is necessary to perform a stationarity analysis before predicting the oxygen concentration data. After the oxygen concentration data sequence is subjected to differential processing of different differential orders, the higher the differential order, the more serious the feature loss of the change trend of the original oxygen concentration data, that is, the less the change trend of the original data is, and the noise data will also increase accordingly. Therefore, when the original oxygen concentration data is subjected to differential processing to stabilize it, it is necessary to pay attention to the feature retention of the data. Considering that as the oxygen concentration increases, the number of gas molecules increases, and the gas pressure will also increase, there are associated change features between data of different dimensions, that is, there is a certain correlation between oxygen concentration data and gas pressure data. The feature retention of the data after differential processing can be reflected by analyzing whether the changes of the two different data in the same time period tend to be consistent.
[0065] Based on this feature, the degree of feature retention under each differential order is obtained according to the difference between the change of differential concentration data in each time period under each differential order and the change of each differential pressure data in the same time period, as well as the difference in the change of differential concentration data and the difference in the change of differential pressure data in two adjacent time periods.
[0066] Specifically, for any differential order, the slope of each differential concentration data and the slope of each differential pressure data under the differential order are obtained. In this embodiment, each differential concentration data under the first differential order is taken as an example for explanation, that is, the first-order differential sequence is fitted by the least squares method to obtain a first-order differential fitting curve, and the tangent slope of each differential concentration data is calculated on the first-order differential fitting curve as the slope of each differential concentration data under the first differential order.
[0067] It should be noted that the slope of the differential pressure data under each differential order is obtained in the same way as the slope of the differential concentration data under each differential order. The slope of the differential concentration data under each differential order reflects the data change of each differential concentration data, and the slope of the differential pressure data under each differential order reflects the data change of each differential pressure data.
[0068] Furthermore, according to the difference between the slope of the differential concentration data in each time period and the slope of the differential pressure data in the corresponding time period under the differential order, the difference between the slope of the differential concentration data in each time period and its adjacent time period, and the difference between the slope of the differential pressure data in each time period and its adjacent time period, the degree of feature retention under the differential order is obtained.
[0069] In this implementation, taking the differential concentration data and differential pressure data under any differential order as an example, the calculation formula for the feature retention degree under the rth differential order can be expressed as:
[0070] ;
[0071] in, represents the degree of feature preservation under the rth difference order, Indicates the total number of time periods, represents the mean of the slopes of all differential concentration data in the i-th time period under the r-th differential order, represents the mean value of the slope of all differential pressure data in the i-th time period under the r-th differential order, represents the mean value of the slope of all differential concentration data in the i+1th time period under the rth differential order, represents the mean of the slopes of all differential pressure data in the i-th time period under the r-th differential order, exp( ) represents an exponential function with the natural constant e as the base, and Norm( ) represents a linear normalization function.
[0072] It represents the difference in the mean slope between two different differential data in the same time period under the same differential order. The smaller the difference, the closer the data changes of the two different differential data are, which further indicates that the changes between oxygen concentration and gas pressure are more similar, the higher the correlation, and the larger the value of the corresponding feature retention degree, indicating that the data retention after differential processing under the current differential order is better.
[0073] It represents the difference between the slope means of the differential concentration data in two adjacent time periods under a differential order, reflecting the difference between the changes in the differential concentration data between adjacent time periods. It represents the difference between the slope means of the differential pressure data in two adjacent time periods under a difference order, reflecting the difference between the changes in the differential pressure data between adjacent time periods. It represents the ratio between the change differences of two different differential data in the same adjacent time period. The closer the ratio is to 1, the closer the data slope changes in the two dimensions of differential concentration data and differential pressure data are, which means that the data change trends are more similar, the higher the correlation between the two, and the larger the value of the corresponding feature retention degree, which means that the data retention after differential processing at the current differential order is better.
[0074] The degree of feature retention under each differential order represents the degree to which the differential concentration data retains the original features after differential processing under the corresponding differential order. The larger the value of the feature retention degree, the greater the degree to which the differential concentration data retains the original features under the corresponding differential order. The smaller the value of the feature retention degree, the smaller the degree to which the differential concentration data retains the original features under the corresponding differential order.
[0075] Step 5: Screen different differential orders according to the degree of data stability and feature retention to determine the optimal differential order, and use the differential concentration data under the optimal differential order to predict the oxygen concentration.
[0076] In step 2, the data stationarity corresponding to the oxygen concentration data is calculated, which reflects the data stationarity of the initially collected oxygen concentration data. The degree of feature retention under each differential order characterizes the degree to which the differential concentration data retains the original features after differential processing of the oxygen concentration data under the corresponding differential order. When adaptively obtaining the best differential order, it is necessary not only to pay attention to the feature retention of the differential data as the differential order increases, but also to pay attention to the stationarity of the differential data obtained after each differential processing. Therefore, it is necessary to screen different differential orders by data stationarity and feature retention, and then determine the optimal differential order.
[0077] Specifically, it is first necessary to calculate the data stationarity of the differential concentration data at each differential order; it can be understood that the calculation method of the data stationarity of the differential concentration data at each differential order and the data stationarity of the oxygen concentration data sequence are the same.
[0078] The data stability of the differential concentration data under all differential orders is greater than or equal to the judgment threshold, and the feature retention degree is greater than or equal to the minimum value of the differential order corresponding to the preset retention threshold, which is used as the optimal differential order. In this embodiment, the value of the retention threshold is 0.9, and the implementer can set it according to the specific implementation scenario. Since the value of the feature retention degree is a normalized value, the value range of the retention threshold in this embodiment is (0,1). When the value of the retention threshold is closer to 1, the judgment of the feature retention situation is stricter, and when the value of the retention threshold is closer to 0, the judgment of the feature retention situation is looser.
[0079] When the data stability of the differential concentration data under a differential order is greater than or equal to the judgment threshold, it means that the data stability of the differential data at this time is relatively high, that is, it can meet the stability requirements of the prediction analysis. At the same time, when the feature retention degree of the differential concentration data under a differential order is greater than or equal to the retention threshold, it means that the differential data at this time retains the original features to a high degree, that is, it ensures that the data features can be retained to the maximum extent during the prediction analysis.
[0080] Furthermore, in order to ensure that the data features can be retained to the maximum extent while meeting the stability requirements of the prediction analysis, it is necessary to obtain differential concentration data under the differential order that meets the requirements for data stability and feature retention. At the same time, considering that the higher the order of differential data after differential processing, the weaker the data feature retention ability, in this embodiment, a minimum value is selected from the differential orders that meet the requirements as the optimal differential order, that is, the adaptive acquisition operation of the optimal differential order is realized.
[0081] Finally, the oxygen concentration is predicted using the differential concentration data under the optimal differential order. Specifically, in this embodiment, the ARIMA model is used in combination with the differential concentration data under the optimal differential order to predict the oxygen concentration, which can obtain a more accurate prediction result.
[0082] Step six, obtaining oxygen detection results based on the prediction results.
[0083] Specifically, the standard range of oxygen concentration in the laboratory is obtained. When the oxygen concentration in the predicted result exceeds the standard range, an early warning is issued, and relevant staff need to take measures in advance based on the early warning result. It should be noted that the standard range of oxygen concentration in different laboratories may be different, and implementers need to obtain it according to the specific implementation scenario.
[0084] Embodiment 2:
[0085] This embodiment provides an oxygen detection device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of an oxygen detection method when executed by the processor. Since an oxygen detection method has been described in detail in Embodiment 1, it will not be described in detail here.
[0086] Embodiment three:
[0087] This embodiment provides an oxygen data processing method, which is specifically:
[0088] In practice, oxygen concentration monitoring is crucial in various scenarios, especially when it is necessary to ensure personnel safety and monitor the environment. For example, in some industrial production environments, some processes may consume oxygen, and the oxygen concentration needs to be monitored; in closed spaces, such as pipelines and basements, due to limited space, oxygen concentration may be affected by many factors, so it needs to be monitored; in some environmental protection and ecological research, oxygen concentration monitoring is necessary to assess the quality of water, atmosphere or soil.
[0089] Existing methods often predict and analyze oxygen concentration, thereby predicting the change of oxygen concentration in advance, so as to achieve the purpose of early alarm processing. Among them, when using the differential integrated moving average autoregressive model (ARIMA) to predict and analyze oxygen concentration, in order to increase the stability of the original data, the original data is usually processed by one or more orders of difference. However, in the differential processing process, different differential orders may affect the characteristics of the original data. When the differential order is too small, the original data will not be stable enough. When the differential order is too large, it may cause the loss of original data characteristics or increase data noise. Therefore, when using existing methods to predict and analyze oxygen concentration, the unreasonable selection of differential order leads to less accurate prediction results.
[0090] In order to solve the technical problem that the unreasonable selection of the differential order in the existing method leads to inaccurate prediction results, the purpose of this embodiment is to provide an oxygen data processing method, and the technical solution adopted is as follows:
[0091] Step 1: Collect oxygen concentration data and gas pressure data at each moment in a set number of different time periods to form an oxygen concentration data sequence and a gas pressure data sequence respectively.
[0092] Step 2: According to the correlation between the data balance and data fluctuation of the oxygen concentration data in every two adjacent time periods, the data stability of the oxygen concentration data sequence is obtained.
[0093] Step three, judging whether to perform differential processing on the oxygen concentration data sequence according to the degree of data stability; if so, performing differential processing on the oxygen concentration data sequence and the gas pressure data sequence respectively to obtain differential concentration data and differential pressure data under different differential orders.
[0094] Step 4: According to the difference between the change of differential concentration data in each time period under each differential order and the change of each differential pressure data in the same time period, as well as the difference between the change of differential concentration data and the change of differential pressure data in two adjacent time periods, the feature retention degree under each differential order is obtained.
[0095] Step 5: Screen different differential orders according to the degree of data stability and feature retention to determine the optimal differential order, and use the differential concentration data under the optimal differential order to predict the oxygen concentration.
[0096] Since steps 1 to 5 have been described in detail in the first embodiment, they will not be repeated here.
[0097] The oxygen data processing method provided in this embodiment has the following technical effects:
[0098] The present invention first collects oxygen concentration data and gas pressure data, takes into account the correlation between the two, and provides a data basis for the subsequent analysis of data change trends. Then, the correlation between the data balance and data fluctuation of the oxygen concentration data in each two adjacent time periods is analyzed to obtain the data stability of the oxygen concentration data sequence. The data stability reflects the stability of the oxygen concentration data from the change trend of the oxygen concentration data in the adjacent time periods. In order to make the data for predictive analysis more stable, the data stability can be used to determine whether the oxygen concentration data sequence meets the stability requirements and whether it is necessary to perform a part of the stabilization processing on the oxygen concentration data, that is, differential processing. Further, if differential processing is required, the changes in the differential concentration data and the differential pressure data under each differential order are analyzed respectively to obtain the feature retention degree under each differential order, which characterizes the degree to which the differential concentration data of the oxygen concentration data after differential processing under the corresponding differential order retains the original change trend characteristics. Finally, the optimal difference order is determined by combining the data stability and feature retention. This allows the differential concentration data under the optimal difference order to meet the stability requirements while retaining the data change characteristics to the maximum extent, thus realizing the adaptive acquisition operation of the difference order and further making the final prediction results more accurate.
[0099] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person 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 may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. An oxygen detection method, characterized in that: The method comprises the following steps: Collect oxygen concentration data and gas pressure data at each moment in a set number of different time periods to form an oxygen concentration data sequence and a gas pressure data sequence respectively; According to the correlation between the data balance and data fluctuation of the oxygen concentration data in every two adjacent time periods, the data stability of the oxygen concentration data sequence is obtained; Determine whether to perform differential processing on the oxygen concentration data sequence according to the data stability; if so, perform differential processing on the oxygen concentration data sequence and the gas pressure data sequence respectively to obtain differential concentration data and differential pressure data under different differential orders; According to the difference between the change of differential concentration data in each time period under each differential order and the change of each differential pressure data in the same time period, as well as the difference between the change of differential concentration data and the change of differential pressure data in two adjacent time periods, the degree of feature retention under each differential order is obtained; Different differential orders are screened according to the degree of data stability and feature retention to determine the optimal differential order, and the oxygen concentration is predicted using the differential concentration data under the optimal differential order; Obtain oxygen detection results based on the prediction results; The feature retention degree under each differential order is obtained according to the difference between the change of the differential concentration data in each time period under each differential order and the change of each differential pressure data in the same time period, and the difference between the change of the differential concentration data and the change of the differential pressure data in two adjacent time periods, specifically including: For any differential order, obtain the slope of each differential concentration data and the slope of each differential pressure data under the differential order; According to the difference between the slope of the differential concentration data in each time period and the slope of the differential pressure data in the corresponding time period under the differential order, the difference between the slope of the differential concentration data in each time period and its adjacent time period, and the difference between the slope of the differential pressure data in each time period and its adjacent time period, the feature retention degree under the differential order is obtained; The calculation formula of the feature retention degree under the difference order is specifically: ; in, represents the degree of feature preservation under the rth difference order, Indicates the total number of time periods, represents the mean of the slopes of all differential concentration data in the i-th time period under the r-th differential order, represents the mean value of the slope of all differential pressure data in the i-th time period under the r-th differential order, represents the mean value of the slope of all differential concentration data in the i+1th time period under the rth differential order, represents the mean value of the slope of all differential pressure data in the i-th time period under the r-th differential order, exp( ) represents the exponential function with the natural constant e as the base, and Norm( ) represents the linear normalization function; The data stability of the oxygen concentration data sequence is obtained according to the correlation between the data balance and the data fluctuation of the oxygen concentration data in every two adjacent time periods, specifically including: For any two adjacent time periods, the correlation coefficient between the two adjacent time periods is obtained according to the difference between the mean of all oxygen concentration data in each time period and the mean of all oxygen concentration data in two adjacent time periods, and the variance of all oxygen concentration data in each time period; the mean of the correlation coefficient between every two adjacent time periods is normalized to obtain the data stability of the oxygen concentration data sequence; The calculation formula of the data stability is specifically: ; in, Indicates the data stability of the oxygen concentration data series. Indicates the total number of time periods, represents the mean value of all oxygen concentration data in the kth time period, represents the mean value of all oxygen concentration data in the k+1th time period, represents the mean of all oxygen concentration data in the kth time period and the k+1th time period, represents the variance of all oxygen concentration data in the kth time period, represents the variance of all oxygen concentration data in the k+1th time period, is the correlation coefficient between the kth time period and the k+1th time period, and Norm( ) represents the linear normalization function; The step of judging whether to perform differential processing on the oxygen concentration data sequence according to the data stability specifically includes: When the data stability is greater than or equal to the preset judgment threshold, the oxygen concentration data sequence is not subjected to differential processing; when the data stability is less than the preset judgment threshold, the oxygen concentration data sequence can be subjected to differential processing; the value of the judgment threshold is greater than 0 and less than 1; The method of screening different difference orders according to the data stability and feature retention to determine the optimal difference order specifically includes: Calculate the data stationarity of the differential concentration data at each differential order; The differential concentration data under all differential orders whose data stability is greater than or equal to the judgment threshold and whose feature retention is greater than or equal to the minimum value of the differential order corresponding to the preset retention threshold are taken as the optimal differential order.
2. An oxygen detection method according to claim 1, characterized in that: The method further comprises: If the oxygen concentration data sequence is not subjected to differential processing, the oxygen concentration is predicted based on the oxygen concentration data sequence; and the oxygen detection result is obtained based on the prediction result.
3. An oxygen detection method according to claim 1, characterized in that: The method of predicting oxygen concentration using differential concentration data under the optimal differential order is specifically as follows: The oxygen concentration is predicted using the differential concentration data under the optimal difference order and the differential integrated moving average autoregressive model.
4. An oxygen detection device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the computer program is executed by a processor, the steps of an oxygen detection method as described in any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Real-time deducting background nonlinear correction method for detecting concentration of oxygen in glass bottles by means of wavelength modulation spectroscopy
CN107643252A
Ventilation capacity detection method, electronic equipment and metabolism cabin
CN117257274A
