Nitrogen-oxygen sensor aging test method based on deep learning

Through a deep learning-based method, the Transformer architecture model is built, combining transfer learning and full connection layer, the accuracy and adaptability of nitrogen oxygen sensor aging detection is solved, and efficient and accurate detection effect is achieved, suitable for complex environments and reduced Data dependency.

CN119125465AActive Publication Date: 2024-12-13ZHONGKEZHI TECH (HEFEI) CO LTD

Patent Information

Application Number
CN202411603526.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2024-12-13
Estimated Expiration
2044-11-12

AI Technical Summary

Technical Problem

The existing nitrogen oxygen sensor aging detection methods rely on manual experience and simple threshold judgment, cannot effectively adapt to complex environments, and lack the processing capacity of small sample data, resulting in insufficient detection accuracy and adaptability.

Method used

Using a deep learning method, by constructing a self-attention mechanism model with a three-layer Transformer architecture, using historical large sample data to extract general aging trend data, conduct model training and transfer learning, and combine full connection layer and Softmax activation function to form A dedicated detection model for detecting the aging state of the nitrogen oxygen sensor.

Benefits of technology

It realizes efficient and accurate detection of nitrogen oxygen sensor aging, improves the generalization ability of the model and scene adaptability, quickly processes multi-dimensional features, improves the robustness in complex environments, and reduces the dependence on large-scale annotation data. , reducing the cost of data acquisition and training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119125465A_ABST
    Figure CN119125465A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of sensor detection, and discloses a deep learning-based nitrogen-oxygen sensor aging test method, which comprises the following steps: extracting universal aging trend data from preprocessed historical large sample data; training the self-attention mechanism model by using the universal aging trend data to obtain a universal basic model; taking the trained general basic model as a transfer learning model, and performing model fine adjustment on the transfer learning model; adding a new full-connection layer, connecting the output of the fine-tuned transfer learning model to the new full-connection layer, activating the output of the new full-connection layer, and training the fine-tuned transfer learning model by using special aging trend data by taking minimization of a predefined loss function as a target to obtain a special detection model; performing an aging test on the to-be-detected nitrogen-oxygen sensor by using the special detection model; according to the invention, the accuracy and robustness of aging detection of the nitrogen-oxygen sensor can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of sensor detection technology, and more specifically, to a nitrogen oxygen sensor aging test method based on deep learning. Background Art

[0002] Gas sensors play a key role in many fields such as automotive emission control, industrial safety monitoring and environmental monitoring. In particular, nitrogen oxide sensors (NOx sensors) are particularly important in monitoring the concentration of nitrogen oxides in vehicle exhaust and industrial waste gas. However, with the extension of usage time, such sensors gradually show signs of aging. Aging manifestations usually include signal drift, reduced sensitivity and prolonged response time. These phenomena not only affect the accuracy of the sensor, but may also lead to improper system monitoring and failure to detect abnormal emissions or potential hazards in a timely manner. Therefore, how to accurately and efficiently detect the aging status of the sensor has become a problem that needs to be solved urgently in the field of technology.

[0003] Existing NOx sensor aging detection methods mainly rely on manual experience and simple threshold judgments; although these methods are effective to a certain extent, they are powerless in the face of complex practical application scenarios; different NOx sensors have different aging patterns in different environments, and a single detection strategy cannot fully cover all situations; in addition, the cost of acquiring a large amount of annotated data is high, and small sample data is common in actual scenarios, which further limits the promotion and application of traditional methods; in the case of unbalanced data or inability to obtain sufficient annotations, the performance of traditional detection models is usually not ideal; therefore, existing technologies face many bottlenecks in adaptability to diverse environments and efficient detection. Summary of the invention

[0004] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides a nitrogen oxide sensor aging test method based on deep learning.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] A nitrogen oxygen sensor aging test method based on deep learning, the method comprising:

[0007] Collecting historical large sample data from a source domain, preprocessing the historical large sample data, and extracting general aging trend data from the preprocessed historical large sample data;

[0008] A self-attention mechanism model with a three-layer Transformer architecture was constructed. The self-attention mechanism model of the Transformer architecture was trained using general aging trend data to obtain a general basic model for detecting whether a gas sensor is aging.

