Odor database updating method and device, storage medium and product

By acquiring target sample metadata, filtering reference odor category feature vector sets, calculating minimum similarity distance, and combining confidence and environmental information, the odor database is dynamically updated, solving the problem of low odor classification efficiency and achieving real-time iteration and efficient classification.

CN121833728APending Publication Date: 2026-04-10ZHONGKE WEIGAN (NINGBO) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-13
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In existing technologies, the odor database is not updated in a timely manner, resulting in low odor classification efficiency and requiring the entire model to be retrained, which leads to low system efficiency.

Method used

By acquiring target sample metadata, filtering the feature vector set of reference odor categories, calculating the minimum similarity distance, and combining confidence and environmental information, the odor database is dynamically updated to avoid full training.

Benefits of technology

It enables real-time, online iteration of the odor classification model, improving classification efficiency, reducing computing power and time costs, and ensuring high data reliability and accurate identification capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121833728A_ABST
    Figure CN121833728A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of sensors, in particular to a smell database updating method and device, a storage medium and a product, and the method comprises the steps: obtaining target sample metadata; according to a candidate category range corresponding to the to-be-classified identifier, screening a reference feature vector set corresponding to at least one reference odor category from an original odor database, and determining a minimum similarity distance between the target odor and the at least one reference odor category; determining a target category to which the target odor belongs according to the minimum similarity distance and a preset percentile threshold of a reference odor category corresponding to the minimum similarity distance; and when the confidence coefficient of the target feature vector is greater than a first threshold value and the environmental information of the sensor array meets a preset condition, establishing a mapping relationship between the target sample metadata and the target category, and updating the original database to obtain a target odor database. The problem that the smell database is not updated in time due to low work efficiency of smell classification determination can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of sensors, and particularly relates to an updating method, device, storage medium and product of an odor database. BACKGROUND

[0002] With the development of big data, machine learning and sensor technology, the application of electronic nose devices (gas sensor arrays) is also more and more widely used, the number of sensing channels and the sampling frequency of the sensor array are significantly improved, and the scale of the response data generated by the sensor array exposed to the gas is explosively increased.

[0003] In the related art, the response data generated by the sensor array is usually collected offline, the response data is input into an odor classification model, other categories corresponding to the response data are output, and the categories and the response data are stored in a database. However, this static storage method needs to retrain the full model of the odor classification model once a new odor category appears, which leads to low work efficiency of determining odor classification and further leads to untimely updating of the odor database. SUMMARY

[0004] In order to solve the above technical problems, the present disclosure provides an updating method, device, storage medium and product of an odor database to solve the problem of low work efficiency of determining odor classification and untimely updating of the odor database.

[0005] In a first aspect, the present disclosure provides an updating method of an odor database, the method comprising: obtaining target sample metadata, the target sample metadata comprising a target feature vector corresponding to a response of a sensor array exposed to a target odor, and a to-be-classified identifier corresponding to the target odor; selecting, from an original odor database corresponding to an odor classification model, a reference feature vector set corresponding to each reference odor category in at least one reference odor category corresponding to a candidate category range according to the candidate category range; determining a minimum similarity distance between the target odor and the at least one reference odor category according to the target feature vector and the reference feature vector set; determining a target category to which the target odor belongs according to the minimum similarity distance and a preset percentile threshold of the reference odor category corresponding to the minimum similarity distance; when a confidence of the target feature vector is greater than a first threshold and environment information of the sensor array satisfies a preset condition, establishing a mapping relationship between the target sample metadata and the target category, updating the mapping relationship and the target sample metadata to the original database, and obtaining a target odor database.

[0006] In one optional implementation, acquiring target sample metadata includes: acquiring initial sample metadata, which includes initial response feature values ​​and response association information corresponding to the responses generated by the sensor array when exposed to the target odor, and the response association information includes a classification identifier; standardizing the initial response feature values ​​based on the interquartile range algorithm to obtain standardized intermediate response feature values; acquiring the current temperature and humidity of the environment where the sensor array is located at the current moment; correcting the intermediate response feature values ​​according to the current temperature and humidity to obtain target response feature values, wherein the drift index of the sensor array corresponding to the target response feature values ​​is less than a preset drift index; and generating target sample metadata based on the target response feature values ​​and the response association information.

