PM2.5 sensor service life prolonging method and system based on environment adaptive adjustment

By dynamically adjusting the sampling interval and duration of the PM2.5 sensor, adaptive adjustment is achieved according to environmental conditions and changes in PM2.5 concentration, which solves the problem of short sensor life, extends the service life and improves adaptability and data accuracy.

CN118961526APending Publication Date: 2024-11-15HUAGONG TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410997447.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

PM2.5 sensor has a short service life in high concentration environments and is affected by factors such as particulate deposition, temperature and humidity, resulting in rapid wear and failure.

Method used

By dynamically adjusting the sampling interval and sampling duration of the sensor, and according to environmental conditions and PM2.5 concentration changes, a cyclic iteration strategy is adopted to achieve adaptive adjustment to extend the service life of the sensor.

Benefits of technology

Flexible adjustment of sampling strategies under different environmental conditions, reduce sensor workload, extend life, improve adaptability and robustness, ensure data timeliness and accuracy, and reduce operation and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118961526A_ABST
    Figure CN118961526A_ABST
Patent Text Reader

Abstract

The invention provides a PM2.5 sensor service life prolonging method and system based on environment adaptive adjustment, and the method comprises the steps: obtaining a first sampling sequence based on a time sequence through setting an initial sampling interval and an initial sampling duration of a sensor; if the preset threshold value adjusting condition is met, a sampling interval adjusting threshold value is calculated; when the sampling data at the next moment meets the sampling interval adjusting threshold value, adjusting the initial sampling interval to be a second sampling interval, and adjusting the initial sampling duration to be a second sampling duration at the same time; if the sample data of the second sampling sequence falls into a callback threshold condition, adjusting a second sampling interval according to a sampling interval callback threshold; according to the method, the sampling interval and the sampling duration are dynamically adjusted, a self-adaptive adjustment mechanism is realized by adopting a loop iteration strategy, and the service life of the sensor is prolonged while the adaptability and the robustness of the sensor are 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 adjustment technology, and in particular to a method and system for extending the life of a PM2.5 sensor based on environmental adaptive adjustment. Background Art

[0002] The working principle of PM2.5 sensor is mainly based on light scattering. When PM2.5 particles in the air pass through the sensor, they scatter the light emitted by the laser beam. The intensity of this scattered light is proportional to the concentration of the particles. The photodiode receiver inside the sensor collects these scattered lights and converts them into electrical signals. Then, the circuit inside the sensor processes these electrical signals and converts them into readable particle concentration values. PM2.5 sensors usually contain a laser transmitter and a photodetector. The laser transmitter emits a laser beam. When particles in the air pass through the laser beam, they scatter light. The photodetector is responsible for capturing these scattered lights and converting them into electrical signals. The circuit inside the sensor amplifies, filters and digitizes these electrical signals to obtain accurate particle concentration values.

[0003] However, the use environment has a great impact on the service life of PM2.5 sensors. The higher the concentration of particulate matter in the environment, the more obvious the particle deposition, the higher the temperature and relative humidity, the greater the effect on the corrosion of components. Studies have shown that when PM2.5 sensors are exposed to high concentrations of particulate matter (PM2.5 mass concentration is 133mg / m3) in the laboratory, the sensor begins to report errors after only 18 hours. As the use time increases, the service life of the sensor will decrease rapidly due to the dust attached to the sensor and the light decay phenomenon. Therefore, there is an urgent need for a PM2.5 sensor life extension method and system based on environmental adaptive adjustment to adjust the working parameters of the PM2.5 sensor to achieve the purpose of extending the life. Summary of the invention

[0004] In view of the above problems, the present invention is proposed to provide a method and system for extending the life of a PM2.5 sensor based on environmental adaptive adjustment, which overcomes the above problems or at least partially solves the above problems.

[0005] In order to solve the above technical problems, the embodiments of the present application disclose the following technical solutions:

[0006] In a first aspect, an embodiment of the present invention discloses a method for extending the life of a PM2.5 sensor based on environmental adaptive regulation, comprising:

[0007] S100. Set the initial sampling interval and initial sampling duration of the PM2.5 sensor to obtain a first sampling sequence consisting of n sample data based on a time series, where n≥5;

[0008] S200. Determine whether the sample data in the first sampling sequence meets the preset adjustment threshold condition. If the first preset adjustment threshold is met, obtain the sampling interval adjustment threshold according to the average distance and standard deviation of each sample data in the first sampling sequence to the data mean;

[0009] S300. Collect the sampling data at the next moment, determine whether the sampling data at the next moment meets the sampling interval adjustment threshold condition, and if so, use the initial sampling interval as the second sampling interval, and use the initial sampling duration as the second sampling duration, and obtain a second sampling sequence consisting of n sample data based on the time series according to the second sampling interval;

[0010] S400. Determine whether the sample data of the second sampling sequence meets the preset callback threshold condition. If so, obtain the sampling interval callback threshold according to the average distance and standard deviation of each sample data in the second sampling sequence to the data mean;

