Chemical sensor service life detection method and system, product and medium

By collecting real-time data and calculating the real-time life value of the chemical sensor in combination with multiple parameters, the problem of low life detection accuracy in the prior art is solved, and higher life monitoring accuracy and applicability are achieved.

CN120216809APending Publication Date: 2025-06-27SIGAS MEASUREMENT ENG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510209280.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-25
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

The existing chemical sensor life detection methods are not accurate and are prone to false alarms.

Method used

By collecting real-time sensor data and calculating real-time life value, combining multiple parameters such as reaction rate constant, attenuation coefficient and environmental function, it is suitable for different types of chemical sensors and complex environments, improving the accuracy of life prediction.

Benefits of technology

It improves the accuracy of chemical sensor life monitoring and reduces false alarm situations. It is suitable for different types of chemical sensors and complex working environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216809A_ABST
    Figure CN120216809A_ABST
Patent Text Reader

Abstract

A chemical sensor life detection method, system, product and medium. The method comprises the steps that after a sensor starts to be used, real-time sensor data are collected at a preset first frequency, and real-time time is recorded; calling the real-time sensor data, the real-time time, the startup time, a preset reaction rate constant, a preset sensor life value, an attenuation coefficient, an environment function and initial sensor data, inputting the data into a first formula, and calculating to obtain a real-time sensor life value; and under the condition that the real-time sensor service life proportion value exceeds a preset early warning proportion value range, sending out service life depletion early warning information. By implementing the technical scheme provided by the invention, the accuracy of monitoring the service life of the chemical sensor is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of sensors, and in particular, to a method, system, product, and medium for detecting the lifespan of a chemical sensor. Background Art

[0002] With the development of technology, chemical sensors have become an important support for social operation and scientific research. In environmental monitoring, they can detect pollutants in air, water, and soil, such as harmful gases and heavy metal ions, providing key data for environmental protection. In the biomedical field, chemical sensors can detect disease markers to assist in disease diagnosis and treatment. During industrial production, chemical sensors monitor the chemical composition of raw materials and products in real time to ensure stable production and qualified products. In addition, in food detection, military security, scientific research exploration, etc., chemical sensors, relying on accurate chemical information, promote the development of various industries.

[0003] Currently, there are mainly several ways to monitor the lifespan of chemical sensors: recording key parameters such as sensitivity after each calibration, comparing the current parameters with the initial parameters or standard parameters, and if the difference is too large, the lifespan may be about to expire; or setting up a lifespan monitoring circuit or chip inside the sensor to monitor the working state and key performance indicators of the sensor in real time, and triggering an alarm when the indicators are abnormal or approaching the lifespan limit.

[0004] However, in the above methods for detecting the lifespan of chemical sensors, the accuracy of detecting the lifespan of the sensor is insufficient, and false alarms may occur. Summary of the Invention

[0005] This application provides a method, system, product, and medium for detecting the lifespan of a chemical sensor to improve the accuracy of monitoring the lifespan of chemical sensors.

[0006] In the first aspect of this application, a method for detecting the lifespan of a chemical sensor is provided. The method includes: After the sensor starts to be used, collect real-time sensor data at a preset first frequency and record the real-time time; retrieve the real-time sensor data, the real-time time, the power-on time, a preset reaction rate constant, a preset sensor lifespan value, an attenuation coefficient, an environmental function, and the initial sensor data, input them into the first formula, and calculate the real-time sensor lifespan value; where the first formula is: L is the real-time sensor lifespan value, T total is the preset sensor lifespan value, V0 is the initial sensor data, V1 is the real-time sensor data, t is the time difference between the real-time time and the power-on time, k0 is the preset reaction rate constant, α is the attenuation coefficient, g(T, H) is the environmental function; when the real-time sensor lifespan ratio value exceeds the preset warning ratio value range, send out a lifespan exhaustion warning message.

[0007] In the above embodiments, by collecting real-time data at a certain frequency, calculating the real-time life of the sensor and comparing it with the preset life. In contrast to the related art where the life is monitored only through the sensor performance or the real-time life of the sensor is calculated through the real-time data of the sensor, the method for detecting the life of the chemical sensor provided in this application also introduces multiple parameters in the process of calculating the real-time life of the sensor, which is applicable to different types of chemical sensors and various complex working environments, and improves the accuracy of sensor life prediction.

[0008] Combined with some embodiments of the first aspect, in some embodiments, after retrieving the real-time sensor data, the real-time time, the boot time, the preset reaction rate constant, the preset sensor life value, the attenuation coefficient, the environmental function, and the initial sensor data, inputting them into the first formula, and calculating the real-time sensor life value, it further includes: When the real-time sensor life ratio value is within the range of the preset warning ratio value, retrieving the real-time working data group of the sensor and copying it as the simulated working data group; inputting the simulated working data group into the preset mathematical relationship model to obtain the simulated real-time working model of the sensor; in the simulated real-time working model of the sensor, obtaining the optimal simulated working data group corresponding to the optimal simulated life value; using the data corresponding to the optimal simulated working data group as the latest working data of the sensor.

[0009] In the above embodiments, when the sensor life is within the warning range, by retrieving and copying the real-time working data group, inputting it into the preset mathematical relationship model to construct a simulation model, finding the optimal simulated working data group, and using its data as the latest working data. This enables the working state of the sensor to be optimized in a timely manner according to the simulation results, improves the performance of the sensor, extends the service life, and ensures the stable operation of the system.