[0007] In one optional implementation, the intermediate response feature value is corrected based on the current temperature and current humidity to obtain the target response feature value, including: calculating the difference between the current temperature and the preset temperature to obtain the temperature difference value, and calculating the difference between the current humidity and the preset humidity to obtain the humidity difference value; and correcting the intermediate response feature value based on the temperature difference value and the humidity difference value according to the first algorithm to obtain the target response feature value.

[0008] The first algorithm can be represented based on the following expression:

[0009] in, Represents the characteristic value of the target response; Indicates the intermediate response characteristic value; Indicates the temperature difference value; Indicates the humidity difference; This represents the compensation coefficient corresponding to the temperature difference. This represents the compensation coefficient corresponding to the humidity difference.

[0010] In one optional implementation, determining the minimum similarity distance between the target odor and at least one reference odor category based on the target feature vector and the set of reference feature vectors includes: determining the category center vector corresponding to each reference odor category based on the set of reference feature vectors corresponding to each reference odor category; calculating the Mahalanobis distance and cosine similarity distance between each category center vector and the target feature vector; determining the similarity distance between the target odor and each reference odor category according to the second algorithm based on the Mahalanobis distance and cosine similarity distance; and determining the minimum similarity distance among the at least one similarity distance as the minimum similarity distance.

[0011] The second algorithm can be represented based on the following expression:

[0012] in, Indicates similarity distance; Indicates Mahalanobis distance; Represents the cosine similarity distance; This represents the weight value corresponding to the Mahalanobis distance.

[0013] In one optional implementation, the target category to which the target odor belongs is determined based on the minimum similarity distance and a preset percentile threshold of the reference odor category corresponding to the minimum similarity distance, including: when the minimum similarity distance is less than the preset percentile threshold, the reference odor category corresponding to the minimum similarity distance is determined as the target category; or, when the minimum similarity distance is greater than or equal to the preset percentile threshold, a new odor category corresponding to the target category is created, and the new odor category is determined as the target category.

[0014] In an optional implementation, before establishing the mapping relationship between the target sample metadata and the target category when the confidence level of the target feature vector is greater than a first threshold and the environmental changes of the sensor array meet preset conditions, the method further includes: obtaining the minimum distance from the target feature vector to the boundary of the adjacent category, the local sample density of the target feature vector in the feature space, and the repeated sampling variance corresponding to the target odor; and calculating the confidence level of the target feature vector based on the minimum distance, the local sample density, the repeated sampling variance, and the drift index.

[0015] In one optional implementation, the method further includes: generating a prompt message when the confidence level is less than or equal to a second threshold, the prompt message indicating that the target category needs to be manually reviewed; or, detecting whether the environmental information meets preset conditions when the confidence level is less than or equal to a first threshold and greater than a second threshold; if the environmental information does not meet the preset conditions, generating a prompt message.

[0016] Secondly, the present invention provides an odor database updating device, which includes: an acquisition module for acquiring target sample metadata, the target sample metadata including a target feature vector corresponding to the response of a sensor array exposed to a target odor and a classification identifier corresponding to the target odor.

[0017] The processing module is used to filter the reference feature vector set corresponding to each reference odor category in the original odor database corresponding to the odor classification model, based on the candidate category range corresponding to the identifier to be classified; determine the minimum similarity distance between the target odor and at least one reference odor category based on the target feature vector and the reference feature vector set; and determine the target category to which the target odor belongs based on the minimum similarity distance and the preset percentile threshold of the reference odor category corresponding to the minimum similarity distance.

[0018] The update module is used to establish a mapping relationship between target sample metadata and target category when the confidence level of the target feature vector is greater than the first threshold and the environmental information of the sensor array meets the preset conditions, update the mapping relationship and target sample metadata to the original database, and obtain the target odor database.

[0019] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the odor database update method of the first aspect or any corresponding embodiment described above.

[0020] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the odor database update method of the first aspect or any corresponding embodiment described above.

[0021] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to execute the method for updating an odor database according to the first aspect or any corresponding embodiment described above.