[0011] S500. Continue to collect the next sampling data, determine whether the next sampling data meets the sampling interval callback threshold, if so, use the second sampling interval as the third sampling interval, and adjust the second sampling duration to the third sampling duration, and obtain a third sampling sequence consisting of n sample data based on the time series according to the third sampling interval;

[0012] S600. Determine whether the sample data in the third sampling sequence meets the preset adjustment threshold condition. If so, repeat step S200. If not, continue sampling according to the third sampling interval until the sampling interval returns to the initial sampling interval, and repeat step S100.

[0013] Furthermore, the first sampling sequence is expressed as X=(x t-n ,……,x t-3 ,x t-2 ,x t-1 ,x t ), where x t is the sample data of the current sampling period, x t-n It is the sample data n sampling periods ago, a total of n+1 sample data, n≥5.

[0014] Further, in S200, the preset adjustment threshold condition is:

[0015]

[0016] Among them, x Max is the maximum value of the sample data in the first sampling sequence, x Min is the minimum value of the sample data in the first sampling sequence, is the average value of the sample data in the first sampling sequence, m is the threshold control amount, 2%≤m≤5%.

[0017] Furthermore, in S200, if the first preset adjustment threshold is met, the sampling interval adjustment threshold is obtained according to the average distance and standard deviation of each sample data in the first sampling sequence to the data mean; the sampling interval adjustment threshold M 1 The calculation formula is: in is the average value of the sample data in the first sampling sequence, σ is the standard deviation of each sample data to the data mean, is the average value of the sample data in the first sampling sequence, x i is the i-th sample data in the first sampling sequence, tn≤i≤n; if the sample data in the first sampling sequence meets the preset adjustment threshold condition, the initial sampling interval and the initial sampling duration are kept unchanged, and the first sampling sequence is continuously updated.

[0018] Further, in S300, the sampling data x at the next moment t+1 ≤ the sampling interval adjustment threshold M 1 , the sampling interval adjustment threshold is met, and the initial sampling interval is adjusted to the second sampling interval, and the initial sampling duration is adjusted to the second sampling duration;

[0019] The second sampling interval T 2 is a function that increases with the number of sampling times, T 2 =T 1 +kΔT, where k is the number of sampling times after adjusting the initial sampling interval to the second sampling interval, T 1 is the initial sampling interval, ΔT is the fixed time interval, T 1 / 3 ≤ΔT≤T 1 / 2 , T 2 ≤20T 1 , when T 2 The maximum value has been reached, and the second sampling interval no longer increases with the increase in the number of sampling times; the second sampling time length increases with the second sampling interval T 2 The function that increases with the increase of 2 =Q 1 +k, each time the sampling number k increases, Q 1 For the initial sampling, the second sampling duration Q 2 Increase by 1ms.

[0020] Further, in S400, the callback threshold condition is Among them, x' Maxis the maximum value of the sample data in the second sampling sequence, x' Min is the minimum value of the sample data in the second sampling sequence, is the average value of the sample data in the second sampling sequence, m 2 is the threshold control value, m 2 =5%; the second sampling sequence is represented by X'=(x' t-n ,……,x' t-3 ,x' t-2 ,x' t-1 ,x' t ), where x' t is the sample data of the current sampling period, x' t-n is the sample data n sampling periods ago, a total of n+1 sample data, n≥5;

[0021] The sampling interval callback threshold M 2 The calculation formula is: σ' is the standard deviation of each sample data to the data mean in the second sampling sequence. The sampling data x' at the next moment t+1 >M 2 When the second sampling interval is used as the third sampling interval, the second sampling time is used as the third sampling duration; if the sample data in the second sampling sequence does not meet the callback threshold condition or does not meet the sampling interval callback threshold, the second sampling sequence continues to be updated.

[0022] Further, in S500, the third sampling interval T 3 As the number of sampling increases, T 3 =T t-1 -lΔT, where l is the number of sampling times after adjusting the second sampling interval to the third sampling interval, T t-1 is the sampling interval between the last sampling data and the current sampling data, ΔT is the fixed time interval, T 1 / 3 ≤ΔT≤T 1 / 2 , when T 3 =T 1 When the third sampling interval no longer decreases with the increase of the number of sampling times; the third sampling time length increases with the third sampling interval T 3 The function decreases as the sampling frequency increases. Every time the sampling frequency increases, the third sampling duration decreases by 1ms.

[0023] Furthermore, the initial sampling interval T of the sensor operation 1 The initial sampling time Q is 2 to 5 seconds. 1 The maximum sampling time is 80-100 ms, the maximum sampling interval is 500 s, and the maximum sampling time is 200 ms.

[0024] In a second aspect, an embodiment of the present invention discloses a PM2.5 sensor life extension system based on environmental adaptive adjustment, comprising: a first sampling sequence constituent unit, a sampling interval adjustment threshold acquisition unit, a second sampling sequence constituent unit, a sampling interval callback threshold acquisition unit, a third sampling sequence constituent unit and a third sampling sequence judgment unit; wherein:

[0025] A first sampling sequence forming unit is used to set an initial sampling interval and an initial sampling duration of the PM2.5 sensor to obtain a first sampling sequence consisting of n sample data based on a time series, where n≥5;