[0010] In combination with some embodiments of the first aspect, in some embodiments, when the real-time sensor life ratio value is within the preset warning ratio value range, the real-time working data group of the sensor is retrieved and copied as the simulated working data group, which specifically includes: after obtaining the real-time sensor life value, calculating the ratio of the real-time sensor life value to the preset sensor life value to obtain the real-time sensor life ratio value; when the real-time sensor life ratio value is within the preset warning ratio value range, retrieving the real-time working data group of the sensor and the preset calibration algorithm combination; according to the preset calibration algorithm combination, generating real-time calibration information for the real-time working data group; copying the real-time working data group to obtain the simulated working data group, and using the preset calibration algorithm combination to calibrate the simulated working data group to generate simulated calibration information; when there are different data in the real-time calibration information and the simulated calibration information, locating the positions of the different data in the real-time calibration information and the simulated calibration information as different real-time calibration information and different simulated calibration information; deleting the different simulated data corresponding to the different simulated calibration information, and storing new different simulated data at the original different simulated data positions to obtain the modified simulated working data group.

[0011] In the above embodiments, the real-time sensor life ratio value is calculated. When it is within the preset range, the data group is retrieved, calibrated and copied, the simulated working data group is calibrated and information processed, the different data are located and processed, and the sensor working data is checked to improve the data accuracy.

[0012] In combination with some embodiments of the first aspect, in some embodiments, the simulated working data group is input into a preset mathematical relationship model to obtain a simulated real-time working model of the sensor, which specifically includes: The simulated working data group is input into a preset mathematical relationship model to obtain a simulated real-time working model of the sensor, and the real-time simulated life value is calculated; if the simulated life difference is greater than the preset simulated life difference threshold, the preset parameters in the preset mathematical relationship model are adjusted by substituting the real-time sensor life value to obtain an adjusted mathematical relationship model; the simulated working data group is input into the adjusted mathematical relationship model to obtain an adjusted simulated real-time working model of the sensor.

[0013] In the above embodiments, by inputting the simulated working data group into the mathematical relationship model, the real-time simulated life value is calculated. When the simulated life difference exceeds the threshold, the model parameters are adjusted and recalculated to obtain an adjusted model. This enables the improvement of the accuracy of the simulation results, makes the model more in line with the actual situation, provides a more reliable basis for evaluating the working state of the sensor, and ensures the stability and reliability of the system operation.

[0014] In combination with some embodiments of the first aspect, in some embodiments, the data corresponding to the optimal simulated working data group is used as the latest working data of the sensor, which specifically includes: In this real-time working model of the analog sensor, by changing the data values in the analog working data group within the numerical range of the preset working data group, multiple data combinations are performed to obtain an adjusted sensor life value data group; the maximum value in the adjusted sensor life value data group is retrieved as the optimal simulated life value, and the working data group corresponding to the optimal simulated life value is used as the optimal simulated working data group.

[0015] In the above embodiment, by changing the data values of the analog working data group within a preset range, multiple combinations are performed to generate an adjusted sensor life value data group, and the maximum value and its corresponding working data group are found. This enables the identification of the optimal working data, provides a basis for optimizing the working conditions of the sensor, thereby extending the sensor life, improving the sensor performance, and ensuring the efficient and stable operation of the system.

[0016] In combination with some embodiments of the first aspect, in some embodiments, after retrieving the real-time sensor data, the real-time time, the power-on time, the preset reaction rate constant, the preset sensor life value, the attenuation coefficient, the environmental function, and the initial sensor data, inputting them into the first formula, and calculating the real-time sensor life value, it further includes: Storing the real-time sensor life value and the corresponding real-time time into a preset sensor real-time life data group; taking the difference between the sensor life value stored last time in the sensor real-time life data group and the real-time sensor life value to obtain a sensor life difference value; in the case where the sensor life difference value is less than the time value of a preset time period, sending out a warning message that the sensor life is consumed too quickly.

[0017] In the above embodiment, by storing the real-time sensor life value and the corresponding time into a data group, calculating the difference between two adjacent life values, and comparing it with the time value of a preset time period. This enables the timely detection of abnormal situations in the consumption of the sensor life. Once the life is consumed too quickly, a warning is sent, allowing the staff to prepare in advance to avoid affecting the normal operation of the system due to the sudden failure of the sensor.

[0018] In combination with some embodiments of the first aspect, in some embodiments, after sending out a warning message that the life is exhausted when the real-time sensor life ratio value exceeds the preset warning ratio value range, it further includes: Storing the sensor detection data into a preset sensor data group.

[0019] In the above embodiment, after the sensor life ratio value exceeds the warning range and a warning of exhaustion is sent, the sensor detection data is stored in a preset data group. This enables the retention of past sensor detection data for subsequent in-depth analysis of the performance and failure reasons of the sensor.

[0020] Second aspect, an embodiment of the present application provides a chemical sensor life detection system, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program code, and the computer program code includes computer instructions. The one or more processors call the computer instructions to cause the chemical sensor life detection system to execute the method described in the first aspect and any possible implementation manner in the first aspect.

[0021] Third aspect, an embodiment of the present application provides a computer program product containing instructions. When the computer program product runs on a chemical sensor life detection system, it causes the chemical sensor life detection system to execute the method described in the first aspect and any possible implementation manner in the first aspect.