[0009] Collect historical small sample data from the target domain, and after extracting the dedicated aging trend data from the historical small sample data, pre-process the dedicated aging trend data, use the trained general basic model as a transfer learning model, and fine-tune the transfer learning model;

[0010] Add a new fully connected layer, connect the output of the fine-tuned transfer learning model to the new fully connected layer, activate the output of the new fully connected layer using the Softmax activation function, and train the fine-tuned transfer learning model using the dedicated aging trend data with the goal of minimizing the predefined loss function to obtain a dedicated detection model for detecting whether the nitrogen oxide sensor is aging;

[0011] An aging test is performed on the nitrogen oxygen sensor to be tested using a dedicated detection model, and an aging test result is output, wherein the aging test result includes one of aging and non-aging.

[0012] Furthermore, the historical large sample data includes historical aging performance data of R types of gas sensors, and the historical aging performance data includes an influencing feature set and an aging performance change; the influencing feature set includes k influencing features, and the aging performance change is one of a signal drift value, sensitivity or response time, and k is an integer greater than zero.

[0013] Furthermore, the extraction of general aging trend data from the pre-processed historical large sample data includes:

[0014] a1: Get the historical aging performance data of the vth gas sensor, where i is an integer greater than zero;

[0015] a2: Analyze and calculate the historical aging performance data of the v-th gas sensor using the Pearson correlation coefficient to obtain an aging feature set of the v-th gas sensor, and let i=i+1, and return to step a1, the aging feature set includes m aging features;

[0016] The analyzing and calculating of the historical aging performance data of the vth gas sensor includes:

[0017] Calculate the Pearson correlation coefficient of each influencing feature in the influencing feature set of the vth gas sensor;

[0018] A Pearson correlation coefficient threshold is set, and a corresponding influencing feature set whose Pearson correlation coefficient is greater than or equal to the Pearson correlation coefficient threshold is used as an aging feature of the vth gas sensor;

[0019] Count all aging features of the v-th gas sensor to form an aging feature set of the v-th gas sensor;

[0020] a3: Repeat steps a1 to a2 above until the cycle ends when i=R, and obtain the aging feature set of R types of gas sensors;

[0021] a4: Perform intersection calculation on the aging feature sets of R types of gas sensors to obtain S common aging features of all gas sensors, and combine the S common aging features and the aging performance change into universal aging trend data, where S is an integer greater than zero.

[0022] Furthermore, in the self-attention mechanism model of the three-layer Transformer architecture, the first layer includes an embedding layer, the second layer includes six Transformer encoder modules, and the third layer includes an output layer, wherein the Transformer encoder is composed of six repeated encoders, each encoder contains a self-attention sublayer and a feedforward neural network sublayer, and each sublayer is followed by normalization and residual connection.

[0023] Furthermore, the training of the self-attention mechanism model of the Transformer architecture includes:

[0024] Acquire universal aging trend data, and divide the universal aging trend data into a universal model training set and a universal model test set, wherein the universal model training set includes common aging features and their corresponding aging performance changes;

[0025] Obtaining a label of each aging performance change amount corresponding to the aging performance change amount, wherein the label includes "0" and "1", wherein "0" represents no aging and "1" represents aging;

[0026] Initialize the self-attention mechanism model of the three-layer Transformer architecture, use the common aging features in the general model training set as the input of the self-attention mechanism model, and use the annotated labels in the general model training set as the output of the self-attention mechanism model, train the self-attention mechanism model, and obtain a trained self-attention mechanism model;

[0027] The trained self-attention mechanism model is verified using the general model test set, and the trained self-attention mechanism model with a value greater than or equal to the preset test accuracy threshold is output as the general basic model.

[0028] Furthermore, the step of extracting the dedicated aging trend data from the historical small sample data includes:

[0029] Extract historical small sample data and general aging trend data;

[0030] Perform intersection calculation on the historical small sample data and the general aging trend data to obtain H intersection data points, where H is an integer greater than zero;

[0031] The difference calculation is performed on the historical small sample data and the intersection data points to obtain G difference data points, and the G difference data points are used as special aging trend data, where G is an integer greater than zero.

[0032] Furthermore, the fine-tuning of the transfer learning model includes:

[0033] Freeze the embedding layer and the first 3 Transformer encoder modules in the transfer learning model;