[0026] a sampling interval adjustment threshold acquisition unit, configured to determine whether the sample data in the first sampling sequence meets a preset adjustment threshold condition, and if the first preset adjustment threshold is met, obtain the sampling interval adjustment threshold according to the average distance and standard deviation of each sample data in the first sampling sequence to the data mean;

[0027] A second sampling sequence forming unit is used to collect sampling data at the next moment, determine whether the sampling data at the next moment meets the sampling interval adjustment threshold condition, and if so, use the initial sampling interval as the second sampling interval, and use the initial sampling duration as the second sampling duration, and obtain a second sampling sequence consisting of n sample data based on the time series according to the second sampling interval;

[0028] a sampling interval callback threshold acquisition unit, used to determine whether the sample data of the second sampling sequence meets the preset callback threshold condition, and if so, obtain the sampling interval callback threshold according to the average distance and standard deviation of each sample data in the second sampling sequence to the data mean;

[0029] A third sampling sequence forming unit is used to continue to collect sampling data at the next moment, determine whether the sampling data at the next moment meets the sampling interval callback threshold, and if so, use the second sampling interval as the third sampling interval, and adjust the second sampling duration to the third sampling duration, and obtain a third sampling sequence consisting of n sample data based on the time series according to the third sampling interval;

[0030] The third sampling sequence judgment unit is used to judge whether the sample data in the third sampling sequence meets the preset adjustment threshold condition. If so, the sampling interval adjustment threshold acquisition unit is repeatedly started; if not, sampling is continued according to the third sampling interval until the sampling interval returns to the initial sampling interval, and the first sampling sequence formation unit is repeatedly started.

[0031] In a third aspect, an embodiment of the present invention discloses an electronic device, including:

[0032] one or more processors;

[0033] A memory for storing one or more programs;

[0034] When the one or more programs are executed by the one or more processors, the one or more processors implement the sensor life extension method.

[0035] The beneficial effects of the above technical solution provided by the embodiment of the present invention include at least:

[0036] 1. The present invention can adapt to different environmental conditions and changes in PM2.5 concentration by dynamically adjusting the sampling interval and sampling duration. In practical applications, when the air quality is good and the PM2.5 concentration is low, the sampling interval can be extended to reduce the workload of the sensor, thereby reducing wear and failure rate and extending the service life of the sensor. The method adopts a cyclic iterative strategy to realize an adaptive adjustment mechanism, so that the sensor can flexibly respond to various environmental conditions and improve the adaptability and robustness of the sensor.

[0037] 2. The preset adjustment threshold conditions and sampling interval adjustment thresholds in the method of the present invention can dynamically adjust the sampling strategy according to the actual environmental conditions; in practical applications, when the PM2.5 concentration is high or changes rapidly, data can be acquired more frequently to ensure the timeliness and accuracy of the data, and improve the sampling efficiency and data accuracy; in the application scenarios of long-term actual continuous monitoring, the effect of reducing operating costs and maintenance costs is achieved, and it has broad application prospects.

[0038] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0040] Figure 1 This is a flow chart of a method for extending the life of a PM2.5 sensor based on environmental adaptive adjustment in Example 1 of the present invention;

[0041] Figure 2 This is a schematic diagram of the structure of an electronic device in Example 3 of the present invention. DETAILED DESCRIPTION

[0042] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0043] In order to solve the problems existing in the prior art, an embodiment of the present invention provides a method and system for extending the life of a PM2.5 sensor based on environmental adaptive adjustment.

[0044] Example 1

[0045] The present invention discloses a method for extending the life of a PM2.5 sensor based on environmental adaptive regulation, such as Figure 1 ,include:

[0046] S100. Set the initial sampling interval and initial sampling duration of the PM2.5 sensor to obtain a first sampling sequence consisting of n sample data based on a time series, where n≥5;

[0047] Specifically, in this embodiment, the first sampling sequence is expressed as X=(x t-n ,……,x t-3 ,x t-2 ,x t-1 ,x t ), where x t is the sample data of the current sampling period, x t-n It is the sample data n sampling cycles ago, with a total of n+1 sample data, n≥5. The initial sampling interval of the sensor is 2 to 5s, and the initial sampling duration is 80 to 100ms. It should be noted that the initial sampling duration is the time interval between two consecutive samplings of the sensor in the PM2.5 sensor. For PM2.5 sensors, this interval is set to balance the real-time measurement and power consumption. A shorter sampling interval can provide more frequent measurement data, but may increase the power consumption and wear of the sensor; a longer sampling interval can reduce power consumption, but may reduce the real-time performance of data updates.

[0048] When the initial sampling interval is set to 2 to 5 seconds, the sensor will sample every 2 to 5 seconds. This range is usually selected to ensure that the sensor can capture changes in air quality in a timely manner while maintaining low power consumption, thereby extending the service life of the sensor.