[0022] The technical solution provided in this disclosure has the following advantages: The odor database update device can acquire target sample metadata; based on the candidate category range corresponding to the identifier to be classified, it filters the reference feature vector set corresponding to each reference odor category in at least one reference odor category corresponding to the candidate category range from the original odor database; based on the target feature vector and the reference feature vector set, it determines the minimum similarity distance between the target odor and at least one reference odor category; based on the minimum similarity distance and the preset percentile threshold of the reference odor category corresponding to the minimum similarity distance, it determines the target category to which the target odor belongs; when the confidence of the target feature vector is greater than the first threshold and the environmental information of the sensor array meets the preset conditions, it establishes a mapping relationship between the target sample metadata and the target category, updates the mapping relationship and the target sample metadata to the original database, and obtains the target odor database.

[0023] Since the target database is locally calculated and updated based on the set of reference feature vectors corresponding to the target category, the odor classification model does not need to retrain all category data in the database. This avoids the long system interruption caused by full retraining, reduces computing power and time costs, enables real-time, online iteration of the odor classification model, improves the efficiency of determining odor classification, and allows for timely updates to the odor database. Furthermore, combining confidence level and environmental information for dual verification to screen high-reliability samples for database inclusion effectively avoids contamination by low-quality or misclassified samples. Simultaneously, the preset percentile threshold is determined based on the data distribution of each category, adapting to the characteristic differences of different odor categories, further enhancing the accurate identification capability of cross-category odors. Attached Figure Description

[0024] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0025] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1 This is a flowchart illustrating a method for updating an odor database according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating another method for updating an odor database according to an embodiment of the present invention; Figure 3 This is a flowchart illustrating another method for updating an odor database according to an embodiment of the present invention; Figure 4 This is a structural block diagram of an odor database updating device according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an optional embodiment of the present invention. Detailed Implementation

[0027] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0028] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0029] This application embodiment is applied to a scenario where response data generated by a sensor array is collected and the response data is updated to an odor database.

[0030] In related technologies, response data generated by sensor arrays is typically collected offline. This response data is then input into an odor classification model, which outputs the corresponding categories for that response data. The categories and response data are then stored in a database. However, this static storage method requires a full retraining of the odor classification model whenever a new odor category is added. This results in low efficiency in determining the classification of odor response data, leading to untimely updates to the odor database.

[0031] To address the aforementioned technical issues, this application proposes a method for updating an odor database. This method involves: acquiring target sample metadata; selecting a set of reference feature vectors for each of at least one reference odor category from the original odor database, based on the candidate category range corresponding to the unclassified identifier included in the target sample metadata; determining the minimum similarity distance between the target odor and at least one reference odor category based on the target feature vector and the set of reference feature vectors; determining the target category to which the target odor belongs based on the minimum similarity distance and a preset percentile threshold of the reference odor category corresponding to the minimum similarity distance; and establishing a mapping relationship between the target sample metadata and the target category when the confidence level of the target feature vector is greater than a first threshold and the environmental information of the sensor array meets preset conditions. This mapping relationship and the target sample metadata are then updated to the original database to obtain the target odor database. This approach eliminates the need to retrain all category data in the database, improving the efficiency of determining the odor category and enabling timely updates to the odor database.

[0032] Figure 1 This is a flowchart illustrating a method for updating an odor database according to an embodiment of the present invention. The method can be executed by an odor database updating device, which can be implemented in software and / or hardware. The odor database updating device can be configured in an electronic device, such as a server or terminal, wherein the terminal specifically includes an in-vehicle terminal, a computer, or a tablet computer, etc.

[0033] like Figure 1 As shown, the method for updating the odor database provided in this embodiment includes the following steps. Figure 1 As shown, Figure 1This is a flowchart illustrating a method for updating an odor database according to an embodiment of the present invention. The process includes the following steps: S101, Obtain target sample metadata.

[0034] In this embodiment of the application, the target sample metadata includes the target feature vector and response association information corresponding to the response generated by the sensor array being exposed to the target odor.

[0035] The response-related information includes the target sample's sample identifier, environmental information, label information, and status information. The sample identifier includes the target sample's identifier, sampling time, sensor array device number, and number of channels. Environmental information includes the current temperature, humidity, and pressure of the sensor array. Label information includes the target odor's corresponding classification identifier, odor name, and concentration range. Status information includes the target sample's confidence level, drift index, label status, and noise label. The classification identifier can indicate an odor from a specific domain. For example, it could be an odor from the food domain or an odor from the flower domain.

