Gas sensor array optimization method, device and equipment and storage medium
By screening and optimizing the gas sensor array, combining feature importance and interaction strength, the target sensor array is built, which solves the problem of sensor number and performance balance and improves the overall performance of the electronic nose system.
Patent Information
- Application Number
- CN202510462607.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-04-14
AI Technical Summary
The existing gas sensor array optimization method cannot effectively balance the number of sensors and the performance of the gas model, resulting in poor performance of the electronic nose system.
By determining the characteristic importance of the gas sensor in the gas model prediction, the first target sensor with high importance is selected, and the second target sensor with high interaction is selected according to the interaction intensity, the target sensor array is constructed, and the sensor array is optimized in combination with the incremental selection strategy.
While reducing the number of sensors, the performance of the gas model is maintained or improved, improving the overall performance of the electronic nose system.
Smart Images

Figure CN120446390A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic noses, and in particular to a gas sensor array optimization method, apparatus, device, and storage medium. Background Art
[0002] Electronic nose systems, as biomimetic olfactory systems, are widely used in food safety, environmental protection, and disease diagnosis. To more realistically simulate human olfaction, artificial olfactory systems, or electronic noses, typically utilize multi-gas sensor arrays. However, excessive gas sensors increase hardware complexity and lead to information redundancy due to cross-sensitivity, making optimization of the gas sensor array crucial.
[0003] Traditional gas sensor array optimization methods, such as those based on dynamic feature importance, genetic algorithm, correlation analysis, and machine learning, ultimately fail to achieve a good balance between the number of sensors and the performance of the gas model, resulting in poor performance of the electronic nose system. Summary of the Invention
[0004] Based on this, it is necessary to provide a gas sensor array optimization method, device, equipment and storage medium that can improve the performance of the electronic nose system to address the above technical problems.
[0005] In a first aspect, the present application provides a gas sensor array optimization method, the method comprising:
[0006] Determine the feature importance of multiple candidate gas sensors in the gas model prediction of the electronic nose system;
[0007] Selecting a first target sensor whose feature importance satisfies a high importance condition from the plurality of candidate gas sensors to form a sensor parent set;
[0008] For each first target sensor in the sensor parent set, determining an interaction strength between the first target sensor and a plurality of remaining sensors, and selecting a second target sensor from the plurality of remaining sensors whose interaction strength satisfies a high interaction condition to form a sensor subset of the first target sensor; the remaining sensors are candidate gas sensors from the plurality of candidate gas sensors other than the first target sensor;
[0009] A target sensor array is determined according to the sensor parent set and the sensor subset; the target sensor array at least includes a first target sensor in the sensor parent set and a second target sensor in the sensor subset included in the first target sensor.
[0010] In one embodiment, determining the feature importance of multiple candidate gas sensors in the electronic nose system in gas model prediction includes:
[0011] Determine all possible sensor arrays in the electronic nose system; each of the possible sensor arrays includes at least two candidate gas sensors among a plurality of candidate gas sensors in the electronic nose system;
[0012] For each candidate gas sensor in each of the possible sensor arrays, determining the importance of the candidate gas sensor in the gas model prediction, and obtaining an initial feature importance of the candidate gas sensor in the possible sensor array;
[0013] For each candidate gas sensor among the multiple candidate gas sensors, initial feature importances of the candidate gas sensor in all possible sensor arrays are averaged to obtain the feature importance of the candidate gas sensor in gas model prediction.
[0014] In one embodiment, selecting a first target sensor whose feature importance satisfies a high importance condition from the plurality of candidate gas sensors to form a sensor parent set includes:
[0015] sorting the plurality of candidate gas sensors in descending order of feature importance;
[0016] From the sorted plurality of candidate gas sensors, a first preset number of candidate gas sensors ranked at the top are selected as first target sensors that meet a high importance condition to form a sensor parent set.
[0017] In one embodiment, determining, for each first target sensor in the sensor superset, the interaction strength between the first target sensor and a plurality of remaining sensors includes:
[0018] For each first target sensor in the parent set of sensors and for each remaining sensor in a plurality of remaining sensors, determining a joint probability between the first target sensor and the remaining sensor, and determining a first marginal probability of the first target sensor and a second marginal probability of the remaining sensor;
[0019] An interaction strength between the first target sensor and the remaining sensors is determined according to the joint probability, the first marginal probability, and the second marginal probability.
[0020] In one embodiment, selecting, from the plurality of remaining sensors, a second target sensor whose interaction intensity satisfies a high interaction condition to form a sensor subset of the first target sensor includes:
[0021] sorting the plurality of remaining sensors in descending order of the interaction strength;
[0022] From the sorted plurality of remaining sensors, a second preset number of remaining sensors that are at the top of the sort are selected as second target sensors that meet a high interactivity condition to form a sensor subset of the first target sensors.
[0023] In one embodiment, determining a target sensor array according to the sensor parent set and the sensor subset includes:
[0024] Based on the sensor parent set and the sensor subset, a plurality of candidate sensor arrays are sequentially determined based on an incremental selection strategy; each candidate sensor array in the plurality of candidate sensor arrays determined each time includes the same number of candidate gas sensors; the number of candidate gas sensors included in each candidate sensor array determined each time is one more than the number of candidate gas sensors included in the candidate sensor array determined last time; each candidate sensor array includes at least one first target sensor in the sensor parent set and one second target sensor in the sensor subset that includes the first target sensor;
[0025] For each selection, selecting an optimal sensor array that optimizes the model performance of the gas model from the multiple candidate sensor arrays determined each time;
[0026] If the model performance increment between the optimal sensor array selected each time and the optimal sensor array selected last time is greater than or equal to the preset increment, then continue to select the optimal sensor array that optimizes the model performance of the gas model from the multiple candidate sensor arrays determined next time; otherwise, stop selecting and use the optimal sensor array selected last time as the target sensor array.
[0027] In a second aspect, the present application provides a gas sensor array optimization device, the device comprising:
[0028] a determination module, for determining the feature importance of multiple candidate gas sensors in the electronic nose system in gas model prediction;
[0029] a selection module, configured to select a first target sensor whose feature importance satisfies a high importance condition from the plurality of candidate gas sensors, to form a sensor parent set;
[0030] The determining module is further configured to determine, for each first target sensor in the sensor parent set, an interaction strength between the first target sensor and a plurality of remaining sensors; the selecting module is further configured to select, from the plurality of remaining sensors, a second target sensor whose interaction strength satisfies a high interaction condition, to form a sensor subset of the first target sensor; the remaining sensors are candidate gas sensors other than the first target sensor in the plurality of candidate gas sensors;
[0031] The determination module is further configured to determine a target sensor array based on the sensor parent set and the sensor subset; the target sensor array includes at least a first target sensor in the sensor parent set and a second target sensor in the sensor subset of the first target sensor.
[0032] In a third aspect, the present application provides a computer device including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps in the method embodiments of the present application are implemented.
[0033] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the various method embodiments of the present application.
[0034] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the steps in the various method embodiments of the present application when the computer program is executed by a processor.
[0035] The above-mentioned gas sensor array optimization method, device, equipment and storage medium determine the feature importance of multiple candidate gas sensors in the electronic nose system in the gas model prediction; select the first target sensor whose feature importance meets the high importance condition from the multiple candidate gas sensors to form a sensor parent set; for each first target sensor in the sensor parent set, determine the interaction strength between the first target sensor and the multiple remaining sensors, and select the second target sensor whose interaction strength meets the high interaction condition from the multiple remaining sensors to form a sensor subset of the first target sensor; the remaining sensors are candidate gas sensors other than the first target sensor in the multiple candidate gas sensors; determine the target sensor array based on the sensor parent set and the sensor subset; the target sensor array includes at least one first target sensor in the sensor parent set and one second target sensor in the sensor subset of the included first target sensor. Compared with the traditional gas sensor array optimization method, the present application first screens out the core gas sensors from multiple gas sensors based on the feature importance of the gas sensors in the gas model prediction to retain key information. Then, by combining the interaction strength between the core gas sensor and the remaining sensors, which measures the degree of mutual dependence between the two sensors, the remaining gas sensors with the highest degree of dependence on the core gas sensor are screened out. Furthermore, based on the screened core gas sensors and the gas sensors with the highest degree of dependence on the core gas sensor, the final optimized target sensor array is determined. This final optimized sensor array ensures that the gas model performance remains at a high level while using fewer gas sensors, thus achieving a good balance between the number of sensors and the gas model performance, thereby improving the performance of the electronic nose system. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 1 is a flow chart of a method for optimizing a gas sensor array according to an embodiment;
[0037] Figure 2 A schematic flow chart of a gas sensor array optimization method according to another embodiment;
[0038] Figure 3 A schematic diagram showing a performance comparison between an optimized target sensor array according to the present application and an array composed of all conventional sensors in one embodiment;
[0039] Figure 4 A schematic diagram showing a performance comparison between the sensor array optimization method of the present application and a traditional sensor array optimization method in one embodiment;
[0040] Figure 5A schematic diagram showing a performance comparison between the target sensor array optimized by the present application and an array composed of all conventional sensors in another embodiment;
[0041] Figure 6 is a structural block diagram of a gas sensor array optimization device in one embodiment;
[0042] Figure 7 is a diagram of the internal structure of a computer device in one embodiment;
[0043] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0045] In one embodiment, Figure 1 As shown, a gas sensor array optimization method is provided. The method can be applied to a computer device, which can be a terminal or a server. That is, the method can be executed by the terminal or server alone, or can be implemented through interaction between the terminal and the server. This embodiment uses the method applied to a computer device as an example to illustrate, and includes the following steps:
[0046] Step 102 : determining the feature importance of multiple candidate gas sensors in the electronic nose system in gas model prediction.
[0047] The electronic nose system consists of a gas sensor array and a gas model. The gas sensor array is composed of multiple gas sensors. The gas sensor array is the hardware front-end of the electronic nose system, responsible for signal generation, while the gas model is the software back-end of the electronic nose system, responsible for signal analysis. Although the gas model itself does not include the gas sensor array, its input is completely dependent on the output of the gas sensor array. The feature importance of a candidate gas sensor in the gas model prediction refers to the degree to which the candidate gas sensor contributes to the gas model's prediction results.
[0048] In one embodiment, the gas model may be at least one of a gas prediction model and a gas classification model. The gas prediction model is used to predict the input gas, while the gas classification model is used to classify the input gas.
[0049] In one embodiment, determining the feature importance of multiple candidate gas sensors in an electronic nose system in a gas model prediction includes: determining a candidate gas sensor array consisting of all candidate gas sensors in the electronic nose system; determining, for each candidate gas sensor in the candidate gas sensor array, the importance of the candidate gas sensor in the gas model prediction, and directly using the determined importance as the feature importance of the candidate gas sensor in the gas model prediction.
[0050] Step 104 : Select a first target sensor whose feature importance satisfies a high importance condition from the plurality of candidate gas sensors to form a sensor parent set.
[0051] The first target sensor is at least one candidate gas sensor selected from a plurality of candidate gas sensors, the feature importance of which satisfies a high importance condition. The sensor superset includes the selected first target sensors.
[0052] In one embodiment, the computer device may select a first target sensor having a feature importance greater than a preset importance from a plurality of candidate gas sensors to form a parent set of sensors.
[0053] Step 106: For each first target sensor in the sensor mother set, determine the interaction strength between the first target sensor and the multiple remaining sensors, and select a second target sensor whose interaction strength meets the high interaction condition from the multiple remaining sensors to form a sensor subset of the first target sensor; the remaining sensors are candidate gas sensors other than the first target sensor from the multiple candidate gas sensors.
[0054] The interaction strength between the first target sensor and the remaining sensors is used to measure the degree of interdependence between the first target sensor and the remaining sensors. The second target sensor is at least one remaining sensor selected from the plurality of remaining sensors whose interaction strength satisfies the high interaction condition. The sensor subset includes each of the selected second target sensors.
[0055] In one embodiment, for each first target sensor in the sensor mother set, the computer device can determine the interaction strength between the first target sensor and multiple remaining sensors, and select a second target sensor with an interaction strength greater than a preset interaction strength from the multiple remaining sensors to form a sensor subset of the first target sensor.
[0056] Step 108 : Determine a target sensor array based on the sensor parent set and the sensor subset. The target sensor array includes at least one first target sensor in the sensor parent set and one second target sensor in the sensor subset of the first target sensor.
[0057] In one embodiment, a target sensor array is determined based on a sensor parent set and a sensor subset, including: determining a plurality of candidate sensor arrays based on the sensor parent set and the sensor subset; each candidate sensor array includes at least one first target sensor in the sensor parent set and one second target sensor in the sensor subset of the first target sensor; and selecting, from the plurality of candidate sensor arrays, a candidate sensor array that optimizes the model performance of the gas model as the target sensor array.
[0058] In one embodiment, different evaluation metrics can be used to measure the performance of gas models for different task types. For example, for a gas model used for classification tasks, gas classification accuracy can be used as an evaluation metric to measure the performance of the gas model. For a gas model used for regression tasks, mean squared error can be used as an evaluation metric to measure the performance of the gas model.
[0059] In the above-mentioned gas sensor array optimization method, the feature importance of multiple candidate gas sensors in the electronic nose system in gas model prediction is determined; from the multiple candidate gas sensors, a first target sensor whose feature importance satisfies a high-importance condition is selected to form a sensor parent set; for each first target sensor in the sensor parent set, the interaction strength between the first target sensor and multiple remaining sensors is determined, and from the multiple remaining sensors, a second target sensor whose interaction strength satisfies a high-interaction condition is selected to form a sensor subset of the first target sensor; the remaining sensors are candidate gas sensors other than the first target sensor in the multiple candidate gas sensors; a target sensor array is determined based on the sensor parent set and the sensor subset; the target sensor array includes at least one first target sensor in the sensor parent set and one second target sensor in the sensor subset of the included first target sensor. Compared to traditional gas sensor array optimization methods, the present application first selects core gas sensors from multiple gas sensors based on their feature importance in gas model prediction to retain key information. Then, the interaction strength between the core gas sensor and the other remaining sensors is combined to measure the degree of mutual dependence between the two sensors to select gas sensors with a high degree of dependence on the core gas sensor from the remaining gas sensors. Furthermore, based on the screened core gas sensors and the gas sensors that are highly dependent on the core gas sensors, the final optimized target sensor array is determined. The final optimized sensor array can ensure that the model performance of the gas model remains at a better level while using fewer gas sensors, and it strikes a good balance between the number of sensors and the model performance of the gas model, thereby improving the performance of the electronic nose system.
[0060] In one embodiment, determining the feature importance of multiple candidate gas sensors in an electronic nose system in a gas model prediction includes: determining all possible sensor arrays in the electronic nose system; each possible sensor array includes at least two candidate gas sensors from the multiple candidate gas sensors in the electronic nose system; determining, for each candidate gas sensor in each possible sensor array, the importance of the candidate gas sensor in the gas model prediction to obtain an initial feature importance of the candidate gas sensor in the possible sensor array; and averaging, for each candidate gas sensor in the multiple candidate gas sensors, the initial feature importance of the candidate gas sensor in all possible sensor arrays to obtain the feature importance of the candidate gas sensor in the gas model prediction.
[0061] The possible sensor array is a sensor array of all possible combinations of multiple candidate gas sensors of the electronic nose system.
[0062] In one embodiment, for each candidate gas sensor in each possible sensor array, the initial characteristic importance (ie, SHAP value) of the candidate gas sensor in the possible sensor array can be calculated using the following formula:
[0063] ∅ x = ∑ S⊆N(i) S ! N - S -1 ! N ! [f S⋃ i - f S ] ;
[0064] Where N is the sensor set corresponding to the possible sensor array, S is the sensor subset after removing the candidate gas sensor i, f(S) represents the output of the gas model predicted using the possible sensor array N, and f(S) represents the output of the gas model predicted using only the sensor subset S. Represents the marginal contribution of gas sensor i.
[0065] In one embodiment, for each candidate gas sensor among the plurality of candidate gas sensors, the feature importance of the candidate gas sensor in the gas model prediction can be calculated using the following formula:
[0066] ;
[0067] Where M is the number of samples, that is, the number of possible sensor arrays, is the initial feature importance of candidate gas sensor i in the possible sensor array j.
[0068] In the above embodiment, the influence of a gas sensor may vary depending on the presence of other gas sensors. Therefore, by averaging the importance of each gas sensor across all possible gas sensor combinations to obtain the characteristic importance of each gas sensor in the gas model prediction, we can quantify the average influence of each gas sensor on the gas model prediction and improve the accuracy of the characteristic importance of each gas sensor in the gas model prediction.
[0069] In one embodiment, a first target sensor whose feature importance satisfies a high importance condition is selected from a plurality of candidate gas sensors to form a sensor mother set, including: sorting the plurality of candidate gas sensors in descending order of feature importance; and selecting a first preset number of candidate gas sensors ranked at the front from the sorted plurality of candidate gas sensors as the first target sensors that meet the high importance condition to form the sensor mother set.
[0070] In the above embodiment, by selecting a portion of candidate gas sensors with the greatest feature importance as the first target sensors that meet the high importance condition to form a sensor mother set, the core gas sensors can be screened out more accurately to retain key information, thereby further improving the performance of the electronic nose system.
[0071] In one embodiment, for each first target sensor in the sensor superset, determining the interaction strength between the first target sensor and a plurality of remaining sensors includes: determining, for each first target sensor in the sensor superset and for each remaining sensor in the plurality of remaining sensors, a joint probability between the first target sensor and the remaining sensors, and determining a first marginal probability of the first target sensor and a second marginal probability of the remaining sensors; and determining the interaction strength between the first target sensor and the remaining sensors based on the joint probability, the first marginal probability, and the second marginal probability.
[0072] In one embodiment, the interaction strength between the first target sensor and the remaining sensors can be calculated using the following formula:
[0073] ;
[0074] Where P(x,y) is the joint probability of taking the values of the first target sensor x and the remaining sensors y at the same time, P(x) is the first marginal probability of taking the value of the first target sensor x, and P(y) is the second marginal probability of taking the value of the remaining sensors y.
[0075] In the above embodiment, the interaction strength between the first target sensor and the remaining sensors is determined by using the joint probability between the first target sensor and the remaining sensors, the first edge probability of the first target sensor, and the second edge probability of the remaining sensors, thereby improving the accuracy of the interaction strength.
[0076] In one embodiment, second target sensors whose interaction strength meets a high interactivity condition are selected from a plurality of remaining sensors to form a sensor subset of a first target sensor, including: sorting the plurality of remaining sensors in descending order of interaction strength; and selecting a second preset number of remaining sensors ranked at the front of the sorted plurality of remaining sensors as second target sensors that meet the high interactivity condition to form a sensor subset of the first target sensor.
[0077] In the above embodiment, a portion of the remaining sensors with the largest interaction intensity is selected as the second target sensors that meet the high importance condition to form a sensor subset, so that gas sensors with a high degree of dependence on the core gas sensor can be more accurately screened out, thereby further improving the performance of the electronic nose system.
[0078] In one embodiment, a target sensor array is determined based on a sensor parent set and a sensor subset, including: sequentially determining multiple candidate sensor arrays based on the sensor parent set and the sensor subset based on an incremental selection strategy; each of the multiple candidate sensor arrays determined each time has the same number of candidate gas sensors; the number of candidate gas sensors contained in each candidate sensor array determined each time is one more than the number of candidate gas sensors contained in the candidate sensor array determined last time; each candidate sensor array includes at least one first target sensor from the sensor parent set and one second target sensor from the sensor subset containing the first target sensor; for each selection, selecting an optimal sensor array that optimizes the model performance of a gas model from the multiple candidate sensor arrays determined each time; if the incremental value of the model performance between the optimal sensor array selected each time and the optimal sensor array selected last time is greater than or equal to a preset incremental value, then continuing to select the optimal sensor array that optimizes the model performance of the gas model from the multiple candidate sensor arrays determined next time, otherwise stopping the selection and using the optimal sensor array selected last time as the target sensor array.
[0079] In the above embodiment, an incremental selection strategy is used to gradually add gas sensors and evaluate their contribution to model prediction, thereby selecting a gas sensor array that can better balance the number of sensors and the model performance of the gas model, thereby further improving the performance of the electronic nose system.
[0080] In one embodiment, Figure 2 As shown, the implementation steps of the gas sensor array optimization method of this application are as follows:
[0081] Step 1: Determine multiple candidate gas sensors S1-S8 in the electronic nose system.
[0082] Step 2: Determine the feature importance of multiple candidate gas sensors S1-S8 in the electronic nose system in gas model prediction; sort the multiple candidate gas sensors in descending order of feature importance; and select a first preset number (e.g., the first two) of the sorted candidate gas sensors as the first target sensors (S4 and S8) that meet the high importance condition to form a sensor parent set.
[0083] Step 3: For each first target sensor in the sensor superset, determine the interaction strength between the first target sensor and the remaining sensors. Then, sort the remaining sensors in descending order of interaction strength. From the sorted remaining sensors, select a second preset number (e.g., the first three) of the remaining sensors that meet the high interaction strength requirement as second target sensors to form a sensor subset of the first target sensor. For example, the sensor subset of first target sensor S4 in the sensor superset includes S8, S1, and S5. The sensor subset of first target sensor S8 in the sensor superset includes S4, S5, and S1.
[0084] Steps 4 and 5: Based on the sensor superset {S4, S8} and the sensor subsets {S8, S1, S5} and {S4, S5, S1}, multiple candidate sensor arrays are sequentially determined based on an incremental selection strategy; each of the multiple candidate sensor arrays determined each time has the same number of candidate gas sensors; the number of candidate gas sensors contained in each candidate sensor array determined each time is one more than the number of candidate gas sensors contained in the candidate sensor array determined previously; each candidate sensor array includes at least one first target sensor from the sensor superset and one second target sensor from the sensor subset of the first target sensor; for each selection, an optimal sensor array that optimizes the model performance of the gas model is selected from the multiple candidate sensor arrays determined each time; if the incremental value of the model performance between the optimal sensor array selected each time and the optimal sensor array selected previously is greater than or equal to a preset incremental value, the optimal sensor array that optimizes the model performance of the gas model is selected from the multiple candidate sensor arrays determined next time; otherwise, the selection is terminated and the optimal sensor array selected previously is used as the target sensor array. For example, in step 5, the incremental model performance between the optimal three-sensor array {S4, S8, S1} and the optimal two-sensor array {S4, S5} is If it is greater than or equal to the preset increment value β, the optimal sensor array that optimizes the model performance of the gas model will be selected from the multiple candidate sensor arrays determined next time. Otherwise, the selection is stopped and the optimal sensor array selected last time, that is, {S4, S5}, is used as the target sensor array.
[0085] In one embodiment, Figure 3 As shown, Figure 3 Figures A and B correspond to two datasets for gas classification tasks. The model performance of the target sensor array selected by the gas sensor array optimization method of the present application on 11 different gas models (i.e., RF, DT, XGBoost, LR, SVM, LDA, CNN, RNN, LSTM, TCN, and MLP) is compared with the model performance and sensor number of the original sensor array (i.e., the array consisting of all gas sensors in the electronic nose system). The results clearly demonstrate that the gas sensor array optimization method of the present application not only reduces the number of gas sensors but also optimizes model performance. Furthermore, the number of gas sensors corresponding to the target sensor array selected by the gas sensor array optimization method of the present application is significantly reduced, nearly halving the number of gas sensors in the original sensor array. Based on the RF, DT, XGBoost, SVM, and LDA models, the gas sensor array optimization method of the present application can achieve array optimization using no more than two gas sensors while maintaining minimal model performance fluctuation. In some gas models, the overall classification performance of the gas model is significantly improved as the number of gas sensors is reduced.
[0086] In one embodiment, Figure 4 As shown, Figure 4 Figure A shows the classification confusion matrix performance of the gas sensor array optimization method of this application on different machine learning methods. As can be seen, the gas sensor array optimization method of this application (i.e., the AOFI method) can effectively classify different categories under different models. For the above classification tasks, the gas sensor array optimization method of this application was compared with other array optimization methods, and the evaluation criteria included accuracy, precision, recall, and F1. Figure 4 Figures B and C show the performance comparison of the AOFI method and other array optimization methods on two datasets, and mark the performance of the original sensor array as a baseline comparison. Figure 4 Figures D and E compare the number of gas sensors in the sensor array selected by different array optimization methods. By comparing model performance and the number of gas sensors, we can see that the AOFI method can achieve array optimization with a smaller number of gas sensors while maintaining model performance, achieving a good balance between the number of gas sensors and model performance.
[0087] In one embodiment, Figure 5 As shown, Figure 5 Figure A shows the regression performance test of four gases based on 4 data subsets, and is verified by different models, comparing the MAE (mean absolute error) of the gas sensor array optimization method (i.e., AOFI method) of this application with the original sensor array combination. Figure 5 Figure B shows the R² performance of gas sensor arrays selected using the AOFI method and other array optimization methods for each dataset. As can be seen, the AOFI method achieves excellent array optimization results across different datasets. Experimental results demonstrate that the AOFI method performs well in regression tasks across multiple models. Compared to the original sensor array, the AOFI method improves the model's MAE and R² performance while reducing the number of sensors. For example, on models such as XGBoost, RF, and LSTM, the gas sensor array optimized by the AOFI method can achieve the same or even exceed the prediction performance of the original sensor array.
[0088] It should be understood that, although the various steps in the flow chart of the above-mentioned embodiments are shown in sequence, these steps are not necessarily performed in sequence. Unless clearly stated herein, the execution of these steps does not have strict order restrictions, and these steps can be performed in other sequences. Moreover, at least a portion of the steps in the above-mentioned embodiments may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0089] In one embodiment, Figure 6 As shown, a gas sensor array optimization device 600 is provided, which specifically includes:
[0090] A determination module 602 is used to determine the feature importance of multiple candidate gas sensors in the electronic nose system in the gas model prediction;
[0091] A selection module 604 is configured to select a first target sensor whose feature importance satisfies a high importance condition from a plurality of candidate gas sensors to form a sensor parent set;
[0092] The determination module 602 is further configured to determine, for each first target sensor in the sensor parent set, an interaction strength between the first target sensor and the plurality of remaining sensors. The selection module 604 is further configured to select, from the plurality of remaining sensors, a second target sensor whose interaction strength satisfies a high interaction condition, to form a sensor subset of the first target sensor. The remaining sensors are candidate gas sensors other than the first target sensor from the plurality of candidate gas sensors.
[0093] The determination module 602 is further configured to determine a target sensor array based on the sensor parent set and the sensor subset; the target sensor array includes at least a first target sensor in the sensor parent set and a second target sensor in the sensor subset of the first target sensor.
[0094] In one embodiment, the determination module 602 is further used to determine all possible sensor arrays in the electronic nose system; each possible sensor array includes at least two candidate gas sensors from a plurality of candidate gas sensors in the electronic nose system; for each candidate gas sensor in each possible sensor array, the importance of the candidate gas sensor in the gas model prediction is determined to obtain the initial feature importance of the candidate gas sensor in the possible sensor array; for each candidate gas sensor in the plurality of candidate gas sensors, the initial feature importance of the candidate gas sensor in all possible sensor arrays is averaged to obtain the feature importance of the candidate gas sensor in the gas model prediction.
[0095] In one embodiment, the selection module 604 is further used to sort multiple candidate gas sensors in descending order of feature importance; from the sorted multiple candidate gas sensors, the first preset number of candidate gas sensors ranked at the front are selected as the first target sensors that meet the high importance condition to form a sensor parent set.
[0096] In one embodiment, the determination module 602 is further configured to determine, for each first target sensor in the sensor parent set and for each remaining sensor in the plurality of remaining sensors, a joint probability between the first target sensor and the remaining sensors, and a first marginal probability of the first target sensor and a second marginal probability of the remaining sensors; and determine the interaction strength between the first target sensor and the remaining sensors based on the joint probability, the first marginal probability, and the second marginal probability.
[0097] In one embodiment, the selection module 604 is further used to sort the multiple remaining sensors in descending order of interaction intensity; and select the second preset number of remaining sensors ranked at the front from the sorted multiple remaining sensors as the second target sensors that meet the high interaction condition to constitute a sensor subset of the first target sensor.
[0098] In one embodiment, the determination module 602 is further configured to sequentially determine multiple candidate sensor arrays based on the sensor parent set and the sensor subset and an incremental selection strategy; each of the multiple candidate sensor arrays determined each time includes the same number of candidate gas sensors; the number of candidate gas sensors included in each candidate sensor array determined each time is one more than the number of candidate gas sensors included in the candidate sensor array determined last time; each candidate sensor array includes at least one first target sensor in the sensor parent set and one second target sensor in the sensor subset of the first target sensor; for each selection, an optimal sensor array that optimizes the model performance of the gas model is selected from the multiple candidate sensor arrays determined each time; if the incremental value of the model performance between the optimal sensor array selected each time and the optimal sensor array selected last time is greater than or equal to a preset incremental value, then the optimal sensor array that optimizes the model performance of the gas model is selected from the multiple candidate sensor arrays determined next time; otherwise, the selection is stopped and the optimal sensor array selected last time is used as the target sensor array.
[0099] The gas sensor array optimization device determines the feature importance of multiple candidate gas sensors in a gas model prediction in an electronic nose system; selects a first target sensor whose feature importance satisfies a high-importance condition from the multiple candidate gas sensors to form a sensor parent set; determines the interaction strength between each first target sensor in the sensor parent set and multiple remaining sensors, and selects a second target sensor whose interaction strength satisfies a high-interaction condition from the multiple remaining sensors to form a sensor subset of the first target sensor; the remaining sensors are candidate gas sensors other than the first target sensor from the multiple candidate gas sensors; and determines a target sensor array based on the sensor parent set and the sensor subset; the target sensor array includes at least one first target sensor from the sensor parent set and one second target sensor from the sensor subset of the included first target sensor. Compared to traditional gas sensor array optimization methods, the present application first selects core gas sensors from multiple gas sensors based on their feature importance in gas model prediction to retain key information. Then, combining the interaction strength between the core gas sensor and the other remaining sensors, which measures the degree of mutual dependence between the two sensors, selects gas sensors with a high degree of dependence on the core gas sensor from the remaining gas sensors. Furthermore, based on the screened core gas sensors and the gas sensors that are highly dependent on the core gas sensors, the final optimized target sensor array is determined. The final optimized sensor array can ensure that the model performance of the gas model remains at a better level while using fewer gas sensors, and it strikes a good balance between the number of sensors and the model performance of the gas model, thereby improving the performance of the electronic nose system.
[0100] Each module in the aforementioned gas sensor array optimization device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor within a computer device as hardware, or stored in a computer device memory as software, allowing the processor to call and execute the corresponding operations of each module.
[0101] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 7As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a gas sensor array optimization method is implemented.
[0102] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner. The wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication), or other technologies. When the computer program is executed by the processor, it implements a gas sensor array optimization method. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.
[0103] Those skilled in the art will understand that Figure 7 and Figure 8The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0104] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.
[0105] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor.
[0106] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0107] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.
[0108] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the above-described method embodiments. Any reference to memory, storage, database, or other media used in the embodiments provided herein may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0109] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0110] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A gas sensor array optimization method, characterized in that: The method comprises: Determine the feature importance of multiple candidate gas sensors in the gas model prediction of the electronic nose system; Selecting a first target sensor whose feature importance satisfies a high importance condition from the plurality of candidate gas sensors to form a sensor parent set; For each first target sensor in the sensor parent set, determining an interaction strength between the first target sensor and a plurality of remaining sensors, and selecting a second target sensor from the plurality of remaining sensors whose interaction strength satisfies a high interaction condition to form a sensor subset of the first target sensor; the remaining sensors are candidate gas sensors from the plurality of candidate gas sensors other than the first target sensor; A target sensor array is determined according to the sensor parent set and the sensor subset; the target sensor array at least includes a first target sensor in the sensor parent set and a second target sensor in the sensor subset included in the first target sensor.
2. The method according to claim 1, characterized in that The determining of the feature importance of multiple candidate gas sensors in the electronic nose system in the gas model prediction includes: Determine all possible sensor arrays in the electronic nose system; each of the possible sensor arrays includes at least two candidate gas sensors among a plurality of candidate gas sensors in the electronic nose system; For each candidate gas sensor in each of the possible sensor arrays, determining the importance of the candidate gas sensor in the gas model prediction, and obtaining an initial feature importance of the candidate gas sensor in the possible sensor array; For each candidate gas sensor among the multiple candidate gas sensors, initial feature importances of the candidate gas sensor in all possible sensor arrays are averaged to obtain the feature importance of the candidate gas sensor in gas model prediction.
3. The method according to claim 1, characterized in that The step of selecting a first target sensor whose feature importance satisfies a high importance condition from the plurality of candidate gas sensors to form a sensor parent set includes: sorting the plurality of candidate gas sensors in descending order of feature importance; From the sorted plurality of candidate gas sensors, a first preset number of candidate gas sensors ranked at the top are selected as first target sensors that meet a high importance condition to form a sensor parent set.
4. The method according to claim 1, wherein The determining, for each first target sensor in the sensor superset, the interaction strength between the first target sensor and a plurality of remaining sensors includes: For each first target sensor in the parent set of sensors and for each remaining sensor in a plurality of remaining sensors, determining a joint probability between the first target sensor and the remaining sensor, and determining a first marginal probability of the first target sensor and a second marginal probability of the remaining sensor; An interaction strength between the first target sensor and the remaining sensors is determined according to the joint probability, the first marginal probability, and the second marginal probability.
5. The method according to claim 1, wherein The step of selecting, from the plurality of remaining sensors, a second target sensor whose interaction intensity satisfies a high interaction degree condition to form a sensor subset of the first target sensor includes: sorting the plurality of remaining sensors in descending order of the interaction strength; From the sorted plurality of remaining sensors, a second preset number of remaining sensors that are at the top of the sort are selected as second target sensors that meet a high interactivity condition to form a sensor subset of the first target sensors.
6. The method according to any one of claims 1 to 5, characterized in that The step of determining a target sensor array according to the sensor parent set and the sensor subset includes: Based on the sensor parent set and the sensor subset, a plurality of candidate sensor arrays are sequentially determined based on an incremental selection strategy; each candidate sensor array in the plurality of candidate sensor arrays determined each time includes the same number of candidate gas sensors; the number of candidate gas sensors included in each candidate sensor array determined each time is one more than the number of candidate gas sensors included in the candidate sensor array determined last time; each candidate sensor array includes at least one first target sensor in the sensor parent set and one second target sensor in the sensor subset that includes the first target sensor; For each selection, selecting an optimal sensor array that optimizes the model performance of the gas model from the multiple candidate sensor arrays determined each time; If the model performance increment between the optimal sensor array selected each time and the optimal sensor array selected last time is greater than or equal to the preset increment, then continue to select the optimal sensor array that optimizes the model performance of the gas model from the multiple candidate sensor arrays determined next time; otherwise, stop selecting and use the optimal sensor array selected last time as the target sensor array.
7. A gas sensor array optimization device, characterized in that: The device comprises: a determination module, for determining the feature importance of multiple candidate gas sensors in the electronic nose system in gas model prediction; a selection module, configured to select a first target sensor whose feature importance satisfies a high importance condition from the plurality of candidate gas sensors, to form a sensor parent set; The determining module is further configured to determine, for each first target sensor in the sensor parent set, an interaction strength between the first target sensor and a plurality of remaining sensors; the selecting module is further configured to select, from the plurality of remaining sensors, a second target sensor whose interaction strength satisfies a high interaction condition, to form a sensor subset of the first target sensor; the remaining sensors are candidate gas sensors other than the first target sensor in the plurality of candidate gas sensors; The determination module is further configured to determine a target sensor array based on the sensor parent set and the sensor subset; the target sensor array includes at least a first target sensor in the sensor parent set and a second target sensor in the sensor subset of the first target sensor.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Electronic nose gas sensor array optimization method based on dynamic characteristic importance
CN109799269A
Sensor array optimization and feature selection method based on feature group combination
CN110837871A
Electronic nose array optimization method based on adaptive feature selection
CN115168792A
Signal processing method and device applied to intelligent electronic nose
CN118275608A
Food freshness detection system and method based on gas sensor array
CN119757672A