[0049] The initial sampling duration refers to the length of time the sensor actually measures each time it samples. This duration determines how much air sample and particulate matter information the sensor can collect during each sampling process. When the initial sampling duration is set to 80-100 milliseconds, the sensor will measure the air sample within this time range. A shorter sampling duration can reduce the response time of the sensor, but may reduce the accuracy of the measurement; while a longer sampling duration can improve the accuracy of the measurement, but may increase power consumption and response time. Within this time range, the sensor will collect enough data to accurately reflect the PM2.5 particle concentration in the current air while maintaining a faster measurement speed. Such a setting can achieve higher real-time performance while ensuring measurement accuracy. It should be noted that the settings of these initial sampling intervals and sampling durations may not be fixed. This embodiment uses the PMS5003T-PM2.5 sensor, sets the initial sampling interval of the sensor operation to 2s, and the initial sampling duration is 100ms.

[0050] S200. Determine whether the sample data in the first sampling sequence meets the preset adjustment threshold condition. If the first preset adjustment threshold is met, obtain the sampling interval adjustment threshold according to the average distance and standard deviation of each sample data in the first sampling sequence to the data mean;

[0051] In S200 of this embodiment, the preset adjustment threshold condition is:

[0052]

[0053] Among them, x Max is the maximum value of the sample data in the first sampling sequence, x Min is the minimum value of the sample data in the first sampling sequence, is the average value of the sample data in the first sampling sequence, m is the threshold control amount, 2%≤m≤5%.

[0054] In S200 of this embodiment, if the first preset adjustment threshold is met, the sampling interval adjustment threshold is obtained according to the average distance and standard deviation of each sample data in the first sampling sequence to the data mean; the sampling interval adjustment threshold M 1 The calculation formula is: in is the average value of the sample data in the first sampling sequence, σ is the standard deviation of each sample data to the data mean, is the average value of the sample data in the first sampling sequence, x iis the i-th sample data in the first sampling sequence, tn≤i≤n; if the sample data in the first sampling sequence meets the preset adjustment threshold condition, the initial sampling interval and the initial sampling duration are kept unchanged, and the first sampling sequence is continuously updated.

[0055] For example, if n is set to 6 in the first sampling sequence, there are 7 sample data (taking PM2.5 concentration as an example, the unit is micrograms / cubic meter): [20, 22, 21, 23, 25, 24, 22].

[0056] The maximum value in the sequence is 25, and the minimum value is 20; select the threshold control amount M = 5%, the difference between the maximum and minimum values: 25-20 = 5; the product of 2 times the average value and M: 22.5*2*5% = 2.25; 2.25<5, so the condition is not met;

[0057] Then keep the initial sampling interval and the initial sampling duration unchanged, continue to update the first sampling sequence, and obtain the updated first sampling sequence after a period of time: [20, 22, 21, 20, 21, 21, 22]; the maximum value in the sequence is 22, and the minimum value is 20; the threshold control amount M=5% remains unchanged, the difference between the maximum value and the minimum value: 22-20=2; the product of 2 times the average value and M: 21*2*5%=2.1; 2<2.1, so the condition is met.

[0058] S300. Collect the sampling data at the next moment, determine whether the sampling data at the next moment meets the sampling interval adjustment threshold condition, and if so, use the initial sampling interval as the second sampling interval, and use the initial sampling duration as the second sampling duration, and obtain a second sampling sequence consisting of n sample data based on the time series according to the second sampling interval;

[0059] In S300 of this embodiment, the sampling data x at the next moment t+1 ≤ the sampling interval adjustment threshold M 1 , the sampling interval adjustment threshold is met, and the initial sampling interval is adjusted to the second sampling interval, and the initial sampling duration is adjusted to the second sampling duration;

[0060] The second sampling interval T 2 is a function that increases with the number of sampling times, T 2 =T 1 +kΔT, where k is the number of sampling times after adjusting the initial sampling interval to the second sampling interval, T 1 is the initial sampling interval, ΔT is the fixed time interval, T 1 / 3 ≤ΔT≤T 1 / 2 , T 2 ≤20T 1 , when T 2The maximum value has been reached, and the second sampling interval no longer increases with the increase in the number of sampling times; the second sampling time length increases with the second sampling interval T 2 The function that increases with the increase of 2 =Q 1 +k, each time the sampling number k increases, Q 1 For the initial sampling, the second sampling duration Q 2 Increase by 1ms.

[0061] In this embodiment, the updated first sampling sequence is: [20, 22, 21, 20, 21, 21, 22], and the sampling data at the next moment is 23. The calculation result is 23.28, 23<23.28, which satisfies the sampling interval adjustment threshold. At this time, the initial sampling interval is adjusted to the second sampling interval, and the initial sampling duration is adjusted to the second sampling duration. For example, T 1 is the initial sampling interval of 2s, ΔT is the fixed time interval of 1s, then the second sampling interval changes with the number of sampling times as [3, 4, 5, 6, 7, ...].

[0062] S400. Determine whether the sample data of the second sampling sequence meets the preset callback threshold condition. If so, obtain the sampling interval callback threshold according to the average distance and standard deviation of each sample data in the second sampling sequence to the data mean;

[0063] In S400 of this embodiment, the callback threshold condition is Among them, x' Max is the maximum value of the sample data in the second sampling sequence, x' Min is the minimum value of the sample data in the second sampling sequence, is the average value of the sample data in the second sampling sequence, m 2 is the threshold control value, m 2 =5%; the second sampling sequence is represented by X'=(x' t-n ,……,x' t-3 ,x' t-2 ,x' t-1 ,x' t ), where x' t is the sample data of the current sampling period, x' t-n is the sample data n sampling periods ago, a total of n+1 sample data, n≥5;

[0064] The sampling interval callback threshold M 2 The calculation formula is: σ' is the standard deviation of each sample data to the data mean in the second sampling sequence. The sampling data x' at the next moment t+1 >M 2When the second sampling interval is used as the third sampling interval, the second sampling time is used as the third sampling duration; if the sample data in the second sampling sequence does not meet the callback threshold condition or does not meet the sampling interval callback threshold, the second sampling sequence continues to be updated.

[0065] S500. Continue to collect the next sampling data, determine whether the next sampling data meets the sampling interval callback threshold, if so, use the second sampling interval as the third sampling interval, and adjust the second sampling duration to the third sampling duration, and obtain a third sampling sequence consisting of n sample data based on the time series according to the third sampling interval;

[0066] In S500 of this embodiment, the third sampling interval T 3 As the number of sampling increases, T 3 =T t-1 -lΔT, where l is the number of sampling times after adjusting the second sampling interval to the third sampling interval, T t-1 is the sampling interval between the last sampling data and the current sampling data, ΔT is the fixed time interval, T 1 / 3 ≤ΔT≤T 1 / 2 , when T 3 =T 1 When the third sampling interval no longer decreases with the increase of the number of sampling times; the third sampling time length increases with the third sampling interval T 3 The function decreases as the sampling frequency increases. Every time the sampling frequency increases, the third sampling duration decreases by 1ms.

[0067] S600. Determine whether the sample data in the third sampling sequence meets the preset adjustment threshold condition. If so, repeat step S200. If not, continue sampling according to the third sampling interval until the sampling interval returns to the initial sampling interval, and repeat step S100.

[0068] Specifically, in some preferred embodiments, the initial sampling interval T of the sensor operation is 1 The initial sampling time Q is 2 to 5 seconds. 1The maximum sampling interval is set to 80-100ms; the maximum sampling interval is set to 500s, and the maximum sampling duration is set to 200ms. It should be noted that the purpose of setting the maximum sampling interval is to ensure that the sensor can appropriately reduce the workload and extend the service life when the air quality is good or the PM2.5 concentration is low; at the same time, by limiting the maximum sampling interval, it can also ensure that the sensor will not lose sensitivity to changes in PM2.5 concentration due to excessively long sampling intervals. The maximum sampling duration is set to prevent the sensor from collecting too much data in a single sampling process, thereby avoiding the complexity of data processing and the increase in power consumption. By limiting the maximum sampling duration, it can be ensured that the sensor can efficiently collect data each time it is sampled while maintaining low power consumption.

[0069] The present embodiment discloses a method for extending the life of a PM2.5 sensor based on environmental adaptive adjustment, comprising: S100. Setting an initial sampling interval and an initial sampling duration of the PM2.5 sensor operation, and obtaining a first sampling sequence consisting of n sample data based on a time series, where n≥5; S200. Judging whether the sample data in the first sampling sequence meets a preset adjustment threshold condition, and if the first preset adjustment threshold is met, obtaining a sampling interval adjustment threshold according to an average distance and a standard deviation of each sample data in the first sampling sequence to a data mean; S300. Collecting sampling data at the next moment, judging whether the sampling data at the next moment meets the sampling interval adjustment threshold condition, and if so, taking the initial sampling interval as the second sampling interval, and taking the initial sampling duration as the second sampling duration, and obtaining a sampling sequence consisting of n sample data based on a time series according to the second sampling interval. a second sampling sequence formed; S400. judging whether the sample data of the second sampling sequence meets the preset callback threshold condition; if so, obtaining the sampling interval callback threshold according to the average distance and standard deviation of each sample data in the second sampling sequence to the data mean; S500. continuing to collect sampling data at the next moment, judging whether the sampling data at the next moment meets the sampling interval callback threshold; if so, taking the second sampling interval as the third sampling interval, and adjusting the second sampling duration to the third sampling duration, obtaining a third sampling sequence consisting of n sample data based on the time series according to the third sampling interval; S600. judging whether the sample data in the third sampling sequence meets the preset adjustment threshold condition; if so, repeating step S200; if not, continuing sampling according to the third sampling interval until the sampling interval returns to the initial sampling interval, and repeating step S100.

[0070] This embodiment can adapt to different environmental conditions and PM2.5 concentration changes by dynamically adjusting the sampling interval and sampling duration. In practical applications, when the air quality is good and the PM2.5 concentration is low, the sampling interval can be extended to reduce the workload of the sensor, thereby reducing wear and failure rate and extending the service life of the sensor; the method adopts a cyclic iteration strategy to implement an adaptive adjustment mechanism, so that the sensor can flexibly respond to various environmental conditions and improve the adaptability and robustness of the sensor. The method disclosed in this embodiment can dynamically adjust the sampling strategy according to the actual environmental conditions by presetting the adjustment threshold conditions and the sampling interval adjustment threshold; in practical applications, when the PM2.5 concentration is high or changes rapidly, data can be obtained more frequently to ensure the timeliness and accuracy of the data, and improve the sampling efficiency and data accuracy; in the application scenario of long-term actual continuous monitoring, the effect of reducing operating costs and maintenance costs is achieved, and it has broad application prospects.