[0034] Unfreeze the last 3 Transformer encoder modules and the output layer in the transfer learning model.

[0035] Furthermore, the expression of the predefined loss function is as follows:

[0036] ;

[0037] Where: N is the number of samples, is the true label of sample j, is the probability predicted by the model, indicating the probability that sample i belongs to aging. represents the weight of sample i, To adjust the parameters.

[0038] An electronic device comprises a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, any one of the above-mentioned deep learning-based nitrogen oxygen sensor aging test methods is implemented.

[0039] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed, implements any of the above-mentioned deep learning-based nitrogen oxygen sensor aging test methods.

[0040] Compared with the prior art, the present invention has the following beneficial effects:

[0041] The present application discloses a nitrogen oxide sensor aging test method based on deep learning, comprising: extracting general aging trend data from pre-processed historical large sample data; using the general aging trend data to train a self-attention mechanism model to obtain a general basic model; using the trained general basic model as a transfer learning model, and fine-tuning the transfer learning model; adding a new fully connected layer, connecting the output of the fine-tuned transfer learning model to the new fully connected layer, activating the output of the new fully connected layer, and training the fine-tuned transfer learning model with dedicated aging trend data with the goal of minimizing a predefined loss function to obtain a dedicated detection model; using the dedicated detection model to perform an aging test on the nitrogen oxide sensor to be detected; based on the above characteristics, the present invention realizes the aging detection of nitrogen oxide sensors by combining deep learning with transfer learning. Efficient and precise; by extracting universal aging trend data of various gas sensors and fine-tuning the model in the target domain, the generalization ability and scene adaptability of the model are effectively improved; the Transformer architecture with self-attention mechanism enables the model to quickly process multi-dimensional features, realize real-time detection, and improve robustness in complex environments; in addition, the processing of difficult-to-classify samples is optimized through the dynamic weight loss function, which significantly improves the overall detection performance and avoids the classification bias of the model; and the transfer learning strategy reduces the dependence on large-scale labeled data, so that the model still maintains high detection accuracy in a small sample environment, reducing data collection and training costs; further, the present invention provides an intelligent and systematic solution for sensor aging detection, promotes the technological development in the fields of industrial monitoring and environmental protection, and has broad application value and promotion prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 A flowchart of a nitrogen oxygen sensor aging test method based on deep learning provided by the present invention;

[0043] Figure 2 A schematic diagram of the structure of an electronic device provided by the present invention;

[0044] Figure 3 A schematic diagram of the structure of a computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0046] Example 1

[0047] See also Figure 1 As shown, this embodiment discloses a nitrogen oxygen sensor aging test method based on deep learning, and the method includes:

[0048] S101: Collecting historical large sample data from a source domain, preprocessing the historical large sample data, and extracting general aging trend data from the preprocessed historical large sample data;

[0049] The historical large sample data includes historical aging performance data of R types of gas sensors, and the historical aging performance data includes an influencing feature set and an aging performance change amount; the influencing feature set includes k influencing features, and the aging performance change amount is one of a signal drift value, a sensitivity, or a response time, and k is an integer greater than zero;

[0050] It should be understood that: signal drift value, sensitivity and response time are specific manifestations of whether the sensor is aged. Among them, the signal drift value refers to the deviation between the output signal and the reference value of the sensor during long-term operation, even under the same conditions and when measuring the same concentration, that is, signal drift value = signal measurement value - signal reference value; sensitivity refers to the sensor's ability to respond to changes in input quantity (such as gas concentration), which is specifically manifested as the change in output signal caused by each unit change in input quantity, that is, sensitivity = Δ input quantity (the difference in the signal between two measurements of the sensor (such as voltage change)) / Δ output signal (the change in gas concentration detected by the sensor (such as ppm change)); response time refers to the time required for the sensor to detect a change in input quantity from the beginning of perception to the stabilization of the output signal, response time = time required for the output signal to reach 90% of the final value - time required for the output signal to reach 10% of the final value;

[0051] The k influencing features include but are not limited to the temperature, humidity, gas concentration, carbon deposit amount, current value and voltage value of the environment where the gas sensor is located;

[0052] It should be noted that: the R types of gas sensors include but are not limited to oxygen sensors and carbon dioxide sensors, etc., and the R types of gas sensors with similar functions and usage scenarios as nitrogen and oxygen sensors can be used as application objects of the present invention, and R is an integer greater than zero; wherein, the historical large sample data of the R types of gas sensors are obtained through prior knowledge (such as scientific literature, industry standards, etc.), actual records or specific experiments, etc.; wherein, the preprocessing content of the historical large sample data includes but is not limited to data cleaning, outlier detection (IQR method (interquartile range method)), missing value filling (missing data can be filled by using mean, interpolation or regression method), data denoising (using moving average method or wavelet denoising algorithm) and data standardization (Min-Max standardization method), etc.;

[0053] In implementation, the general aging trend data is extracted from the pre-processed historical large sample data, including:

[0054] a1: Get the historical aging performance data of the vth gas sensor, where i is an integer greater than zero;

[0055] a2: Analyze and calculate the historical aging performance data of the v-th gas sensor using the Pearson correlation coefficient to obtain an aging feature set of the v-th gas sensor, and let i=i+1, and return to step a1, the aging feature set includes m aging features;

[0056] Specifically, the analyzing and calculating of the historical aging performance data of the vth gas sensor includes:

[0057] Calculate the Pearson correlation coefficient of each influencing feature in the influencing feature set of the vth gas sensor;

[0058] Wherein, the formula of the Pearson correlation coefficient is as follows: , where: is the Pearson correlation coefficient; is the value of the ith influencing feature of the vth gas sensor; n is the number of data points; p is the value of the aging performance change, and are the means of X and Y respectively;

[0059] It is worth noting that: in each data point there is a value of an influencing feature and a value of the change in aging performance corresponding to it;

[0060] A Pearson correlation coefficient threshold is set, and a corresponding influencing feature set whose Pearson correlation coefficient is greater than or equal to the Pearson correlation coefficient threshold is used as an aging feature of the vth gas sensor;

[0061] Count all aging features of the v-th gas sensor to form an aging feature set of the v-th gas sensor;

[0062] a3: Repeat steps a1 to a2 above until the cycle ends when i=R, and obtain the aging feature set of R types of gas sensors;

[0063] a4: Perform intersection calculation on the aging feature sets of R types of gas sensors to obtain S common aging features of all gas sensors, and combine the S common aging features and the aging performance change into universal aging trend data, where S is an integer greater than zero;

[0064] It should be understood that: by extracting general aging trend data and training and constructing subsequent general basic models based on the general aging trend data, it is beneficial to ensure that the general basic model has good generalization ability globally, so that after subsequent transfer learning, the model can maintain global capabilities. Then, by using special aging trend data to fine-tune the general basic model, it can be given good local prediction capabilities, so that through the least sample training and the smallest training cost, the special detection model obtained after training has more accurate prediction or distinction capabilities, thereby achieving rapid acquisition of a better model while minimizing the model cost.

[0065] S102: construct a self-attention mechanism model including a three-layer Transformer architecture, and use general aging trend data to train the self-attention mechanism model of the Transformer architecture to obtain a general basic model for detecting whether the gas sensor is aging;

[0066] Specifically, the first layer of the self-attention mechanism model of the three-layer Transformer architecture includes an embedding layer, the second layer includes six Transformer encoder modules, and the third layer includes an output layer, wherein the Transformer encoder is composed of six repeated encoders, each encoder includes a self-attention sublayer and a feedforward neural network sublayer, and each sublayer is followed by normalization and residual connection;

[0067] It is clear that the three-layer Transformer architecture achieves efficient, stable and accurate gas sensor aging detection by organically combining the embedding layer, six Transformer encoder modules and the output layer; the model architecture takes into account deep feature learning, parallel processing and generalization capabilities, ensuring that it can adapt to diverse sensor environments and providing a good foundation for transfer learning;

[0068] In implementation, the training of the self-attention mechanism model of the Transformer architecture includes:

[0069] Acquire universal aging trend data, and divide the universal aging trend data into a universal model training set and a universal model test set, wherein the universal model training set includes common aging features and their corresponding aging performance changes;

[0070] Obtaining a label of each aging performance change amount corresponding to the aging performance change amount, wherein the label includes "0" and "1", wherein "0" represents no aging and "1" represents aging;

