CN115798154A - Air quality alarm method and system - Google Patents

Air quality alarm method and system Download PDF

Info

Publication number
CN115798154A
CN115798154A CN202211362346.7A CN202211362346A CN115798154A CN 115798154 A CN115798154 A CN 115798154A CN 202211362346 A CN202211362346 A CN 202211362346A CN 115798154 A CN115798154 A CN 115798154A
Authority
CN
China
Prior art keywords
euclidean distance
concentration
target
pollutant
standard
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211362346.7A
Other languages
Chinese (zh)
Inventor
吴旺盛
吴龙彪
兰帮福
黄俊琳
刘文峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangxi Fashion Technology Co Ltd
Original Assignee
Jiangxi Fashion Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangxi Fashion Technology Co Ltd filed Critical Jiangxi Fashion Technology Co Ltd
Priority to CN202211362346.7A priority Critical patent/CN115798154A/en
Publication of CN115798154A publication Critical patent/CN115798154A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Emergency Alarm Devices (AREA)

Abstract

The invention provides an air quality alarm method and system, which are characterized in that concentration values of pollutants acquired by a sensor are acquired in real time, the concentration values of the pollutants are sequentially judged in a standard range and a concentration variation, the health states of equipment and data are preliminarily screened, then the concentration values of the pollutants in a pollutant concentration data set are clustered, a corresponding target cluster mass center is determined, the subsequently acquired concentration values are calculated with the target cluster mass center, the obtained target Euclidean distance is compared with the standard Euclidean distance, data are analyzed more accurately, if the target Euclidean distance is larger than the standard Euclidean distance, the data are abnormal, an alarm is sent out to prompt the abnormal air quality, the sensitivity of the abnormal data is effectively improved, and an alarm prompt can be timely made according to slight change of the data.

Description