[0071] Example 2

[0072] Based on the PM2.5 sensor life extension method based on environmental adaptive adjustment in Example 1, this embodiment discloses a PM2.5 sensor life extension system based on environmental adaptive adjustment, including: a first sampling sequence constituent unit, a sampling interval adjustment threshold acquisition unit, a second sampling sequence constituent unit, a sampling interval callback threshold acquisition unit, a third sampling sequence constituent unit and a third sampling sequence judgment unit; wherein:

[0073] A first sampling sequence forming unit is used to set an initial sampling interval and an initial sampling duration of the PM2.5 sensor to obtain a first sampling sequence consisting of n sample data based on a time series, where n≥5;

[0074] a sampling interval adjustment threshold acquisition unit, configured to determine whether the sample data in the first sampling sequence meets a preset adjustment threshold condition, and if the first preset adjustment threshold is met, obtain the sampling interval adjustment threshold according to the average distance and standard deviation of each sample data in the first sampling sequence to the data mean;

[0075] A second sampling sequence forming unit is used to collect sampling data at the next moment, determine whether the sampling data at the next moment meets the sampling interval adjustment threshold condition, and if so, use the initial sampling interval as the second sampling interval, and use the initial sampling duration as the second sampling duration, and obtain a second sampling sequence consisting of n sample data based on the time series according to the second sampling interval;

[0076] a sampling interval callback threshold acquisition unit, used to determine whether the sample data of the second sampling sequence meets the preset callback threshold condition, and if so, obtain the sampling interval callback threshold according to the average distance and standard deviation of each sample data in the second sampling sequence to the data mean;

[0077] A third sampling sequence forming unit is used to continue to collect sampling data at the next moment, determine whether the sampling data at the next moment meets the sampling interval callback threshold, and if so, use the second sampling interval as the third sampling interval, and adjust the second sampling duration to the third sampling duration, and obtain a third sampling sequence consisting of n sample data based on the time series according to the third sampling interval;

[0078] The third sampling sequence judgment unit is used to judge whether the sample data in the third sampling sequence meets the preset adjustment threshold condition. If so, the sampling interval adjustment threshold acquisition unit is repeatedly started; if not, sampling is continued according to the third sampling interval until the sampling interval returns to the initial sampling interval, and the first sampling sequence formation unit is repeatedly started.

[0079] Among them, the specific working methods of the first sampling sequence constituting unit, the sampling interval adjustment threshold acquisition unit, the second sampling sequence constituting unit, the sampling interval callback threshold acquisition unit, the third sampling sequence constituting unit and the third sampling sequence judging unit have been described in detail in Example 1, and will not be repeated here in this embodiment.

[0080] Example 3

[0081] Based on the same inventive concept, an embodiment of the present disclosure also provides an electronic device. Figure 2 FIG. 1 is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. Figure 2 As shown, an embodiment of the present disclosure provides an electronic device including: one or more processors 101, a memory 102, and one or more I / O interfaces 103. The memory 102 stores one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement any optimization method in the above embodiments; the one or more I / O interfaces 103 are connected between the processor and the memory, and are configured to implement information interaction between the processor and the memory.

[0082] Among them, the processor 101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU), etc.; the memory 102 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface (read-write interface) 103 is connected between the processor 101 and the memory 102, and can realize information interaction between the processor 101 and the memory 102, including but not limited to a data bus (Bus), etc.

[0083] In some embodiments, the processor 101 , the memory 102 , and the I / O interface 103 are connected to each other via a bus 104 , and further connected to other components of the computing device.

[0084] In some embodiments, the one or more processors 101 include a field programmable gate array.

[0085] According to an embodiment of the present disclosure, a computer-readable medium is further provided, wherein a computer program is stored on the computer-readable medium, wherein when the program is executed by a processor, the steps in any optimization method in the above-mentioned embodiment are implemented.

[0086] It should be understood that the specific order or hierarchy of steps in the disclosed process is an example of an exemplary method. Based on design preferences, it should be understood that the specific order or hierarchy of steps in the process can be rearranged without departing from the scope of protection of the present disclosure. The attached method claims present the elements of the various steps in an exemplary order and are not intended to be limited to the specific order or hierarchy described.

[0087] In the above detailed description, various features are grouped together in a single embodiment to simplify the disclosure. This method of disclosure should not be interpreted as reflecting an intention that the embodiments of the claimed subject matter require more features than are clearly stated in each claim. On the contrary, as reflected in the appended claims, the invention is in a state of having less than all the features of the disclosed individual embodiments. Therefore, the appended claims are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate preferred embodiment of the invention.