[0022] Fourth aspect, an embodiment of the present application provides a computer-readable storage medium, including instructions. When the instructions run on a chemical sensor life detection system, it causes the chemical sensor life detection system to execute the method described in the first aspect and any possible implementation manner in the first aspect.

[0023] It can be understood that the chemical sensor life detection system provided in the second aspect, the computer program product provided in the third aspect, and the computer storage medium provided in the fourth aspect are all used to execute the chemical sensor life detection method provided by the embodiments of the present application. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, and will not be elaborated here.

[0024] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. In the present application, real-time data is collected at a certain frequency, the real-time life of the sensor is calculated and compared with the preset life. Compared with the related art, where only the life is monitored through the sensor performance or the real-time life of the sensor is calculated through the real-time data of the sensor, the chemical sensor life detection method provided in the present application also introduces multiple parameters in the process of calculating the real-time life of the sensor, which is applicable to different types of chemical sensors and various complex working environments, and improves the accuracy of sensor life prediction.

[0025] 2. In the present application, when the sensor life is within the warning range, the real-time working data group is retrieved and copied, input into a preset mathematical relationship model to construct a simulation model, the optimal simulated working data group is found, and its data is used as the latest working data. This enables the working state of the sensor to be optimized in a timely manner based on the simulation results, improves the performance of the sensor, extends the service life, and ensures the stable operation of the system.

[0026] 3. In this application, by calculating the real-time sensor life ratio value, when it is within the preset range, the data group is retrieved, verified, and copied, the analog working data group is verified and information processed, different data is located and processed, and the sensor working data is inspected, improving data accuracy. Description of the Drawings

[0027] Figure 1 It is a schematic structural diagram of an applicable system architecture for the chemical sensor life detection method in an embodiment of this application; Figure 2 It is a schematic flowchart of a chemical sensor life detection method in an embodiment of this application; Figure 3 It is another schematic flowchart of a chemical sensor life detection method in an embodiment of this application; Figure 4 It is a schematic diagram of an exemplary hardware structure of a chemical sensor life detection system in an embodiment of this application. Detailed Description of the Embodiment

[0028] The terms used in the following embodiments of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. As used in the specification and appended claims of this application, the singular forms "a", "an", "the", "above-mentioned", "said", and "this" are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in this application refers to and includes any or all possible combinations of one or more of the listed items.

[0029] Hereinafter, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as implying or suggesting relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of this application, unless otherwise stated, the meaning of "a plurality" is two or more.

[0030] Figure 1 It is a schematic structural diagram of an applicable system architecture for the chemical sensor life detection method in an embodiment of this application.

[0031] Please refer to Figure 1 , this system architecture includes a chemical sensor 110, a controller 120, a storage device 130, a clock 140, and a communication device 150.

[0032] The chemical sensor 110, as the core data acquisition component of the system, based on a specific chemical sensing mechanism, converts chemical signals into electrical signals or other forms of signals that can be recognized by the system, providing basic data for subsequent calculations and analyses.

[0033] The controller 120 retrieves the real-time sensor data from the chemical sensor 110, the real-time time recorded by the clock 140, and the data stored in the storage device 130, and processes the data. Through the internal processor and pre-written program algorithms, the input data is analyzed, calculated, and logically judged, and the various parts of the system are directed to work together according to the set rules.

[0034] The storage device 130 is responsible for storing various important data and information required during the operation of the storage system. It uses storage media such as hard disks and flash memories to achieve orderly storage and fast reading of data through a specific storage management system.

[0035] The clock 140 accurately records the real time, provides a time reference for the system, generates a stable time signal based on timing elements such as a crystal oscillator, and ensures the accuracy of the time through synchronization with the standard time or an internal calibration mechanism.

[0036] The communication device 150 is responsible for data transmission and interaction between the system and external devices or systems. For example, when the system issues a warning message of life exhaustion or a warning message of excessive sensor life consumption, this information can be sent to the terminal device of the relevant staff through the communication device 150 so that timely measures can be taken. In addition, external instructions can also be received to adjust the parameters or operating mode of the system. According to different communication protocols (such as Bluetooth, Wi-Fi, wired network protocols, etc.), the data inside the system is converted into a signal form suitable for transmission on the communication line to realize data sending and receiving.

[0037] In related technologies, there are many ways to monitor the life of chemical sensors, such as comparing real-time parameters with initial parameters at a certain frequency or monitoring the working status and key performance indicators of the sensor in real time, and triggering an early warning when the indicators are abnormal or the life is approaching the limit. However, this method is prone to errors and false alarms in chemical sensor life detection.

[0038] The chemical sensor life detection method in the embodiment of the present application is used to calculate the real-time life of the chemical sensor in real time by combining the environmental data of the chemical sensor's surroundings, and compare it with the preset life. When the life threshold is about to be reached, an alarm is triggered, thereby improving the accuracy of chemical sensor life monitoring.

[0039] Figure 2 It is a flow chart of the intelligent monitoring and station operation and maintenance method according to the embodiment of the present application, including the following steps: S201, after the sensor starts to be used, collecting real-time sensor data at a preset first frequency and recording the real-time time; After the sensor is put into use, the system will collect real-time sensor data according to a pre-set first frequency and record the real-time. This frequency determines the time interval for collecting real-time sensor data. For example, it is set to collect once every 10 seconds. When the set collection moment arrives, the corresponding data collected by the sensor in real time is recorded. For example, for a gas content sensor, the corresponding gas content collected in real time is recorded; for a humidity sensor, the humidity collected in real time is recorded, etc. At the same time, the system will record the real-time of this data collection with the help of a real-time clock chip to ensure that the collected data is all marked with accurate time stamps.