Air quality alarm method and system
Technical Field
The invention belongs to the technical field of air quality alarm, and particularly relates to an air quality alarm method and system.
Background
The quality of Air quality (Air quality) reflects the degree of Air pollution, and can be judged according to the concentration of pollutants in the Air, wherein the concentration of the pollutants in the Air is influenced by a plurality of factors such as tail gas of vehicles, ships and airplanes, industrial pollution, waste incineration and the like at a specific time and place.
In order to monitor the air quality, usually can install air quality collection system at the appointed area for carry out real-time collection to the pollutant in the air, and output pollutant concentration data, relevant staff knows the condition of current air quality through looking over pollutant concentration data, and according to the condition of current air quality, reports an emergency and asks for help or increased vigilance, and in time carry out environmental remediation, rectification.
The traditional mode of checking pollutant concentration data through the manual work, the degree of sensitivity to abnormal data is limited, can't in time make according to data change and report an emergency and ask for help or increased vigilance the suggestion, and the manual work efficiency of looking over is lower.
Disclosure of Invention
Based on this, the embodiment of the invention provides an air quality alarm method and system, and aims to solve the problems that in the prior art, the sensitivity degree of abnormal data is limited by a mode of artificially checking pollutant concentration data, and an alarm prompt cannot be made in time according to data change.
A first aspect of an embodiment of the present invention provides an air quality alarm method, where the method includes:
the method comprises the steps of acquiring concentration values of various pollutants acquired by a sensor in real time to form a pollutant concentration data set, and judging whether the concentration values are in a standard range;
if so, respectively acquiring a first concentration value and a second concentration value of each pollutant at adjacent moments, and calculating corresponding concentration variation according to the first concentration value and the second concentration value;
judging whether the concentration variation is larger than a corresponding variation threshold;
if not, clustering concentration values of various pollutants in the pollutant concentration data set, and determining the mass center of the corresponding target cluster;
acquiring a third concentration value of each pollutant at the current moment, calculating a target Euclidean distance according to the third concentration value and the target cluster mass center, and judging whether the target Euclidean distance is greater than a standard Euclidean distance;
if yes, an alarm is given out to prompt that the air quality is abnormal.
Further, the step of clustering concentration values of each pollutant in the pollutant concentration data set and determining a corresponding target cluster centroid includes:
step one, determining corresponding coordinate points according to concentration values of various pollutants in the pollutant concentration data set;
randomly selecting k coordinate points from all coordinate points as a first cluster centroid, wherein k is the number of terms of the pollutants;
step three, calculating first Euclidean distances from coordinate points except the first cluster centroid to the first cluster centroid;
dividing the pollutant concentration data set into k clusters by taking the first cluster centroid as a datum point according to the first Euclidean distance;
step five, acquiring each corresponding coordinate point in each cluster, calculating the average value of all coordinate points in the cluster to obtain a target coordinate point, and updating the centroid of the first cluster according to the target coordinate point;
and step six, repeating the step three to the step five until the first cluster mass center is not changed any more, and defining the first cluster mass center as the target cluster mass center.
Further, in the step of calculating a first euclidean distance from the first cluster centroid to other coordinate points except for the first cluster centroid, the calculation formula of the first euclidean distance is:
Figure BDA0003923128940000021
where d (x, y) represents the euclidean distance between coordinate point x and coordinate point y, and n represents the dimension.
Further, the standard euclidean distance dynamically changes over time.
Further, the step of obtaining a third concentration value of each pollutant at the current moment, calculating a target euclidean distance according to the third concentration value and the target cluster centroid, and determining whether the target euclidean distance is smaller than a standard euclidean distance includes:
acquiring a first time interval of the current time, a first standard Euclidean distance corresponding to the first time interval, a second time interval adjacent to the first time interval and a second standard Euclidean distance corresponding to the second time interval;
judging whether the first standard Euclidean distance and the second standard Euclidean distance are equal;
if not, acquiring critical time points of the first time interval and the second time interval, and replacing the second standard Euclidean distance with the first standard Euclidean distance when the time reaches the critical time points.
Further, the step of obtaining a third concentration value of each pollutant at the current moment, calculating a target euclidean distance according to the third concentration value and the target cluster centroid, and determining whether the target euclidean distance is smaller than a standard euclidean distance includes:
when the Euclidean distance of the target is judged to be smaller than the standard Euclidean distance, acquiring the corresponding Euclidean distance of the target calculated according to the concentration values of the pollutants in a preset time period, and calculating the average value of all the Euclidean distances in the concentration values of a certain pollutant;
judging whether the difference value between the average value and the corresponding standard Euclidean distance is larger than a threshold value;
if yes, adjusting the standard Euclidean distance according to the average value.
A second aspect of an embodiment of the present invention provides an air quality alarm system, including:
the first judgment module is used for acquiring concentration values of various pollutants acquired by the sensor in real time, forming a pollutant concentration data set and judging whether the concentration values are in a standard range or not;
the concentration variation calculation module is used for respectively acquiring a first concentration value and a second concentration value of each pollutant at adjacent moments when each concentration value is judged to be within a standard range, and calculating corresponding concentration variation according to the first concentration value and the second concentration value;
the second judgment module is used for judging whether the concentration variation is larger than a corresponding variation threshold;
the target cluster centroid determining module is used for clustering concentration values of pollutants in the pollutant concentration data set when the concentration variation is judged not to be larger than the corresponding variation threshold value, and determining the corresponding target cluster centroid;
the third judgment module is used for acquiring a third concentration value of each pollutant at the current moment, calculating a target Euclidean distance according to the third concentration value and the target cluster mass center, and judging whether the target Euclidean distance is greater than a standard Euclidean distance;
and the warning module is used for sending a warning to prompt that the air quality is abnormal when the Euclidean distance of the target is judged to be greater than the standard Euclidean distance.
A third aspect of an embodiment of the present invention provides a computer-readable storage medium, including:
the readable storage medium stores one or more programs which, when executed by a processor, implement the air quality warning method of the first aspect.
A fourth aspect of an embodiment of the present invention provides an electronic device, including a memory and a processor, wherein:
the memory is used for storing computer programs;
the processor is configured to implement the air quality warning method of the first aspect when executing the computer program stored in the memory.
The invention provides an air quality alarm method and system, which are characterized in that concentration values of various pollutants acquired by a sensor are acquired in real time, the concentration values of the various pollutants are sequentially judged in a standard range and a concentration variation, the health states of equipment and data are preliminarily screened, then the concentration values of the various pollutants in a pollutant concentration data set are clustered, a corresponding target cluster mass center is determined, the subsequently acquired concentration values are calculated with the target cluster mass center, the obtained target Euclidean distance is compared with the standard Euclidean distance, data are analyzed more accurately, if the target Euclidean distance is greater than the standard Euclidean distance, the data are abnormal, an alarm is sent out to prompt the abnormal air quality, the sensitivity of the abnormal data is effectively improved, and an alarm prompt can be timely made according to slight change of the data.
Drawings
Fig. 1 is a flowchart of an implementation of an air quality alarm method according to a first embodiment of the present invention;
fig. 2 is a schematic structural diagram of an air quality alarm system according to a second embodiment of the present invention;
fig. 3 is a block diagram of an electronic device according to a third embodiment of the present invention.
The following detailed description will be further described in conjunction with the above-identified drawing figures.
Detailed Description
To facilitate an understanding of the invention, the invention will now be described more fully hereinafter with reference to the accompanying drawings. Several embodiments of the invention are presented in the drawings. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
It will be understood that when an element is referred to as being "secured to" another element, it can be directly on the other element or intervening elements may also be present. When an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present. The terms "vertical," "horizontal," "left," "right," and the like as used herein are for illustrative purposes only.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
Example one
Referring to fig. 1, fig. 1 illustrates an air quality alarm method according to a first embodiment of the present invention, which specifically includes steps S01 to S06.
Step S01, concentration values of various pollutants collected by a sensor are obtained in real time to form a pollutant concentration data set, whether the concentration values are within a standard range or not is judged, and if yes, the step S02 is executed.
In some special application scenarios, concentration values of various pollutants collected by the sensor may be installed, for example, an environment-friendly dust collection instrument is installed in a construction site to collect, for example, PM2.5, PM10, and SO 2 、NO 2 、CO、O 3 And the like, because each item of data can be simultaneously collected, each collected item of data, namely each concentration value, can be simultaneously compared with the corresponding standard range, whether the concentration value is in the respective standard range is judged, if so, the equipment and the data belong to a normal state is shown, it can be understood that when the concentration value is smaller than the lower limit of the standard range, the equipment is abnormal, the equipment is possibly interrupted, and when the concentration value is larger than the upper limit of the standard range, the data is abnormal, and an alarm is directly sent out.
Step S02, respectively obtaining a first concentration value and a second concentration value of each pollutant at adjacent moments, and calculating corresponding concentration variation according to the first concentration value and the second concentration value.
Specifically, since the sensor obtains the concentration value of each pollutant in real time, that is, the concentration value of each pollutant is continuously updated, and the variation range of the data is also one of the expressions of data abnormality, for this reason, the concentration variation is obtained by obtaining the first concentration value and the second concentration value of each pollutant at adjacent moments and calculating the difference between the first concentration value and the second concentration value.
And step S03, judging whether the concentration variation is larger than a corresponding variation threshold, and if not, executing step S04.
It can be understood that the variation of different pollutants that correspond under the different scenes is different, for this reason, can be according to actual production process, set up corresponding variation threshold value to after the concentration variation is obtained in the calculation, compare with corresponding variation threshold value, when the concentration variation is greater than the variation threshold value, it is great to explain data amplitude of change, and air quality is unusual, then sends out and reports an emergency and asks for help or increased vigilance.
And S04, clustering concentration values of various pollutants in the pollutant concentration data set, and determining the corresponding target cluster mass center.
It should be noted that, the determination of the target cluster centroid can be performed in a commissioning phase, and the target cluster centroid is optimized through a certain amount of data, and the target cluster centroid can be determined by the following steps:
determining corresponding coordinate points according to concentration values of pollutants in a pollutant concentration data set, wherein the concentration values of the pollutants can be all drawn in a graph, the graph is a scatter diagram, and the graph can be understood as being divided into a plurality of scatter point groups when the concentration values of the pollutants are all embodied in the scatter diagram, and one scatter point group can contain all the concentration values of one pollutant;
step two, randomly selecting k coordinate points from all coordinate points as a first cluster centroid, wherein k is the number of terms of the pollutants, and assuming the collected pollutantsHas PM2.5, PM10 and SO 2 If the number of terms of the pollutants is three, randomly determining 3 coordinate points as a first cluster centroid;
step three, calculating a first Euclidean distance from the coordinate points except the first cluster centroid to the first cluster centroid, wherein the calculation formula of the first Euclidean distance is as follows:
Figure BDA0003923128940000061
wherein d (x, y) represents the euclidean distance between the coordinate point x and the coordinate point y, and n represents the dimension, it can be understood that all subsequent calculations regarding euclidean distances can use the above formula;
dividing the pollutant concentration data set into k clusters by taking the first cluster centroid as a datum point according to the first Euclidean distance;
step five, acquiring corresponding coordinate points in each cluster, calculating the average value of all coordinate points in the cluster to obtain a target coordinate point, and updating the centroid of the first cluster according to the target coordinate point;
and step six, repeating the step three to the step five until the first cluster mass center does not change any more, defining the first cluster mass center as a target cluster mass center, namely determining a scatter point in each scatter point group as a final result, and taking the scatter point as the target cluster mass center of the scatter point group.
Step S05, obtaining a third concentration value of each pollutant at the current moment, calculating a target Euclidean distance according to the third concentration value and the target cluster center of mass, judging whether the target Euclidean distance is greater than a standard Euclidean distance, and if yes, executing step S06.
In this embodiment, the standard euclidean distance dynamically changes with time, taking a chemical plant scenario as an example, the emission amount of pollutants at night is far smaller than the working time in the daytime, that is, the emission amount of pollutants at night is lower and more stable, then the standard euclidean distance set in a certain time period at night may be smaller than the standard euclidean distances of other time periods, so as to control the pollutant data more accurately, where a first time period at the current time, a first standard euclidean distance corresponding to the first time period, a second time period adjacent to the first time period, and a second standard euclidean distance corresponding to the second time period may be obtained; judging whether the first standard Euclidean distance is equal to the second standard Euclidean distance; if not, the critical time points of the first time interval and the second time interval are obtained, and when the time reaches the critical time point, the second standard Euclidean distance is replaced by the first standard Euclidean distance so as to realize the intelligent adjustment of the standard Euclidean distance.
In addition, because the standard Euclidean distance can be preset manually, when the sensor operates in the initial stage, the obtained pollutant data are limited, the standard Euclidean distance may not be accurate, and the standard Euclidean distance can be adjusted through big data along with the increase of the collected data quantity, so that the judgment standard is more appropriate, wherein the operation is carried out only when the data are all normal values, specifically, the corresponding target Euclidean distance calculated according to the concentration values of various pollutants in the preset time period, namely the working period and the non-working period, is obtained, and the average value of all target Euclidean distances calculated according to all coordinate points and the mass center of a target cluster in the concentration value of a certain pollutant is calculated; judging whether the difference value between the average value and the corresponding standard Euclidean distance is greater than a threshold value; if yes, the standard Euclidean distance is not set accurately enough, abnormal conditions of data can not be reflected, then the standard Euclidean distance is adjusted according to the average value, wherein the current standard Euclidean distance is subtracted by a threshold value, and the obtained value is determined as a new quasi-Euclidean distance.
And step S06, giving an alarm to prompt that the air quality is abnormal.
To sum up, in the air quality alarm method provided by the embodiment of the present invention, the concentration values of the pollutants acquired by the sensor are obtained in real time, the standard ranges and the concentration variation of the concentration values of the pollutants are sequentially determined, the health states of the equipment and the data are preliminarily screened, then the concentration values of the pollutants in the pollutant concentration data set are clustered, a corresponding target cluster centroid is determined, the subsequently acquired concentration values are calculated with the target cluster centroid, the obtained target euclidean distance is compared with the standard euclidean distance, the data is analyzed more accurately, if the target euclidean distance is greater than the standard euclidean distance, it is indicated that the data is abnormal, an alarm is issued to indicate that the air quality is abnormal, the method effectively improves the sensitivity of the abnormal data, and an alarm prompt can be made in time according to the slight change of the data.
Example two
Referring to fig. 2, fig. 2 is a block diagram of an air quality alarm system according to an embodiment of the present invention. The air quality warning system 200 includes: the concentration variation calculating module comprises a first judging module 21, a concentration variation calculating module 22, a second judging module 23, a target cluster centroid determining module 24, a third judging module 25 and an alarming module 26, wherein:
the first judgment module 21 is configured to obtain concentration values of each pollutant acquired by a sensor in real time, form a pollutant concentration data set, and judge whether each concentration value is within a standard range;
a concentration variation calculation module 22, configured to, when it is determined that each of the concentration values is within the standard range, respectively obtain a first concentration value and a second concentration value of each pollutant at adjacent times, and calculate a corresponding concentration variation according to the first concentration value and the second concentration value;
a second determination module 23, configured to determine whether the concentration variation is greater than a corresponding variation threshold;
a target cluster centroid determining module 24, configured to, when it is determined that the concentration variation is not greater than the corresponding variation threshold, perform clustering processing on concentration values of each pollutant in the pollutant concentration data set, and determine a corresponding target cluster centroid;
a third determining module 25, configured to obtain a third concentration value of each pollutant at the current time, calculate a target euclidean distance according to the third concentration value and the target cluster centroid, and determine whether the target euclidean distance is greater than a standard euclidean distance, where the standard euclidean distance dynamically changes with time;
and the alarm module 26 is used for sending an alarm to prompt that the air quality is abnormal when the Euclidean distance of the target is judged to be greater than the standard Euclidean distance.
Further, in some alternative embodiments of the present invention, the target cluster centroid determining module 24 includes:
the coordinate point determining unit is used for determining corresponding coordinate points according to concentration values of various pollutants in the pollutant concentration data set;
the first cluster centroid determining unit is used for randomly selecting k coordinate points from all the coordinate points as a first cluster centroid, wherein k is the number of terms of the pollutants;
a first calculating unit, configured to calculate a first euclidean distance from the first cluster centroid to other coordinate points except for the first cluster centroid, where the first euclidean distance is calculated by:
Figure BDA0003923128940000091
wherein d (x, y) represents the euclidean distance between coordinate point x and coordinate point y, and n represents the dimension;
a clustering unit, configured to divide the pollutant concentration data set into k clusters by using the first cluster centroid as a reference point according to the first euclidean distance;
the updating unit is used for acquiring each corresponding coordinate point in each cluster, calculating the average value of all coordinate points in the cluster to obtain a target coordinate point, and updating the centroid of the first cluster according to the target coordinate point;
and the circulating unit is used for repeating the first calculating unit, the clustering unit and the updating unit until the first cluster mass center is not changed any more, and defining the first cluster mass center as the target cluster mass center.
Further, in some optional embodiments of the present invention, the third determining module 25 includes:
a first obtaining unit, configured to obtain a first time period at a current time, a first standard euclidean distance corresponding to the first time period, a second time period adjacent to the first time period, and a second standard euclidean distance corresponding to the second time period;
a first judgment unit, configured to judge whether the first standard euclidean distance and the second standard euclidean distance are equal;
and the replacing unit is used for acquiring the critical time points of the first time interval and the second time interval when the first standard Euclidean distance and the second standard Euclidean distance are judged to be unequal, and replacing the second standard Euclidean distance with the first standard Euclidean distance when the time reaches the critical time points.
Further, in some alternative embodiments of the present invention, the air quality warning system 200 further includes:
the average value calculation module is used for acquiring the corresponding target Euclidean distance calculated according to the concentration values of various pollutants in a preset time period when the target Euclidean distance is judged to be smaller than the standard Euclidean distance, and calculating the average value of all the target Euclidean distances in the concentration values of a certain pollutant;
a fourth judging module, configured to judge whether a difference between the average value and the corresponding standard euclidean distance is greater than a threshold;
and the adjusting module is used for adjusting the standard Euclidean distance according to the average value when the difference value between the average value and the corresponding standard Euclidean distance is judged to be larger than a threshold value.
EXAMPLE III
Referring to fig. 3, a block diagram of an electronic device according to a third embodiment of the present invention is shown, which includes a memory 20, a processor 10, and a computer program 30 stored in the memory and running on the processor, and when the processor 10 executes the computer program 30, the air quality alarm method is implemented.
The processor 10 may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor or other data Processing chip in some embodiments, and is used to execute program codes stored in the memory 20 or process data, such as executing an access restriction program.
The memory 20 includes at least one type of readable storage medium, which includes flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 20 may in some embodiments be an internal storage unit of the electronic device, for example a hard disk of the electronic device. The memory 20 may also be an external storage device of the electronic device in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the electronic device. Further, the memory 20 may also include both an internal storage unit and an external storage device of the electronic apparatus. The memory 20 may be used not only to store application software and various types of data of the electronic device, but also to temporarily store data that has been output or is to be output.
It should be noted that the configuration shown in fig. 3 does not constitute a limitation of the electronic device, and in other embodiments the electronic device may include fewer or more components than shown, or some components may be combined, or a different arrangement of components.
Embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the air quality alarm method as described above.
Those of skill in the art will understand that the logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be viewed as implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following technologies, which are well known in the art, may be used: discrete logic circuits with logic gates for implementing logic functions on data states, application specific integrated circuits with appropriate combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), etc.
In the description of the specification, reference to the description of "one embodiment," "some embodiments," "an example," "a specific example," or "some examples" or the like means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above examples only show some embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (9)