[0036] The drift index of the sensor array corresponding to the target response characteristic value is less than the preset drift index. The preset drift index can be set according to actual needs and is not restricted.

[0037] In some optional implementations, the odor database update device can acquire initial sample metadata; standardize the initial response feature values ​​based on the interquartile range algorithm to obtain standardized intermediate response feature values; acquire the current temperature and humidity of the environment where the sensor array is located at the current moment; correct the intermediate response feature values ​​according to the current temperature and humidity to obtain target response feature values; and generate target sample metadata according to the target response feature values ​​and response association information.

[0038] The initial sample metadata includes the initial response feature values ​​and response association information corresponding to the responses generated by exposure to the target odor in the sensor array.

[0039] Specifically, such as Figure 2 As shown, Figure 2 This is a schematic flowchart of another method for updating an odor database according to an embodiment of the present invention. The odor database updating device can perform the following steps: S1011, calculate the difference between the current temperature and the preset temperature to obtain the temperature difference, and calculate the difference between the current humidity and the preset humidity to obtain the humidity difference.

[0040] The preset temperature or preset humidity can be set according to actual needs without restriction.

[0041] S1012, according to the first algorithm, the intermediate response feature value is corrected based on the temperature difference and humidity difference to obtain the target response feature value.

[0042] The first algorithm can be represented based on the following expression:

[0043] in, Represents the characteristic value of the target response; Indicates the intermediate response characteristic value; Indicates the temperature difference value; Indicates the humidity difference; This represents the compensation coefficient corresponding to the temperature difference. This represents the compensation coefficient corresponding to the humidity difference.

[0044] Specifically, during the process of the odor database update device correcting the intermediate response feature value according to the first algorithm based on the temperature difference and humidity difference, the drift index of the sensor can be determined by the feature mean of the current batch of samples, the feature mean of the benchmark batch, and the feature standard deviation of the benchmark batch, including the corrected intermediate response feature value. If the drift index is greater than or equal to the preset drift index, the intermediate response feature value is corrected until the determined drift index is less than the preset drift index, at which point the compensation stops and the target response feature value is obtained.

[0045] Optionally, the odor database update mechanism can correct intermediate response feature values ​​to obtain target response feature values ​​through tree model regression or sliding window baseline reconstruction based on historical samples, which will not be elaborated here.

[0046] Understandably, standardizing the initial response feature values ​​using the interquartile range (IQR) algorithm provides stronger robustness to extreme outliers. This effectively filters out abnormal data generated by accidental interference during sensor array acquisition, avoiding the impact of extreme values ​​on feature distribution and resulting in more stable intermediate response feature values. Furthermore, by incorporating current temperature and humidity parameters to specifically correct the intermediate response feature values, the sensor sensitivity shift caused by changes in environmental conditions (such as temperature and humidity fluctuations) can be offset. This makes the final output target response feature values ​​closer to the true characteristics of the odor, ensuring the comparability of feature values ​​under different environments, significantly reducing the sensor drift index, and improving the accuracy of subsequent category determination.

[0047] S102, based on the candidate category range corresponding to the identifier to be classified, select the reference feature vector set corresponding to each reference odor category from the original odor database corresponding to the candidate category range.

[0048] The original odor database includes multiple odor classifications and corresponding feature vectors for each odor classification. This database employs a three-layer hybrid indexing system: hierarchical structure, vector indexing, and cascading indexes. The database constructs a structured classification directory based on domain, odor type, and concentration range. Odor feature vectors are stored in a dedicated vector database, enabling Top-K similarity retrieval to find similar odor samples based on feature similarity. The database retrieval process first filters the candidate set hierarchically, then performs vector nearest neighbor recall, achieving a balance between efficiency and accuracy.

[0049] For example, taking the odor to be classified as the food sector and the target odor as the volatile odor of meat as an example, the odor database updating device can select a set of reference feature vectors corresponding to each reference odor category in at least one reference odor category corresponding to the candidate category range corresponding to the food sector (e.g., meat, fruit, vegetables, dairy) from the original odor database.

[0050] S103, Based on the target feature vector and the set of reference feature vectors, determine the minimum similarity distance between the target odor and at least one reference odor category.

[0051] The minimum similarity distance is used to indicate the reference odor category whose features are most similar to those of the target odor in at least one reference odor category.