[0040] S202. Retrieve the real-time sensor data, real-time, power-on time, preset reaction rate constant, preset sensor life value, attenuation coefficient, environmental function, and initial sensor data, input them into the first formula, and calculate the real-time sensor life value; Specifically, the first formula is:

[0041] L is the real-time sensor life value, T total is the preset sensor life value, V0 is the initial sensor data, V1 is the real-time sensor data, t is the time difference between the real-time and the power-on time, k0 is the preset reaction rate constant, α is the attenuation coefficient, and g(T, H) is the environmental function.

[0042] For the above first formula, the reaction kinetic factors of the chemical substances inside the chemical sensor are considered, making the setting of the life value more scientific and reasonable. Since the life of a chemical sensor is essentially closely related to the consumption and reaction process of chemical substances, introducing the reaction rate constant and its relationship with environmental factors can more deeply describe the aging mechanism of the sensor, more accurately calculate the integral value reflecting its true life, provide a more reliable basis for accurately judging whether the sensor has reached the life limit, and reduce misjudgment situations.

[0043] In the above first formula, the reaction rate constant k is a parameter describing the reaction rate of a chemical reaction. Let k = k0×e-αt×g(T, H), where k0 is the initial reaction rate constant, which represents the basic rate of chemical substance reaction in the initial state of the sensor; α is the attenuation coefficient, which is used to reflect the attenuation of the reaction rate over time. This is because during the use of the sensor, factors such as the gradual consumption of chemical substances and the possible reduction of catalyst activity may cause the reaction rate to gradually slow down. e - α tSimulate this decay trend over time; g(T, H) is a function related to temperature T and humidity H, indicating that the reaction rate constant is affected by environmental temperature and humidity. For example, chemical reactions in some chemical sensors may proceed faster in high-temperature or high-humidity environments, while slowing down in low-temperature and low-humidity environments. The g(T, H) function can quantify this relationship of environmental influence based on the specific sensor materials and chemical reaction characteristics.

[0044] Introduce the reaction rate constant and its influencing factors to describe the reaction process of chemical substances inside the sensor. Traditional lifetime assessment methods may ignore the dynamic changes of the reaction rate over time and with the environment, while this method can adjust the estimation of the reaction rate in real time according to the actual usage time and environmental conditions of the sensor, thus more accurately predicting the lifetime of the sensor.

[0045] For example, in an industrial monitoring scenario that has been in a high-temperature and high-humidity environment for a long time, the reaction rate constant will increase accordingly, resulting in faster consumption of the chemical substances in the sensor. This formula can reflect this change in a timely manner, prompting the user in advance that the sensor may reach its lifetime limit earlier, and avoiding problems such as inaccurate monitoring data or equipment failures caused by sensor failure.

[0046] The environmental factor-related function g(T, H) is used to quantify the influence of temperature T and humidity H on the reaction rate constant k. For different chemical sensors, the reactions of the chemical substances inside are different in sensitivity to temperature and humidity. The specific form of the g(T, H) function needs to be determined through a large amount of experimental data and theoretical analysis. For example, for some gas sensors based on electrochemical principles, an increase in temperature may accelerate the chemical reaction rate on the electrode surface, and an increase in humidity may affect the ionic conduction performance of the electrolyte, thereby affecting the overall reaction rate. The g(T, H) function can be a polynomial function, exponential function or other forms of mathematical expressions containing temperature and humidity, and its coefficients are obtained by experimental fitting to accurately describe the reaction rate change law of a specific sensor under different temperature and humidity conditions.

[0047] The environmental conditions where chemical sensors are located are complex and diverse. After introducing the g(T, H) function, the environmental factors can be incorporated into the calculation model of the sensor lifetime. This makes the lifetime detection method have stronger adaptability and accuracy. No matter in what temperature and humidity environment the sensor works, it can dynamically adjust the lifetime prediction according to the actual environmental parameters. Compared with the method that does not consider environmental factors, it can significantly reduce the lifetime prediction error caused by environmental changes, improve the reliability of sensor lifetime management, ensure that the sensor can provide accurate and reliable measurement data throughout its service life cycle, and also helps to optimize the usage and maintenance strategies of the sensor and reduce the usage cost.

[0048] The first formula that comprehensively considers the reaction rate and environmental factors has many advantages in the life detection of chemical sensors. First of all, it improves the accuracy of life prediction. By accurately simulating the reaction kinetics of chemical substances and the influence of environmental factors on the reaction, it can more realistically reflect the aging process of the sensor, reduce misjudgment and missed judgment situations, and provide users with more reliable replacement and maintenance tips. Secondly, it enhances the versatility and adaptability of the method of the present application, is applicable to different types of chemical sensors and various complex working environments, and provides a unified and effective method for the life management of sensors in different application scenarios.

[0049] S203. When the real-time sensor life ratio value exceeds the preset warning ratio value range, send out a life exhaustion warning message.

[0050] Specifically, the life exhaustion warning message is to prompt that the sensor is about to reach the preset life; the real-time sensor life ratio value is the ratio of the real-time sensor life value to the preset sensor life value.

[0051] The system will calculate the real-time sensor life ratio value in real time, that is, divide the real-time sensor life value calculated according to a complex algorithm by the preset sensor life value set in advance to obtain the ratio.