1. An air quality alarm method, characterized in that the method comprises:
the method comprises the steps of acquiring concentration values of various pollutants acquired by a sensor in real time to form a pollutant concentration data set, and judging whether the concentration values are in a standard range;
if so, respectively acquiring a first concentration value and a second concentration value of each pollutant at adjacent moments, and calculating corresponding concentration variation according to the first concentration value and the second concentration value;
judging whether the concentration variation is larger than a corresponding variation threshold value;
if not, clustering concentration values of each pollutant in the pollutant concentration data set, and determining a corresponding target cluster mass center;
acquiring a third concentration value of each pollutant at the current moment, calculating a target Euclidean distance according to the third concentration value and the target cluster mass center, and judging whether the target Euclidean distance is greater than a standard Euclidean distance;
if yes, an alarm is given out to prompt that the air quality is abnormal.
2. The air quality alarm method of claim 1, wherein the step of clustering concentration values of each pollutant in the pollutant concentration data set and determining a corresponding target cluster centroid comprises:
step one, determining corresponding coordinate points according to concentration values of various pollutants in the pollutant concentration data set;
randomly selecting k coordinate points from all coordinate points as a first cluster centroid, wherein k is the number of terms of the pollutants;
step three, calculating first Euclidean distances from coordinate points except the first cluster centroid to the first cluster centroid;
dividing the pollutant concentration data set into k clusters by taking the first cluster centroid as a datum point according to the first Euclidean distance;
step five, acquiring each corresponding coordinate point in each cluster, calculating the average value of all coordinate points in the cluster to obtain a target coordinate point, and updating the centroid of the first cluster according to the target coordinate point;
and step six, repeating the step three to the step five until the first cluster mass center is not changed any more, and defining the first cluster mass center as the target cluster mass center.
3. The air quality alarm method according to claim 2, wherein in the step of calculating the first euclidean distance from the first cluster centroid to other coordinate points than the first cluster centroid, the first euclidean distance is calculated by the formula:
Figure FDA0003923128930000021
where d (x, y) represents the euclidean distance between coordinate point x and coordinate point y, and n represents the dimension.
4. The air quality alarm method of claim 3, wherein the standard Euclidean distance dynamically changes over time.
5. The air quality alarm method according to claim 4, wherein the step of obtaining a third concentration value of each pollutant at the current moment, calculating a target Euclidean distance according to the third concentration value and the target cluster centroid, and judging whether the target Euclidean distance is smaller than a standard Euclidean distance comprises:
acquiring a first time period of the current moment, a first standard Euclidean distance corresponding to the first time period, a second time period adjacent to the first time period and a second standard Euclidean distance corresponding to the second time period;
judging whether the first standard Euclidean distance and the second standard Euclidean distance are equal;
if not, acquiring critical time points of the first time interval and the second time interval, and replacing the second standard Euclidean distance with the first standard Euclidean distance when the time reaches the critical time points.
6. The air quality alarm method according to claim 5, wherein the step of obtaining a third concentration value of each pollutant at the current moment, calculating a target Euclidean distance according to the third concentration value and the target cluster centroid, and judging whether the target Euclidean distance is smaller than a standard Euclidean distance comprises the following steps:
when the Euclidean distance of the target is judged to be smaller than the standard Euclidean distance, acquiring the corresponding Euclidean distance of the target calculated according to the concentration values of the pollutants in a preset time period, and calculating the average value of all the Euclidean distances in the concentration values of a certain pollutant;
judging whether the difference value between the average value and the corresponding standard Euclidean distance is larger than a threshold value or not;
if yes, adjusting the standard Euclidean distance according to the average value.
7. An air quality alarm system, the system comprising:
the first judgment module is used for acquiring concentration values of various pollutants acquired by the sensor in real time, forming a pollutant concentration data set and judging whether the concentration values are in a standard range or not;
the concentration variation calculation module is used for respectively acquiring a first concentration value and a second concentration value of each pollutant at adjacent moments when each concentration value is judged to be within a standard range, and calculating corresponding concentration variation according to the first concentration value and the second concentration value;
the second judgment module is used for judging whether the concentration variation is larger than a corresponding variation threshold;
the target cluster mass center determining module is used for clustering the concentration values of the pollutants in the pollutant concentration data set when the concentration variation is judged not to be larger than the corresponding variation threshold value, and determining the corresponding target cluster mass center;
the third judgment module is used for acquiring a third concentration value of each pollutant at the current moment, calculating a target Euclidean distance according to the third concentration value and the target cluster mass center, and judging whether the target Euclidean distance is greater than a standard Euclidean distance;
and the warning module is used for sending a warning to prompt that the air quality is abnormal when the Euclidean distance of the target is judged to be greater than the standard Euclidean distance.
8. A computer-readable storage medium, comprising:
the readable storage medium stores one or more programs which, when executed by a processor, implement the air quality alerting method of any one of claims 1-6.
9. An electronic device, comprising a memory and a processor, wherein:
the memory is used for storing computer programs;
the processor is configured to implement the air quality warning method according to any one of claims 1 to 6 when executing the computer program stored in the memory.
CN202211362346.7A 2022-11-02 2022-11-02 Air quality alarm method and system Pending CN115798154A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211362346.7A CN115798154A (en) 2022-11-02 2022-11-02 Air quality alarm method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211362346.7A CN115798154A (en) 2022-11-02 2022-11-02 Air quality alarm method and system