[0088] Those skilled in the art will also appreciate that the various illustrative logic blocks, modules, circuits, and algorithmic steps described in conjunction with the embodiments herein can all be implemented as electronic hardware, computer software, or a combination thereof. In order to clearly illustrate the interchangeability between hardware and software, various illustrative components, blocks, modules, circuits, and steps are generally described above around their functions. Whether such functions are implemented as hardware or software depends on specific applications and the design constraints imposed on the entire system. A skilled person can implement the described functions in an alternative manner for each specific application, but such implementation decisions should not be interpreted as departing from the scope of protection of the present disclosure.

[0089] The steps of the method or algorithm described in conjunction with the embodiments herein may be directly embodied as hardware, a software module executed by a processor, or a combination thereof. The software module may be located in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a mobile disk, a CD-ROM, or any other form of storage medium well known in the art. An exemplary storage medium is connected to the processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium may also be an integral part of the processor. The processor and the storage medium may be located in an ASIC. The ASIC may be located in a user terminal. Of course, the processor and the storage medium may also be present in a user terminal as discrete components.

[0090] For software implementation, the techniques described in this application can be implemented with modules (e.g., procedures, functions, etc.) that perform the functions described in this application. These software codes can be stored in a memory unit and executed by a processor. The memory unit can be implemented within the processor or outside the processor. In the latter case, it is coupled to the processor in a communication manner via various means, which are well known in the art.

[0091] The above description includes examples of one or more embodiments. Of course, it is impossible to describe all possible combinations of components or methods for the purpose of describing the above embodiments, but it should be recognized by those skilled in the art that the various embodiments may be further combined and arranged. Therefore, the embodiments described herein are intended to cover all such changes, modifications and variations that fall within the scope of protection of the appended claims. In addition, with respect to the term "comprising" used in the specification or claims, the word is covered in a manner similar to the term "including", just as "including," is explained as a transitional word in the claims. In addition, any term "or" used in the specification of the claims is intended to mean "non-exclusive or".

Claims

1. A method for extending the life of a PM2.5 sensor based on environmental adaptive regulation, characterized in that: include: S100. Set the initial sampling interval and initial sampling duration of the PM2.5 sensor to obtain a first sampling sequence consisting of n sample data based on a time series, where n≥5; S200. Determine whether the sample data in the first sampling sequence meets the preset adjustment threshold condition. If the first preset adjustment threshold is met, obtain the sampling interval adjustment threshold according to the average distance and standard deviation of each sample data in the first sampling sequence to the data mean; S300. Collect the sampling data at the next moment, determine whether the sampling data at the next moment meets the sampling interval adjustment threshold condition, and if so, use the initial sampling interval as the second sampling interval, and use the initial sampling duration as the second sampling duration, and obtain a second sampling sequence consisting of n sample data based on the time series according to the second sampling interval; S400. Determine whether the sample data of the second sampling sequence meets the preset callback threshold condition. If so, obtain the sampling interval callback threshold according to the average distance and standard deviation of each sample data in the second sampling sequence to the data mean; S500. Continue to collect the next sampling data, determine whether the next sampling data meets the sampling interval callback threshold, if so, use the second sampling interval as the third sampling interval, and adjust the second sampling duration to the third sampling duration, and obtain a third sampling sequence consisting of n sample data based on the time series according to the third sampling interval; S600. Determine whether the sample data in the third sampling sequence meets the preset adjustment threshold condition. If so, repeat step S200. If not, continue sampling according to the third sampling interval until the sampling interval returns to the initial sampling interval, and repeat step S100.

2. A method for extending the life of a PM2.5 sensor based on environmental adaptive regulation as claimed in claim 1, characterized in that: The first sampling sequence is represented by X=(x t-n ,……,x t-3 ,x t-2 ,x t-1 ,x t ), where x t is the sample data of the current sampling period, x t-n It is the sample data n sampling periods ago, a total of n+1 sample data, n≥5.

3. A method for extending the life of a PM2.5 sensor based on environmental adaptive regulation as claimed in claim 1, characterized in that: In S200, the preset adjustment threshold condition is: Among them, x Max is the maximum value of the sample data in the first sampling sequence, x Min is the minimum value of the sample data in the first sampling sequence, is the average value of the sample data in the first sampling sequence, m is the threshold control value, and 2%≤m≤5%.

4. A method for extending the life of a PM2.5 sensor based on environmental adaptive regulation as claimed in claim 1, characterized in that: In S200, if the first preset adjustment threshold is met, the sampling interval adjustment threshold is obtained according to the average distance and standard deviation of each sample data in the first sampling sequence to the data mean; the calculation formula of the sampling interval adjustment threshold M1 is: in is the average value of the sample data in the first sampling sequence, σ is the standard deviation of each sample data to the data mean, is the average value of the sample data in the first sampling sequence, x i is the i-th sample data in the first sampling sequence, tn≤i≤n; if the sample data in the first sampling sequence meets the preset adjustment threshold condition, the initial sampling interval and the initial sampling duration are kept unchanged, and the first sampling sequence is continuously updated.

