Gas station inspection and monitoring method and system based on odor recognition
By adopting multi-frequency spectral analysis and Fourier transform technology in gas stations, combining a hybrid network of memristor and Transformer models, high-precision identification and quantitative analysis of combustible and toxic gases are achieved, and the identification in the existing technology is solved The difficult problem improves the accuracy and reliability of the monitoring system, and provides early warning and precise positioning functions.
Patent Information
- Application Number
- CN202410562826.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-08
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-05-08
AI Technical Summary
Existing combustible and toxic gas monitoring methods are difficult to achieve accurate identification and quantitative analysis in complex gas station environments, due to the sensitivity of the sensor and environmental factors.
Using a method based on odor recognition, multi-frequency spectral analysis technology combined with Fourier transform, high-precision characteristic frequency and frequency domain characteristics of combustible and toxic gases are extracted, and the hybrid network structure of the memristor model and the Transformer model is fused for depth Learn and comprehensive analysis, combined with triangulation method to locate the leakage source.
Significantly improve the identification accuracy of combustible and toxic gases and the accuracy of concentration detection, enhance the comprehensiveness and reliability of data analysis, realize early warning of potential leakage events and precise positioning of leakage sources, and reduce environmental pollution and Security risks.
Smart Images

Figure CN118392800B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of deep learning technology, and in particular to a gas station inspection and monitoring method and system based on odor recognition. Background Art
[0002] Volatile organic compounds (flammable and toxic gases) are common harmful gases in gas stations. They not only pose a threat to human health, but may also cause air pollution and fire and explosion accidents. Therefore, it is of great significance to conduct effective monitoring and leakage warning of flammable and toxic gases in gas stations.
[0003] However, existing flammable and toxic gas monitoring methods mainly rely on traditional gas sensors. Although these methods can provide real-time monitoring in some cases, they are often limited by the sensitivity of the sensors, the monitoring range and the influence of environmental factors, making it difficult to accurately identify and quantitatively analyze flammable and toxic gases in the complex environment of gas stations. Summary of the invention
[0004] The present application provides a gas station inspection and monitoring method and system based on odor recognition, which improves the accuracy of identifying the odor of combustible and toxic gases at gas stations and thus improves the accuracy of gas station inspections and abnormal monitoring.
[0005] In a first aspect, the present application provides a gas station inspection and monitoring method based on odor recognition, the gas station inspection and monitoring method based on odor recognition comprising:
[0006] Performing flammable and toxic gas detection and environmental factor extraction on multiple air sample data to obtain multiple first odor classification labels and first environmental factor data of the flammable and toxic gases in each air sample data;
[0007] Inputting the plurality of air sample data, the plurality of first odor classification labels, and the first environmental factor data into a preset memristor model and a Transformer model for model training to obtain an odor recognition model;
[0008] Conduct air and environmental monitoring at multiple odor sampling points of the target gas station to obtain air monitoring data and second environmental factor data at each odor sampling point;
[0009] Inputting the air monitoring data and the second environmental factor data into the odor recognition model to perform flammable and toxic gas recognition and flammable and toxic gas content analysis, and obtaining flammable and toxic gas recognition results and flammable and toxic gas content data for each odor sampling point;
[0010] The triangulation method is used to analyze the flammable and toxic gas identification results and flammable and toxic gas content data of each odor sampling point for content anomaly analysis and leakage source location, and obtain leakage source location information.
[0011] In a second aspect, the present application provides a gas station inspection and monitoring system based on odor recognition, the gas station inspection and monitoring system based on odor recognition comprising:
[0012] An extraction module, used to perform flammable and toxic gas detection and environmental factor extraction on multiple air sample data, and obtain multiple first odor classification labels and first environmental factor data of the flammable and toxic gases in each air sample data;
[0013] A training module, used for inputting the plurality of air sample data, the plurality of first odor classification labels and the first environmental factor data into a preset memristor model and a Transformer model for model training to obtain an odor recognition model;
[0014] A monitoring module, used to perform air and environmental monitoring at multiple odor sampling points of a target gas station, and obtain air monitoring data and second environmental factor data at each odor sampling point;
[0015] An analysis module, used for inputting the air monitoring data and the second environmental factor data into the odor recognition model to perform flammable and toxic gas recognition and flammable and toxic gas content analysis, and obtain flammable and toxic gas recognition results and flammable and toxic gas content data for each odor sampling point;
[0016] The positioning module is used to use the triangulation method to perform content anomaly analysis and leakage source positioning on the flammable and toxic gas identification results and flammable and toxic gas content data of each odor sampling point to obtain leakage source positioning information.
[0017] The third aspect of the present application provides a computer device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the computer device executes the above-mentioned gas station inspection and monitoring method based on odor recognition.
[0018] A fourth aspect of the present application provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the above-mentioned gas station inspection and monitoring method based on odor recognition.
[0019] In the technical solution provided by this application, multi-frequency spectral analysis technology is used in combination with Fourier transform to realize high-precision characteristic frequency identification and frequency domain feature extraction of flammable and toxic gases, greatly improving the accuracy of flammable and toxic gas type and concentration detection. By collecting environmental factors such as temperature, humidity and wind speed and performing feature mapping and principal component analysis, the impact of environmental variables on flammable and toxic gas monitoring data is effectively considered, and the comprehensiveness and reliability of data analysis are enhanced. The hybrid network structure design integrating the memristor model and the Transformer model not only plays the advantages of the memristor network in processing time series data, but also utilizes the powerful ability of the Transformer network in processing complex data relations, and realizes the deep learning and comprehensive analysis of odor data features. Through the dynamic learning characteristics of the memristor model, rapid response and adaptive adjustment to small changes in monitoring data are achieved, ensuring that the monitoring system remains efficient and sensitive in a changing environment. The triangulation method is used to accurately locate the leakage source in combination with the flammable and toxic gas content data and environmental factors, providing a scientific basis for the rapid identification and emergency disposal of the leakage source, greatly reducing environmental pollution and potential safety risks. By analyzing the abnormal contents of flammable and toxic gases and timely generating information on the location of leakage sources, early warning of potential leakage incidents is achieved, providing strong technical support for timely risk management and emergency response of gas stations. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0021] Figure 1 This is a schematic diagram of an embodiment of a gas station inspection and monitoring method based on odor recognition in an embodiment of the present application;
[0022] Figure 2 This is a schematic diagram of an embodiment of a gas station inspection and monitoring system based on odor recognition in an embodiment of the present application. DETAILED DESCRIPTION
[0023] The embodiments of the present application provide a gas station inspection and monitoring method and system based on odor recognition. The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0024] For ease of understanding, the specific process of the embodiment of the present application is described below. Figure 1 In the embodiment of the present application, an embodiment of the gas station inspection and monitoring method based on odor recognition includes:
[0025] Step 101: flammable and toxic gas detection and environmental factor extraction are performed on multiple air sample data to obtain multiple first odor classification labels and first environmental factor data of the flammable and toxic gases in each air sample data;
[0026] It is understandable that the execution subject of the present application can be a gas station inspection and monitoring system based on odor recognition, or a terminal or a server, which is not limited here. The present application embodiment is described by taking the server as the execution subject as an example.
[0027] Specifically, multiple air sample data are obtained to capture the air conditions around the gas station. Multi-frequency spectral analysis technology is used to identify the characteristic frequencies of volatile organic compounds (combustible and toxic gases) in the air samples, and various flammable and toxic gases in the air samples are separated. The corresponding flammable and toxic gas characteristic information is obtained by generating a characteristic frequency set for each air sample data. Fourier transform processing is performed on the characteristic frequency set of each air sample data to convert the time series data into frequency domain characteristic data for subsequent analysis and identification. The obtained frequency domain characteristic data is used to identify the types of flammable and toxic gases. By analyzing the relationship between the frequency domain characteristic data and the known characteristic frequencies of flammable and toxic gases, the types of flammable and toxic gases contained in each air sample are determined, and multiple first odor classification labels for each air sample data are generated. Environmental factors are extracted for each air sample data, including parameters such as temperature, humidity and wind speed. Environmental factors help to understand the behavior patterns of flammable and toxic gases in the air sample data. By feature mapping the environmental parameters, the environmental characteristics of each air sample data are obtained, which is helpful for subsequent data analysis and model training. By performing principal component analysis (PCA) on the environmental characteristics of each air sample data, the main influencing factors are extracted from numerous environmental factors to obtain the first environmental factor data of each air sample data. Principal component analysis is a commonly used data dimensionality reduction technology that can extract the most representative factors from complex environmental characteristics and simplify the subsequent analysis process.
[0028] Step 102: input multiple air sample data, multiple first odor classification labels, and first environmental factor data into a preset memristor model and a Transformer model for model training to obtain an odor recognition model;
[0029] Specifically, a hybrid network of a preset memristor model and a Transformer model is constructed by creating a fusion layer. The features and learning mechanisms of the two models complement each other. The advantages of the memristor model in processing time series data and the ability of the Transformer model in processing sequence relations are combined through the fusion layer to obtain an initial hybrid network architecture. The model parameters of the initial hybrid network architecture are initialized, including configuring appropriate memristor units and initial weights for the memristor model, and setting appropriate network layers, heads, hidden layer dimensions and self-attention mechanism parameters for the Transformer model. Multiple air sample data and first environmental factor data are input into the initial hybrid network architecture for odor recognition. The model generates the first odor molecule fingerprint prediction data of each air sample data by processing the input data. This data reflects the model's understanding and prediction of the odor characteristics of flammable and toxic gases in each sample. In order to optimize the model performance, the loss value between the odor molecule fingerprint predicted by the model and the actual first odor classification label is calculated. The calculation result of the loss value directly affects the adjustment direction and amplitude of the model parameters. Based on the feedback of the loss value, the weights of the initial hybrid network architecture are updated and the model is refined to make it closer to the actual odor recognition needs, provide continuous iteration, reduce prediction errors, and improve the recognition accuracy of the model. Through model integration technology, the target hybrid network architecture after multiple iterations of optimization is integrated into an odor recognition model, which can accurately identify the odor characteristics of flammable and toxic gases in the gas station environment and conduct effective analysis on them.
[0030] Among them, the weight of the memristor model in the initial hybrid network architecture is updated according to the loss value. Based on the loss value generated during the training process, the parameters in the memristor model are adjusted to reduce the gap between the predicted result and the actual value, and the first model weight is obtained. The model parameters of the initial hybrid network architecture are further updated using the updated first model weight to obtain the first hybrid network architecture. Including adjusting the memristor model and optimizing the entire hybrid network structure to ensure that the model as a whole can more accurately identify odors. The first model weight of the memristor model is fixed, and the weight of the Transformer model is calculated according to the loss value. The Transformer model can process sequence data, especially in understanding and processing long-distance dependencies. The first hybrid network architecture is optimized by the second model weight to obtain the second hybrid network architecture. By adjusting the parameters of the Transformer model, it can work better with the memristor model to improve the accuracy and efficiency of odor identification. The second model weight of the Transformer model is fixed, and the feature allocation parameters of the fusion layer are calculated according to the loss value, and the feature allocation in the fusion layer is optimized to ensure that the outputs of different models can be combined in the most effective way to obtain the final target hybrid network architecture. The target hybrid network architecture is subjected to multiple rounds of two-layer iterative optimization and model integration, and multiple optimized models are merged into a single odor recognition model. The iterative optimization and model integration method enhances the generalization ability of the model and improves the accuracy and reliability of odor recognition.
[0031] Step 103: Perform air and environmental monitoring on multiple odor sampling points of the target gas station to obtain air monitoring data and second environmental factor data of each odor sampling point;
[0032] Specifically, the environmental assessment of the gas station includes identifying possible sources of flammable and toxic gas emissions, odor propagation paths, and the range of changes in environmental factors, ensuring that the selected sampling points can fully represent the air quality of the gas station and capture changes in key environmental factors. High-precision air quality monitoring equipment and environmental parameter monitoring instruments are used to locate and arrange the sampling points. These devices can continuously monitor data such as the content of flammable and toxic gases in the air, particle size, temperature, humidity, and wind speed. By setting the monitoring time period, the odor sampling points are continuously monitored at different times and under different environmental conditions. Including daily air quality monitoring, it is also necessary to consider air and environmental monitoring under seasonal changes, special climatic conditions, and changes in air quality during special operations of the gas station. The monitoring data is sent to the data processing center in real time through data transmission technology. Through data analysis software and algorithms, the air monitoring data and environmental factor data are analyzed, including data cleaning, correction, statistical analysis, etc., to identify the main types and concentrations of pollutants in the monitoring area, and analyze how environmental factors affect the distribution and changes of these pollutants, and obtain the air monitoring data and second environmental factor data of each odor sampling point.
[0033] Step 104: input the air monitoring data and the second environmental factor data into the odor recognition model to perform combustible and toxic gas recognition and combustible and toxic gas content analysis, and obtain the combustible and toxic gas recognition results and combustible and toxic gas content data of each odor sampling point;
[0034] Specifically, the air monitoring data and the second environmental factor data are input into the odor recognition model, which is composed of a memristor model, a fusion layer, and a Transformer model. The air monitoring data is processed by the memristor model, and the characteristic vector of the odor is extracted through its time series data processing capability to capture the time changes and patterns in the odor characteristics of flammable and toxic gases. The fusion layer assigns feature weights to the odor feature vector to obtain the target feature vector, ensuring that the model can be adjusted according to the importance of different features to obtain the optimized target feature vector. The target feature vector and the second environmental factor data are input into the Transformer model for processing. The Transformer model analyzes the comprehensive data through its self-attention mechanism, realizes the prediction of odor classification labels, and generates multiple second odor classification labels. These classification labels represent the model's recognition results for different types of flammable and toxic gases. Based on the second odor classification labels generated by the model, combined with the original air monitoring data and the second environmental factor data, the model performs identification and content analysis of flammable and toxic gases. This includes the identification of flammable and toxic gas types and the calculation of flammable and toxic gas content data at each odor sampling point.
[0035] Among them, the self-attention mechanism layer in the Transformer model performs attention mechanism analysis on the target feature vector and the second environmental factor data. The self-attention mechanism layer can automatically distinguish and assign different importance weights to different data parts, and generate attention mechanism vectors by calculating the correlation within the data. These vectors are essentially a weighted feature representation that can highlight the most relevant information for the identification and content analysis of flammable and toxic gases, while suppressing those less relevant information parts. The attention mechanism vector is predicted by the decision layer in the Transformer model. Through the network structure in deep learning, the corresponding second odor molecule fingerprint prediction data is output according to the input weighted feature vector. These prediction data represent the model's understanding of the odor characteristics of flammable and toxic gases in the air sample at each sampling point. The second odor molecule fingerprint prediction data is matched with odor classification labels. By comparing the predicted data with the known odor molecule fingerprint database, each prediction result is matched to the corresponding odor classification label to obtain multiple second odor classification labels.
[0036] Step 105: Use triangulation to perform content anomaly analysis and leakage source location on the flammable and toxic gas identification results and flammable and toxic gas content data of each odor sampling point to obtain leakage source location information.
[0037] Specifically, by setting the safety threshold of flammable and toxic gas content, the flammable and toxic gas identification results and flammable and toxic gas content data of each odor sampling point in the gas station are analyzed for content anomalies, and sampling points with possible leakage risks are screened out according to the pre-set safety standards. The selected target sampling points are classified by distribution location, and the spatial positions of these points are systematically sorted out to generate a map that comprehensively reflects the spatial distribution of the target sampling points. The geometric center of the spatial distribution of the target sampling points is calculated using the spatial analysis method, and the center position of the geometric shape formed by all target sampling points is determined. The center position can approximately reflect the location of the potential leakage source. Based on the geometric center of the spatial distribution, the triangulation method is used to simulate the diffusion path of flammable and toxic gases at the target sampling points to obtain simulated diffusion data. By simulating the process of flammable and toxic gases diffusing from potential leakage sources to each sampling point, the propagation path of flammable and toxic gases is approximately reconstructed considering the influence of environmental factors such as wind speed and wind direction. The simulated diffusion data is compared with the actual flammable and toxic gas content data, and the leakage source is located by analyzing the matching degree between the two to obtain the leakage source location information.
[0038] In the embodiment of the present application, multi-frequency spectrum analysis technology is used in combination with Fourier transform to realize high-precision characteristic frequency identification and frequency domain feature extraction of flammable and toxic gases, which greatly improves the accuracy of flammable and toxic gas type and concentration detection. By collecting environmental factors such as temperature, humidity and wind speed and performing feature mapping and principal component analysis, the impact of environmental variables on flammable and toxic gas monitoring data is effectively considered, and the comprehensiveness and reliability of data analysis are enhanced. The hybrid network structure design that integrates the memristor model and the Transformer model not only plays the advantages of the memristor network in processing time series data, but also utilizes the powerful ability of the Transformer network in processing complex data relations, and realizes the deep learning and comprehensive analysis of odor data features. Through the dynamic learning characteristics of the memristor model, rapid response and adaptive adjustment to small changes in monitoring data are achieved, ensuring that the monitoring system remains efficient and sensitive in a changing environment. The triangulation method is used to accurately locate the leakage source in combination with flammable and toxic gas content data and environmental factors, which provides a scientific basis for the rapid identification and emergency disposal of the leakage source, greatly reducing environmental pollution and potential safety risks. By analyzing the abnormal contents of flammable and toxic gases and timely generating information on the location of leakage sources, early warning of potential leakage incidents is achieved, providing strong technical support for timely risk management and emergency response of gas stations.
[0039] In a specific embodiment, the process of executing step 101 may specifically include the following steps:
[0040] (1) Acquire multiple air sample data, and use multi-frequency spectrum analysis technology to identify the characteristic frequencies of flammable and toxic gases in the multiple air sample data to generate a characteristic frequency set for each air sample data;
[0041] (2) Performing Fourier transform processing on the characteristic frequency set of each air sample data to obtain frequency domain characteristic data of each air sample data;
[0042] (3) Identifying the types of flammable and toxic gases based on the frequency domain feature data of each air sample data, and obtaining a plurality of first odor classification labels of the flammable and toxic gases in each air sample data;
[0043] (4) Extract environmental factors from multiple air sample data to obtain the temperature, humidity and wind speed corresponding to each air sample data;
[0044] (5) Perform feature mapping on the temperature, humidity and wind speed corresponding to each air sample data to obtain the environmental characteristics of each air sample data;
[0045] (6) Performing principal component analysis on the environmental characteristics of each air sample data to obtain the first environmental factor data of each air sample data.
[0046] Specifically, multiple air sample data are obtained from the gas station environment. Air sampling equipment, such as air sampling pumps and sampling tubes, are used to capture air samples at different times and locations to obtain representative and comprehensive data. Multi-frequency spectral analysis technology is used for processing. Multi-frequency spectral analysis identifies flammable and toxic gases in air samples by measuring the absorption and scattering characteristics of samples under different frequency light irradiation. Each flammable and toxic gas molecule has its own unique spectral characteristics, which enables the system to accurately identify the types of flammable and toxic gases present in the sample through this technology. The characteristic frequency set of each air sample data is Fourier transformed to convert the time series data into frequency domain data to better analyze the characteristic frequencies of flammable and toxic gases in the sample. Fourier transform is a basic tool in signal processing that can reveal periodic characteristics and frequency domain structures in sample data. By analyzing the frequency domain characteristic data, the type of flammable and toxic gas in each air sample is identified, and the first odor classification label of each sample is obtained. Using the known flammable and toxic gas spectral database for matching, the types of flammable and toxic gases contained in the sample are accurately identified by comparing the frequency domain features with the spectral features in the database. For example, if the frequency domain features of a sample match the spectral features of benzene in the database, then the sample will be marked as a sample containing benzene. The collected air sample data is subjected to environmental factor extraction, including measuring parameters such as temperature, humidity, and wind speed corresponding to each sample. These environmental parameters are important factors in understanding and analyzing the behavior of flammable and toxic gases. For example, changes in temperature and humidity may affect the volatility and diffusion rate of flammable and toxic gases. The environmental factors such as temperature, humidity, and wind speed of each sample are feature mapped, and the actual measured values are converted into environmental feature vectors that can be processed by the model. Through data preprocessing and encoding techniques, the absolute values of environmental parameters are converted into relative values or other forms of numerical representation for subsequent analysis. The environmental characteristics of each air sample are subjected to principal component analysis (PCA) to extract the most influential environmental factors and obtain the first environmental factor data of each sample. PCA is a commonly used data dimensionality reduction technique that reduces the complexity of data by finding the main direction of change in the data while retaining the most important information.
[0047] In a specific embodiment, the process of executing step 102 may specifically include the following steps:
[0048] (1) Create a fusion layer and use the fusion layer to construct a hybrid network of the preset memristor model and Transformer model to obtain the initial hybrid network architecture;
[0049] (2) Initialize the model parameters of the initial hybrid network architecture to obtain the configuration and initial weight of the memristor unit of the memristor model and the number of layers, number of heads, hidden layer dimension, and parameter configuration of the self-attention mechanism of the Transformer network of the Transformer model;
[0050] (3) inputting the multiple air sample data and the first environmental factor data into the initial hybrid network architecture for odor recognition, and obtaining the first odor molecule fingerprint prediction data of each air sample data;
[0051] (4) calculating the loss values between the plurality of first odor classification labels and the first odor molecule fingerprint prediction data;
[0052] (5) The weights of the initial hybrid network architecture are updated according to the loss value to obtain the target hybrid network architecture, and the target hybrid network architecture is integrated to obtain the odor recognition model.
[0053] Specifically, a fusion layer is created to integrate information from the memristor model and the Transformer model. The memristor model is good at processing time series data and can effectively capture the time series features in the air sample data, while the Transformer model processes complex sequence data relationships through the self-attention mechanism. By designing the fusion layer, an initial hybrid network architecture is constructed. The model parameters of the initial hybrid network architecture are initialized, and appropriate parameters and initial weights are configured for the memristor unit of the memristor model. At the same time, the appropriate number of network layers, number of heads, hidden layer dimensions, and parameters of the self-attention mechanism are set for the Transformer model. The collected multiple air sample data and the corresponding first environmental factor data are input into the hybrid network architecture for odor recognition processing. The hybrid network model uses its internal data processing and analysis capabilities to analyze each air sample data and predict the first odor molecule fingerprint data of each sample. In order to optimize the model performance, the loss value between the first odor molecule fingerprint data predicted by the model and the actual first odor classification label is calculated. The loss value reflects the gap between the model prediction result and the actual result, and is the key feedback information in the model training process. By analyzing the loss value, the weights and parameters of the model are appropriately adjusted and optimized to reduce the prediction error and improve the accuracy of the model. The weights of the initial hybrid network architecture are updated according to the loss value to obtain the optimized target hybrid network architecture. The target architecture is then model integrated to integrate multiple model versions that have undergone multiple iterations of training and optimization into a unified, better-performing odor recognition model. The integration process can further improve the generalization ability and prediction accuracy of the model, ensuring that flammable and toxic gases in gas station environments can be effectively identified and analyzed in practical applications.
[0054] In a specific embodiment, the execution step updates the weights of the initial hybrid network architecture according to the loss value to obtain the target hybrid network architecture, and performs model integration on the target hybrid network architecture to obtain the odor recognition model, which may specifically include the following steps:
[0055] (1) Update the weight of the memristor model in the initial hybrid network architecture according to the loss value to obtain the first model weight;
[0056] (2) updating the model parameters of the initial hybrid network architecture according to the first model weights to obtain a first hybrid network architecture;
[0057] (3) Fix the first model weight of the memristor model in the initial hybrid network architecture, and calculate the weight of the Transformer model in the initial hybrid network architecture according to the loss value to obtain the second model weight;
[0058] (4) optimizing the first hybrid network architecture by using the second model weight to obtain a second hybrid network architecture;
[0059] (5) Fixing the second model weight of the Transformer model in the second hybrid network architecture, and calculating the feature allocation parameters of the fusion layer according to the loss value to obtain the feature allocation parameters of the fusion layer;
[0060] (6) Optimizing the fusion layer of the second hybrid network architecture according to the feature allocation parameters to obtain the target hybrid network architecture;
[0061] (7) Perform multiple rounds of two-layer iterative optimization and model integration on the target hybrid network architecture to obtain the odor recognition model.
[0062] Specifically, the weight of the memristor model is updated according to the loss value. Through the back propagation algorithm, the weight parameters of the memristor model are adjusted according to the gradient obtained by calculating the loss function to reduce the difference between the model output and the true label, and the first model weight is obtained. For example, if the odor classification predicted by the model does not match the actual classification when processing a specific air sample data, the loss function value will increase. By adjusting the weight, the model learns to correct this deviation. The parameters of the entire hybrid network architecture are updated according to the updated first model weight to form a first hybrid network architecture, ensuring that the memristor model plays a better role in the overall architecture and enhancing the model's ability to process time series data. The weight of the memristor model in the first hybrid network architecture is fixed, and the weight of the Transformer model is updated according to the loss value. The weight adjustment of the Transformer model is performed independently of the memristor model, focusing on optimizing the model's ability to handle complex relationships, and obtaining the second model weight. For example, the Transformer model may need to adjust the parameters of its self-attention mechanism to more accurately identify subtle feature differences in odor samples. The first hybrid network architecture is optimized by the second model weight to obtain the second hybrid network architecture. By comprehensively considering the adjustment results of the memristor model and the Transformer model, the odor recognition ability of the overall network architecture is enhanced. The weight of the Transformer model in the second hybrid network architecture is fixed, and the focus is on optimizing the fusion layer. The feature allocation parameters are calculated based on the loss value. These parameters determine how the features from the memristor model and the Transformer model are combined in the fusion layer to improve the overall prediction accuracy of the model and form an optimized fusion layer. The second hybrid network architecture is optimized based on the feature allocation parameters of the fusion layer to form the target hybrid network architecture. Multiple rounds of double-layer iterative optimization and model integration are performed on the target hybrid network architecture. The model continuously learns from new data and adjusts internal parameters. At the same time, the model integration technology is used to merge the best performing model versions in multiple training cycles to improve the accuracy and robustness of the odor recognition model.
[0063] In a specific embodiment, the process of executing step 104 may specifically include the following steps:
[0064] (1) Inputting the air monitoring data and the second environmental factor data into the odor recognition model, which includes: a memristor model, a fusion layer, and a Transformer model;
[0065] (2) Extract odor features from air monitoring data using a memristor model to obtain an odor feature vector;
[0066] (3) The odor feature vector is assigned feature weights through the fusion layer to obtain the target feature vector;
[0067] (4) Using the Transformer model to predict the odor classification label of the target feature vector and the second environmental factor data, multiple second odor classification labels are obtained;
[0068] (5) Identify flammable and toxic gases through multiple second odor classification tags to obtain flammable and toxic gas identification results for each odor sampling point;
[0069] (6) Based on the flammable and toxic gas identification results, the flammable and toxic gas content analysis is performed on the air monitoring data and the second environmental factor data to obtain the flammable and toxic gas content data of each odor sampling point.
[0070] Specifically, the air monitoring data and the second environmental factor data are input into the odor recognition model, and the odor recognition model includes: a memristor model, a fusion layer, and a Transformer model. The odor features in the air monitoring data are extracted through the memristor model. The memristor model is suitable for processing time series data and can capture patterns that change over time in the data stream. For example, if the air monitoring data shows that the concentration of flammable and toxic gases suddenly increases at a specific time point, the memristor model can identify this change and convert it into an odor feature vector. The fusion layer is used to assign feature weights to the odor feature vector, and the vector is assigned feature weights. According to the importance of each feature to the odor recognition task, its weight is adjusted to generate a target feature vector. The target feature vector and the second environmental factor data are predicted by the Transformer model. The Transformer model uses the self-attention mechanism to effectively process the feature vector and the environmental factor data and predict the odor classification label. The model can predict the type of flammable and toxic gases present in each air sample and generate multiple second odor classification labels. For example, by analyzing specific odor characteristics and environmental factors, the Transformer model may predict that a sample contains benzene and xylene, both of which are common components of flammable and toxic gases. Combustible and toxic gas identification is performed through multiple second odor classification labels. Based on the predicted odor classification labels, the specific flammable and toxic gas components in each odor sampling point are determined, and the flammable and toxic gas identification results for each sampling point are obtained, indicating the specific types of pollutants in the gas station environment. Based on the identification results of flammable and toxic gases, the flammable and toxic gas content of the air monitoring data and the second environmental factor data is analyzed. Each identified flammable and toxic gas is quantitatively analyzed to determine its content in each odor sampling point.
[0071] In a specific embodiment, the execution step predicts the odor classification label of the target feature vector and the second environmental factor data through the Transformer model to obtain multiple second odor classification labels, which may specifically include the following steps:
[0072] (1) Perform attention mechanism analysis on the target feature vector and the second environmental factor data through the self-attention mechanism layer in the Transformer model to obtain the attention mechanism vector;
[0073] (2) The decision layer in the Transformer model predicts the odor molecule fingerprint of the attention mechanism vector to obtain the second odor molecule fingerprint prediction data;
[0074] (3) Match the odor classification label of the second odor molecule fingerprint prediction data to obtain multiple second odor classification labels.
[0075] Specifically, the self-attention mechanism layer in the Transformer model performs attention mechanism analysis on the target feature vector and the second environmental factor data. By calculating the correlation between the various parts of the data, the most important features for the current task are automatically identified to obtain the attention mechanism vector. The attention mechanism vector is predicted by the decision layer in the Transformer model. The decision layer makes predictions based on the processed data. The decision layer performs calculations based on the attention mechanism vector to predict the specific types and characteristics of the flammable and toxic gases in each air sample and generate the second odor molecule fingerprint prediction data. The fingerprint feature that best matches the current sample is found in the odor molecule database. Each predicted odor molecule fingerprint represents one or more flammable and toxic gases that may exist in the sample. Based on the second odor molecule fingerprint prediction data, the model performs odor classification label matching. The predicted odor molecule fingerprint is compared with the predefined odor classification database to determine the odor classification that best matches each odor molecule fingerprint. For example, if the predicted odor molecule fingerprint matches the fingerprint of benzene in the database, then the sample will be marked as containing the odor classification label of benzene.
[0076] In a specific embodiment, the process of executing step 105 may specifically include the following steps:
[0077] (1) Based on the safety threshold of flammable and toxic gas content, the flammable and toxic gas identification results and flammable and toxic gas content data of each odor sampling point are analyzed for content anomalies to obtain multiple target sampling points;
[0078] (2) Classifying the distribution positions of multiple target sampling points to obtain a spatial distribution map of the multiple target sampling points;
[0079] (3) Calculate the spatial distribution geometric center of the spatial distribution map to obtain the spatial distribution geometric center;
[0080] (4) Based on the geometric center of spatial distribution, the triangulation method is used to simulate the diffusion path of flammable and toxic gases at multiple target sampling points to obtain simulated diffusion data;
[0081] (5) Compare the simulated diffusion data and the flammable and toxic gas content data and locate the leakage source to obtain the leakage source location information.
[0082] Specifically, define the safety threshold of flammable and toxic gas content, perform content anomaly analysis on the flammable and toxic gas identification results and flammable and toxic gas content data of each sampling point, and identify those sampling points where the flammable and toxic gas content exceeds the safety threshold. Use air quality monitoring equipment to continuously collect the flammable and toxic gas content in air samples, and then compare these data with the safety threshold to determine which sampling points show abnormally high flammable and toxic gas content. Classify the distribution location of the target sampling points, and use geographic information system (GIS) technology or other spatial analysis tools to draw a map reflecting the spatial distribution of these points. The spatial distribution map provides the exact location of the target sampling points and also shows the relative relationship between these points. For example, these target sampling points may be clustered around a specific area of a gas station, suggesting the location of possible pollution sources. Analyze the spatial distribution map and calculate the geometric center of the spatial distribution of these target sampling points. Consider the coordinates of all target sampling points and find a point that represents the center of their overall spatial distribution. The geometric center point is usually regarded as a preliminary indication of a possible leak source. Based on the geometric center of spatial distribution, the triangulation method is used to simulate the diffusion path of flammable and toxic gases at the target sampling points. Considering wind direction, wind speed and other environmental factors, the path of flammable and toxic gases diffusing outward from the geometric center is simulated. The simulation software generates simulated diffusion data, which shows the possible paths of flammable and toxic gases diffusing from the predicted leakage source to each target sampling point. The simulated diffusion data is compared and analyzed with the actual flammable and toxic gas content data to accurately locate the leakage source. The comparison considers the consistency between the diffusion pattern and the actual monitoring data, and determines the specific location of the leakage source by analyzing the degree of match between the two. For example, if the simulation data shows that flammable and toxic gases diffuse northward from a tank in the oil storage tank area, and the flammable and toxic gas content at the sampling point on the north side is abnormally high, it can be inferred that this oil storage tank is the source of the leakage.
[0083] The above describes the gas station inspection and monitoring method based on odor recognition in the embodiment of the present application. The following describes the gas station inspection and monitoring system based on odor recognition in the embodiment of the present application. Figure 2 In the embodiment of the present application, an embodiment of the gas station inspection and monitoring system based on odor recognition includes:
[0084] An extraction module 201 is used to perform flammable and toxic gas detection and environmental factor extraction on multiple air sample data to obtain multiple first odor classification labels and first environmental factor data of the flammable and toxic gases in each air sample data;
[0085] A training module 202, for inputting a plurality of air sample data, a plurality of first odor classification labels, and a first environmental factor data into a preset memristor model and a Transformer model for model training to obtain an odor recognition model;
[0086] Monitoring module 203, used to perform air and environmental monitoring on multiple odor sampling points of the target gas station, and obtain air monitoring data and second environmental factor data of each odor sampling point;
[0087] The analysis module 204 is used to input the air monitoring data and the second environmental factor data into the odor recognition model to perform combustible and toxic gas recognition and combustible and toxic gas content analysis, and obtain the combustible and toxic gas recognition results and combustible and toxic gas content data of each odor sampling point;
[0088] The positioning module 205 is used to perform content anomaly analysis and leakage source positioning on the flammable and toxic gas identification results and flammable and toxic gas content data of each odor sampling point using a triangulation method to obtain leakage source positioning information.
[0089] Through the collaboration of the above components, the multi-frequency spectrum analysis technology combined with Fourier transform is used to achieve high-precision characteristic frequency identification and frequency domain feature extraction of flammable and toxic gases, greatly improving the accuracy of flammable and toxic gas type and concentration detection. By collecting environmental factors such as temperature, humidity and wind speed and performing feature mapping and principal component analysis, the impact of environmental variables on flammable and toxic gas monitoring data is effectively considered, enhancing the comprehensiveness and reliability of data analysis. The hybrid network structure design that integrates the memristor model and the Transformer model not only takes advantage of the memristor network in processing time series data, but also utilizes the powerful ability of the Transformer network in processing complex data relationships, realizing deep learning and comprehensive analysis of odor data features. Through the dynamic learning characteristics of the memristor model, rapid response and adaptive adjustment to small changes in monitoring data are achieved, ensuring that the monitoring system remains efficient and sensitive in a changing environment. The triangulation method is used to combine flammable and toxic gas content data and environmental factors to accurately locate the leakage source, providing a scientific basis for the rapid identification and emergency disposal of the leakage source, greatly reducing environmental pollution and potential safety risks. By analyzing the abnormal contents of flammable and toxic gases and timely generating information on the location of leakage sources, early warning of potential leakage incidents is achieved, providing strong technical support for timely risk management and emergency response of gas stations.
[0090] The present application also provides a computer device, which includes a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the gas station inspection and monitoring method based on odor recognition in the above-mentioned embodiments.
[0091] The present application also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the gas station inspection and monitoring method based on odor recognition.
[0092] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0093] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0094] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A gas station inspection and monitoring method based on odor recognition, characterized in that: The gas station inspection and monitoring method based on odor recognition includes: Performing flammable and toxic gas detection and environmental factor extraction on multiple air sample data to obtain multiple first odor classification labels and first environmental factor data of flammable and toxic gases in each air sample data; specifically comprising: obtaining multiple air sample data, and using multi-frequency spectrum analysis technology to identify the characteristic frequencies of flammable and toxic gases in the multiple air sample data to generate a characteristic frequency set of each air sample data; performing Fourier transform processing on the characteristic frequency set of each air sample data to obtain frequency domain characteristic data of each air sample data; performing flammable and toxic gas type identification on the frequency domain characteristic data of each air sample data to obtain multiple first odor classification labels of flammable and toxic gases in each air sample data; performing environmental factor extraction on the multiple air sample data to obtain the temperature, humidity and wind speed corresponding to each air sample data; performing feature mapping on the temperature, humidity and wind speed corresponding to each air sample data to obtain the environmental characteristics of each air sample data; performing principal component analysis on the environmental characteristics of each air sample data to obtain the first environmental factor data of each air sample data; Input the multiple air sample data, the multiple first odor classification labels and the first environmental factor data into the preset memristor model and the Transformer model for model training to obtain an odor recognition model; specifically including: creating a fusion layer, and constructing a hybrid network for the preset memristor model and the Transformer model through the fusion layer to obtain an initial hybrid network architecture; initializing the model parameters of the initial hybrid network architecture to obtain the configuration and initial weight of the memristor unit of the memristor model and the number of layers, number of heads, hidden layer dimension and parameter configuration of the self-attention mechanism of the Transformer network of the Transformer model; inputting the multiple air sample data and the first environmental factor data into the initial hybrid network architecture for odor recognition to obtain the first odor molecule fingerprint prediction data of each air sample data; calculating the loss value between the multiple first odor classification labels and the first odor molecule fingerprint prediction data; according to the The loss value is used to update the weight of the memristor model in the initial hybrid network architecture to obtain the first model weight; the model parameters of the initial hybrid network architecture are updated according to the first model weight to obtain the first hybrid network architecture; the first model weight of the memristor model in the initial hybrid network architecture is fixed, and the weight of the Transformer model in the initial hybrid network architecture is calculated according to the loss value to obtain the second model weight; the model of the first hybrid network architecture is optimized according to the second model weight to obtain the second hybrid network architecture; the second model weight of the Transformer model in the second hybrid network architecture is fixed, and the feature allocation parameter of the fusion layer is calculated according to the loss value to obtain the feature allocation parameter of the fusion layer; according to the feature allocation parameter, the fusion layer of the second hybrid network architecture is optimized to obtain the target hybrid network architecture; multiple rounds of double-layer iterative optimization and model integration are performed on the target hybrid network architecture to obtain the odor recognition model; Conduct air and environmental monitoring at multiple odor sampling points of the target gas station to obtain air monitoring data and second environmental factor data at each odor sampling point; The air monitoring data and the second environmental factor data are input into the odor recognition model to perform flammable and toxic gas identification and flammable and toxic gas content analysis to obtain flammable and toxic gas identification results and flammable and toxic gas content data for each odor sampling point; specifically comprising: inputting the air monitoring data and the second environmental factor data into the odor recognition model, the odor recognition model comprising: a memristor model, a fusion layer and a Transformer model; extracting odor features from the air monitoring data through the memristor model to obtain an odor feature vector; performing feature weight assignment on the odor feature vector through the fusion layer to obtain a target feature vector; and obtaining a target feature vector through the self-attention mechanism layer in the Transformer model. Performing an attention mechanism analysis on the target feature vector and the second environmental factor data to obtain an attention mechanism vector; performing odor molecule fingerprint prediction on the attention mechanism vector through the decision layer in the Transformer model to obtain second odor molecule fingerprint prediction data; performing odor classification label matching on the second odor molecule fingerprint prediction data to obtain multiple second odor classification labels; performing flammable and toxic gas identification through the multiple second odor classification labels to obtain flammable and toxic gas identification results for each odor sampling point; based on the flammable and toxic gas identification results, performing flammable and toxic gas content analysis on the air monitoring data and the second environmental factor data to obtain flammable and toxic gas content data for each odor sampling point; The triangulation method is used to analyze the flammable and toxic gas identification results and the flammable and toxic gas content data of each odor sampling point for content anomalies and locate the leakage source to obtain leakage source location information; specifically including: based on the flammable and toxic gas content safety threshold, the flammable and toxic gas identification results and the flammable and toxic gas content data of each odor sampling point are analyzed for content anomalies to obtain multiple target sampling points; the distribution positions of the multiple target sampling points are classified to obtain the spatial distribution map of the multiple target sampling points; the spatial distribution geometric center of the spatial distribution map is calculated to obtain the spatial distribution geometric center; based on the spatial distribution geometric center, the triangulation method is used to simulate the flammable and toxic gas diffusion path of the multiple target sampling points to obtain simulated diffusion data; the simulated diffusion data and the flammable and toxic gas content data are compared and the leakage source is located to obtain leakage source location information.
2. A gas station inspection and monitoring system based on odor recognition, characterized in that: The gas station inspection and monitoring system based on odor recognition includes: An extraction module is used to perform flammable and toxic gas detection and environmental factor extraction on multiple air sample data to obtain multiple first odor classification labels and first environmental factor data of the flammable and toxic gases in each air sample data; specifically comprising: obtaining multiple air sample data, and using multi-frequency spectrum analysis technology to identify the characteristic frequencies of the flammable and toxic gases in the multiple air sample data to generate a characteristic frequency set of each air sample data; performing Fourier transform processing on the characteristic frequency set of each air sample data to obtain frequency domain characteristic data of each air sample data; performing flammable and toxic gas type identification on the frequency domain characteristic data of each air sample data to obtain multiple first odor classification labels of the flammable and toxic gases in each air sample data; performing environmental factor extraction on the multiple air sample data to obtain the temperature, humidity and wind speed corresponding to each air sample data; performing feature mapping on the temperature, humidity and wind speed corresponding to each air sample data to obtain the environmental characteristics of each air sample data; performing principal component analysis on the environmental characteristics of each air sample data to obtain the first environmental factor data of each air sample data; A training module is used to input the multiple air sample data, the multiple first odor classification labels and the first environmental factor data into a preset memristor model and a Transformer model for model training to obtain an odor recognition model; specifically comprising: creating a fusion layer, and constructing a hybrid network of the preset memristor model and the Transformer model through the fusion layer to obtain an initial hybrid network architecture; initializing model parameters of the initial hybrid network architecture to obtain the configuration and initial weight of the memristor unit of the memristor model and the number of layers, number of heads, hidden layer dimension and parameter configuration of the self-attention mechanism of the Transformer network of the Transformer model; inputting the multiple air sample data and the first environmental factor data into the initial hybrid network architecture for odor recognition to obtain the first odor molecule fingerprint prediction data of each air sample data; calculating the loss value between the multiple first odor classification labels and the first odor molecule fingerprint prediction data; based on According to the loss value, the weight of the memristor model in the initial hybrid network architecture is updated to obtain a first model weight; according to the first model weight, the model parameters of the initial hybrid network architecture are updated to obtain a first hybrid network architecture; the first model weight of the memristor model in the initial hybrid network architecture is fixed, and the weight of the Transformer model in the initial hybrid network architecture is calculated according to the loss value to obtain a second model weight; the model of the first hybrid network architecture is optimized by the second model weight to obtain a second hybrid network architecture; the second model weight of the Transformer model in the second hybrid network architecture is fixed, and the feature allocation parameter of the fusion layer is calculated according to the loss value to obtain the feature allocation parameter of the fusion layer; according to the feature allocation parameter, the fusion layer of the second hybrid network architecture is optimized to obtain a target hybrid network architecture; multiple rounds of double-layer iterative optimization and model integration are performed on the target hybrid network architecture to obtain an odor recognition model; A monitoring module, used to perform air and environmental monitoring at multiple odor sampling points of a target gas station, and obtain air monitoring data and second environmental factor data at each odor sampling point; The analysis module is used to input the air monitoring data and the second environmental factor data into the odor recognition model to perform flammable and toxic gas identification and flammable and toxic gas content analysis, and obtain the flammable and toxic gas identification results and flammable and toxic gas content data of each odor sampling point; specifically comprising: inputting the air monitoring data and the second environmental factor data into the odor recognition model, the odor recognition model comprising: a memristor model, a fusion layer and a Transformer model; extracting odor features from the air monitoring data through the memristor model to obtain an odor feature vector; performing feature weight assignment on the odor feature vector through the fusion layer to obtain a target feature vector; and obtaining a target feature vector through the self-attention in the Transformer model. The mechanism layer performs an attention mechanism analysis on the target feature vector and the second environmental factor data to obtain an attention mechanism vector; the decision layer in the Transformer model performs odor molecule fingerprint prediction on the attention mechanism vector to obtain second odor molecule fingerprint prediction data; the second odor molecule fingerprint prediction data is matched with odor classification labels to obtain multiple second odor classification labels; flammable and toxic gases are identified through the multiple second odor classification labels to obtain flammable and toxic gas identification results for each odor sampling point; based on the flammable and toxic gas identification results, the air monitoring data and the second environmental factor data are analyzed for flammable and toxic gas content to obtain flammable and toxic gas content data for each odor sampling point; A positioning module is used to use triangulation to perform content anomaly analysis and leakage source positioning on the flammable and toxic gas identification results and flammable and toxic gas content data of each odor sampling point to obtain leakage source positioning information; specifically including: based on the flammable and toxic gas content safety threshold, performing content anomaly analysis on the flammable and toxic gas identification results and flammable and toxic gas content data of each odor sampling point to obtain multiple target sampling points; classifying the distribution positions of the multiple target sampling points to obtain the spatial distribution map of the multiple target sampling points; calculating the spatial distribution geometric center of the spatial distribution map to obtain the spatial distribution geometric center; based on the spatial distribution geometric center, using triangulation to simulate the flammable and toxic gas diffusion path of the multiple target sampling points to obtain simulated diffusion data; comparing the simulated diffusion data and the flammable and toxic gas content data and locating the leakage source to obtain leakage source positioning information.
3. A computer device, characterized in that: The computer device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory to enable the computer device to execute the gas station inspection and monitoring method based on odor recognition as claimed in claim 1.
4. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the gas station inspection and monitoring method based on odor recognition as claimed in claim 1 is implemented.