Publications (1)

Publication Number Publication Date
CN115798154A true CN115798154A (en) 2023-03-14

Family

ID=85434962

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211362346.7A Pending CN115798154A (en) 2022-11-02 2022-11-02 Air quality alarm method and system

Country Status (1)

Country Link
CN (1) CN115798154A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117391480A (en) * 2023-12-01 2024-01-12 广东华清智业环保科技有限公司 Environment-friendly operation management system based on digital twinning

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117391480A (en) * 2023-12-01 2024-01-12 广东华清智业环保科技有限公司 Environment-friendly operation management system based on digital twinning

Similar Documents

Publication Publication Date Title
CN111949750B (en) Ship track model building and abnormal track detection method
US8554403B2 (en) Vehicle failure diagnostic device
DE102020100591A1 (en) ERROR DETECTING DEVICE FOR DETECTING A PROBLEM WITH A PART OF A MACHINE
WO2010041382A1 (en) Generation of reference value for vehicle failure diagnosis
CN110544373A (en) truck early warning information extraction and risk identification method based on Beidou Internet of vehicles
CN111878320B (en) Monitoring method and system of wind generating set and computer readable storage medium
CN113901162B (en) Unmanned aerial vehicle environment monitoring method and system based on city management and cloud platform
CN115798154A (en) Air quality alarm method and system
CN105871634A (en) Method and application for detecting cluster anomalies and cluster managing system
CN105225523A (en) A kind of parking space state detection method and device
CN113163353B (en) Intelligent health service system of power supply vehicle and data transmission method thereof
CN115689396B (en) Pollutant emission control method, device, equipment and medium
CN112906738A (en) Water quality detection and treatment method
CN118039021B (en) Sewage pollutant detection and alarm method and system
CN110399926B (en) Street lamp fault diagnosis method and device
CN115774653A (en) Early warning research and judgment method, system, readable storage medium and computer equipment
CN115545500A (en) Steel bar engineering quality detection method and system for engineering supervision
CN114399371A (en) Method and device for detecting behavior of surrounding string label, computer equipment and storage medium
CN114861749A (en) Low-sample bearing fault diagnosis method based on depth prototype network
CN110059353B (en) Automatic modal parameter identification, simplification and practical method
CN112580838A (en) Management method and system for operation and maintenance of environmental protection equipment, computer storage medium and terminal
CN115357646B (en) Bridge state monitoring method and system
CN117499887B (en) Data acquisition method and system based on multi-sensor fusion technology
CN117951531B (en) Training method, regional rainfall runoff pollution load prediction method and device
CN116560219B (en) Self-adaptive monitoring control method and system based on transmission tower wind speed joint analysis

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination