Object concentration determination method, apparatus, device, and storage medium
By extracting differential features and local coefficients of variation from the electrochemical sensor detection signal in real time and combining them with a machine learning model, the concentration can be quickly estimated before the signal reaches a steady state. This solves the problem of long sensor response time and improves detection efficiency without increasing costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-10
AI Technical Summary
Existing electrochemical sensors have long response times, resulting in low detection efficiency. Furthermore, hardware improvements or simple signal filtering methods are insufficient to meet the needs of rapid-response online monitoring and emergency detection.
By extracting target features and peak values from sensor detection signals in real time, a pre-trained concentration estimation model is used to quickly estimate the concentration before the signal reaches a steady state or peak. A data-driven approach is used to extract differential features and local coefficients of variation, and machine learning algorithms are combined to predict the concentration.
This shortens the sensor's response time and improves detection efficiency without changing the sensor's hardware structure, thus avoiding increased costs.
Smart Images

Figure CN121385052B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electrochemical sensor monitoring, and in particular to a target concentration determination method, device, equipment and storage medium. BACKGROUND
[0002] Electrochemical gas sensors are widely used in environmental monitoring, industrial safety, vehicle emission detection and medical health due to their high sensitivity, good selectivity, fast response speed, simple structure and low cost. However, in actual detection process, the sensor usually needs to wait for the electrochemical reaction signal to reach steady state or peak value before the concentration determination is completed according to the corresponding relationship between the output current or potential signal and the target gas concentration. This detection mode relying on steady state or peak value signal leads to long response time and poor real-time performance of the sensor, which is difficult to meet the needs of online monitoring, emergency detection and dynamic control.
[0003] In related art, the current electrochemical sensor rapid detection scheme is mainly realized through hardware improvement or simple signal filtering method. For example, by improving the electrode catalytic activity of the electrochemical sensor, increasing the gas diffusion rate or optimizing the membrane structure, the response time can be shortened to a certain extent. Or use the experience threshold to estimate the concentration in advance by judging the inflection point of the signal rising stage.
[0004] However, the above-mentioned technology on the one hand increases the detection cost, and on the other hand still needs to output reliable results near the steady state, so the response time of the sensor is still long, resulting in low detection efficiency. SUMMARY
[0005] The present application provides a target concentration determination method, device, equipment and storage medium to solve the defects of increased detection cost and long sensor response time in the prior art, which realizes real-time extraction of target features and their peak values in the sensor detection signal, and estimates the concentration of the target object in the concentration estimation model through the peak value of the target feature before the peak value of the detection signal arrives, shortens the response time of the sensor and does not increase the detection cost.
[0006] The present application provides a target concentration determination method, comprising:
[0007] Obtaining a real-time detection signal obtained after a target sensor performs real-time concentration detection on a target object; the real-time detection signal is a detection signal that changes in real time with the detection time;
[0008] According to the preset target feature, the target feature of the detection signal of each detection time is extracted respectively to obtain the target feature corresponding to each detection time;
[0009] The target features at each detection moment are compared in real time point by point to determine peak value target features in the target features at each detection moment; the peak value target features appear earlier than the peak value signals or the steady state signals of the real-time detection signals;
[0010] The peak value target features are input into a concentration estimation model for concentration estimation processing to determine the predicted concentration corresponding to the to-be-measured object; the concentration estimation model is obtained by training a plurality of different sample peak value target features and sample concentrations corresponding to each sample peak value target feature in advance, and the plurality of different sample peak value target features are determined based on sample detection signals of a sample sensor under different sample concentrations.
[0011] According to the object concentration determination method provided by the application, the target features include first target features, and the target features are extracted from the detection signals at each detection moment in the real-time detection signals according to the preset target features to obtain the target features corresponding to each detection moment, including:
[0012] A preset first time window is obtained;
[0013] According to the first target features, for each detection moment in the real-time detection signals, the detection moment is taken as the end moment of the first time window, and the detection signal corresponding to the first end detection moment of the first time window is obtained in the real-time detection signals;
[0014] According to the difference between the detection signal corresponding to the detection moment and the detection signal corresponding to the first end detection moment of the first time window, a differential feature corresponding to the detection moment is determined, and the differential feature is taken as the first target feature corresponding to the detection moment, and the differential feature is used to represent the rate change of the real-time detection signal in the signal rising stage.
[0015] According to the object concentration determination method provided by the application, the target features include second target features, and the target features are extracted from the detection signals at each detection moment in the real-time detection signals according to the preset target features to obtain the target features corresponding to each detection moment, including:
[0016] A preset second time window is obtained;
[0017] According to the second target features, for each detection moment in the real-time detection signals, the detection moment is taken as the end moment of the second time window, and the candidate detection signals corresponding to each candidate detection moment located in the second time window are obtained in the real-time detection signals;
[0018] According to the candidate detection signal corresponding to each candidate detection moment in the second time window of the detection moment, a local coefficient of variation corresponding to the detection moment is determined, and the local coefficient of variation is taken as a second target feature corresponding to the detection moment; the local coefficient of variation is used to represent the local fluctuation and / or local stability of the real-time detection signal in the signal rising stage.
[0019] According to the object concentration determination method provided by the application, the local coefficient of variation corresponding to the detection moment is determined according to the candidate detection signal corresponding to each candidate detection moment in the second time window of the detection moment, and the local coefficient of variation is taken as a second target feature corresponding to the detection moment.
[0020] The candidate detection signal corresponding to each candidate detection moment in the second time window of the detection moment is subjected to mean value processing to determine the local mean value corresponding to the detection moment.
[0021] According to the local mean value corresponding to the detection moment and the candidate detection signal corresponding to each candidate detection moment in the second time window of the detection moment, standard deviation processing is performed to determine the local standard deviation corresponding to the detection moment.
[0022] According to the local mean value and / or local standard deviation corresponding to the detection moment, the local coefficient of variation corresponding to the detection moment is determined.
[0023] According to the object concentration determination method provided by the application, the training method of the concentration estimation model comprises:
[0024] The sample detection signal of the sample sensor under different sample concentrations is obtained.
[0025] According to the preset target feature, the target feature extraction is performed on the detection signal of each sample detection moment in each sample detection signal, and the sample target feature corresponding to each sample detection moment of each sample detection signal is obtained.
[0026] The sample target features of the sample detection signal of each sample detection moment are compared in real time point by point to determine the sample peak target feature corresponding to the sample detection signal of each sample detection moment.
[0027] The sample peak target feature of each sample detection signal is bound to the corresponding sample concentration, and the initial concentration estimation model is trained according to the binding relationship to determine the concentration estimation model.
[0028] According to the object concentration determination method provided by the application, the sample detection signal of the sample sensor under different sample concentrations is obtained, comprising:
[0029] A plurality of brand-new sample sensors of the same type are obtained.
[0030] The concentration range of the sample sensor is divided to determine a plurality of sample concentrations.
[0031] The sample object at each sample concentration is detected by each sample sensor to obtain a sample detection signal of each sample sensor at each sample concentration.
[0032] According to the object concentration determination method provided by the application, the concentration estimation model is a random forest regression model.
[0033] The application further provides an object concentration determination device, comprising the following modules:
[0034] The signal acquisition module is configured to acquire a real-time detection signal obtained by the target sensor in real-time concentration detection of the target object; the real-time detection signal is a detection signal that changes in real time with the detection time;
[0035] The feature extraction module is configured to extract target features of the detection signal at each detection time from the real-time detection signal according to preset target features, and obtain target features corresponding to each detection time;
[0036] The peak feature determination module is configured to compare the target features at each detection time in real time point by point to determine the peak target feature in the target features at each detection time; the peak target feature appears earlier than the time when the peak signal or the steady-state signal of the real-time detection signal appears;
[0037] The concentration determination module is configured to input the peak target feature into a concentration estimation model for concentration estimation processing to determine the predicted concentration corresponding to the target object; the concentration estimation model is obtained by training a plurality of different sample peak target features and the sample concentration corresponding to each sample peak target feature in advance, and the plurality of different sample peak target features are determined based on the sample detection signal of the sample sensor at different sample concentrations.
[0038] The application further provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the object concentration determination method according to any one of the above.
[0039] The application further provides a non-transitory computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the object concentration determination method according to any one of the above.
[0040] The application further provides a computer program product comprising a computer program, wherein the computer program is executed by a processor to implement the object concentration determination method according to any one of the above.
[0041] The object concentration determination method, device, equipment and storage medium provided by the application, by obtaining the real-time detection signal obtained by the target sensor for real-time concentration detection of the to-be-detected object, extracting the target feature of each detection time of the real-time detection signal according to the preset target feature, obtaining the target feature corresponding to each detection time, comparing the target features of each detection time in real time, determining the peak target feature in the target features of each detection time, inputting the peak target feature into the concentration trajectory model for concentration estimation processing, and determining the predicted concentration of the to-be-detected object; the concentration estimation model is obtained by pre-training according to a plurality of different sample peak target features and sample concentrations thereof, the plurality of different sample peak target features are determined based on sample detection signals of the sample sensor under different sample concentrations, the real-time detection signal is a detection signal that changes with the detection time, and the peak target feature appears earlier than the time when the peak signal or the steady signal of the real-time detection signal appears. In the method, the target feature in the real-time detection signal of the sensor and the peak value thereof can be extracted in real time, and the concentration of the to-be-detected object can be quickly estimated in the pre-trained concentration estimation model by the extracted peak value of the target feature before the steady signal or the peak signal of the real-time detection signal arrives, so that the concentration of the to-be-detected object can be obtained without waiting for the sensor signal to reach the steady state or the peak value, thereby shortening the response time of the sensor and improving the detection efficiency of the sensor. At the same time, since the sensor hardware does not need to be changed, the concentration detection cost will not be increased. BRIEF DESCRIPTION OF DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor.
[0043] Figure 1 is one of the flowcharts of the object concentration determination method provided by the application.
[0044] Figure 2 is the second flowchart of the object concentration determination method provided by the application.
[0045] Figure 3 is the structural schematic diagram of the object concentration determination device provided by the application.
[0046] Figure 4 is the structural schematic diagram of the electronic equipment provided by the application. DETAILED DESCRIPTION
[0047] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be clearly and completely described below in combination with the drawings in the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work belong to the protection scope of the present application.
[0048] The general electrochemical gas sensor response time optimization method usually depends on the steady-state signal or the peak signal to determine the gas concentration. The main disadvantage of this method is that the dependence on the steady-state signal leads to a long response time, which cannot meet the needs of online monitoring and emergency detection requiring fast response. The sensor must wait for the electrochemical reaction signal to reach the steady state or the peak value before the concentration result can be obtained, which is particularly insufficient in application scenarios with high real-time requirements. The current electrochemical sensor fast detection scheme is mainly realized through hardware level improvement or simple signal filtering method. For example, by improving the electrode catalytic activity, increasing the gas diffusion rate or optimizing the membrane structure, the response time can be shortened to a certain extent; or the inflection point in the rising stage of the signal is estimated in advance by using the experience threshold to estimate the concentration. However, these methods still have the following obvious limitations:
[0049] (1) The hardware optimization scheme usually needs to change the sensor structure or material, which leads to cost increase and is difficult to popularize in existing products;
[0050] (2) The experience or threshold method fails to fully utilize historical test data and cannot adapt to different gas concentrations, environmental conditions or sensor individual differences, which is easy to cause determination error;
[0051] (3) Most methods still need to output reliable results near the steady state, and the shortening of the response time is limited.
[0052] Therefore, the embodiments of the present application provide an object concentration determination method, device, equipment and storage medium, which can solve the above technical problems. The response time of the electrochemical sensor is optimized through data driving, and the key features in the signal rising stage of the historical test data of the sensor are used to predict the gas concentration in real time through feature mining and machine learning algorithm, so that the detection result can be quickly output without waiting for the steady-state signal.
[0053] It should be noted that the execution subject of the embodiments of the present application can be an object concentration determination device, can include an electronic device, or can further include other devices or apparatuses or systems, etc., which are not limited here. The following embodiments will be described taking the electronic device as the execution subject as an example.
[0054] Figure 1 is one of the flowcharts of the object concentration determination method provided by the present application, asFigure 1 As shown, the method comprises the following steps:
[0055] In step 102, a real-time detection signal obtained by the target sensor for real-time concentration detection of the to-be-detected object is acquired. The real-time detection signal is a detection signal that changes in real time with the detection time.
[0056] In this step, the target sensor can be an electrochemical sensor / gas sensor for concentration detection of any type of gas, such as a sensor for detecting carbon monoxide concentration, a sensor for detecting oxygen concentration, an alcohol sensor for detecting alcohol volatile gas concentration, etc. The to-be-detected object refers to the object for which the target sensor performs concentration detection, such as a to-be-detected gas, i.e., the type of the to-be-detected object matches the type of the object that the target sensor can detect.
[0057] Specifically, when real-time concentration detection of the to-be-detected object is needed, the target sensor can be placed in the concentration space where the to-be-detected object is located, and the concentration of the to-be-detected object is detected in real time by the target sensor to obtain a real-time detection signal. The real-time detection signal can be an electrical signal, such as a current signal, or it can also be a potential signal.
[0058] It can be understood that the real-time detection signal is a detection signal that changes in real time with the detection time, i.e., the real-time detection signal includes detection signals at multiple detection times, and each detection time is a detection time point. In addition, it should be noted that for the detection signal detected by the target sensor for concentration detection of the to-be-detected object, the change trend of the detection signal at each time in the detection signal is gradually increasing with time, i.e., the signal first rises and finally tends to be stable, i.e., reaches a steady-state signal. Therefore, the real-time detection signal collected in this embodiment is actually a signal gradually collected from the start of detection to before the signal reaches the steady-state signal, i.e., at the first detection time, the real-time detection signal only has a detection signal at one time, at the second detection time, the real-time detection signal includes detection signals at the first two times, and the subsequent is similar.
[0059] In step 104, target feature extraction is performed on the detection signal at each detection time in the real-time detection signal according to a preset target feature to obtain a target feature corresponding to each detection time.
[0060] In this step, the sample detection signals of the sample sensor at different sample concentrations can be collected in advance, and then a plurality of features are extracted from each sample detection signal, and then a correlation analysis is performed between the plurality of features of each sample detection signal and the corresponding sample concentration, so as to find a feature that is highly correlated with the concentration and appears in the rising stage of the sample detection signal from the plurality of features. The feature screened out here can be referred to as a target feature. The target feature screened out here can be one or more features, such as a first target feature, a second target feature, and the like. In addition, the target feature screened out here can be an early feature reflecting the rate change, local fluctuation, local stability, and the like of the sample detection signal in the rising stage, such as the slope, mean value, and the like of the detection signal, that is, the feature appearing before the detection signal reaches the steady state / peak value.
[0061] After the target feature is determined, the target feature of each detection time can be extracted or calculated after the real-time detection signal of each detection time is collected in the process of collecting the real-time detection signal in real time. The target feature of the current detection time can be calculated and obtained only by the real-time detection signal of the current detection time, or the target feature of the current detection time can be calculated and obtained in combination with the real-time detection signal of the time before the current detection time.
[0062] Step 106, real-time point-by-point comparison of the target features of each detection time is performed to determine the peak target feature in the target features of each detection time. The peak target feature appears earlier than the time when the peak signal or the steady state signal of the real-time detection signal appears.
[0063] In this step, for each type of target feature, as the signal collection time increases, after the target feature of each detection time is obtained, the target feature of the detection time can be added to the feature sequence, wherein the feature sequence is initially empty, and after the target feature corresponding to each detection time is calculated and obtained, it can be added to the feature sequence. After the target feature corresponding to the current detection time is obtained and added to the feature sequence, it can be compared with the target features of other detection times in the feature sequence in real time according to the collection time sequence to determine whether the target feature of the current time reaches the peak of the target feature. If the target feature of the current time reaches the peak of the target feature, the target feature of the current time and / or the current time are taken as the peak target feature of this type of target feature.
[0064] In the case of multiple / kinds of target features, the peak target feature corresponding to each kind of target feature can be extracted or calculated in the above-mentioned manner.
[0065] It should be noted that the time at which each of the above target characteristics corresponding to the peak value target characteristic occurs is earlier than the time at which the peak signal or the steady-state signal of the real-time detection signal occurs, that is, the peak value target characteristic can be calculated or extracted before the peak signal or the steady-state signal of the real-time detection signal arrives, and the concentration of the to-be-detected object is estimated through the peak value target characteristic, and the target sensor can stop the concentration detection, that is, the target sensor does not need to continue to detect until the steady-state signal or the peak signal is reached, so that the response time of the target sensor during concentration detection can be shortened.
[0066] In step 108, the peak value target characteristic is input into a concentration estimation model for concentration estimation processing to determine the predicted concentration corresponding to the to-be-detected object. The concentration estimation model is obtained by pre-training according to a plurality of different sample peak value target characteristics and the sample concentration corresponding to each sample peak value target characteristic. The plurality of different sample peak value target characteristics are determined based on the sample detection signal of the sample sensor under different sample concentrations.
[0067] Among them, a concentration estimation model can be pre-set to estimate / predict the concentration of the to-be-detected object based on the peak value target characteristic of the to-be-detected object. The concentration estimation model can be a machine learning model, and its specific type can be set according to actual conditions. The concentration estimation model can be pre-trained. Specifically, the sample detection signal of the sample sensor under different sample concentrations can be collected, and the sample peak value target characteristic corresponding to each sample detection signal can be extracted in the above manner. Then, the sample peak value target characteristic is used as the input of the initial concentration estimation model, the sample concentration corresponding to each sample peak value target characteristic is used as the reference output of the initial concentration estimation model, the initial concentration estimation model is trained, and the trained concentration estimation model is obtained.
[0068] After obtaining the concentration estimation model, the peak value target characteristic corresponding to the real-time detection signal obtained above can be input into the concentration estimation model for concentration estimation / prediction processing to predict the concentration corresponding to the peak value target characteristic, that is, to obtain the predicted concentration corresponding to the to-be-detected object.
[0069] In this embodiment, the real-time detection signal obtained after the target sensor detects the concentration of the to-be-detected object in real time is acquired, the detection signal at each detection time in the real-time detection signal is subjected to target feature extraction according to a preset target feature, the target feature corresponding to each detection time is obtained, the target features at each detection time are subjected to real-time point-by-point comparison, the peak target feature in the target features at each detection time is determined, the peak target feature is input into a concentration trajectory model for concentration estimation processing, and the predicted concentration of the to-be-detected object is determined. The concentration estimation model is obtained by pre-training according to a plurality of different sample peak target features and sample concentrations thereof, the plurality of different sample peak target features are determined based on sample detection signals of a sample sensor under different sample concentrations, the real-time detection signal is a detection signal that changes in real time with detection time, and the peak target feature appears earlier than the peak signal or the steady-state signal of the real-time detection signal. In this method, the target feature in the real-time detection signal of the sensor and the peak value thereof can be extracted in real time, and the concentration of the to-be-detected object can be quickly estimated in the pre-trained concentration estimation model by the extracted peak value of the target feature before the steady-state signal or the peak signal of the real-time detection signal arrives, so that the concentration of the to-be-detected object can be obtained without waiting for the sensor signal to reach the steady state or the peak value, thereby shortening the response time of the sensor and improving the detection efficiency of the sensor. At the same time, since the sensor hardware does not need to be changed, the concentration detection cost is not increased.
[0070] The above embodiments mention that a plurality of / kinds of target features can be extracted or calculated from the real-time detection signal. Taking the extraction or calculation of two kinds of target features as an example, the following embodiments will describe the process of extracting or calculating the two kinds of target features.
[0071] In one embodiment, the above-mentioned target feature includes a first target feature, and the step 104 of extracting the target feature from the real-time detection signal at each detection time according to the preset target feature to obtain the target feature corresponding to each detection time can include:
[0072] A preset first time window is acquired.
[0073] According to the first target feature, for each detection time in the real-time detection signal, the detection time is taken as the end time of the first time window, and the detection signal corresponding to the starting detection time of the first time window in the real-time detection signal is acquired.
[0074] According to the difference between the detection signal corresponding to the detection time and the detection signal corresponding to the starting detection time of the first time window, a differential feature corresponding to the detection time is determined, and the differential feature is taken as the first target feature corresponding to the detection time. The differential feature is used to represent the rate change of the real-time detection signal in the signal rising stage.
[0075] The length of the first time window is related to the number of detection moments, and its size can be set according to the actual situation. For example, the first time window includes 20 inspection moments / time points.
[0076] After acquiring the detection signal at each detection moment in real time, differential operations can be performed on the detection signal at each detection moment within the first time window to obtain the differential feature corresponding to each detection moment. Specifically, for each detection moment, this detection moment can be taken as the end moment of its first time window, and the detection signal corresponding to the first detection moment of the first time window can be obtained. Then, the difference between the detection signal corresponding to this detection moment and the detection signal corresponding to the first detection moment of the first time window is calculated, and the obtained difference signal is recorded as the differential feature corresponding to this detection moment. Taking a first time window with a length of 20 time points / moments as an example, that is, the time step when calculating the differential feature is 20, assuming the real-time detection signal is S(t), the calculation of the th time point... t i The process of the difference characteristics at time points can be represented as:
[0077] ;
[0078] in, D ( t i ) indicates the first t i Differential features at detection time, S ( t i ) represents the first digit in the real-time detection signal. t i The detection signal at the detection time, S ( t i-20 ) represents the first digit in the real-time detection signal. t i The detection signal corresponding to the first detection time of the first time window of the detection time.
[0079] Following the above method, the differential features corresponding to each detection time in the real-time detection signal can be obtained. Then, the differential features corresponding to each detection time can be used as the first target feature of the corresponding detection time. After obtaining the differential features of each detection time, they can be added to the feature sequence in order of acquisition time to obtain a feature sequence in time order of differential features. This feature sequence can be denoted as differential feature sequence / rate of change sequence.
[0080] Correspondingly, the real-time point-by-point comparison of the target features at each detection time to determine the peak target feature in the target features at each detection time can include: real-time comparison of each differential feature in the differential feature sequence / variation rate sequence in order to find the peak differential feature and its corresponding detection time / position. It should be noted that the peak differential feature here can be a differential feature corresponding to an inflection point or a peak in the differential feature sequence, which is expressed by the following formula:
[0081]
[0082] F D wherein the peak differential feature is represented by D t t
[0083] It can be understood that the differential feature sequence / variation rate sequence includes a plurality of differential features arranged in order, and the differential features in the differential feature sequence can reflect the variation rate of the target sensor in the initial response stage. The peak differential feature can reflect the maximum growth rate of the real-time detection signal in the rising stage, and can depict the dynamic intensity of the object to be measured before the peak value of the electrical signal of the real-time detection signal appears, thereby providing effective information for subsequent rapid prediction of concentration.
[0084] As an option, the target feature includes a second target feature, and the step 104 of extracting the target feature from the detection signal at each detection time in the real-time detection signal according to the preset target feature to obtain the target feature corresponding to each detection time can include:
[0085] obtaining a preset second time window;
[0086] According to the second target feature, for each detection time in the real-time detection signal, taking the detection time as the end time of the second time window, and obtaining the candidate detection signal corresponding to each candidate detection time within the second time window in the real-time detection signal;
[0087] According to the candidate detection signal corresponding to each candidate detection time within the second time window of the detection time, determining the local coefficient of variation corresponding to the detection time, and taking the local coefficient of variation as the second target feature corresponding to the detection time; the local coefficient of variation is used to represent the local fluctuation and / or local stability of the real-time detection signal in the signal rising stage.
[0088] The length of the second time window can be the same as or different from the length of the first time window. The length of the second time window is also related to the number of detection time points, and can be set according to actual conditions, for example, the second time window includes 30 detection time points.
[0089] After obtaining the detection signal of each detection time point in real time, the detection signal of each detection time point in the second time window can be subjected to local coefficient of variation operation to obtain the local coefficient of variation CV (Coefficient of Variation) corresponding to each detection time point. The local coefficient of variation can represent the local fluctuation and / or local stability of the real-time detection signal at each time point in the rising stage of the signal. Specifically, for each detection time point, the detection time point can be taken as the end time point of its second time window, and each time point within the second time window at the detection time point is obtained, which is recorded as a candidate detection time point. The candidate detection time point can include the detection time point, and the detection signal corresponding to each candidate detection time point can be obtained from the real-time detection signal, which is recorded as a candidate detection signal. Then, based on each candidate detection signal within the second time window of the detection time point, the local coefficient of variation corresponding to the detection time point is calculated, which can include mean, standard deviation, variance, average deviation, etc. After obtaining the local coefficient of variation corresponding to each detection time point, it can be taken as the second target feature of the corresponding detection time point.
[0090] As an option, the above-mentioned determination of the local coefficient of variation corresponding to the detection time point according to the candidate detection signal corresponding to each candidate detection time point within the second time window of the detection time point includes:
[0091] The candidate detection signal corresponding to each candidate detection time point within the second time window of the detection time point is subjected to mean processing to determine the local mean corresponding to the detection time point.
[0092] The candidate detection signal corresponding to each candidate detection time point within the second time window of the detection time point is subjected to mean processing to determine the local mean corresponding to the detection time point.
[0093] The local coefficient of variation corresponding to the detection time point is determined according to the local mean and / or local standard deviation corresponding to the detection time point.
[0094] Specifically, for each detection time point in the real-time detection signal, after obtaining each candidate detection signal within the second time window corresponding to the detection time point, the mean of each candidate detection signal can be processed, that is, the sum of each candidate detection signal within the second time window is divided by the length of the second time window to obtain the local mean corresponding to the detection time point, and the specific calculation formula is as follows:
[0095] ;
[0096] wherein, denotes the t i local mean value at the detection time, w denotes the length of the second time window, S ( t j ) denotes the t i the detection signal at the candidate detection time within the second time window at the detection time. t j the detection signal at the candidate detection time.
[0097] After that, the difference square value of each candidate detection time can be obtained by square processing of the difference between each candidate detection signal corresponding to the detection time and the local mean value at the detection time, and the local standard deviation corresponding to the detection time can be obtained by mean processing of the difference square value of each candidate detection time, and the specific calculation formula is as follows:
[0098] ;
[0099] wherein, denotes the t i local standard deviation at the detection time.
[0100] After that, one or more of the local mean value and the local standard deviation corresponding to the detection time can be taken as the local coefficient of variation corresponding to the detection time. Alternatively, the ratio of the local standard deviation to the local mean value at the detection time can be obtained by ratio processing, and the ratio is taken as the local coefficient of variation corresponding to the detection time. In addition, in order to prevent the denominator from being 0, the local mean value at the detection time can be summed with a set constant not equal to 0 to obtain a local sum value, and the local standard deviation is processed by ratio with the local sum value. Taking the ratio of the local standard deviation to the local sum value as the local coefficient of variation for example, the calculation process is as follows:
[0101] ;
[0102] wherein, CV ( t i ) denotes the t i the ratio of the local standard deviation to the local sum value at the detection time, denotes a set constant not equal to 0.
[0103] According to the above manner, the local variation coefficient corresponding to each detection time in the real-time detection signal can be obtained, and then the local variation coefficient corresponding to each detection time can be taken as the second target feature of the corresponding detection time. After obtaining the local variation coefficient of each detection time, the local variation coefficient can be sequentially added to the feature sequence in the order of the acquisition time sequence to obtain a feature sequence in which the local variation coefficients are arranged in time sequence. The feature sequence can be denoted as a variation coefficient sequence.
[0104] Accordingly, the real-time point-by-point comparison of the target features of each detection time to determine the peak target feature in the target feature of each detection time can include real-time comparison of each local variation coefficient in the variation coefficient sequence to find the peak local variation coefficient. It should be noted that the peak local variation coefficient can be a local variation coefficient corresponding to an inflection point or a peak in each local variation coefficient in the variation coefficient sequence, which can be expressed by the following formula:
[0105]
[0106] wherein, F C the peak local variation coefficient is denoted as CV t the variation coefficient sequence is denoted as max t denotes selecting the maximum value / inflection point / peak in the variation coefficient sequence.
[0107] It can be understood that the variation coefficient sequence includes a plurality of sequentially arranged local variation coefficients, and the local variation coefficients in the variation coefficient sequence can reflect the fluctuation and stability of the target sensor in the signal rising stage, specifically, can reflect the local fluctuation intensity of the target sensor in the signal rising stage, and can effectively describe the sensitive response degree of the target sensor to the concentration change of the object to be measured.
[0108] In this embodiment, two types of early features, peak difference features and peak local variation coefficients, are extracted in the rising stage of the real-time detection signal monitored by the target sensor, so that the rate feature and fluctuation feature of the target sensor response can be ensured when the real-time detection signal has not reached the steady state, key input variables are provided for the subsequent concentration estimation model to predict the concentration, and the efficiency and accuracy of the concentration estimation model for concentration estimation are improved.
[0109] The training process of the concentration estimation model is simply explained in the above embodiment, and the specific training process of the concentration estimation model is explained in the following embodiment.
[0110] Figure 2 is a second flowchart of the object concentration determination method provided by the present application, as shown in Figure 2 As shown, the training manner of the above concentration estimation model includes the following steps:
[0111] In step 202, sample detection signals of the sample sensor under different sample concentrations are obtained.
[0112] In this embodiment, multiple sample sensors can be used for model training, and each sample sensor can detect the concentration of a sample object to obtain a sample detection signal. Alternatively, in this step, the sample detection signals of the sample sensor under different sample concentrations can include:
[0113] A plurality of brand-new sample sensors of the same type are obtained.
[0114] The concentration range of the sample sensor is divided to determine a plurality of sample concentrations.
[0115] Each sample sensor detects the concentration of a sample object under each sample concentration to obtain a sample detection signal of each sample sensor under each sample concentration.
[0116] Specifically, a plurality of brand-new sample sensors of the same type can be obtained, i.e., sample sensors for detecting the concentration of the same type of sample object, such as four brand-new electrochemical gas sensors. The concentration range of the plurality of sample sensors is the same and can be obtained by setting the sample sensor. In addition, the sample object can be the same as the object to be measured. Then, the concentration range can be equally spaced, i.e., a plurality of concentration points are selected as a plurality of sample concentrations in the concentration range. It can be understood that the plurality of sample concentrations can cover the concentration range of the sample sensor, and the number of sample concentrations can be set according to actual conditions, such as 20 sample concentrations. After obtaining a plurality of sample concentrations, each sample sensor can independently detect the concentration of a sample object under each sample concentration to ensure the representativeness and consistency of the data. At the same time, each sample sensor repeatedly measures the same sample concentration multiple times (such as three times) with a fixed interval to ensure the repeatability and signal stability of the experimental results.
[0117] During the concentration detection of the sample sensor, time series data and electrochemical signals (including output current or potential-time curves) of the sample sensor can be continuously collected to obtain a complete data set reflecting the dynamic response process of the sample sensor. Through the above experiment, a plurality of electrochemical response sequences (i.e., sample detection signals) are constructed. After formatting and preprocessing, the data is used as a training sample for subsequent feature extraction and concentration estimation model training to optimize the response time of the electrochemical gas sensor and quickly predict the concentration.
[0118] Step 204, according to the preset target feature, the detection signal of each sample detection time of each sample detection signal is extracted respectively to obtain the sample target feature corresponding to each sample detection time of each sample detection signal.
[0119] In this step, a plurality of features can be extracted from each sample detection signal, and then the correlation between the plurality of features of each sample detection signal and the corresponding sample concentration is analyzed to find a feature that is highly correlated with the concentration and has a feature appearance time in the rising stage of the sample detection signal. The selected feature here can be referred to as a target feature. The target feature here can be, for example, the first target feature, the second target feature, etc.
[0120] After the target feature is determined, the target feature extraction process can be performed on the detection signal of each sample time of each sample detection signal according to the method of extracting the target feature from the real-time detection signal in the above embodiment to obtain the sample target feature corresponding to each sample time of each sample detection signal.
[0121] Step 206, real-time point-by-point comparison is performed on each sample target feature of the sample detection signal of each sample detection time to determine the sample peak target feature corresponding to the sample detection signal of each sample detection time.
[0122] In this step, after obtaining the sample target feature corresponding to each sample time of each sample detection signal, for each sample detection signal, the same type of target feature at each sample time can be compared point by point to obtain the sample peak target feature corresponding to each type of target feature of each sample detection signal.
[0123] In addition, it should be noted that the above-mentioned sample detection signal can include the detection signal between the start of detection and the steady state / peak value of the sample sensor, and the above-mentioned real-time detection signal is a dynamic real-time acquisition, real-time target feature extraction and real-time target feature comparison of the object to be measured. After obtaining the peak target feature, the signal acquisition can be stopped, and the appearance time of the detection signal corresponding to the peak target feature is earlier than the appearance time of the peak / steady state signal of the real-time detection signal. Therefore, the steady state / peak signal is not included in the real-time detection signal, i.e. the concentration prediction can be completed before the steady state / peak signal of the real-time detection signal arrives, and the sensor response time is shortened.
[0124] Step 208, the sample peak target feature of each sample detection signal is bound to the corresponding sample concentration, and an initial concentration estimation model is trained according to the binding relationship to determine the concentration estimation model.
[0125] In this step, after obtaining the peak target features of each class of samples in each sample detection signal, the peak target features of one or all classes of samples in each sample detection signal can be bound to their corresponding sample concentrations to form a set of training samples. This way, multiple sets of training samples can be obtained. Then, the initial concentration estimation model can be trained using these multiple sets of training samples to obtain a trained concentration estimation model.
[0126] Optionally, the concentration estimation model described above is a Random Forest Regressor. Specifically, training the concentration estimation model may include: inputting the peak target features of each training sample group into the initial concentration estimation model for concentration estimation processing; determining the predicted concentration of each training sample group (i.e., each sample detection signal); calculating the loss between the predicted concentration and the corresponding sample concentration for each training sample group using a loss function; and training the initial concentration estimation model based on the calculated loss to obtain the trained concentration estimation model.
[0127] The aforementioned random forest regression model is a nonparametric regression model based on the ensemble of multiple decision trees. It improves the model's fitting accuracy and generalization ability by randomly sampling samples and features, training multiple regression trees, and then weighting the outputs of each subtree. For each training sample, the process by which this random forest regression model estimates the concentration of the peak target feature in that training sample can be represented as follows:
[0128] ;
[0129] in, This represents the output of the random forest regression model, which estimates the concentration of the peak target feature in the training samples, i.e., the predicted sample concentration. M This indicates the number of regressing trees in the forest. f m ( X ) indicates the first m The goal of this random forest regression model is to minimize the error between the predicted and actual values to optimize overall prediction performance. The loss function used can be Mean Squared Error (MSE), which calculates the difference between the sample concentration of each training sample group and the corresponding predicted sample concentration, sums the squares of these differences, and averages the results to obtain the loss for each training sample group. The expression for this loss is:
[0130]
[0131] in, L For the final calculated loss, N This represents the total number of training samples in each group. respectively represent the sample concentration corresponding to the training sample of the first group (i.e. the true value of the concentration) and the predicted sample concentration (i.e. the predicted value of the concentration). l
[0132] In a specific implementation, the random forest regression model can be trained using Python language and scikit-learn open source library. After standardization processing, the input features are randomly divided into a training set and a validation set, wherein the training set accounts for 70% and the validation set accounts for 30%, so as to evaluate the generalization performance and robustness of the model. In the embodiment, the following parameter configuration is used:
[0133] Number of decision trees (n_estimators): 200;
[0134] Maximum tree depth (max_depth): adaptive optimization;
[0135] Minimum number of split samples (min_samples_split): 2;
[0136] Minimum number of leaf node samples (min_samples_leaf): 1;
[0137] Random number seed (random_state): 42.
[0138] Through the above process, the random forest regression model can be trained. After the training of the random forest regression model is completed, the input features are predicted using the trained random forest regression model to obtain the concentration estimate value of the electrochemical sensor in the response stage. By comparing with the true concentration data of the validation set, the determination coefficient R 2 and the root mean square error (RMSE) are calculated to evaluate the prediction accuracy and stability of the random forest regression model. The experimental results show that the scheme of the embodiment of the present application can realize accurate concentration prediction when the detection signal of the sensor has not reached a steady state, and R 2 > 0.95 and the RMSE remains at a low level, thereby verifying the high detection accuracy and good generalization performance of the random forest regression model of the embodiment of the present application.
[0139] In this embodiment, the sample detection signal of the sample sensor at different sample concentrations is obtained, and the model is trained by target feature extraction, peak target feature determination, and establishment of the binding relationship between the peak target feature and the sample concentration. In this way, the accuracy and generalization performance of the trained model can be improved by training the model with multiple sets of training samples and multiple sample concentrations. In addition, by testing multiple sample concentrations within the concentration range of the same type of sensor, the stability of the testing process can be ensured, thereby improving the accuracy of the trained model. Further, the concentration estimation model is a random forest regression model, which can improve the fitting accuracy and generalization ability of the model, and further improve the accuracy of concentration prediction by the model.
[0140] From the description of the above embodiments, it can be known that in the embodiments of the present application, sensor response data at different sample concentrations is first obtained through offline experiments, key feature parameters (differential signal peak value, coefficient of variation peak value, etc.) in the signal rising stage are extracted and screened, and a mapping model / nonlinear mapping relationship between the signal rising stage feature and the steady-state concentration is established. In real-time detection, after the sensor signal is preprocessed and the target feature is extracted and the peak target feature is determined, the trained model is directly input, and the concentration of the object to be detected can be predicted before the signal stabilizes, realizing rapid determination and output of the concentration. It is suitable for electrochemical gas sensors, especially for environmental monitoring, industrial safety and emergency detection, etc. which require high response speed. Moreover, the technical solution of the present application does not need to make any changes to the structure or material of the sensor, and has the characteristics of simple implementation, low cost and strong portability, and can be widely applied to different types of electrochemical gas sensors and various online detection scenes. It can be seen that the technical solution of the embodiment of the present application not only makes up for the defects of the existing rapid detection method such as response lag and insufficient real-time performance, but also significantly improves the response speed, detection efficiency and intelligent level of the electrochemical gas sensor, and provides an efficient and universal response time optimization technical solution for the gas detection field.
[0141] The object concentration determination device provided by the present application is described below. The object concentration determination device described below can be correspondingly referred to the object concentration determination method described above.
[0142] Figure 3 is a structural schematic diagram of the object concentration determination device provided by the present application, as shown in Figure 3 The device can include:
[0143] The signal acquisition module 310 is configured to acquire a real-time detection signal obtained by a target sensor for real-time concentration detection of an object to be detected. The real-time detection signal is a detection signal that changes in real time with the detection time.
[0144] The feature extraction module 320 is configured to perform target feature extraction on the detection signal at each detection time in the real-time detection signal according to a preset target feature, to obtain a target feature corresponding to each detection time.
[0145] The peak feature determination module 330 is configured to perform real-time point-by-point comparison on the target features at each detection time, to determine a peak target feature in the target features at each detection time; the peak target feature appears earlier than the peak signal or the steady-state signal of the real-time detection signal.
[0146] The concentration determination module 340 is configured to input the peak target feature into a concentration estimation model to perform concentration estimation processing, to determine a predicted concentration corresponding to the to-be-measured object; the concentration estimation model is obtained by pre-training according to a plurality of different sample peak target features and a sample concentration corresponding to each sample peak target feature, and the plurality of different sample peak target features are determined based on sample detection signals of a sample sensor under different sample concentrations.
[0147] In one embodiment, the target feature includes a first target feature, and the feature extraction module 320 is specifically configured to obtain a preset first time window; according to the first target feature, for each detection time in the real-time detection signal, the detection time is taken as the end time of the first time window, and the detection signal corresponding to the first end detection time of the first time window is obtained in the real-time detection signal; according to the difference between the detection signal corresponding to the detection time and the detection signal corresponding to the first end detection time of the first time window, a differential feature corresponding to the detection time is determined, and the differential feature is taken as the first target feature corresponding to the detection time; the differential feature is used to represent the rate change of the real-time detection signal in the signal rising stage.
[0148] In one embodiment, the target feature includes a second target feature, and the feature extraction module 320 is specifically configured to obtain a preset second time window; according to the second target feature, for each detection time in the real-time detection signal, the detection time is taken as the end time of the second time window, and the candidate detection signal corresponding to each candidate detection time located in the second time window is obtained in the real-time detection signal; according to the candidate detection signal corresponding to each candidate detection time in the second time window of the detection time, a local coefficient of variation corresponding to the detection time is determined, and the local coefficient of variation is taken as the second target feature corresponding to the detection time; the local coefficient of variation is used to represent the local fluctuation and / or local stability of the real-time detection signal in the signal rising stage.
[0149] Optionally, the feature extraction module 320 is specifically configured to perform mean processing on the candidate detection signals corresponding to each candidate detection time in the second time window of the detection time, to determine a local mean corresponding to the detection time; perform standard deviation processing on the candidate detection signals corresponding to each candidate detection time in the second time window of the detection time according to the local mean corresponding to the detection time, to determine a local standard deviation corresponding to the detection time; and determine a local coefficient of variation corresponding to the detection time according to the local mean and / or the local standard deviation corresponding to the detection time.
[0150] In one embodiment, the device further comprises a training module configured to: obtain sample detection signals of a sample sensor under different sample concentrations; perform target feature extraction on the detection signal of each sample detection time in each sample detection signal according to a preset target feature, to obtain sample target features corresponding to each sample detection time of each sample detection signal; perform real-time point-by-point comparison on the sample target features of the sample detection signal of each sample detection time, to determine sample peak target features corresponding to the sample detection signal of each sample detection time; establish a binding relationship between the sample peak target features of each sample detection signal and the corresponding sample concentration, and train an initial concentration estimation model according to the binding relationship, to determine the concentration estimation model.
[0151] In one embodiment, the training module is specifically configured to: obtain a plurality of brand-new sample sensors of the same type; divide the concentration range corresponding to the sample sensor, to determine a plurality of sample concentrations; and perform concentration detection on sample objects under each sample concentration by each sample sensor, to obtain sample detection signals of each sample sensor under each sample concentration.
[0152] In one embodiment, the concentration estimation model is a random forest regression model.
[0153] It should be noted that the device provided by the embodiment of the present application can realize all the method steps achieved by the method embodiment and achieve the same technical effects. Therefore, the same parts and beneficial effects of the method embodiment will not be described in detail.
[0154] Figure 4 An example of an entity structure diagram of an electronic device is shown in FIG. 1. Figure 4As shown, the electronic device can include a processor 410, a communications interface 420, a memory 430, and a communications bus 440, wherein the processor 410, the communications interface 420, and the memory 430 complete mutual communication through the communications bus 440. The processor 410 can invoke a logical instruction in the memory 430 to execute an object concentration determination method, which includes: obtaining a real-time detection signal obtained by a target sensor after real-time concentration detection of a to-be-detected object; the real-time detection signal is a detection signal that changes in real time with the detection time; according to a preset target feature, the detection signal of each detection time in the real-time detection signal is subjected to target feature extraction respectively, to obtain the target feature corresponding to each detection time; the target features of each detection time are subjected to real-time point-by-point comparison to determine a peak target feature in the target features of each detection time; the time when the peak target feature appears is earlier than the time when a peak signal or a steady-state signal of the real-time detection signal appears; the peak target feature is input into a concentration estimation model for concentration estimation processing to determine a predicted concentration corresponding to the to-be-detected object; the concentration estimation model is obtained by pre-training according to a plurality of different sample peak target features and a sample concentration corresponding to each sample peak target feature, and the plurality of different sample peak target features are determined based on sample detection signals of a sample sensor under different sample concentrations.
[0155] In addition, the logical instruction in the memory 430 described above can be implemented in the form of a software function unit and sold or used as an independent product, and can be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0156] In another aspect, the present application also provides a computer program product comprising a computer program, which can be stored on a non-transitory computer readable storage medium, and which, when executed by a processor, enables a computer to perform the object concentration determination method provided by any of the above methods. The method comprises: obtaining a real-time detection signal obtained by a target sensor after real-time concentration detection of a to-be-detected object; the real-time detection signal is a detection signal that changes in real time with the detection time; performing target feature extraction on the detection signal of each detection time in the real-time detection signal according to a preset target feature, to obtain a target feature corresponding to each detection time; performing real-time point-by-point comparison on the target features of each detection time to determine a peak target feature in the target features of each detection time; the peak target feature appears earlier than the time when a peak signal or a steady-state signal of the real-time detection signal appears; inputting the peak target feature into a concentration estimation model for concentration estimation processing to determine a predicted concentration corresponding to the to-be-detected object; the concentration estimation model is obtained by training a plurality of different sample peak target features and a sample concentration corresponding to each sample peak target feature in advance, and the plurality of different sample peak target features are determined based on sample detection signals of a sample sensor under different sample concentrations.
[0157] In another aspect, the present application also provides a non-transitory computer readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the object concentration determination method provided by any of the above methods. The method comprises: obtaining a real-time detection signal obtained by a target sensor after real-time concentration detection of a to-be-detected object; the real-time detection signal is a detection signal that changes in real time with the detection time; performing target feature extraction on the detection signal of each detection time in the real-time detection signal according to a preset target feature, to obtain a target feature corresponding to each detection time; performing real-time point-by-point comparison on the target features of each detection time to determine a peak target feature in the target features of each detection time; the peak target feature appears earlier than the time when a peak signal or a steady-state signal of the real-time detection signal appears; inputting the peak target feature into a concentration estimation model for concentration estimation processing to determine a predicted concentration corresponding to the to-be-detected object; the concentration estimation model is obtained by training a plurality of different sample peak target features and a sample concentration corresponding to each sample peak target feature in advance, and the plurality of different sample peak target features are determined based on sample detection signals of a sample sensor under different sample concentrations.
[0158] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected to achieve the purposes of the embodiments according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0159] Through the description of the above embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software and the necessary general hardware platform, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.
[0160] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method of object concentration determination, characterized by, The method comprises the following steps: obtaining a real-time detection signal obtained by a target sensor for real-time concentration detection on a to-be-detected object; the real-time detection signal is a detection signal that changes in real time with the detection time; extracting target features from the detection signal at each detection time in the real-time detection signal according to a preset target feature to obtain target features corresponding to each detection time; performing real-time point-by-point comparison on the target features at each detection time to determine a peak target feature in the target features at each detection time; the peak target feature appears earlier than the time when a peak signal or a steady-state signal of the real-time detection signal appears; inputting the peak target feature into a concentration estimation model for concentration estimation processing to determine a predicted concentration corresponding to the to-be-detected object; the concentration estimation model is obtained by training a plurality of different sample peak target features and a sample concentration corresponding to each sample peak target feature in advance, and the plurality of different sample peak target features are determined based on sample detection signals of a sample sensor under different sample concentrations.
2. The object concentration determination method according to claim 1, characterized by, The target feature includes a first target feature, and the step of extracting target features from the detection signal at each detection time in the real-time detection signal according to a preset target feature to obtain target features corresponding to each detection time comprises: obtaining a preset first time window; for each detection time in the real-time detection signal, taking the detection time as the end time of the first time window, and obtaining the detection signal corresponding to the starting detection time of the first time window in the real-time detection signal according to the first target feature; determining a differential feature corresponding to the detection time according to the difference between the detection signal corresponding to the detection time and the detection signal corresponding to the starting detection time of the first time window, and taking the differential feature as the first target feature corresponding to the detection time, wherein the differential feature is used to represent the rate change of the real-time detection signal in the signal rising stage.
3. The object concentration determination method according to claim 1, characterized by, The target feature includes a second target feature, and the step of extracting target features from the detection signal at each detection time in the real-time detection signal according to a preset target feature to obtain target features corresponding to each detection time comprises: obtaining a preset second time window; for each detection time in the real-time detection signal, taking the detection time as the end time of the second time window, and obtaining candidate detection signals corresponding to each candidate detection time within the second time window in the real-time detection signal according to the second target feature; determining a local coefficient of variation corresponding to the detection time according to the candidate detection signals corresponding to each candidate detection time within the second time window of the detection time, and taking the local coefficient of variation as the second target feature corresponding to the detection time; the local coefficient of variation is used to represent the local fluctuation and / or local stability of the real-time detection signal in the signal rising stage.
4. The object concentration determination method according to claim 3, characterized by, The step of determining the local variation coefficient corresponding to the detection time based on the candidate detection signals corresponding to each candidate detection time within the second time window of the detection time includes: The candidate detection signals corresponding to each candidate detection time within the second time window of the detection time are averaged to determine the local mean corresponding to the detection time. Based on the local mean corresponding to the detection time and the candidate detection signals corresponding to each candidate detection time within the second time window of the detection time, standard deviation processing is performed to determine the local standard deviation corresponding to the detection time. The local coefficient of variation corresponding to the detection time is determined based on the local mean and / or local standard deviation corresponding to the detection time.
5. The object concentration determination method according to any one of claims 1 to 4, characterized in that, The training methods for the concentration estimation model include: Acquire sample detection signals from the sample sensor at different sample concentrations; According to the preset target features, target features are extracted from the detection signals at each sample detection time in each sample detection signal to obtain the sample target features corresponding to each sample detection time of each sample detection signal; The sample target features of the sample detection signal at each sample detection time are compared in real time point by point to determine the sample peak target features corresponding to the sample detection signal at each sample detection time. The peak target features of each sample detection signal are linked to the corresponding sample concentration, and an initial concentration estimation model is trained based on the linking relationship to determine the concentration estimation model.
6. The object concentration determination method according to claim 5, characterized by, The acquisition of sample detection signals from the sample sensor at different sample concentrations includes: Acquire multiple new sensor samples of the same type; The concentration range corresponding to the sample sensor is divided to determine multiple sample concentrations; Each of the sample sensors performs concentration detection on the sample object at each of the sample concentrations to obtain the sample detection signal of each sample sensor at each of the sample concentrations.
7. The object concentration determination method according to any one of claims 1 to 4, characterized by, The concentration estimation model is a random forest regression model.
8. An object concentration determination apparatus characterized by comprising: include: The signal acquisition module is used to acquire the real-time detection signal obtained by the target sensor after real-time concentration detection of the target object; The real-time detection signal is a detection signal that changes in real time with the detection time; The feature extraction module is used to extract target features from the detection signal at each detection time in the real-time detection signal according to the preset target features, so as to obtain the target features corresponding to each detection time. The peak feature determination module is used to perform real-time point-by-point comparison of the target features at each detection time to determine the peak target feature among the target features at each detection time; the peak target feature appears earlier than the peak signal or steady-state signal of the real-time detection signal. The concentration determination module is configured to input the peak target feature into a concentration estimation model for concentration estimation processing to determine a predicted concentration corresponding to the to-be-detected object. The concentration estimation model is obtained by pre-training according to a plurality of different sample peak target features and a sample concentration corresponding to each of the sample peak target features. The plurality of different sample peak target features are determined based on sample detection signals of a sample sensor under different sample concentrations.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, The processor implements the object concentration determination method of any one of claims 1 to 7 when executing the computer program. 10.A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by the processor, implements the object concentration determination method of any one of claims 1 to 7.
Citation Information
Patent Citations
Method and equipment for rapidly detecting content of progesterone in milk of cattle and sheep
CN119574510A
Multi-gas accurate detection method and system
CN121027428A