[0071] The labeling labels may be obtained manually by an AI data annotator or a technical staff, or may be automatically labeled by a pre-set labeling program. When the labeling program is automatically labeled, the labeling logic is as follows: each aging performance change is obtained, and each aging performance change is compared with a preset aging performance change threshold. If the aging performance change is greater than or equal to the aging performance change threshold, it is labeled as "1". Otherwise, if the aging performance change is less than the aging performance change threshold, it is labeled as "0".

[0072] Initialize the self-attention mechanism model of the three-layer Transformer architecture, use the common aging features in the general model training set as the input of the self-attention mechanism model, and use the annotated labels in the general model training set as the output of the self-attention mechanism model, train the self-attention mechanism model, and obtain a trained self-attention mechanism model;

[0073] The trained self-attention mechanism model is verified using the general model test set, and the trained self-attention mechanism model with a value greater than or equal to the preset test accuracy threshold is output as the general basic model.

[0074] S103: collecting historical small sample data from the target domain, and after extracting the dedicated aging trend data from the historical small sample data, preprocessing the dedicated aging trend data, using the trained general basic model as a transfer learning model, and fine-tuning the transfer learning model;

[0075] It should be noted that: target domain and source domain are concepts commonly used in transfer learning, mainly describing different distributions and scenarios of data or tasks; source domain refers to the field of data or tasks on which the model was originally trained, and is a field that already has a large amount of labeled data; it is understandable that since the historical large sample data comes from R types of gas sensors, the data already has a large number of annotations, and the data volume is large, including thousands or tens of thousands of items; and the target domain refers to the field of new data or tasks that the model needs to adapt to, the data distribution or characteristics in the target domain may be different from those in the source domain, and the data in the target domain often lacks sufficient annotations, and the data volume is small, including only a few hundred items; therefore, it can be seen that the historical small sample data and the historical large sample data are named based on the difference in volume;

[0076] The historical large sample data includes historical aging performance data of nitrogen and oxygen gas sensors, and the historical aging performance data includes an influencing feature set and an aging performance change amount; the influencing feature set includes k influencing features;

[0077] Specifically, the step of extracting dedicated aging trend data from historical small sample data includes:

[0078] Extract historical small sample data and general aging trend data;

[0079] Perform intersection calculation on the historical small sample data and the general aging trend data to obtain H intersection data points, where H is an integer greater than zero;

[0080] Perform difference calculation on the historical small sample data and the intersection data points to obtain G difference data points, and use the G difference data points as special aging trend data, where G is an integer greater than zero;

[0081] Exemplarily, assuming that the influencing feature set in the historical small sample data is A, and A={Y1,Y2, Y3}, that is, the influencing feature set A contains three influencing features, and each influencing feature corresponds to a corresponding aging performance change a={z1,z2,z3}, and assuming that the common aging feature set formed by S common aging features in the general aging trend data is B, and B={Y3,Y4,Y5}, and each common aging feature corresponds to a corresponding aging performance change b={z3,z4,z5}, therefore, the intersection of A and B is Y3, then Y3 and z3 corresponding to Y3 are taken as intersection data points; and after calculating the difference set, that is, 𝐴\(𝐴∩𝐵)={Y1,Y2, Y3}{Y3}={Y1,Y2}, therefore, Y1 and z1 corresponding to Y1, and Y2 and z2 corresponding to Y2 are taken as difference set data points;

[0082] It should be noted that the preprocessing of the dedicated aging trend data is the same as the preprocessing of the historical large sample data mentioned above. For details, please refer to the above related content and will not be repeated here.

[0083] Specifically, fine-tuning the transfer learning model includes:

[0084] Freeze the embedding layer and the first 3 Transformer encoder modules in the transfer learning model;

[0085] Unfreeze the last three Transformer encoder modules and the output layer in the transfer learning model;

[0086] It can be understood that by freezing the embedding layer and the first three encoder modules, and unfreezing the last three encoder modules and the output layer, the model can effectively retain common features and perform fine-tuning on the target domain data; this method ensures that the model can not only utilize the knowledge of the source domain, but also perform well in the tasks in the target domain, which is conducive to the subsequent efficient and accurate aging detection.

[0087] S104: adding a new fully connected layer, connecting the output of the fine-tuned transfer learning model to the new fully connected layer, activating the output of the new fully connected layer using a Softmax activation function, and training the fine-tuned transfer learning model using dedicated aging trend data with the goal of minimizing a predefined loss function, thereby obtaining a dedicated detection model for detecting whether the nitrogen oxide sensor is aging;

[0088] The expression of the predefined loss function is as follows:

[0089] ;

[0090] Where: N is the number of samples, is the true label of sample j (aged is 1, non-aged is 0), is the probability predicted by the model, indicating the probability that sample i belongs to aging. represents the weight of sample i, It is an adjustment parameter used to control the impact of sample uncertainty on the loss function;

[0091] It is understandable that when the predicted value When it is close to 0.5 (i.e. the model is uncertain about the sample), the weight When the predicted value is far away from 0.5 (close to 0 or 1), the weight decreases to reduce the focus on easy-to-classify samples. This helps to optimize difficult-to-classify samples, improve overall detection performance and classification accuracy, and prevent the model from being biased due to reliance on a small number of easy-to-classify samples, thereby enhancing robustness in small sample scenarios.

[0092] S105: Performing an aging test on the nitrogen oxide sensor to be tested using a dedicated detection model, and outputting an aging test result, wherein the aging test result includes one of aging and non-aging.

[0093] Example 2

[0094] See also Figure 2 As shown, this embodiment discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, any one of the deep learning-based nitrogen oxygen sensor aging test methods provided by the above methods is implemented.

[0095] Since the electronic device introduced in this embodiment is an electronic device used to implement the nitrogen oxygen sensor aging test method based on deep learning in the embodiment of this application, based on the nitrogen oxygen sensor aging test method based on deep learning introduced in the embodiment of this application, the technical personnel of this field can understand the specific implementation of the electronic device of this embodiment and its various variations, so how the electronic device implements the method in the embodiment of this application is not introduced in detail here. As long as the technical personnel of this field implement the electronic device used in the nitrogen oxygen sensor aging test method based on deep learning in the embodiment of this application, it belongs to the scope of protection of this application.

[0096] Example 3

[0097] See also Figure 3 As shown, this embodiment discloses a computer-readable storage medium, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, any one of the deep learning-based nitrogen oxygen sensor aging test methods provided by the above methods is implemented.

[0098] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters, weights and thresholds in the formula are set by technicians in this field according to actual conditions.

[0099] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired network or a wireless network. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media sets. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD) or a semiconductor medium. The semiconductor medium may be a solid-state hard disk.

[0100] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present invention can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0101] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0102] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only one, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0103] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0104] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0105] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0106] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A nitrogen oxygen sensor aging test method based on deep learning, characterized in that: The method comprises: Collecting historical large sample data from a source domain, preprocessing the historical large sample data, and extracting general aging trend data from the preprocessed historical large sample data; A self-attention mechanism model with a three-layer Transformer architecture was constructed. The self-attention mechanism model of the Transformer architecture was trained using general aging trend data to obtain a general basic model for detecting whether a gas sensor is aging. Collect historical small sample data from the target domain, and after extracting the dedicated aging trend data from the historical small sample data, pre-process the dedicated aging trend data, use the trained general basic model as a transfer learning model, and fine-tune the transfer learning model; Add a new fully connected layer, connect the output of the fine-tuned transfer learning model to the new fully connected layer, activate the output of the new fully connected layer using the Softmax activation function, and train the fine-tuned transfer learning model using the dedicated aging trend data with the goal of minimizing the predefined loss function to obtain a dedicated detection model for detecting whether the nitrogen oxide sensor is aging; An aging test is performed on the nitrogen oxygen sensor to be tested using a dedicated detection model, and an aging test result is output, wherein the aging test result includes one of aging and non-aging.

2. The nitrogen oxygen sensor aging test method based on deep learning according to claim 1 is characterized in that: The historical large sample data includes historical aging performance data of R types of gas sensors, and the historical aging performance data includes an influencing feature set and an aging performance change; the influencing feature set includes k influencing features, and the aging performance change is one of a signal drift value, sensitivity or response time, and k is an integer greater than zero.