[0052] Compare this ratio with the preset warning ratio value range. Once it is found that the real-time sensor life ratio value exceeds this range, the warning mechanism will be immediately triggered. At this time, the system will send out a life exhaustion warning message through a preset output method, such as popping up a prompt box on the display screen, sending a message to an associated device, etc., to inform the user that the sensor is about to reach the preset life.

[0053] In the above embodiment, by collecting real-time data at a certain frequency, calculating the real-time life of the sensor and comparing it with the preset life. Compared with the related technology, which only monitors the life through the sensor performance or calculates the real-time life of the sensor through the real-time data of the sensor, the method for detecting the life of a chemical sensor provided by the present application also introduces multiple parameters in the process of calculating the real-time life of the sensor, is applicable to different types of chemical sensors and various complex working environments, and improves the accuracy of sensor life prediction.

[0054] In other embodiments of the present application, after predicting the sensor life, if the sensor life reaches the threshold value that needs to be warned but does not reach the dangerous threshold value, on the basis of monitoring the sensor life, the sensor life can also be extended by adjusting the real-time data to extend the service time of the sensor.

[0055] As Figure 3 shown, it is another flow schematic diagram of the method for detecting the life of a chemical sensor provided by the embodiment of the present application, and this method can be used for Figure 1In the system architecture shown, the following steps are included: S301. After the sensor starts to be used, collect real-time sensor data at a preset first frequency and record the real time; S302. Retrieve the real-time sensor data, real time, startup time, preset reaction rate constant, preset sensor life value, attenuation coefficient, environmental function, and initial sensor data, input them into the first formula, and calculate the real-time sensor life value; Specifically, the first formula is: S303. Store the real-time sensor life value and the corresponding real time into the preset sensor real-time life data group; After calculating the real-time sensor life value, perform the storage operation. First, locate the preset sensor real-time life data group that has been set up in advance. This data group may be stored in memory, hard disk, or other storage media. Then, take the real-time sensor life value and the real time as a set of associated data, and insert them into the corresponding position of the preset sensor real-time life data group according to the established data format.

[0056] S304. Subtract the sensor life value stored last time in the sensor real-time life data group from the real-time sensor life value to obtain the sensor life difference; After obtaining the latest real-time sensor life value, extract the sensor life value stored last time from the preset sensor real-time life data group. The data in the data group is arranged in the order of storage time, so the last record immediately adjacent to the current data can be accurately located. Then, subtract the last life value from the latest obtained real-time sensor life value to obtain the difference between the two, that is, the sensor life difference.

[0057] S305. When the sensor life difference is less than the time value of the preset time period, send a warning message that the sensor life is consumed too quickly; Specifically, the preset time period is the time period of the first frequency interval.

[0058] When the sensor life difference is obtained, it will be compared with the time value of the preset time period. This preset time period is the time period separated by the first frequency when the sensor collects data. If the calculated sensor life difference is less than the time value corresponding to this preset time period, it indicates that the sensor life is consumed extremely rapidly in a very short time.

[0059] S306. When the real-time sensor life value is obtained, calculate the ratio of the real-time sensor life value to the preset sensor life value to obtain the real-time sensor life ratio value; The preset sensor life value is a fixed value set in advance based on the sensor's design standards, material properties, and past experience. The system divides the real-time sensor life value by the preset sensor life value and obtains the ratio of the two through a simple mathematical division operation. This ratio is the real-time sensor life ratio value.

[0060] This technical step obtains the real-time sensor life ratio value by calculating the ratio of the real-time sensor life value to the preset sensor life value, enabling users or the system to clearly and intuitively understand the consumption degree of the sensor life. Based on this ratio value, the remaining service life of the sensor can be more accurately evaluated, providing a quantitative basis for subsequent maintenance and replacement plans.

[0061] S307. Determine whether the real-time sensor life ratio value is within the preset warning ratio value range; If so, execute the following step S310; If not, when the real-time sensor life ratio value is greater than the maximum value of the preset warning ratio value range, execute the following step S308; when the real-time sensor life ratio value is less than the minimum value of the preset warning ratio value range, execute the above step S301; Determining whether the real-time sensor life ratio value is within the preset warning ratio value range indicates that the current sensor life has been consumed relatively much, but it can still be used. When the real-time sensor life ratio value is within the preset warning ratio value range, execute the following steps to extend the sensor life by adjusting parameters; if the real-time sensor life ratio value is greater than the maximum value of the preset warning ratio value range, it indicates that the sensor life is about to run out and it will not be able to continue using in a short time, and execute the following sensor life exhaustion warning steps; if the real-time sensor life ratio value is less than the minimum value of the preset warning ratio value range, it indicates that the sensor has been used for a short time, continue to execute the above steps, collect data at the first frequency, and calculate the real-time sensor life value.

[0062] S308. Send a life exhaustion warning message; S309. Store the sensor detection data in the preset sensor data group; Specifically, the sensor detection data includes the power-on time, initial sensor data, preset sensor life value, all collected sensor data, and collection time.

[0063] When the sensor is powered on for the first time, its power-on time will be accurately recorded. At the same time, the system collects and stores the initial sensor data at this time.

[0064] When the sensor's lifespan is exhausted, all sensor data and acquisition times during the sensor's operation are sequentially stored in a preset sensor data group according to the established data storage format. This data group may be stored in a local hard drive, a server, or cloud storage, and the storage process is automatically completed through a storage management program built into the system.

[0065] S310. Retrieve the real-time working data group of the sensor and the preset verification algorithm combination; Specifically, the real-time working data group of the sensor includes real-time liquid temperature data, real-time liquid flow rate data, real-time ambient temperature data, real-time ambient humidity data, and real-time liquid pH data within the sensor.

[0066] S311. Generate real-time verification information for the real-time working data group according to the preset verification algorithm combination; Process the real-time working data of the sensor according to the preset algorithm combination. During this process, various verification bits will be added to the data, and verification information such as verification codes or hash values will be generated. These verification information are associated with the original data and are used to verify the integrity and accuracy of the data subsequently.

[0067] In the above embodiment, the preset algorithm combination may be a Hamming code, a multiple parity check code that can correct one error and detect two errors; in some other embodiments of the present application, the preset algorithm combination may also be algorithms such as MD5 (Message-Digest Algorithm 5). MD5 is a widely used hash function that can map data of any length to a 128-bit hash value, perform multiple rounds of complex operations on the data, and the generated hash value is unique. If the data changes, the hash value will be different, and no limitation is made here.

[0068] S312. Copy the real-time working data group to obtain a simulated working data group, and verify the simulated working data group using the preset verification algorithm combination to generate simulated verification information; Process the data in the simulated working data group according to the preset algorithm combination, and add various verification bits to the data, and generate verification information such as verification codes or hash values.

[0069] S313. In the case where there are different data between the real-time verification information and the simulated verification information, locate the positions of the different data in the real-time verification information and the simulated verification information, which are different real-time verification information and different simulated verification information; When the system determines that there are different data between the real-time verification information and the simulated verification information, the positioning program will be started. The system will compare each data item in the two sets of verification information one by one. By means of loop traversal, starting from the first data, it will check whether the data at the corresponding positions in the real-time verification information and the simulated verification information are the same. Once data inconsistency is found, the specific positions of the data in the two sets of information will be immediately recorded, and the data at these two positions will be marked as different real-time verification information and different simulated verification information respectively.

[0070] S314. Delete the different simulated data corresponding to the different simulated verification information, and store the new different simulated data at the original position of the different simulated data to obtain the modified simulated working data group; It can be understood that the new different simulated data is obtained by copying the data in the real-time working data group corresponding to the different real-time verification information again.

[0071] After different data is found, first determine the position of the different simulated verification information in the simulated verification information group, and then delete the simulated verification information corresponding to this position. Find the corresponding data of the different real-time verification information in the real-time working data group, copy it again, and store the newly obtained simulated data at the position of the previously deleted different simulated data, so as to obtain the modified simulated working data group.

[0072] S315. Input the simulated working data group into the preset mathematical relationship model to obtain the real-time working model of the simulated sensor and calculate the real-time simulated life value; It can be understood that in the preset mathematical relationship model, the simulated life value can be calculated by calculating the simulated working data group with multiple preset parameters.

[0073] Take the modified simulated working data group as the input content and import it into the preset mathematical relationship model set in advance. This model has a specific calculation logic set inside. It will extract the data items in the simulated working data group and combine multiple preset parameters, such as coefficients, constants, etc. determined according to sensor characteristics, application scenarios, etc. Through the established mathematical operations in the model, such as combinations of multiplication, addition, power operations, etc., finally calculate the simulated life value, so as to construct the real-time working model of the simulated sensor to simulate the real-time working state of the sensor.

[0074] For the above mathematical relationship model, the core is to simulate the working data set, which contains various key data of the sensor, such as real-time liquid temperature data, real-time liquid flow rate data, real-time ambient temperature data, real-time ambient humidity data, and real-time liquid pH data, etc. These data participate in the operation as variables because the lifespan of the sensor is usually affected by the comprehensive influence of these working environment and working state factors. In addition to the data variables, the model also contains multiple preset parameters. These parameters are predetermined according to factors such as the physicochemical properties, design specifications, and material properties of the sensor. For example, different types of sensors have different sensitivities to temperature changes, which requires a parameter related to the temperature sensitivity; for the loss of the sensor caused by chemical reactions, there will be a corresponding reaction rate constant as a parameter. The model connects the data variables and the preset parameters through a series of mathematical functions. These functions can include linear functions, polynomial functions, exponential functions, logarithmic functions, etc. For example, the sensor lifespan may have an exponential relationship with temperature and a linear relationship with the flow rate, and the model will describe this complex relationship through an appropriate combination of functions.

[0075] S316. If the simulated lifespan difference is greater than the preset simulated lifespan difference threshold, then by substituting the real-time sensor lifespan value, adjust the preset parameters in the preset mathematical relationship model to obtain an adjusted mathematical relationship model; Specifically, the simulated lifespan difference is the difference between the implemented simulated lifespan value and the real-time sensor lifespan value.

[0076] If the simulated lifespan difference is greater than the preset simulated lifespan difference threshold, it indicates that the calculation result of the preset mathematical relationship model deviates greatly from the actual lifespan value. At this time, the system will substitute the real-time sensor lifespan value into the preset mathematical relationship model and adjust the preset parameters in the model through a specific algorithm. These parameters may include coefficients related to the sensor characteristics, etc. After adjustment, an adjusted mathematical relationship model that can more accurately reflect the relationship between the sensor lifespan and the working data is obtained.

[0077] In some embodiments of the present application, the specific algorithm in the above steps may be the gradient descent algorithm; in some other embodiments of the present application, the specific algorithm in the above steps may also be the least squares method, etc., which is not limited here.