[0052] Specifically, such as Figure 3 As shown, Figure 3 This is a schematic flowchart of another method for updating an odor database according to an embodiment of the present invention. The odor database updating device can perform the following steps: S1031, Based on the set of reference feature vectors corresponding to each reference odor category, determine the category center vector corresponding to each reference odor category.

[0053] S1032, calculate the Mahalanobis distance and cosine similarity distance between each category center vector and the target feature vector.

[0054] S1033, according to the second algorithm, the similarity distance between the target odor and each reference odor category is determined based on Mahalanobis distance and cosine similarity distance.

[0055] The second algorithm can be represented based on the following expression:

[0056] in, Indicates similarity distance; Indicates Mahalanobis distance; Represents the cosine similarity distance; This represents the weight value corresponding to the Mahalanobis distance.

[0057] S1034, determine the smallest similarity distance among at least one similarity distance as the minimum similarity distance.

[0058] Understandably, by simultaneously calculating and weighting Mahalanobis distance and cosine similarity distance, the Mahalanobis distance, which considers the dimensional correlation and data distribution of feature vectors, effectively reduces misclassification caused by overlapping features of different categories. Cosine similarity distance focuses on the directional consistency of feature vectors, making it more sensitive to the type identification of odor features. The combined similarity distance, compared to a single distance metric, more accurately characterizes the feature differences between the target odor and the reference category, significantly improving the accuracy of category matching. Furthermore, using the category center vector of the reference feature vector set as the distance calculation benchmark, rather than a single reference sample, avoids the random interference of a single sample. The category center vector is the feature mean of all reference samples of the same category, representing the core features of that category's odor. Distance values ​​calculated based on this benchmark are more statistically significant, ensuring the fairness and effectiveness of distance comparisons between different reference categories. The accurate minimum similarity distance provides a reliable basis for subsequent threshold comparison to determine the target category, effectively filtering out truly matching reference categories and avoiding the inclusion of misclassified samples due to inaccurate distance measurements.

[0059] S104. Determine the target category to which the target odor belongs based on the minimum similarity distance and the preset percentile threshold of the reference odor category corresponding to the minimum similarity distance.

[0060] The preset percentile threshold for the reference odor category corresponding to the minimum similarity distance can be the 90th percentile of the distance distribution within the reference odor category.

[0061] In some optional implementations, the odor database updating device determines the reference odor category corresponding to the minimum similarity distance as the target category when the minimum similarity distance is less than a preset percentile threshold; or, when the minimum similarity distance is greater than or equal to the preset percentile threshold, it creates a new odor category corresponding to the target category and determines the new odor category as the target category.

[0062] Understandably, by using a preset percentile threshold as the judgment boundary, when the minimum similarity distance is lower than the threshold, the target odor is determined to belong to an existing reference category, thus achieving accurate classification of known odors; when the minimum similarity distance is higher than the threshold, the new category creation process is automatically triggered, thus achieving effective identification of unknown odors. This breaks through the limitation of traditional classification models that can only identify existing categories, giving the system the ability to autonomously expand the odor recognition range.

[0063] S105, when the confidence level of the target feature vector is greater than the first threshold and the environmental information of the sensor array meets the preset conditions, establish a mapping relationship between the target sample metadata and the target category, update the mapping relationship and the target sample metadata to the original database, and obtain the target odor database.

[0064] The preset conditions can be that the difference between the current temperature of the sensor array and the temperature at the time of the previous sampling is less than a preset temperature difference, and the difference between the current humidity of the sensor array and the humidity at the time of the previous sampling is less than a preset humidity difference.

[0065] In some optional implementations, the odor database update device obtains the minimum distance from the target feature vector to the boundary of the adjacent category, the local sample density of the target feature vector in the feature space, and the repeat sampling variance corresponding to the target odor; and calculates the confidence level of the target feature vector based on the minimum distance, local sample density, repeat sampling variance, and drift index.

[0066] In one example, the odor database update device calculates the confidence level of the target feature vector according to a third algorithm, based on minimum distance, local sample density, repeated sampling variance, and drift index.

[0067] The third algorithm can be represented based on the following expression:

[0068] in, Represents the confidence level of the target feature vector; Indicates the minimum distance; Indicates local sample density; Indicates the variance of repeated sampling; Indicates the drift index; This represents the weight value corresponding to the minimum distance; This represents the weight value corresponding to the local sample density; This represents the weight value corresponding to the variance of repeated sampling; This represents the weight value corresponding to the drift index.

[0069] In one example, a prompt message is generated when the confidence level is less than or equal to the second threshold; or, when the confidence level is less than or equal to the first threshold and greater than the second threshold, it is detected whether the environmental information meets the preset conditions; if the environmental information does not meet the preset conditions, a prompt message is generated.

[0070] The prompt message indicates that the target category needs to be manually reviewed.

[0071] Understandably, when the confidence level is less than or equal to the second threshold, meaning the target feature vector has low confidence, triggering a prompt message directly ensures that all low-quality samples are screened. When the confidence level is less than or equal to the first threshold but greater than the second threshold, meaning the target feature vector has intermediate confidence, triggering a prompt message is determined based on environmental stability. This avoids a one-size-fits-all approach to manual review, reduces unnecessary manual intervention for high-quality samples, saves review manpower costs, and ensures the accuracy and reliability of the data entering the database from the source. Through intelligent judgment of confidence level and environmental information, automatic entry and model updates for high-confidence samples are achieved, while manual review is triggered only for low-confidence samples, significantly reducing the workload of manual annotation and model maintenance, and lowering manpower costs.

[0072] Furthermore, after determining the target odor database, only the center, covariance matrix, and discriminator parameters of the affected categories in the odor classification model are updated, avoiding full model retraining of the odor classification model and achieving real-time evolution.

[0073] based on Figure 1 The method shown describes a device for updating an odor database that can acquire target sample metadata; based on the candidate category range corresponding to the identifier to be classified, it filters a set of reference feature vectors for each reference odor category from at least one reference odor category corresponding to the candidate category range in the original odor database; based on the target feature vector and the set of reference feature vectors, it determines the minimum similarity distance between the target odor and at least one reference odor category; based on the minimum similarity distance and a preset percentile threshold of the reference odor category corresponding to the minimum similarity distance, it determines the target category to which the target odor belongs; when the confidence level of the target feature vector is greater than a first threshold and the environmental information of the sensor array meets preset conditions, it establishes a mapping relationship between the target sample metadata and the target category, updates the mapping relationship and the target sample metadata to the original database, and obtains the target odor database.

[0074] Since the target database is locally calculated and updated based on the set of reference feature vectors corresponding to the target category, the odor classification model does not need to retrain all category data in the database. This avoids the long system interruption caused by full retraining, reduces computational and time costs, and enables real-time, online iteration of the odor classification model. Furthermore, combining confidence level and environmental information for dual verification to select high-reliability samples for database entry effectively avoids contamination by low-quality or misclassified samples. Simultaneously, the preset percentile threshold is determined based on the category's own data distribution, adapting to the characteristic differences of different odor categories, further improving the accurate identification capability of cross-category odors.

[0075] This embodiment also provides an odor database updating device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0076] This embodiment provides an odor database updating device, such as... Figure 4 As shown, Figure 4 This is a structural block diagram of an odor database updating apparatus according to an embodiment of the present invention; the odor database updating apparatus includes: The acquisition module 401 is used to acquire target sample metadata, which includes the target feature vector corresponding to the response of the sensor array to the target odor and the classification identifier corresponding to the target odor.

[0077] The processing module 402 is used to filter the set of reference feature vectors corresponding to each reference odor category in the original odor database corresponding to the odor classification model according to the candidate category range corresponding to the candidate category range of the identifier to be classified; determine the minimum similarity distance between the target odor and at least one reference odor category according to the target feature vector and the set of reference feature vectors; and determine the target category to which the target odor belongs according to the minimum similarity distance and the preset percentile threshold of the reference odor category corresponding to the minimum similarity distance.

[0078] The update module 403 is used to establish a mapping relationship between target sample metadata and target category when the confidence level of the target feature vector is greater than the first threshold and the environmental information of the sensor array meets the preset conditions, update the mapping relationship and target sample metadata to the original database, and obtain the target odor database.

