Alarm method and device, electronic device and storage medium
By measuring water quality information at the first preset position of the water body and combining the upstream and downstream water quality index sequence, the false alarm problem in water pollution alarm is solved, and real-time detection and accurate alarm of abnormal water bodies is realized.
Patent Information
- Application Number
- CN202310556239.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-17
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2043-05-17
AI Technical Summary
The existing water pollution warning technology has false alarms, resulting in unnecessary manpower and material consumption, and it is impossible to accurately identify abnormal situations in the water environment.
By measuring the water quality information at the first preset position of the water body, determining the water quality index sequence, and combining environmental information and upstream and downstream water quality index sequences, it is determined whether the alarm triggering conditions are met, reducing interference from non-water factors, and improving alarm accuracy.
Real-time detection of abnormal water conditions is achieved, the probability of false alarms is reduced, and the accuracy of alarms is improved for water pollution incidents.
Smart Images

Figure CN116704710B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to an alarm method and device, an electronic device, and a storage medium. Background Art
[0002] With the rapid development of global industry and the rapid growth of urban populations, the discharge of industrial and domestic wastewater has increased dramatically, causing the global water resources situation to deteriorate and water environment problems to become increasingly prominent. In order to reduce the serious pollution and damage caused by water pollution accidents to water systems and ecological environments, it is very important to monitor water quality indicators and issue warnings for possible water pollution incidents.
[0003] However, considering that the water environment is relatively complex, for example, water changes may occur due to seasons, water release, etc., and may be affected by random factors such as environmental debris in the water body, the alarm information of water pollution incidents may not be accurate, and there may be false alarms, resulting in unnecessary consumption of manpower and / or material resources. Summary of the Invention
[0004] The present disclosure proposes an alarm technology solution.
[0005] According to one aspect of the present disclosure, an alarm method is provided, including: determining a first water quality indicator sequence of a water body based on water quality information measured at a first preset position of the water body; judging whether the first water quality indicator sequence is abnormal data; if the first water quality indicator sequence is abnormal data, judging whether an alarm triggering condition is met based on environmental information of the first preset position of the water body and at least one second water quality indicator sequence related to the first water quality indicator sequence, wherein the second water quality indicator sequence is determined based on water quality information at a second preset position of the water body, the second preset position being an upstream position and / or downstream position of the first preset position; and generating alarm information if the alarm triggering condition is met.
[0006] In one possible implementation, the determining whether an alarm trigger condition is met based on environmental information of a first preset position of a water body and at least one second water quality indicator sequence related to the first water quality indicator sequence includes: determining whether there is an abnormality in the environment of the first preset position of the water body based on the environmental information of the first preset position of the water body; if the environment of the first preset position of the water body is abnormal, the alarm trigger condition is not met, or, if the environment of the first preset position of the water body is normal, determining whether the alarm trigger condition is met based on the first water quality indicator sequence and at least one second water quality indicator sequence related to the first water quality indicator sequence.
[0007] In one possible implementation, judging whether there is an abnormality in the environment of the first preset position of the water body based on the environmental information of the first preset position of the water body includes: determining the degree of abnormality of the first preset position of the water body based on the environmental information of the first preset position of the water body; and when the degree of abnormality of the first preset position of the water body is greater than a first preset threshold, judging that the environment of the first preset position of the water body is abnormal.
[0008] In one possible implementation, the determining whether an alarm trigger condition is met based on the first water quality index sequence and at least one second water quality index sequence related to the first water quality index sequence includes: performing feature extraction on the first water quality index sequence to determine a target feature, wherein the target feature is a data feature used to indicate an abnormal change in water quality index sequences measured at multiple preset locations caused by the same water pollution; determining a predicted time when the target feature appears at the second preset location based on flow rate information of the water body and the distance between the first preset location and the second preset location; and the alarm trigger condition is met when the target feature is detected in the second water quality index sequence and the first time corresponding to the target feature detected in the second water quality index sequence is consistent with the predicted time.
[0009] In one possible implementation, determining whether the first water quality indicator sequence is abnormal data includes: determining a historical water quality indicator sequence based on historical water quality information measured at a first preset location of the water body; determining, based on historical distribution data of the historical water quality indicator sequence, an interval in the historical distribution data having a confidence probability of being normal data greater than a second preset threshold as a confidence interval, wherein the historical distribution data is fitted data obtained by performing data fitting processing on the historical water quality indicator sequence; determining whether the first water quality indicator sequence is abnormal data based on the distribution data of the first water quality indicator sequence and the confidence interval, wherein the distribution data is fitted data obtained by performing data fitting processing on the first water quality indicator sequence.
[0010] In one possible implementation, determining a first water quality indicator sequence of a water body based on water quality information measured at a first preset position of the water body includes: determining an initial water quality indicator sequence to be processed based on the water quality information measured at the first preset position of the water body; and denoising the initial water quality indicator sequence to obtain a first water quality indicator sequence after denoising.
[0011] In one possible implementation, denoising the initial water quality index sequence to obtain a denoised first water quality index sequence includes: determining a mean of the initial water quality index sequence; and removing jump point elements in the initial water quality index sequence whose distance from the mean is greater than a preset distance to obtain the first water quality index sequence.
[0012] In one possible implementation, the water quality indicators include at least one of chemical oxygen demand, turbidity, total phosphorus content, ammonia nitrogen content, permanganate index, total suspended solids, biological oxygen demand, total organic carbon, sulfate content, chloride content, soluble iron content, soluble manganese content, soluble copper content, soluble zinc content, nitrate content, nitrite content, total nitrogen content, fluoride content, selenium content, total arsenic content, total mercury content, total cadmium content, chromium content, total lead content, total cyanide, volatile phenol content, coliform bacteria content, and sulfide content.
[0013] According to one aspect of the present disclosure, an alarm device is provided, comprising: a determination module for determining a first water quality index sequence of a water body based on water quality information measured at a first preset position of the water body; a first judgment module for judging whether the first water quality index sequence is abnormal data; a second judgment module for judging whether an alarm triggering condition is met based on environmental information of the first preset position of the water body and at least one second water quality index sequence related to the first water quality index sequence when the first water quality index sequence is abnormal data, wherein the second water quality index sequence is determined based on water quality information at a second preset position of the water body, the second preset position being an upstream position and / or downstream position of the first preset position; and an alarm module for generating alarm information when the alarm triggering condition is met.
[0014] In one possible implementation, the second judgment module is used to: judge whether there is an abnormality in the environment of the first preset location of the water body based on the environmental information of the first preset location of the water body; if the environment at the first preset location of the water body is abnormal, the alarm trigger condition is not met; or, if the environment at the first preset location of the water body is normal, judge whether the alarm trigger condition is met based on the first water quality indicator sequence and at least one second water quality indicator sequence related to the first water quality indicator sequence.
[0015] In one possible implementation, the second judgment module is further used to: determine the abnormality of the first preset position of the water body based on the environmental information of the first preset position of the water body; when the abnormality of the first preset position of the water body is greater than a first preset threshold, the judgment result is that the environment of the first preset position of the water body is abnormal.
[0016] In one possible implementation, the second judgment module is used to: perform feature extraction on the first water quality indicator sequence to determine a target feature, wherein the target feature is a data feature used to indicate an abnormal change in the water quality indicator sequences measured at multiple preset locations caused by the same water pollution; determine a predicted time when the target feature appears at the second preset location based on the flow rate information of the water body and the distance between the first preset location and the second preset location; and satisfy an alarm trigger condition when the target feature is detected in the second water quality indicator sequence and the first time corresponding to the target feature detected in the second water quality indicator sequence is consistent with the predicted time.
[0017] In one possible implementation, the first judgment module is used to: determine a historical water quality index sequence based on historical water quality information measured at a first preset location of the water body; determine, based on historical distribution data of the historical water quality index sequence, an interval in the historical distribution data in which the confidence probability of belonging to normal data is greater than a second preset threshold as a confidence interval, wherein the historical distribution data is fitting data obtained by performing data fitting processing on the historical water quality index sequence; and determine whether the first water quality index sequence is abnormal data based on the distribution data of the first water quality index sequence and the confidence interval, wherein the distribution data is fitting data obtained by performing data fitting processing on the first water quality index sequence.
[0018] In one possible implementation, the determination module is used to: determine an initial water quality indicator sequence to be processed based on water quality information measured at a first preset position of the water body; and perform denoising on the initial water quality indicator sequence to obtain a first water quality indicator sequence after denoising.
[0019] In a possible implementation, the determination module is further used to: determine the mean of the initial water quality indicator sequence; and remove jump point elements in the initial water quality indicator sequence whose distance from the mean is greater than a preset distance to obtain a first water quality indicator sequence.
[0020] In one possible implementation, the water quality indicators include at least one of chemical oxygen demand, turbidity, total phosphorus content, ammonia nitrogen content, permanganate index, total suspended solids, biological oxygen demand, total organic carbon, sulfate content, chloride content, soluble iron content, soluble manganese content, soluble copper content, soluble zinc content, nitrate content, nitrite content, total nitrogen content, fluoride content, selenium content, total arsenic content, total mercury content, total cadmium content, chromium content, total lead content, total cyanide, volatile phenol content, coliform bacteria content, and sulfide content.
[0021] According to one aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to call the instructions stored in the memory to execute the above method.
[0022] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the above method is implemented.
[0023] In the disclosed embodiment, the abnormal conditions of the water body can be detected in real time. Only when the first water quality indicator sequence of the water body is abnormal data will it be determined whether the alarm triggering conditions are met. During this judgment process, the abnormal environmental information of the water body such as aquatic plants, bottom mud, and aquatic organisms can be identified to reduce false alarms caused by non-water factors interfering with the optical path. By analyzing the associated changes of the second water quality indicator sequence at at least one second preset position (for example, upstream and downstream positions) near the first preset position, the abnormal conditions of the water body (for example, water pollution incidents) can be further confirmed to improve the accuracy of the alarm and reduce the probability of false alarms.
[0024] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, rather than limiting the present disclosure. Other features and aspects of the present disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The accompanying drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and, together with the specification, are used to explain the technical solutions of the present disclosure.
[0026] Figure 1 A flowchart of an alarm method according to an embodiment of the present disclosure is shown.
[0027] Figure 2 A schematic diagram illustrating a denoising process according to an embodiment of the present disclosure is shown.
[0028] Figure 3 A schematic diagram illustrating upstream and downstream association change analysis according to an embodiment of the present disclosure is shown.
[0029] Figure 4 A block diagram of an alarm device according to an embodiment of the present disclosure is shown.
[0030] Figure 5 A block diagram of an electronic device according to an embodiment of the present disclosure is shown.
[0031] Figure 6 A block diagram of another electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0032] Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
[0033] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0034] The term "and / or" herein simply describes an association relationship between associated objects, indicating that three relationships can exist. For example, "A and / or B" can represent the existence of three situations: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" herein refers to any combination of at least two of any one or more of a plurality of items. For example, "at least one of A, B, and C" can represent any one or more elements selected from the set consisting of A, B, and C.
[0035] In addition, numerous specific details are provided in the following detailed description to better illustrate the present disclosure. Those skilled in the art will appreciate that the present disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art are not described in detail in order to highlight the main points of the present disclosure.
[0036] The water quality of a water body is generally stable in the absence of abnormal influx. There are roughly three types of water quality abnormalities: the first is baseline changes, which are long-term changes caused by seasons, water releases, etc.; the second is outliers, which are occasional single water quality data that are significantly higher or lower than the baseline. These are mostly random effects of environmental debris and do not represent pollution; the third is abnormal events, such as when the measured water quality is significantly different from the normal value for a long period of time. In this case, an alarm needs to be issued in a timely manner.
[0037] Taking into account the fact that the alarm information of water pollution incidents is not accurate enough due to the complex water environment, there are cases of false alarms. The embodiment of the present disclosure provides an alarm method that can detect abnormal conditions of water bodies in real time. Only when the first water quality indicator sequence of the water body is abnormal data will it be judged whether the alarm triggering conditions are met. In this judgment process, the false alarms caused by non-water factors interfering with the optical path can be reduced by identifying the abnormalities of the environmental information of the water body such as aquatic plants, bottom mud, and aquatic organisms. By analyzing the correlation changes of the second water quality indicator sequence at at least one second preset position (such as upstream and downstream positions) near the first preset position, the abnormal conditions of the water body (such as water pollution incidents) can be further confirmed to improve the accuracy of the alarm and reduce the probability of false alarms.
[0038] Figure 1 A flowchart of an alarm method according to an embodiment of the present disclosure is shown. Figure 1 As shown, the alarm method includes:
[0039] In step S11, a first water quality index sequence of the water body is determined based on water quality information measured at a first preset position of the water body;
[0040] In step S12, it is determined whether the first water quality indicator sequence is abnormal data;
[0041] In step S13, if the first water quality indicator sequence is abnormal data, it is determined whether an alarm triggering condition is met based on environmental information of a first preset location of the water body and at least one second water quality indicator sequence related to the first water quality indicator sequence;
[0042] In step S14, when the alarm triggering condition is met, alarm information is generated.
[0043] In one possible implementation, the alarm method may be executed by an electronic device such as a terminal device or a server. The terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, an in-vehicle device, a wearable device, or the like. The method may be implemented by a processor invoking computer-readable instructions stored in a memory. Alternatively, the method may be executed by a server.
[0044] In one possible implementation, the alarm method of an embodiment of the present disclosure can issue an alarm for abnormalities in water bodies, where a water body is a collection of water, such as rivers, lakes, seas, reservoirs, groundwater, etc. The water body includes not only water, but also solvent substances, suspended matter, bottom mud, aquatic organisms, etc. in the water. The present disclosure does not limit the category of water bodies.
[0045] In one possible implementation, in step S11, water quality information of a water body may be measured by a quantum dot spectrometer. The quantum dot spectrometer may include a quantum dot spectrum probe, which may measure incident light (e.g., light transmitted or scattered through a water sample in a predetermined area) based on the physical and optical properties of nanocrystals to obtain spectral information of the incident light. For example, the quantum dot spectrum probe may include a nanocrystal chip made of a variety of nanocrystals, wherein the nanocrystal chip includes a certain arrangement of a variety of nanocrystals (e.g., a nanocrystal array), wherein each nanocrystal has different light absorption or emission characteristics, and different types of semiconductor nanocrystals may be, for example, of different materials, sizes, etc., so that the nanocrystal chip can modulate and respond to wavelengths within a wider wavelength range to obtain a spectrum adjusted for incident light within the wider wavelength range.
[0046] In one possible implementation, the light transmitted or scattered through water may be affected by substances in the water (e.g., suspended matter, pollutants, etc.), thereby obtaining specific spectral information. The quantum dot spectral probe can obtain this spectral information in real time, and this spectral information can represent the water quality information of the water body at the measurement location (e.g., the first preset location), and then the water quality index can be determined based on the spectral information. For example, by the absorption strength of the water sample to light of different wavelengths, the spectral information of light of different frequency bands can be obtained, and the water quality index can be converted from this spectral information. The present disclosure does not limit the working principle of the quantum dot spectral probe.
[0047] In an example, the water quality indicators may include chemical oxygen demand (COD), turbidity, total phosphorus content, ammonia nitrogen content, permanganate index, total suspended solids, biological oxygen demand, total organic carbon, sulfate content, chloride content, soluble iron content, soluble manganese content, soluble copper content, soluble zinc content, nitrate content, nitrite content, total nitrogen content, fluoride content, selenium content, total arsenic content, total mercury content, total cadmium content, chromium content, total lead content, total cyanide, volatile phenol content, coliform bacteria content, sulfide content, etc. The water temperature may also be measured based on the infrared spectrum in the spectral information.
[0048] In an example, a quantum dot spectral probe can determine water quality indicators based on the light absorption characteristics of various substances contained in the water. For example, the intensity of light of a specific wavelength can be analyzed through spectral information to obtain the concentration of substances corresponding to the light of the specific wavelength range (water quality indicator). Alternatively, the quantum dot spectral probe can infer water quality indicators through a neural network. For example, spectral information can be input into the neural network, and the neural network can infer the concentration of various substances (water quality indicators). This disclosure does not limit the method of determining water quality indicators.
[0049] In one possible implementation, a quantum dot spectral probe can be used to measure water quality indicators (e.g., COD) in real time. Water quality indicators obtained at multiple times at the same location (a first preset location) can form a water quality indicator sequence. Compared to the method of measuring water quality indicators by sampling water and then conducting laboratory tests, measuring indicators using a quantum dot spectral probe can achieve online, in-situ, high-frequency, and real-time measurement. For example, the measurement frequency can be increased from 1 day / time to 3-60 minutes / time, preferably 5-30 minutes / time, particularly preferably 8-20 minutes / time, and most preferably 10-15 minutes / time, which is much higher than traditional testing methods. As a result, a water quality indicator sequence can be obtained at a higher frequency.
[0050] In a possible implementation, a water quality indicator (e.g., COD) of a water body can be continuously detected by a quantum dot spectrometer at a first preset position to obtain a first water quality indicator sequence. In the example, the first water quality indicator sequence can be expressed as: {(t1,x 1,1 ),(t2,x 1,2 ),(t3,x 1,3 ),…,(t c ,x 1,c ),…}, where c is any positive integer, t c Indicates the cth moment, x 1,c Represents the water quality index measured at the cth moment.
[0051] In step S11 , a first water quality indicator sequence of the water body is determined. In step S12 , it is determined whether the first water quality indicator sequence is abnormal data.
[0052] For example, whether the first water quality indicator sequence is abnormal data can be determined by comparing the first water quality indicator sequence with historical water quality indicator sequences;
[0053] For example, whether the first water quality indicator sequence is abnormal data can be determined by detecting whether there are certain elements in the first water quality indicator sequence that exceed a preset indicator threshold;
[0054] For example, the first water quality indicator sequence may be input into a pre-trained neural network for determining whether data is abnormal, and whether the first water quality indicator sequence is abnormal data may be determined based on an output result of the neural network.
[0055] Exemplarily, whether the first water quality indicator sequence is abnormal data may be determined by detecting whether the distribution data of the first water quality indicator sequence is within a given confidence interval.
[0056] The present disclosure does not limit the specific method for determining whether the first water quality indicator sequence is abnormal data.
[0057] In step S13, when the first water quality indicator sequence is abnormal data, it can be determined whether the alarm triggering condition is met based on the environmental information of the first preset location of the water body and at least one second water quality indicator sequence related to the first water quality indicator sequence.
[0058] The second water quality indicator sequence is determined based on water quality information at a second preset location of the water body, the second preset location being an upstream location and / or a downstream location of the first preset location. The second preset location may be one or more upstream locations, one or more downstream locations, one upstream location and one downstream location, or multiple upstream locations and multiple downstream locations.
[0059] Exemplarily, in the case where the first water quality indicator sequence is abnormal data, if the environmental information of the first preset location of the water body is normal, and, through upstream and downstream correlation analysis, the abnormal data generated at the first preset location (for example, abnormal data corresponding to a certain type of pollution event), as the water quality fluctuates, a second water quality indicator sequence related to the abnormal data can be captured at each second preset location (i.e., the upstream location and / or downstream location of the first preset location), for example, the second water quality indicator sequence may include a second water quality indicator sequence having the same target feature as the abnormal data, it can be determined that the alarm trigger condition is met, and an alarm message is generated in step S14;
[0060] Otherwise, if the environmental information at the first preset location of the water body is abnormal, or if, through upstream and downstream correlation analysis, the second water quality indicator sequence detected at any second preset location is unrelated to the abnormal data generated at the first preset location, for example, if the second water quality indicator sequence is normal, or if the second water quality indicator sequence does not contain the target feature of the abnormal data, then the alarm triggering condition may be determined to be unsatisfied, and the process may be terminated without generating an alarm message in step S14.
[0061] It should be understood that in order to improve alarm efficiency and save computing resources, when abnormal environmental information is detected at the first preset position of the water body, it can be directly judged that the alarm triggering conditions are not met without performing upstream and downstream correlation analysis, that is, the analysis process of the second water quality indicator sequence related to the first water quality indicator sequence is omitted.
[0062] If the judgment result of step S13 is that the alarm triggering condition is met, alarm information may be generated in step S14.
[0063] Exemplarily, the alarm information may include data on various water quality indicators, the current status of water quality, meteorological information of the water area, water temperature indicators, abnormal thresholds of various indicators, water pollution conditions (such as characteristic information such as water pollution time, location, pollution source, pollutants, water pollution level, etc.), pollution prediction information, pollution response measures, etc. The present disclosure does not limit the specific content of the alarm information.
[0064] Exemplarily, the alarm information can be sent to the user's terminal device in the form of text, image, report, voice, video, etc., to remind the user to process the alarm information. The present disclosure does not limit the specific form of the alarm information.
[0065] In this way, abnormal conditions of water bodies (such as water pollution incidents) can be detected in real time. Only when the first water quality indicator sequence of the water body is abnormal data will it be determined whether the alarm triggering conditions are met. During this judgment process, the abnormal environmental information of the water body such as aquatic plants, bottom mud, and aquatic organisms can be identified to reduce false alarms caused by non-water factors interfering with the optical path. By analyzing the associated changes of the second water quality indicator sequence at at least one second preset position (such as upstream and downstream positions) near the first preset position, further confirmation of the abnormal conditions of the water body (such as water pollution incidents) can be performed to improve the accuracy of the alarm and reduce the probability of false alarms.
[0066] The alarm method of the embodiment of the present disclosure is described below.
[0067] In actual applications, taking into account the occasional instantaneous fluctuations in water quality and abnormal value noise in the water environment, in order to more accurately identify abnormal conditions of the water body (such as pollution discharge incidents, etc.), obtain more accurate alarm information, and reduce the probability of false alarms, denoising processing can be performed in step S11 during the process of determining the first water quality indicator sequence based on the water quality information of the water body.
[0068] In a possible implementation, step S11 may include:
[0069] In step S111, an initial water quality indicator sequence to be processed is determined based on water quality information measured at a first preset position of the water body;
[0070] In step S112, the initial water quality indicator sequence is subjected to denoising to obtain a first water quality indicator sequence after denoising.
[0071] For example, Figure 2 A schematic diagram of denoising processing according to an embodiment of the present disclosure is shown as follows: Figure 2 As shown, the horizontal axis t represents the collection time of the initial water quality index sequence, and the vertical axis x represents the water quality index measured at each collection time.
[0072] In step S111, the water quality information of the water flow at the first preset position of the water body can be measured by using a quantum dot spectrometer to obtain an initial water quality index sequence to be processed, that is, Figure 2 The initial water quality index sequence shown on the left side, each point can represent an element in the initial water quality index sequence. The specific method can be referred to above and will not be repeated here.
[0073] Taking into account the jump points in the initial water quality index sequence, such as occasional single elements that are significantly higher or lower than the baseline (such as the mean) of the initial water quality index sequence, most of them are caused by the random influence of environmental debris and do not represent the occurrence of pollution.
[0074] In this regard, in step S111, the initial water quality index sequence is determined, and in step S112, the initial water quality index sequence is subjected to denoising processing to remove instantaneous fluctuation elements and / or abnormal jump point elements in the initial water quality index sequence, such as Figure 2 The elements indicated by the arrows in the middle are the first water quality index sequence after denoising, that is, Figure 2 The initial water quality indicator sequence is shown on the right.
[0075] In this way, a more accurate first water quality indicator sequence can be obtained, which is beneficial to subsequently improving the accuracy of alarms and reducing the probability of false alarms.
[0076] In a possible implementation, step S112 may include: determining the mean of the initial water quality indicator sequence; and removing jump point elements in the initial water quality indicator sequence whose distance from the mean is greater than a preset distance to obtain a first water quality indicator sequence.
[0077] For example, assuming that the initial water quality index sequence can be expressed as {(t1,x 1,1 ),(t2,x 1,2 ),…,(t c ,x 1,c )}, where c is any positive integer, t c Indicates the cth moment, x 1,c Represents the water quality index measured at the cth moment.
[0078] The mean of the initial water quality index sequence can be determined first, that is, Among them, x 1,i Represents the water quality index measured at the i-th moment, where i∈[1,c].
[0079] Then, each element x in the initial water quality index sequence can be calculated separately 1,i and mean The distance between d1 and d c , d1~d cThe first water quality indicator sequence is obtained by selecting the jump point elements that are greater than the preset distance A.
[0080] For example, for any element x in the initial water quality index sequence 1,i , if the element x 1,i and mean distance Element x 1,i For the jump point element, the jump point element x 1,i Eliminate them from the initial water quality index sequence to obtain the first water quality index sequence.
[0081] In this way, the initial water quality indicator sequence can be denoised accurately and efficiently to obtain a more accurate first water quality indicator sequence, which is beneficial to subsequently improving the accuracy of alarms and reducing the probability of false alarms.
[0082] In step S11, a first water quality indicator sequence is obtained. In step S12, it is determined whether the first water quality indicator sequence is abnormal data.
[0083] In a possible implementation, step S12 may include:
[0084] In step S121, a historical water quality index sequence is determined based on historical water quality information measured at a first preset location of the water body;
[0085] In step S122, based on the historical distribution data of the historical water quality index sequence, an interval in the historical distribution data having a confidence probability of belonging to normal data greater than a second preset threshold is determined as a confidence interval, wherein the historical distribution data is fitted data obtained by performing data fitting processing on the historical water quality index sequence;
[0086] In step S123, whether the first water quality indicator sequence is abnormal data is determined based on the distribution data of the first water quality indicator sequence and the confidence interval, where the distribution data is fitting data obtained by performing data fitting processing on the first water quality indicator sequence.
[0087] For example, in step S121, historical water quality information at the first preset location can be obtained according to the actual application scenario. The historical water quality information can be water quality information for a period of time before the current moment (for example, a few hours, a few days, etc.), or it can be water quality information for the same period in previous years. This disclosure does not impose any restrictions on this.
[0088] Among them, historical water quality information can be read by accessing the storage space of the quantum dot spectrometer set at the first preset position, or historical water quality information of the first preset position recorded by other devices (such as a server) can be received. The present disclosure does not limit the method of obtaining historical water quality information.
[0089] After obtaining historical water quality information of the water body at the first preset location, the historical water quality indicators obtained at multiple recorded historical moments may be combined into a historical water quality indicator sequence.
[0090] After the historical water quality index sequence is determined in step S121, in step S122, a data fitting method such as the least squares method is used to perform data fitting processing on the historical water quality index sequence to obtain fitted historical distribution data.
[0091] Data fitting, also known as curve fitting, is a method of mathematically substituting existing discrete data (such as a historical water quality indicator series) into a numerical expression. By fitting the historical water quality indicator series, the resulting historical distribution data can be expressed as a continuous function (i.e., a curve) or a more intensive discrete equation that matches the known historical water quality indicator series in its discrete form.
[0092] Then, a statistical method can be used to analyze the historical distribution data of the historical water quality index series, and the interval in the historical distribution data where the confidence probability of belonging to normal data is greater than a second preset threshold is determined as the confidence interval.
[0093] The second preset threshold may be 0.95, and a 95% confidence interval may be used, ie, a confidence interval corresponding to plus or minus 2 / 3 times the standard deviation. It should be understood that the present disclosure does not limit the size of the second preset threshold.
[0094] After the confidence interval is determined in step S122, in step S123, a data fitting method such as the least squares method may be used to perform data fitting processing on the first water quality indicator sequence to obtain distribution data of the fitted first water quality indicator sequence.
[0095] If the distribution data of the first water quality indicator sequence are all within the confidence interval, the first water quality indicator sequence can be judged as normal data.
[0096] If there is a part in the distribution data of the first water quality index sequence that does not belong to the confidence interval, the first water quality index sequence can be determined as abnormal data;
[0097] In this way, it is possible to efficiently and accurately determine whether the first water quality indicator sequence is abnormal data.
[0098] If it is determined in step S12 that the first water quality indicator sequence is not abnormal data, it means that there is a high probability that no abnormality has occurred in the water body, and the process can be terminated directly without issuing an alarm;
[0099] If in step S12, it is determined that the first water quality indicator sequence is abnormal data, indicating that an abnormal situation may have occurred in the water body (such as a pollution incident), in step S13, it can be determined whether the alarm triggering condition is met based on the environmental information of the first preset position of the water body and at least one second water quality indicator sequence related to the first water quality indicator sequence.
[0100] The second water quality indicator sequence is determined based on water quality information at a second preset position of the water body (eg, an upstream position and / or a downstream position of the first preset position).
[0101] In one possible implementation, step S13 may include: judging whether there is any abnormality in the environment of the first preset position of the water body based on the environmental information of the first preset position of the water body; if the environment of the first preset position of the water body is abnormal, the alarm trigger condition is not met; or, if the environment of the first preset position of the water body is normal, judging whether the alarm trigger condition is met based on the first water quality indicator sequence and at least one second water quality indicator sequence related to the first water quality indicator sequence.
[0102] For example, a quantum dot spectrometer set at a first preset position of a water body can be used to detect environmental information such as aquatic plants, bottom mud, aquatic organisms, etc. in the water body at the first preset position, and determine whether there is any abnormality in the environment of the water body at the first preset position, so as to reduce false alarms caused by non-water factors interfering with the optical path.
[0103] Exemplarily, the abnormality of the first preset position of the water body can be determined based on the environmental information of the first preset position of the water body; when the abnormality of the first preset position of the water body is greater than the first preset threshold, the judgment result is that the environment of the first preset position of the water body is abnormal.
[0104] For example, the first water quality indicator sequence determined in step S11 can be disassembled to obtain environmental information of the first preset location of the water body, such as a sequence of attribute indicators related to the water body environment, such as turbidity and oxygen content. The local maximum of the attribute indicator sequence can be captured, and the captured local maximum can be determined as the abnormality of the first preset location of the water body. The abnormality can then be used to determine whether there is an abnormality in the environment of the first preset location of the water body. If the abnormality of the first preset location obtained is greater than a first preset threshold, the result is that the environment of the first preset location of the water body is abnormal; if the abnormality of the first preset location obtained is less than or equal to the first preset threshold, the result is that the environment of the first preset location of the water body is normal.
[0105] Thus, if a sequence of attribute indicators related to the water environment, such as turbidity and oxygen content, contains a value greater than a first preset threshold, it can be determined that the environmental information at the first preset location of the water body contains sediment and that the environment at the first preset location of the water body is abnormal. Turbidity can be measured in a variety of ways, for example, by determining a turbidity image using spectral information acquired by a spectral image information acquisition component.
[0106] For another example, a quantum dot spectrometer set at a first preset position of a water body can be used to collect spectral data. The spectral data carries spectral image information at the first preset position of the water body. The area (or diameter, radius, etc.) of the largest light spot in the spectral image information can be determined as the abnormality of the first preset position of the water body, and the abnormality is used to determine whether there is an abnormality in the environment of the first preset position of the water body. If the abnormality of the first preset position obtained is greater than a first preset threshold value, the judgment result is that the environment of the first preset position of the water body is abnormal; if the abnormality of the first preset position obtained is less than or equal to the first preset threshold value, the judgment result is that the environment of the first preset position of the water body is normal;
[0107] In this way, if the area (or diameter, radius, etc.) of the maximum light spot is greater than the first preset threshold, it can be determined that the rotten matter produced by aquatic plants and aquatic organisms blocks the lens, and the environment at the first preset position of the water body is abnormal.
[0108] It should be understood that, for different application scenarios, the degree of abnormality can be determined by any carrier data carrying environmental information (such as turbidity, oxygen content, spectral data spot, etc.), or the degree of abnormality can be determined by comprehensively considering multiple carrier data carrying environmental information and performing weighted summation of multiple carrier data carrying environmental information, etc., and the present disclosure does not limit this. Accordingly, different first preset thresholds can be set according to different application scenarios, and the present disclosure does not limit the specific value of the first preset threshold.
[0109] If the environment at the first preset location of the water body is abnormal, it is likely due to the random influence of environmental debris, resulting in an abnormal first water quality indicator sequence. It does not mean that a pollution incident has occurred in the water body and the alarm triggering conditions are not met;
[0110] Alternatively, if the environment at the first preset location of the water body is normal, the random influence of environmental debris can be ruled out. In this case, the pollution event can be further confirmed by analyzing changes in nearby upstream and downstream correlations, based on the first water quality indicator sequence and at least one second water quality indicator sequence related to the first water quality indicator sequence, to determine whether the alarm trigger conditions are met.
[0111] In this way, if the first water quality indicator sequence is determined to be abnormal, an immediate alarm will not be issued. Instead, the system will increase the recognition of abnormal environmental information such as aquatic plants, bottom mud, and aquatic organisms, reducing false alarms caused by non-water factors interfering with the optical path. Furthermore, by analyzing changes in nearby upstream and downstream correlations, the system can further confirm pollution events, reducing the probability of false alarms and improving the accuracy of alarms.
[0112] In one possible implementation, in the process of determining whether the alarm triggering condition is met in step S13, determining whether the alarm triggering condition is met based on the first water quality indicator sequence and at least one second water quality indicator sequence related to the first water quality indicator sequence may include steps S13A to S13C:
[0113] In step S13A, feature extraction is performed on the first water quality indicator sequence to determine a target feature, wherein the target feature is a data feature indicating abnormal changes in the water quality indicator sequences measured at multiple preset locations caused by the same water pollution;
[0114] In step S13B, the predicted time when the target feature appears at the second preset location is determined based on the flow velocity information of the water body and the distance between the first preset location and the second preset location;
[0115] In step S13C, when the target feature is detected in the second water quality indicator sequence and the first moment corresponding to the detection of the target feature in the second water quality indicator sequence is consistent with the predicted moment, the alarm triggering condition is met.
[0116] For example, Figure 3 Schematic diagram showing the upstream and downstream association change analysis according to an embodiment of the present disclosure. Figure 3 As shown, X(t) may represent a first water quality indicator sequence measured at a first preset position, and Q(t) may represent a second water quality indicator sequence measured at a second preset position, where the second preset position may be a position downstream / downstream of the first preset position.
[0117] It should be understood that Figure 3 The second preset position is merely an example and may include multiple upstream and / or downstream points. To improve the accuracy and reliability of the alarm, the second preset position may be configured to include a larger number of points, thereby integrating multiple points to determine whether to trigger an alarm. To improve alarm efficiency, the second preset position may be configured to include one or more points closer to the first preset position to reduce alarm delays caused by contamination conduction. This disclosure does not impose any specific limitations on the second preset position.
[0118] In step S13A, feature extraction can be performed on the first water quality indicator sequence X(t) to determine target features that indicate abnormal changes in water quality indicator sequences measured at multiple preset locations caused by the same water pollution event. For example, after a water pollution event occurs, feature extraction is performed on the first water quality indicator sequence X(t), and the extracted target features are three peaks: (t1, X(t1)), (t2, X(t2)), and (t3, X(t3)).
[0119] Among them, feature extraction methods may include template-based methods, edge-based methods, spatial transformation-based methods, etc.; target features may include water quality index peaks, water quality index troughs, water quality index change rates, etc.; the present disclosure does not limit the categories of feature extraction methods and the categories of extracted target features.
[0120] In step S13B, assuming the water body's flow velocity information v is known and the distance between the first and second preset locations is S, the predicted times at which the target feature, three wave peaks, appear at the second preset location are predicted: (t1+Δt, X(t1+Δt)), (t2+Δt, X(t2+Δt)), and (t3+Δt, X(t3+Δt)), where Δt = S / v. It should be understood that if the water body contains hydraulic structures (e.g., sluice gates and dams), the flow velocity information v will change, and the corresponding pollution transmission rate will also change.
[0121] Among them, if the second preset position is the downstream position of the first preset position, the pollution may be transmitted from the first preset position upstream to the second preset position downstream, and △t is greater than 0; if the second preset position is the upstream position of the first preset position, the pollution may be transmitted from the second preset position upstream to the first preset position downstream, and △t is less than 0. The present disclosure does not limit the size of △t.
[0122] In step S13C, a second water quality index sequence can be measured at a second preset position. If it is detected that the second water quality index sequence has the target characteristics of three peaks, namely (t4, X(t4)), (t5, X(t5)), and (t6, X(t6)); and the first moment t4 of the first peak X(t4) is detected to be consistent with the predicted moment t1+△t, the first moment t5 of the second peak X(t5) is detected to be consistent with the predicted moment t2+△t, and the first moment t6 of the third peak X(t6) is detected to be consistent with the predicted moment t3+△t, it means that the waveforms of the first water quality index sequence and the second water quality index sequence are similar, there is a correlation between the two water quality index sequences, and the alarm triggering condition is met, an alarm information can be generated in step S14. The alarm information can be sent to the user's terminal device in the form of text, image, report, voice, video, etc., to remind the user to process the alarm information. The present disclosure does not limit the specific form of the alarm information.
[0123] On the contrary, if the second water quality indicator sequence measured at the second preset position does not have the target characteristic of three peaks, when the second preset position is the downstream position of the first preset position, it means that the target characteristic at the first preset position is not transmitted to the second preset position downstream, and the alarm triggering condition is not met, and the alarm may not be triggered; when the second preset position is the upstream position of the first preset position, there may be a situation where pollution occurs between the second preset position and the first preset position. An upstream position (or downstream position) closer to the first preset position can be selected to obtain the second water quality indicator sequence, and steps S13A to S13C are re-executed until it is determined that the alarm is triggered, or not triggered.
[0124] Alternatively, although a target feature with three peaks is detected at the second preset position, there is inconsistency between the first moment t4 when the first peak X(t4) is detected and the predicted moment t1+△t, the first moment t5 when the second peak X(t5) is detected and the predicted moment t2+△t, and the first moment t6 when the third peak X(t6) is detected and the predicted moment t3+△t, indicating that the target feature at the second preset position is not transmitted from the first preset position located upstream, the alarm triggering condition is not met, and the alarm is not triggered.
[0125] It should be understood that the embodiments of the present disclosure only take the target feature of three peaks as an example, and the present disclosure does not limit the specific form of the target feature.
[0126] In this way, it is beneficial to further confirm the pollution incident through the analysis of the correlation changes upstream and downstream near the first preset position of the water body (such as the second preset position), so as to reduce the probability of false alarms and improve the accuracy of alarms.
[0127] In summary, the alarm method of the embodiment of the present disclosure can detect abnormal conditions of water bodies (such as water pollution incidents) in real time. Only when the first water quality indicator sequence of the water body is abnormal data will it be determined whether the alarm triggering conditions are met. In this judgment process, the abnormal environmental information of the water body such as aquatic plants, bottom mud, aquatic organisms, etc. can be identified to reduce false alarms caused by non-water factors interfering with the optical path. By analyzing the associated changes of the second water quality indicator sequence at at least one second preset position (such as upstream and downstream positions) near the first preset position, the abnormal conditions of the water body (such as water pollution incidents) can be further confirmed to improve the accuracy of the alarm and reduce the probability of false alarms.
[0128] It is understood that the above-mentioned various method embodiments mentioned in this disclosure can be combined with each other to form combined embodiments without violating the principle logic. Due to space limitations, this disclosure will not go into details. It is understood by those skilled in the art that in the above-mentioned methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.
[0129] In addition, the present disclosure also provides an alarm device, an electronic device, a computer-readable storage medium, and a program, all of which can be used to implement any alarm method provided by the present disclosure. The corresponding technical solutions and descriptions are referred to the corresponding records in the method section and will not be repeated here.
[0130] Figure 4 A block diagram of an alarm device according to an embodiment of the present disclosure is shown as follows: Figure 4 As shown, the device includes:
[0131] a determination module 41 for determining a first water quality indicator sequence of the water body based on water quality information measured at a first preset location of the water body;
[0132] A first judgment module 42 is used to judge whether the first water quality indicator sequence is abnormal data;
[0133] a second judgment module 43, configured to, when the first water quality indicator sequence is abnormal data, judge whether an alarm triggering condition is satisfied based on environmental information at a first preset location of the water body and at least one second water quality indicator sequence related to the first water quality indicator sequence, wherein the second water quality indicator sequence is determined based on water quality information at a second preset location of the water body, the second preset location being an upstream location and / or downstream location of the first preset location;
[0134] The alarm module 44 is configured to generate an alarm message when the alarm triggering condition is met.
[0135] In one possible implementation, the second judgment module 43 is used to: judge whether there is an abnormality in the environment of the first preset location of the water body based on the environmental information of the first preset location of the water body; if the environment at the first preset location of the water body is abnormal, the alarm trigger condition is not met; or, if the environment at the first preset location of the water body is normal, judge whether the alarm trigger condition is met based on the first water quality indicator sequence and at least one second water quality indicator sequence related to the first water quality indicator sequence.
[0136] In one possible implementation, the second judgment module 43 is further used to: determine the abnormality of the first preset position of the water body based on the environmental information of the first preset position of the water body; when the abnormality of the first preset position of the water body is greater than the first preset threshold, the judgment result is that the environment of the first preset position of the water body is abnormal.
[0137] In one possible implementation, the second judgment module 43 is further used to: perform feature extraction on the first water quality indicator sequence to determine a target feature, wherein the target feature is a data feature used to indicate an abnormal change in the water quality indicator sequences measured at multiple preset locations caused by the same water pollution; determine a predicted time when the target feature appears at the second preset location based on the flow rate information of the water body and the distance between the first preset location and the second preset location; and satisfy an alarm triggering condition when the target feature is detected in the second water quality indicator sequence and the first time corresponding to the target feature detected in the second water quality indicator sequence is consistent with the predicted time.
[0138] In one possible implementation, the first judgment module 42 is configured to: determine a historical water quality index sequence based on historical water quality information measured at a first preset location of the water body; determine, based on historical distribution data of the historical water quality index sequence, an interval in the historical distribution data in which the confidence probability of normal data is greater than a second preset threshold as a confidence interval, wherein the historical distribution data is fitted data obtained by performing data fitting processing on the historical water quality index sequence; and determine, based on the distribution data of the first water quality index sequence and the confidence interval, whether the first water quality index sequence is abnormal data, wherein the distribution data is fitted data obtained by performing data fitting processing on the first water quality index sequence.
[0139] In one possible implementation, the determination module 41 is used to: determine an initial water quality indicator sequence to be processed based on water quality information measured at a first preset position of the water body; and perform denoising on the initial water quality indicator sequence to obtain a first water quality indicator sequence after denoising.
[0140] In a possible implementation, the determination module 41 is further used to: determine the mean of the initial water quality indicator sequence; and remove jump point elements in the initial water quality indicator sequence whose distance from the mean is greater than a preset distance to obtain a first water quality indicator sequence.
[0141] In one possible implementation, the water quality indicators include at least one of chemical oxygen demand, turbidity, total phosphorus content, ammonia nitrogen content, permanganate index, total suspended solids, biological oxygen demand, total organic carbon, sulfate content, chloride content, soluble iron content, soluble manganese content, soluble copper content, soluble zinc content, nitrate content, nitrite content, total nitrogen content, fluoride content, selenium content, total arsenic content, total mercury content, total cadmium content, chromium content, total lead content, total cyanide, volatile phenol content, coliform bacteria content, and sulfide content.
[0142] This method has a specific technical connection with the internal structure of the computer system, and can solve the technical problem of how to improve the hardware computing efficiency or execution effect (including reducing the amount of data storage, reducing the amount of data transmission, increasing the hardware processing speed, etc.), thereby obtaining the technical effect of improving the internal performance of the computer system in accordance with the laws of nature.
[0143] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.
[0144] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.
[0145] An embodiment of the present disclosure further proposes an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to call the instructions stored in the memory to execute the above method.
[0146] An embodiment of the present disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0147] The electronic device may be provided as a terminal, a server, or other forms of devices.
[0148] Figure 5A block diagram of an electronic device 800 according to an embodiment of the present disclosure is shown. For example, the electronic device 800 may be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, an in-vehicle device, a wearable device, or other terminal device.
[0149] Reference Figure 5 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0150] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 802 may include one or more modules to facilitate interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
[0151] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0152] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.
[0153] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0154] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0155] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.
[0156] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of components, such as the display and keypad of the electronic device 800. The sensor assembly 814 can also detect changes in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a complementary metal oxide semiconductor (CMOS) or charge coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0157] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as wireless network (Wi-Fi), second generation mobile communication technology (2G), third generation mobile communication technology (3G), fourth generation mobile communication technology (4G), long term evolution (LTE) of universal mobile communication technology, fifth generation mobile communication technology (5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0158] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0159] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 804 including computer program instructions. The computer program instructions can be executed by the processor 820 of the electronic device 800 to perform the above method.
[0160] Figure 6 FIG1 shows a block diagram of an electronic device 1900 according to an embodiment of the present disclosure. For example, the electronic device 1900 can be provided as a server or a terminal device. Figure 6 The electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute the instructions to perform the above-described method.
[0161] The electronic device 1900 may further include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as a Microsoft Server operating system (Windows Server 2003). TM ), a graphical user interface operating system launched by Apple (Mac OS X TM ), a multi-user, multi-process computer operating system (Unix TM ), a free and open source Unix-like operating system (Linux TM ), an open-source Unix-like operating system (FreeBSD TM ) or similar.
[0162] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.
[0163] The present disclosure may be a system, method and / or computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0164] Computer-readable storage media can be a tangible device that can hold and store the instructions used by the instruction execution device. Computer-readable storage media can be, for example, (but not limited to) an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination thereof. Computer-readable storage media used herein is not interpreted as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagated by waveguides or other transmission media (for example, light pulses by fiber optic cables), or electrical signals transmitted by wires.
[0165] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.
[0166] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, and conventional procedural programming languages such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., utilizing an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions. The electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0167] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0168] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0169] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0170] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and the part of the module, program segment or instruction contains one or more executable instructions for realizing the prescribed logical function. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the prescribed function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0171] The computer program product may be implemented in hardware, software, or a combination thereof. In one embodiment, the computer program product is implemented as a computer storage medium. In another embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0172] The above description of the various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced with each other and will not be repeated herein for the sake of brevity.
[0173] Those skilled in the art will understand that in the above-mentioned method of the specific implementation method, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0174] If the technical solution of this application involves personal information, the product that applies the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing personal information. If the technical solution of this application involves sensitive personal information, the product that applies the technical solution of this application has obtained the individual's separate consent before processing sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, a clear and prominent sign is set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that they agree to the collection of their personal information; or on the personal information processing device, when the personal information processing rules are notified by obvious signs / information, the individual's authorization is obtained through pop-up information or by asking the individual to upload their personal information; among which, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.
[0175] While various embodiments of the present disclosure have been described above, the above descriptions are illustrative, non-exhaustive, and not intended to be limiting of the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or improvements to existing technologies, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. An alarm method, characterized in that: include: determining a first water quality indicator sequence of the water body based on water quality information measured at a first preset location of the water body; Determining whether the first water quality indicator sequence is abnormal data; In the case where the first water quality indicator sequence is abnormal data, determining whether the environment at the first preset location of the water body is abnormal based on the environmental information at the first preset location of the water body; If the environment at a first preset location of the water body is abnormal, the alarm triggering condition is not satisfied. If the environment at the first preset location of the water body is normal, determining whether the alarm triggering condition is satisfied based on the first water quality index sequence and at least one second water quality index sequence related to the first water quality index sequence includes: extracting features from the first water quality index sequence to determine a target feature, wherein the target feature is a data feature indicating an abnormal change in water quality index sequences measured at multiple preset locations caused by the same water pollution; determining a predicted time when the target feature will appear at the second preset location based on flow rate information of the water body and the distance between the first preset location and the second preset location; satisfying the alarm triggering condition when the target feature is detected in the second water quality index sequence and the first time corresponding to the detection of the target feature in the second water quality index sequence is consistent with the predicted time; wherein the second water quality index sequence is determined based on water quality information at a second preset location of the water body, the second preset location being an upstream location and / or downstream location of the first preset location; When the alarm triggering condition is met, an alarm message is generated.
2. The method according to claim 1, characterized in that The determining, based on the environmental information of the first preset location of the water body, whether the environment at the first preset location of the water body is abnormal includes: determining, based on environmental information of a first preset location of the water body, a degree of abnormality at the first preset location of the water body; When the abnormality degree of the first preset position of the water body is greater than the first preset threshold, the judgment result is that the environment of the first preset position of the water body is abnormal.
3. The method according to claim 1 or 2, characterized in that The determining whether the first water quality indicator sequence is abnormal data includes: determining a historical water quality indicator sequence based on historical water quality information measured at a first preset location of the water body; determining, based on historical distribution data of the historical water quality indicator sequence, an interval in the historical distribution data having a confidence probability of belonging to normal data greater than a second preset threshold as a confidence interval, wherein the historical distribution data is fitted data obtained by performing data fitting processing on the historical water quality indicator sequence; Whether the first water quality indicator sequence is abnormal data is determined based on the distribution data of the first water quality indicator sequence and the confidence interval, wherein the distribution data is fitting data obtained by performing data fitting processing on the first water quality indicator sequence.
4. The method according to claim 1 or 2, characterized in that Determining a first water quality indicator sequence of the water body based on water quality information measured at a first preset location of the water body includes: determining an initial water quality indicator sequence to be processed based on water quality information measured at a first preset location of the water body; The initial water quality indicator sequence is subjected to denoising processing to obtain a first water quality indicator sequence after denoising processing.
5. The method according to claim 4, characterized in that The denoising process is performed on the initial water quality indicator sequence to obtain a first water quality indicator sequence after denoising, comprising: Determining the mean of the initial water quality indicator sequence; The jump point elements in the initial water quality indicator sequence whose distance from the mean is greater than a preset distance are eliminated to obtain a first water quality indicator sequence.
6. The method according to claim 1 or 2, characterized in that The water quality indicators include at least one of chemical oxygen demand, turbidity, total phosphorus content, ammonia nitrogen content, permanganate index, total suspended solids, biological oxygen demand, total organic carbon, sulfate content, chloride content, soluble iron content, soluble manganese content, soluble copper content, soluble zinc content, nitrate content, nitrite content, total nitrogen content, fluoride content, selenium content, total arsenic content, total mercury content, total cadmium content, chromium content, total lead content, total cyanide, volatile phenol content, coliform bacteria content, and sulfide content.
7. An alarm device, characterized in that: include: a determination module, configured to determine a first water quality indicator sequence of the water body based on water quality information measured at a first preset position of the water body; A first judgment module, configured to judge whether the first water quality indicator sequence is abnormal data; a second judgment module, configured to judge whether the environment at the first preset location of the water body is abnormal based on the environmental information at the first preset location of the water body when the first water quality indicator sequence is abnormal data; If the environment at a first preset location of the water body is abnormal, the alarm triggering condition is not satisfied. If the environment at the first preset location of the water body is normal, determining whether the alarm triggering condition is satisfied based on the first water quality index sequence and at least one second water quality index sequence related to the first water quality index sequence includes: extracting features from the first water quality index sequence to determine a target feature, wherein the target feature is a data feature indicating an abnormal change in water quality index sequences measured at multiple preset locations caused by the same water pollution; determining a predicted time when the target feature will appear at the second preset location based on flow rate information of the water body and the distance between the first preset location and the second preset location; satisfying the alarm triggering condition when the target feature is detected in the second water quality index sequence and the first time corresponding to the detection of the target feature in the second water quality index sequence is consistent with the predicted time; wherein the second water quality index sequence is determined based on water quality information at a second preset location of the water body, the second preset location being an upstream location and / or downstream location of the first preset location; The alarm module is used to generate alarm information when the alarm triggering condition is met.
8. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Pollution detection method and device, electronic equipment and storage medium
CN113252582A
Flow detection method and device, electronic equipment and storage medium
CN113358164A