[0078] S317. Input the simulated working data set into the adjusted mathematical relationship model to obtain an adjusted simulated real-time working model of the sensor; Organize the processed simulated working data set into an input format suitable for the adjusted mathematical relationship model. This simulated working data set contains various real-time working data of the sensor, such as temperature, flow rate, etc. The adjusted mathematical relationship model is a model optimized for the preset parameters, and it can more accurately reflect the connection between the data.

[0079] Substitute each piece of data in the simulated working data group into the model according to the model requirements. Based on the new parameter settings, the model generates corresponding output results through a series of established mathematical operations, thereby constructing an adjusted real-time working model of the simulated sensor.

[0080] S318. In the real-time working model of the simulated sensor, by changing the data values in the simulated working data group within the numerical range of the preset working data group, multiple data combinations are performed to obtain an adjusted sensor life value data group. In the already constructed real-time working model of the simulated sensor, operations are carried out according to the numerical range of the preset working data group. This range limits the change intervals of various working data of the sensor, such as temperature, flow rate, etc. The system selects data from the simulated working data group and purposefully changes its values within the limited range. For example, gradually increase the temperature value while adjusting other data such as the flow rate. Through permutation and combination, multiple different data combinations are generated. Each combination is input into the real-time working model of the simulated sensor, and the corresponding life value is calculated. These life values are collected to obtain an adjusted sensor life value data group.

[0081] S319. Retrieve the maximum value in the adjusted sensor life value data group as the optimal simulated life value, and use the working data group corresponding to the optimal simulated life value as the optimal simulated working data group. Specifically, the optimal simulated life value is the maximum value among the simulated life values that can be calculated in the real-time working model of the simulated sensor.

[0082] After obtaining the adjusted sensor life value data group, each life value in the data group will be traversed. By comparing one by one, the life value with the largest numerical value is found, and this maximum value is the optimal simulated life value. After finding the optimal simulated life value, the system will trace back to the simulated working data group used to generate this life value. Because in the real-time working model of the simulated sensor, each simulated life value corresponds to a specific working data group, the working data group that generates the optimal simulated life value is determined as the optimal simulated working data group.

[0083] S320. Use the data corresponding to the optimal simulated working data group as the latest working data of the sensor.

[0084] The data corresponding to the optimal simulated working data group calculates the optimal simulated life value in the calculation of the simulated life value, that is, in the current environment, this optimal simulated data group can maximize the service life of the chemical sensor.

[0085] Steps S301, S302, and S308 are similar to steps S201 - S203 in the Figure 2 embodiment shown, and reference can be made to the descriptions in steps S201 - S203, which will not be elaborated here.

[0086] In the above embodiments, the real-time sensor life value is first calculated based on various sensor data and parameters. Different operations are taken when the life ratio value is in different ranges, including retrieving, copying, verifying, simulating data groups, and establishing and adjusting models to find the optimal simulated life value and the corresponding working data group. The real-time operation data of the sensor is changed to the working data group corresponding to the optimal simulated life value. At the same time, the real-time sensor life value and time are stored and the difference is calculated for early warning. It can monitor and evaluate the state of the sensor more comprehensively and systematically, find the best working state by simulating and optimizing the working data group, realize the accurate calculation and monitoring of the sensor life, give early warning of the situation of too fast or exhausted life consumption, provide guarantee for the maintenance, performance optimization and stable operation of the sensor, and improve the equipment reliability and working efficiency.

[0087] The following introduces the exemplary chemical sensor life detection system 400 provided by the embodiments of the present application. Figure 4 It is a schematic diagram of the exemplary hardware structure of the chemical sensor life detection system 400 provided by the embodiments of the present application.

[0088] In some embodiments, the chemical sensor life detection system 400 includes a computer device. The computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with other external terminals or servers through a network connection. In some embodiments, the network interface can be a wired network interface, and in some embodiments, the network interface can also be a wireless network interface. The computer program, when executed by the processor, implements the method in the embodiments of the present application.

[0089] Those skilled in the art can understand that Figure 4 the structure shown in

[0090] 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 foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the various embodiments of the present application.

[0091] As used in the above embodiments, depending on the context, the term "when..." can be interpreted to mean "if...", or "after...", or "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if detecting (the stated condition or event)" can be interpreted to mean "if determining...", or "in response to determining...", or "when detecting (the stated condition or event)", or "in response to detecting (the stated condition or event)".

[0092] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can 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. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can 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 can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more available media integrated. The available media can be magnetic media (such as floppy disks, hard disks, magnetic tapes), optical media (such as DVDs), or semiconductor media (such as solid state drives), etc.

[0093] Those of ordinary skill in the art can understand all or part of the processes in the methods of the above embodiments. The processes can be completed by relevant hardware instructed by a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The foregoing storage media include: ROM or random access memory RAM, magnetic disks, or optical disks, etc., which can store program codes of various types.

Claims