[0079] In some optional implementations, the acquisition module 401 is specifically used to acquire initial sample metadata, which includes initial response feature values ​​and response association information corresponding to the responses generated by the sensor array when exposed to the target odor. The response association information includes a classification identifier. Based on the interquartile range algorithm, the initial response feature values ​​are standardized to obtain standardized intermediate response feature values. The current temperature and humidity of the environment where the sensor array is located are acquired at the current moment. Based on the current temperature and humidity, the intermediate response feature values ​​are corrected to obtain target response feature values, where the drift index of the sensor array corresponding to the target response feature values ​​is less than a preset drift index. Target sample metadata is generated based on the target response feature values ​​and the response association information.

[0080] In some optional implementations, the processing module 402 is specifically used to calculate the difference between the current temperature and the preset temperature to obtain a temperature difference value, and to calculate the difference between the current humidity and the preset humidity to obtain a humidity difference value; according to the first algorithm, the intermediate response feature value is corrected based on the temperature difference value and the humidity difference value to obtain the target response feature value; The first algorithm can be represented based on the following expression:

[0081] in, Represents the characteristic value of the target response; Indicates the intermediate response characteristic value; Indicates the temperature difference value; Indicates the humidity difference; This represents the compensation coefficient corresponding to the temperature difference. This represents the compensation coefficient corresponding to the humidity difference.

[0082] In some optional implementations, the processing module 402 is specifically configured to: determine the category center vector corresponding to each reference odor category based on the set of reference feature vectors corresponding to each reference odor category; calculate the Mahalanobis distance and cosine similarity distance between each category center vector and the target feature vector; determine the similarity distance between the target odor and each reference odor category according to the second algorithm based on the Mahalanobis distance and cosine similarity distance; and determine the minimum similarity distance among at least one similarity distance as the minimum similarity distance; wherein the second algorithm can be expressed based on the following expression:

[0083] Where D represents the similarity distance; Indicates Mahalanobis distance; Represents the cosine similarity distance; This represents the weight value corresponding to the Mahalanobis distance.

[0084] In some optional implementations, the processing module 402 is specifically used to determine the reference odor category corresponding to the minimum similarity distance as the target category when the minimum similarity distance is less than a preset percentile threshold; or, when the minimum similarity distance is greater than or equal to the preset percentile threshold, to create a new odor category corresponding to the target category and determine the new odor category as the target category.

[0085] In some optional implementations, the acquisition module 401 is further configured to acquire the minimum distance from the target feature vector to the boundary of the adjacent category, the local sample density of the target feature vector in the feature space, and the repeated sampling variance corresponding to the target odor; the processing module 402 is further configured to calculate the confidence level of the target feature vector based on the minimum distance, the local sample density, the repeated sampling variance, and the drift index.

[0086] In some optional implementations, the processing module 402 is further configured to generate a prompt message when the confidence level is less than or equal to the second threshold, the prompt message indicating that the target category needs to be manually reviewed; or, when the confidence level is less than or equal to the first threshold and greater than the second threshold, detect whether the environmental information meets the preset conditions; if the environmental information does not meet the preset conditions, generate a prompt message.

[0087] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0088] In this embodiment, the odor database update device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0089] This invention also provides an electronic device having the above-described features. Figure 4 The device shown is for updating the odor database.

[0090] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided in an optional embodiment of the present invention, such as... Figure 5 As shown, the electronic device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise as required. The processors can process instructions executed within the electronic device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple electronic devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 5 Take a processor 10 as an example.

[0091] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0092] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.

[0093] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the electronic device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0094] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0095] The electronic device also includes a communication interface 30 for communicating with other devices or communication networks.

[0096] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0097] This invention provides a computer program product, which includes computer instructions for causing a computer to execute the method of any embodiment of this invention.

[0098] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0099] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for updating an odor database, characterized in that, The method includes: Obtain target sample metadata, which includes a target feature vector corresponding to the response of the sensor array to the target odor and a classification identifier corresponding to the target odor; Based on the candidate category range corresponding to the identifier to be classified, a set of reference feature vectors corresponding to each reference odor category in at least one reference odor category corresponding to the candidate category range is selected from the original odor database corresponding to the odor classification model. Based on the target feature vector and the set of reference feature vectors, determine the minimum similarity distance between the target odor and at least one reference odor category; The target category to which the target odor belongs is determined based on the minimum similarity distance and the preset percentile threshold of the reference odor category corresponding to the minimum similarity distance; When the confidence level of the target feature vector is greater than a first threshold and the environmental information of the sensor array meets the preset conditions, a mapping relationship between the target sample metadata and the target category is established, and the mapping relationship and the target sample metadata are updated to the original database to obtain the target odor database.

2. The method according to claim 1, characterized in that, The acquisition of target sample metadata includes: Acquire initial sample metadata, which includes initial response feature values ​​and response association information corresponding to the responses generated by the sensor array when exposed to the target odor. The response association information includes the identifier to be classified. Based on the interquartile range algorithm, the initial response feature values ​​are standardized to obtain standardized intermediate response feature values. Obtain the current temperature and humidity of the environment in which the sensor array is located at the current moment; Based on the current temperature and the current humidity, the intermediate response feature value is corrected to obtain the target response feature value, and the drift index of the sensor array corresponding to the target response feature value is less than the preset drift index; The target sample metadata is generated based on the target response feature value and the response association information.

3. The method according to claim 2, characterized in that, The step of correcting the intermediate response feature value based on the current temperature and the current humidity to obtain the target response feature value includes: Calculate the difference between the current temperature and the preset temperature to obtain the temperature difference, and calculate the difference between the current humidity and the preset humidity to obtain the humidity difference; According to the first algorithm, the intermediate response feature value is corrected based on the temperature difference and the humidity difference to obtain the target response feature value; The first algorithm can be represented based on the following expression: in, This represents the target response feature value; This represents the intermediate response feature value; This represents the temperature difference value; This indicates the humidity difference value; This represents the compensation coefficient corresponding to the temperature difference value; This represents the compensation coefficient corresponding to the humidity difference.

4. The method according to any one of claims 1-3, characterized in that, Determining the minimum similarity distance between the target odor and at least one reference odor category based on the target feature vector and the set of reference feature vectors includes: Based on the set of reference feature vectors corresponding to each reference odor category, determine the category center vector corresponding to each reference odor category; Calculate the Mahalanobis distance and cosine similarity distance between each category center vector and the target feature vector; According to the second algorithm, the similarity distance between the target odor and each of the reference odor categories is determined based on the Mahalanobis distance and the cosine similarity distance; The smallest similarity distance among at least one of the aforementioned similarity distances is determined as the minimum similarity distance; The second algorithm can be represented based on the following expression: in, This represents the similarity distance; This represents the Mahalanobis distance; Represents the cosine similarity distance; This represents the weight value corresponding to the Mahalanobis distance.

5. The method according to claim 4, characterized in that, The step of determining the target category to which the target odor belongs based on the minimum similarity distance and a preset percentile threshold of the reference odor category corresponding to the minimum similarity distance includes: When the minimum similarity distance is less than the preset percentile threshold, the reference odor category corresponding to the minimum similarity distance is determined as the target category; Alternatively, when the minimum similarity distance is greater than or equal to the preset percentile threshold, a new odor category corresponding to the target category is created, and the new odor category is determined as the target category.

6. The method according to any one of claims 1-3, characterized in that, Before establishing the mapping relationship between the target sample metadata and the target category when the confidence level of the target feature vector is greater than a first threshold and the environmental change of the sensor array meets a preset condition, the method further includes: Obtain the minimum distance from the target feature vector to the boundary of the adjacent category, the local sample density of the target feature vector in the feature space, and the repeated sampling variance corresponding to the target odor; The confidence level of the target feature vector is calculated based on the minimum distance, the local sample density, the repeated sampling variance, and the drift index.

7. The method according to claim 6, characterized in that, The method further includes: When the confidence level is less than or equal to the second threshold, a prompt message is generated, which indicates that the target category needs to be manually reviewed. Alternatively, when the confidence level is less than or equal to the first threshold and greater than the second threshold, it is detected whether the environmental information meets the preset conditions; If the environmental information does not meet the preset conditions, the prompt message is generated.

8. An electronic device, characterized in that, include: A memory and a processor are communicatively connected, the memory storing computer instructions, and the processor executing the computer instructions to perform the method for updating the odor database according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the method for updating the odor database according to any one of claims 1 to 7.

10. A computer program product, characterized in that, Includes computer instructions for causing a computer to perform the method for updating the odor database according to any one of claims 1 to 7.