5. A method for extending the life of a PM2.5 sensor based on environmental adaptive regulation as claimed in claim 4, characterized in that: In S300, the sampling data x at the next moment t+1 ≤ the sampling interval mediation threshold M1, the sampling interval adjustment threshold is met, and the initial sampling interval is adjusted to the second sampling interval, and the initial sampling duration is adjusted to the second sampling duration; The second sampling interval T2 is a function that increases with the increase of the number of sampling times, T2=T1+kΔT, wherein k is the number of sampling times after adjusting the initial sampling interval to the second sampling interval, T1 is the initial sampling interval, ΔT is a fixed time interval, T1 / 3≤ΔT≤T1 / 2, T2≤20T1, when T2 has reached the maximum value, the second sampling interval no longer increases with the increase of the number of sampling times; the second sampling duration is a function that increases with the increase of the second sampling interval T2, Q2=Q1+k, and each time the sampling number k increases, when Q1 is the initial sampling, the second sampling duration Q2 increases by 1ms.

6. A method for extending the life of a PM2.5 sensor based on environmental adaptive regulation as claimed in claim 1, characterized in that: In S400, the callback threshold condition is Among them, x' Max is the maximum value of the sample data in the second sampling sequence, x' Min is the minimum value of the sample data in the second sampling sequence, is the average value of the sample data in the second sampling sequence, m2 is the threshold control value, m2=5%; the second sampling sequence is represented by X'=(x' t-n ,……,x' t-3 ,x' t-2 ,x' t-1 ,x' t ), where x' t is the sample data of the current sampling period, x' t-n is the sample data n sampling periods ago, a total of n+1 sample data, n≥5; The calculation formula of the sampling interval callback threshold M2 is: σ' is the standard deviation of each sample data to the data mean in the second sampling sequence. The sampling data x' at the next moment t+1 >M2, the second sampling interval is used as the third sampling interval, and the second sampling time is used as the third sampling duration; if the sample data in the second sampling sequence does not meet the callback threshold condition or does not meet the sampling interval callback threshold, the second sampling sequence continues to be updated.

7. A method for extending the life of a PM2.5 sensor based on environmental adaptive regulation as claimed in claim 1, characterized in that: In S500, the third sampling interval T3 is a function that decreases as the number of sampling times increases, T3=T t-1 -lΔT, where l is the number of sampling times after adjusting the second sampling interval to the third sampling interval, T t-1 is the sampling interval between the previous sampling data and the current sampling data, ΔT is a fixed time interval, T1 / 3≤ΔT≤T1 / 2, when T3=T1, the third sampling interval no longer decreases with the increase of the number of sampling times; the third sampling time length is a function that decreases with the decrease of the third sampling interval T3, and the third sampling time length decreases by 1ms for each increase in the number of sampling times.

8. The method for extending the life of a PM2.5 sensor based on environmental adaptive regulation as claimed in claim 1, characterized in that: The initial sampling interval T1 of the sensor operation is 2 to 5 s, the initial sampling duration Q1 is 80 to 100 ms, the maximum sampling interval is set to 500 s, and the maximum sampling duration is set to 200 ms.

9. A PM2.5 sensor life extension system based on environmental adaptive regulation, characterized in that: include: A first sampling sequence constituent unit, a sampling interval adjustment threshold acquisition unit, a second sampling sequence constituent unit, a sampling interval callback threshold acquisition unit, a third sampling sequence constituent unit and a third sampling sequence judgment unit; wherein: A first sampling sequence forming unit is used to set an initial sampling interval and an initial sampling duration of the PM2.5 sensor to obtain a first sampling sequence consisting of n sample data based on a time series, where n≥5; a sampling interval adjustment threshold acquisition unit, configured to determine whether the sample data in the first sampling sequence meets a preset adjustment threshold condition, and if the first preset adjustment threshold is met, obtain the sampling interval adjustment threshold according to the average distance and standard deviation of each sample data in the first sampling sequence to the data mean; A second sampling sequence forming unit is used to collect sampling data at the next moment, determine whether the sampling data at the next moment meets the sampling interval adjustment threshold condition, and if so, use the initial sampling interval as the second sampling interval, and use the initial sampling duration as the second sampling duration, and obtain a second sampling sequence consisting of n sample data based on the time series according to the second sampling interval; a sampling interval callback threshold acquisition unit, used to determine whether the sample data of the second sampling sequence meets the preset callback threshold condition, and if so, obtain the sampling interval callback threshold according to the average distance and standard deviation of each sample data in the second sampling sequence to the data mean; A third sampling sequence forming unit is used to continue to collect sampling data at the next moment, determine whether the sampling data at the next moment meets the sampling interval callback threshold, and if so, use the second sampling interval as the third sampling interval, and adjust the second sampling duration to the third sampling duration, and obtain a third sampling sequence consisting of n sample data based on the time series according to the third sampling interval; The third sampling sequence judgment unit is used to judge whether the sample data in the third sampling sequence meets the preset adjustment threshold condition. If so, the sampling interval adjustment threshold acquisition unit is repeatedly started; if not, sampling is continued according to the third sampling interval until the sampling interval returns to the initial sampling interval, and the first sampling sequence formation unit is repeatedly started.

10. An electronic device comprising: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the sensor life extension method according to any one of claims 1 to 7.