3. The nitrogen oxygen sensor aging test method based on deep learning according to claim 2 is characterized in that: The general aging trend data is extracted from the pre-processed historical large sample data, including: a1: Get the historical aging performance data of the vth gas sensor, where i is an integer greater than zero; a2: Analyze and calculate the historical aging performance data of the v-th gas sensor using the Pearson correlation coefficient to obtain an aging feature set of the v-th gas sensor, and let i=i+1, and return to step a1, the aging feature set includes m aging features; The analyzing and calculating of the historical aging performance data of the vth gas sensor includes: Calculate the Pearson correlation coefficient of each influencing feature in the influencing feature set of the vth gas sensor; A Pearson correlation coefficient threshold is set, and a corresponding influencing feature set whose Pearson correlation coefficient is greater than or equal to the Pearson correlation coefficient threshold is used as an aging feature of the vth gas sensor; Count all aging features of the v-th gas sensor to form an aging feature set of the v-th gas sensor; a3: Repeat steps a1 to a2 above until the cycle ends when i=R, and obtain the aging feature set of R types of gas sensors; a4: Perform intersection calculation on the aging feature sets of R types of gas sensors to obtain S common aging features of all gas sensors, and combine the S common aging features and the aging performance change into universal aging trend data, where S is an integer greater than zero.

4. The nitrogen oxygen sensor aging test method based on deep learning according to claim 3 is characterized in that: In the self-attention mechanism model of the three-layer Transformer architecture, the first layer includes an embedding layer, the second layer includes six Transformer encoder modules, and the third layer includes an output layer, wherein the Transformer encoder is composed of six repeated encoders, each encoder contains a self-attention sublayer and a feedforward neural network sublayer, and each sublayer is followed by normalization and residual connection.

5. The nitrogen oxygen sensor aging test method based on deep learning according to claim 4 is characterized in that: The training of the self-attention mechanism model of the Transformer architecture includes: Acquire universal aging trend data, and divide the universal aging trend data into a universal model training set and a universal model test set, wherein the universal model training set includes common aging features and their corresponding aging performance changes; Obtaining a label of each aging performance change amount corresponding to the aging performance change amount, wherein the label includes "0" and "1", wherein "0" represents no aging and "1" represents aging; Initialize the self-attention mechanism model of the three-layer Transformer architecture, use the common aging features in the general model training set as the input of the self-attention mechanism model, and use the annotated labels in the general model training set as the output of the self-attention mechanism model, train the self-attention mechanism model, and obtain a trained self-attention mechanism model; The trained self-attention mechanism model is verified using the general model test set, and the trained self-attention mechanism model with a value greater than or equal to the preset test accuracy threshold is output as the general basic model.

6. The nitrogen oxide sensor aging test method based on deep learning according to claim 5 is characterized in that: The method of extracting the dedicated aging trend data from the historical small sample data includes: Extract historical small sample data and general aging trend data; Perform intersection calculation on the historical small sample data and the general aging trend data to obtain H intersection data points, where H is an integer greater than zero; The difference calculation is performed on the historical small sample data and the intersection data points to obtain G difference data points, and the G difference data points are used as special aging trend data, where G is an integer greater than zero.

7. The nitrogen oxygen sensor aging test method based on deep learning according to claim 6 is characterized in that: The fine-tuning of the transfer learning model includes: Freeze the embedding layer and the first 3 Transformer encoder modules in the transfer learning model; Unfreeze the last 3 Transformer encoder modules and the output layer in the transfer learning model.

8. The nitrogen oxygen sensor aging test method based on deep learning according to claim 7 is characterized in that: The expression of the predefined loss function is as follows: ; Where: N is the number of samples, is the true label of sample j, is the probability predicted by the model, indicating the probability that sample i belongs to aging. represents the weight of sample i, To adjust the parameters.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the nitrogen oxide sensor aging test method based on deep learning according to any one of claims 1 to 8 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the nitrogen oxide sensor aging test method based on deep learning according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Small sample classification model construction method based on transfer learning and iris classification application

    CN111242063A

  • Small sample target detection method based on attention mechanism and transfer learning

    CN118298147A

  • Apparatus, method and computer program for accelerating grid-of-beams optimization with transfer learning

    FI20205565A1

Cited By

  • Regional industry trend prediction method and system based on big data analysis

    CN120689084A