1. A chemical sensor life detection method, characterized in that: The following steps are involved: After the sensor starts to be used, real-time sensor data is collected at a preset first frequency and the real-time time is recorded; Retrieving the real-time sensor data, the real-time time, the power-on time, the preset reaction rate constant, the preset sensor life value, the attenuation coefficient, the environmental function and the initial sensor data, inputting the first formula, and calculating the real-time sensor life value; the power-on time and the initial sensor data are the data collected and stored when the sensor starts to be used and powered on; Among them, the first formula is: L is the real-time sensor life value, T total is the preset sensor life value, V0 is the initial sensor data, V1 is the real-time sensor data, t is the time difference between the real-time time and the power-on time, k0 is the preset reaction rate constant, α is the attenuation coefficient, and g(T,H) is the environmental function; When the real-time sensor life ratio value exceeds the preset warning ratio value range, a life exhaustion warning message is issued; the life exhaustion warning message is to prompt that the sensor is about to reach the preset life; the real-time sensor life ratio value is the ratio of the real-time sensor life value to the preset sensor life value.

2. According to claim 1, it is characterized in that After retrieving the real-time sensor data, the real-time time, the power-on time, the preset reaction rate constant, the preset sensor life value, the attenuation coefficient, the environmental function and the initial sensor data, inputting the first formula, and calculating the real-time sensor life value, the method further includes: When the real-time sensor life ratio value is within the preset warning ratio value range, the real-time working data group of the sensor is retrieved and copied as a simulation working data group; the real-time working data group of the sensor includes real-time liquid temperature data in the sensor, real-time liquid flow rate data, real-time ambient temperature data, real-time ambient humidity data and real-time liquid pH data; The simulated working data set is input into a preset mathematical relationship model to obtain a simulated sensor real-time working model; in the preset mathematical relationship model, a simulated life value can be obtained by calculating the simulated working data set and a plurality of preset parameters; In the simulated sensor real-time working model, an optimal simulated working data group corresponding to an optimal simulated life value is obtained; the optimal simulated life value is the maximum value of the simulated life values ​​that can be calculated in the simulated sensor real-time working model; The data corresponding to the optimal simulated working data group is used as the latest working data of the sensor.

3. The method according to claim 2, characterized in that When the real-time sensor life ratio value is within the preset warning ratio value range, the real-time working data group of the sensor is retrieved and copied into a simulation working data group, specifically including: After the real-time sensor life value is obtained, a ratio of the real-time sensor life value to a preset sensor life value is calculated to obtain a real-time sensor life ratio value; When the real-time sensor life ratio value is within the preset warning ratio value range, the real-time working data group of the sensor and the preset verification algorithm combination are retrieved; Generating real-time verification information for the real-time working data group according to the preset verification algorithm combination; The real-time working data group is copied to obtain a simulated working data group, and the simulated working data group is verified by using the preset verification algorithm combination to generate simulation verification information; In the case where there are different data in the real-time verification information and the simulation verification information, locating the positions of the different data in the real-time verification information and the simulation verification information, which are different real-time verification information and different simulation verification information; The different simulation data corresponding to the different simulation verification information are deleted, and new different simulation data are stored in the original different simulation data to obtain a modified simulation working data group; the new different simulation data is obtained by copying the data in the real-time working data group corresponding to the different real-time verification information.

4. The method according to claim 2, characterized in that: The step of inputting the simulated working data set into a preset mathematical relationship model to obtain a simulated sensor real-time working model specifically includes: Inputting the simulated working data group into a preset mathematical relationship model to obtain a simulated sensor real-time working model, and calculating a real-time simulated life value; If the simulated life difference is greater than a preset simulated life difference threshold, the preset parameters in the preset mathematical relationship model are adjusted by substituting the real-time sensor life value to obtain an adjusted mathematical relationship model; the simulated life difference is the difference between the implemented simulated life value and the real-time sensor life value; The simulated working data group is input into the adjusted mathematical relationship model to obtain an adjusted simulated sensor real-time working model.

5. The method according to claim 2, characterized in that: In the simulated sensor real-time working model, obtaining an optimal simulated working data set corresponding to an optimal simulated life value specifically includes: In the simulated sensor real-time working model, the data values ​​in the simulated working data group are changed within the preset working data group value range, and multiple data combinations are performed to obtain the adjusted sensor life value data group; The maximum value in the adjusted sensor life value data group is retrieved as the optimal simulated life value, and the working data group corresponding to the optimal simulated life value is used as the optimal simulated working data group.

6. The method according to claim 1, characterized in that After retrieving the real-time sensor data, the real-time time, the power-on time, the preset reaction rate constant, the preset sensor life value, the attenuation coefficient, the environmental function and the initial sensor data, inputting the first formula, and calculating the real-time sensor life value, the method further includes: Storing the real-time sensor life value and the corresponding real-time time in a preset sensor real-time life data group; Subtract the sensor life value last stored in the sensor real-time life data group from the real-time sensor life value to obtain a sensor life difference value; When the difference in the life of the sensor is less than the time value of a preset time period, a warning message of excessively fast consumption of the life of the sensor is issued; the preset time period is a time period of the first frequency interval.

7. The method according to claim 1, characterized in that After issuing a life exhaustion warning message when the real-time sensor life ratio value exceeds a preset warning ratio value range, the method further includes: The sensor detection data is stored in a preset sensor data group; the sensor detection data includes the power-on time, the initial sensor data, the preset sensor life value, all collected sensor data and the collection time.

8. A chemical sensor life detection system, characterized in that: The chemical sensor life detection system includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the chemical sensor life detection system to perform the method described in any one of claims 1-7.

9. A computer program product comprising instructions, characterized in that When the computer program product runs on a chemical sensor life detection system, the chemical sensor life detection system is enabled to perform the method according to any one of claims 1 to 7.

10. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on a chemical sensor life detection system, the chemical sensor life detection system is caused to execute the method according to any one of claims 1 to 7.