Water quality data analysis system and analysis method based on Lora format
By adopting a Lora-based water quality data analysis system in the water quality monitoring system, the water quality collection terminal conducts preliminary analysis and reconfigures the frequency, solving the problem of untimely water quality monitoring and high pressure on monitoring platform analysis in the existing system, achieving more efficient water quality monitoring and early warning.
Patent Information
- Application Number
- CN202411389643.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-10-08
AI Technical Summary
Due to the high power consumption and high cost problems of the GSM system, the existing water quality monitoring system has failed to timely monitor water quality and untimely flood warnings. The monitoring platform has huge analytical pressure, which is prone to insufficient computing resources, resulting in analysis delays or downtime.
The water quality data analysis system based on the Lora system is adopted, which includes a water quality acquisition terminal and a server. The water quality acquisition terminal performs water quality analysis through the main controller, and reconfigures the collection and upload frequency based on the analysis results, and sends data to the server through the Lora communication mode. , reduce the analysis pressure on the server.
The preliminary analysis of the water quality collection terminal itself is reduced, the analysis pressure of the server is improved, the timeliness and accuracy of water quality monitoring is improved, and the problems of untimely water quality monitoring and untimely flood warning are avoided.
Smart Images

Figure CN118883879B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a water quality data analysis system and analysis method based on the Lora format. Background Art
[0002] Water is the source of human life, but with the development of cities, water pollution is becoming more and more serious. Water resource supervision and management have become a major problem in urban development. Failure to monitor water quality and flood warnings in a timely manner is directly related to people's livelihood issues. The development of smart water services can solve these problems in a timely and accurate manner.
[0003] For water quality monitoring, water quality collection terminals need to be deployed in the water area to conduct all-weather water quality monitoring and upload the collected water quality data to the monitoring platform. Multiple water quality collection terminals are usually deployed in the same water area.
[0004] Most of the water quality collection terminals today use the GSM wireless transmission system to transmit the collected information to the monitoring platform deployed on the background server through the public network. For example, the intelligent aquaculture monitoring system disclosed in patent CN104808551A uses GSM communication to transmit the relevant water quality data collected by the sensor to the workstation for analysis. However, the GSM system has problems such as high power consumption and high cost.
[0005] With the trend of shutting down 2G and 3G network base stations in my country, some improvements are made by using Lora communication, which has the advantages of low cost and low power consumption and is applied to water quality collection terminals. For example, as disclosed in patents CN113110211A and CN115327059A, the water quality monitoring node and the Internet of Things monitoring platform use LoRa communication technology for data exchange, and the water quality data collected by the sensor is uploaded to the Internet of Things monitoring platform for analysis.
[0006] However, in the process of using low-cost water quality collection terminals to monitor and process water quality, the data detected by the sensors are usually uploaded directly to the monitoring platform, which receives the data uploaded by the water quality collection terminals arranged in multiple water areas for global analysis. Due to the huge analysis pressure on the monitoring platform, it is easy for the computing resources to be insufficient, resulting in analysis delays or even downtime of the monitoring platform, and there is a risk of untimely water quality monitoring and untimely flood warning. Summary of the invention
[0007] The purpose of this application is to provide a water quality data analysis system and analysis method based on the Lora format to solve the above problems.
[0008] In a first aspect of the present application, a water quality data analysis system based on the Lora format is provided, the system comprising a first water quality collection terminal and a server, the first water quality collection terminal comprising a main controller, and a sensor unit, a storage unit and a Lora communication unit electrically connected to the main controller respectively;
[0009] The sensor unit is used to collect water quality simulation signals in the environment according to the latest configured collection frequency, and send the water quality simulation signals to the main controller;
[0010] The main controller is used to digitally analyze the water quality analog signal to form water quality digital data, perform a first water quality analysis based on the water quality digital data, reconfigure the acquisition frequency and the upload frequency according to the first analysis result, and send the water quality digital data and the first analysis result to the storage unit for storage;
[0011] The Lora communication unit is used to send the stored water quality digital data and the first analysis result to the server through the Lora communication mode according to the latest configured upload frequency;
[0012] The server is used to receive the water quality digital data and the first analysis result, and determine whether to perform a second analysis on the water quality digital data according to the first analysis result.
[0013] Optionally, the water quality digital data includes water quality original data and water quality first corrected data; the main controller is further used to digitally analyze the water quality analog signal to form water quality original data, and correct the water quality original data according to the latest preset correction function to form water quality first corrected data;
[0014] The server is used to correct the original historical data set according to a preset correction model to form a corrected historical data set, fit the original historical data set with the corrected historical data set to form the correction function, and send the correction function to the main controller. The original historical data set is a collection of historically received original water quality data.
[0015] Optionally, the main controller is further used to analyze the numerical interval of the water quality digital data, and obtain the first analysis result according to the numerical interval;
[0016] The Lora communication unit is further configured to send the first water quality correction data and the first analysis result to the server when the first analysis result indicates that the water quality is normal, and to send the first analysis result, the water quality original data and the first water quality correction data to the server when the first analysis result indicates that the water quality is suspected to be abnormal; and to send the first analysis result and the water quality original data to the server when the first analysis result indicates that the water quality is abnormal;
[0017] The server is further configured to determine a numerical interval corresponding to each analysis result, and send the numerical interval to the main controller.
[0018] Optionally, the server is also used to, when the first analysis result indicates that the water quality is normal, not conduct the second analysis; when the first analysis result indicates that the water quality is suspected to be abnormal or the water quality is abnormal, correct the received original water quality data based on a preset correction model to form second corrected water quality data; perform a second water quality analysis based on the corrected second water quality data to obtain a second analysis result; when the first analysis result indicates that the water quality is suspected to be abnormal, compare the difference between the first corrected water quality data and the second corrected water quality data, and determine whether to adjust the correction function based on the difference.
[0019] Optionally, the server is further configured to adjust the correction function when the difference exceeds a preset difference threshold, and send the adjusted correction function to the main controller.
[0020] Optionally, the main controller is further used to update the acquisition frequency to the first acquisition frequency and the upload frequency to the first upload frequency when the first analysis result indicates that the water quality is normal; when the first analysis result indicates that the water quality is suspected to be abnormal, update the acquisition frequency to a second acquisition frequency greater than the first acquisition frequency and update the upload frequency to a second upload frequency greater than the first upload frequency; when the first analysis result indicates that the water quality is abnormal, update the acquisition frequency to a third acquisition frequency greater than the second acquisition frequency and update the upload frequency to a third upload frequency greater than the second upload frequency;
[0021] The server is further configured to perform a second analysis based on the water quality digital data collected by the second water quality collection terminal to obtain a second analysis result, generate frequency adjustment information based on the second analysis result, and send the frequency adjustment information to the Lora communication unit;
[0022] The Lora communication unit is used to send the frequency adjustment information to the main controller, and the main controller adjusts the acquisition frequency and / or upload frequency based on the frequency adjustment information.
[0023] Optionally, the main controller is further configured to compress the water quality digital data according to a first compression model when the first analysis result indicates that the water quality is normal, compress the water quality digital data according to a second compression model with a compression rate lower than that of the first compression model when the first analysis result indicates that the water quality is suspected to be abnormal, and compress the water quality digital data according to a third compression model with a compression rate lower than that of the second compression model when the first analysis result indicates that the water quality is abnormal;
[0024] The Lora communication unit is also used to send the compressed water quality digital data stored in the storage unit to the server.
[0025] Optionally, the sensor unit includes a water temperature sensor and one or more of a pH sensor, a dissolved oxygen sensor and a turbidity sensor;
[0026] The water quality original data includes water temperature data, and also includes one or more of pH value original data, dissolved oxygen original data and turbidity original data; the water quality first corrected data includes one or more of pH value first corrected data, dissolved oxygen first corrected data and turbidity first corrected data;
[0027] The main controller is also used to correct one or more of the pH value original data, dissolved oxygen original data and turbidity original data according to the water temperature data and the correction function to form the first corrected water quality data.
[0028] In a second aspect of the present application, a water quality data analysis method based on the Lora format is provided, which is applied to a water quality collection terminal, and the method comprises:
[0029] Acquire water quality simulation signals in the environment collected according to the latest configured collection frequency;
[0030] Digitally analyzing the water quality analog signal to form water quality raw data, correcting the water quality raw data according to the latest preset correction function to form first water quality corrected data, performing a first water quality analysis based on the water quality digital data, and reconfiguring the acquisition frequency and the upload frequency according to the first analysis result, storing the water quality digital data and the first analysis result, wherein the water quality digital data includes the water quality raw data and the first water quality corrected data;
[0031] sending the stored digital water quality data and the first analysis result to the server via the Lora communication mode according to the latest configured upload frequency;
[0032] A correction function and response information for the first analysis result sent by a server are received, wherein the response information indicates information that the server determines whether to conduct a second analysis on the water quality digital data based on the first analysis result. The server corrects the original historical data set according to a preset correction model to form a corrected historical data set, fits the original historical data set with the corrected historical data set to form a correction function, and sends the formed correction function to the main controller, wherein the original historical data set is a collection of historically received original water quality data.
[0033] Optionally, performing a first water quality analysis based on the water quality digital data, reconfiguring a collection frequency and an upload frequency according to a first analysis result, and storing the water quality digital data and the first analysis result includes:
[0034] When the first analysis result indicates that the water quality is normal, the acquisition frequency is updated to the first acquisition frequency, and the upload frequency is updated to the first upload frequency;
[0035] When the first analysis result indicates that the water quality is suspected to be abnormal, the acquisition frequency is updated to a second acquisition frequency greater than the first acquisition frequency, and the upload frequency is updated to a second upload frequency greater than the first upload frequency;
[0036] When the first analysis result indicates that the water quality is abnormal, the acquisition frequency is updated to a third acquisition frequency greater than the second acquisition frequency, and the upload frequency is updated to a third upload frequency greater than the second upload frequency;
[0037] The response information includes frequency adjustment information. The server performs a second analysis based on the water quality digital data collected by the second water quality collection terminal to obtain a second analysis result, and generates the frequency adjustment information based on the second analysis result.
[0038] The water quality data analysis system and analysis method based on the Lora format in the present application conducts a first water quality analysis through the main controller of the water quality collection terminal itself, so that the water quality collection terminal can preliminarily determine whether the water quality is normal. The server can obtain the preliminary analysis results of the water quality collection terminal and determine whether further analysis is needed based on the preliminary analysis results, thereby eliminating the need to give all water quality analysis work to the server, reducing the analysis pressure on the server. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope of the present application.
[0040] Figure 1 A schematic diagram of an application scenario of a water quality data analysis system based on the Lora format in an embodiment;
[0041] Figure 2 This is a schematic diagram of the structure of a water quality collection terminal in one embodiment;
[0042] Figure 3 Schematic diagram of the process of a water quality data analysis method based on the Lora format in one embodiment. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0044] All terms (including technical and scientific terms) used in this application have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used here should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0045] For example, the terms "first", "second", etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first water quality collection terminal may be referred to as a second water quality collection terminal, and similarly, a second water quality collection terminal may be referred to as a first water quality collection terminal. Both the first water quality collection terminal and the second water quality collection terminal are water quality collection terminals, but they are not the same water quality collection terminal.
[0046] For another example, the terms “include”, “comprising”, etc. used in this application indicate the existence of features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0047] This application provides a water quality data analysis system based on the Lora format, which can be applied to Figure 1 In the environment shown. Combined Figure 1As shown, the system includes a server 200 and a plurality of water quality collection terminals, and the water quality collection terminal belongs to a corresponding monitoring node in the system. Each water quality collection terminal is used for the water quality information in the environment in which it is located, and performs a preliminary analysis on the water quality information to obtain the corresponding preliminary analysis result (i.e., the first analysis result), and sends the preliminary analysis result and the water quality information to the server. The server determines whether it is necessary to perform an in-depth analysis (i.e., the second analysis) on the water quality information by receiving the preliminary analysis result. Among them, the water quality collection terminal includes a first water quality collection terminal 100 and a plurality of second water quality collection terminals 300, and some of the second water quality collection terminals 200 are arranged in the same water area as the first water quality collection terminal. Each water quality collection terminal includes a main controller and a sensor unit, a storage unit, and a Lora communication unit electrically connected thereto.
[0048] Combination Figure 1 and Figure 2 As shown, the first water quality collection terminal includes a main controller 110, and a sensor unit 120, a storage unit 130 and a Lora communication unit 140 which are all electrically connected to the main controller.
[0049] The sensor unit may include one or more sensors for detecting water quality in the environment, including but not limited to one or more of a water temperature sensor, a pH sensor, a dissolved oxygen sensor, a turbidity sensor, etc. Specifically, it may include a water temperature sensor, and may also include one or more of a pH sensor, a dissolved oxygen sensor, a turbidity sensor, etc. For example Figure 2 As shown, the sensor unit includes four types: water temperature sensor, pH value sensor, dissolved oxygen sensor, and turbidity sensor. Optionally, other sensors may be included as needed, such as an ultraviolet sensor.
[0050] Each sensor in the sensor unit is used to measure corresponding water quality data, which specifically includes water temperature data measured by a water temperature sensor, and also includes one or more of pH data measured by a pH sensor, dissolved oxygen data measured by a dissolved oxygen sensor, and turbidity data measured by a turbidity sensor.
[0051] The water quality data measured by one or more sensors in the sensor unit is analog signal data, which is measured regularly according to the acquisition frequency set by the main controller, and the measured water quality analog signal is uploaded to the main controller, which converts the analog signal into a digital signal to form corresponding water quality digital data. Specifically, the water quality analog signal includes one or more of a water temperature signal, a pH value signal, a dissolved oxygen signal, and a turbidity signal.
[0052] The main controller can be specifically NXP's KL26 processor, with an operating power consumption as low as 40uA / MHz. The chip has 128KB FLASH memory and 16KB SRAM, which are used for program code storage and operation. The main controller is connected to the sensor unit through the 485 interface, and exchanges commands and data with the Lora wireless communication unit and storage unit through the SPI interface.
[0053] The storage unit can be a large-capacity flash chip with a W25Q128 spi interface, which is used to store the information collected by the sensor and the configuration data of the collection device. The main controller is connected to the four sensors through the 485 interface. The sensor collection includes the pH value of the measured liquid, the measured liquid temperature, the dissolved oxygen concentration in the measured liquid and the liquid turbidity.
[0054] The Lora wireless communication unit can be Semtech's SX1276 wireless module, which is responsible for communicating with the Lora gateway through the Lora standard and ultimately uploading relevant data to the server through the Lora gateway, interacting with the server, and receiving information sent by the server.
[0055] In one embodiment, the water quality collection terminal also includes basic module circuits such as a power supply module, an oscillation circuit, and a reset circuit.
[0056] The water quality collection terminal will be initialized during the power-on process, mainly including on-chip peripheral initialization and off-chip peripheral initialization. On-chip peripheral initialization includes UART peripheral initialization, SPI peripheral initialization, watchdog initialization, and timer initialization. UART peripheral initialization mainly configures baud rate register, control register and clear status register; SPI peripheral initialization mainly configures baud rate register, control register and clear status register; watchdog initialization mainly configures watchdog configuration register; timer initialization mainly configures timing period register. Off-chip peripheral initialization includes FLASH chip initialization, RS485 chip initialization, and 4 types of sensor initialization. After completing the initialization work, the water quality collection terminal reads various configuration information from the FLASH chip, including automatic collection timing time, water temperature alarm threshold, pH value alarm threshold, dissolved oxygen alarm threshold, turbidity alarm threshold, etc., and sends the configuration information to the SX1276 chip through the SPI interface to establish hardware interrupt pin mapping, wireless radio frequency and other parameter configurations. And establish a connection with the Lora gateway to establish a data and command data channel with the Lora gateway. After that, the main control chip configures the registers through software to enter a low-power state and waits for the command sent by the background server or the automatic collection timer to expire. When a Lora gateway command is received, the command data (such as the response information sent by the server mentioned in this application) will first enter the SX1276 wireless module. The main controller will sense the notification of the SX1276 wireless module through the hardware interrupt pin and complete the parsing command after the terminal exits the low-power state. According to different commands, different actions are completed, such as reconfiguring the automatic collection time (or collection frequency), upload time (or upload frequency), and manually performing sensor collection actions. After executing the corresponding actions, the relevant registers are reconfigured by software to make the terminal enter a low-power state. When the automatic collection timer expires, the terminal exits the low-power state and controls the sensor to collect various water quality data through the RS485 interface or ADC interface, and performs a first analysis on the water quality data, and sends the collected information and the first analysis results to the Lora gateway through the SX1276 module, and then re-enters the terminal low-power state.
[0057] The sensor unit is used to collect the water quality simulation signal in the environment according to the latest configured collection frequency, and send the water quality simulation signal to the main controller. The latest configured collection frequency can be the latest frequency automatically adjusted and set by the main controller, or the latest collection frequency sent by the received server. The main controller uses a timer to count according to the configured collection frequency. When the collection time corresponding to the collection frequency is reached, the collection signal is sent to the corresponding sensor unit. After receiving the signal, the sensor unit starts to collect the water quality simulation signal in the environment and transmits the signal to the main controller.
[0058] The corresponding data collected by one or more sensors in the sensor unit is analog signal data. By collecting the analog signal data, the collection cost is made lower, and the main controller analyzes the analog signal to improve the accuracy of the analysis.
[0059] The main controller is used to digitally analyze the water quality analog signal to form water quality digital data, perform a first water quality analysis based on the water quality digital data, reconfigure the acquisition frequency and upload frequency according to the first analysis result, and send the water quality digital data and the first analysis result to the storage unit for storage.
[0060] When storing the digital water quality data, the collection time corresponding to the digital water quality data is also stored, and the digital water quality data and the collection time form corresponding time series data (or data pairs) for storage. The digital water quality data and the collection time collected by the sensor at each time can form a corresponding time series data sequence.
[0061] In this embodiment, after receiving the water quality simulation signal, the main controller can carry out the first analysis in real time, or it can first store the water quality simulation signal in a storage unit, and then analyze it according to the configured analysis frequency. For example, when the built-in timer reaches the analysis time, all water quality simulation signals that have not been analyzed are extracted from the storage unit, and the extracted water quality simulation signals are subjected to a first analysis to obtain a first analysis result. By setting the acquisition frequency, analysis frequency, and upload frequency, the acquisition device can be kept in a low power consumption state when it is not in the acquisition time, the upload time, or the analysis time, thereby increasing the service life of the acquisition device.
[0062] Specifically, the water quality analog signal can be first converted into water quality digital data, and the water quality digital data can be subjected to a first analysis to obtain a first analysis result. The first analysis is an analysis of the water quality digital data by the main controller, which is used to analyze whether the measured water quality is normal. The first analysis result indicates the analysis result of whether the water quality is normal obtained by the main controller. The analysis results can be divided into multiple types according to different standards, such as analysis results of excellent water quality, good water quality, general water quality, poor water quality, etc., or can be divided into analysis results of normal water quality, abnormal water quality, and suspected abnormal water quality between normal water quality and abnormal water quality. The main controller is also provided with a corresponding first analysis result judgment standard, and the corresponding first analysis result can be determined by comparing the water quality digital data with the judgment standard. After obtaining the first analysis result, one or more of the appropriate upload frequency, analysis frequency, and subsequent acquisition frequency can be determined according to the first analysis result.
[0063] The main controller or the storage unit is configured with a correspondence between different first analysis results and one or more of the acquisition frequency, upload frequency, and analysis frequency. Based on the correspondence, a frequency value of one or more of the acquisition frequency, upload frequency, and analysis frequency suitable for the current first analysis result can be determined and updated. The correspondence can be a corresponding correspondence table, and the main controller can find the frequency value corresponding to the first analysis result from the correspondence table in the storage unit or its own cache, and configure the found value as a new acquisition frequency, upload frequency, and / or analysis frequency.
[0064] When the main controller performs the first analysis, it can read the first analysis result of the previous time or the previous times, and compare the current first analysis result with the first analysis result of the previous time. If the two are the same, the corresponding acquisition frequency, upload frequency and analysis frequency are kept the same; if the first analysis result indicates that the water quality has deteriorated, one or more of the acquisition frequency, upload frequency and / or analysis frequency can be increased; if the first analysis result indicates that the water quality has improved, one or more of the acquisition frequency, upload frequency and / or analysis frequency can be decreased. This allows the acquisition terminal to adjust the acquisition or upload frequency according to the water quality.
[0065] In one embodiment, the acquisition frequency>analysis frequency≥upload frequency. Thus, before the main controller carries out analysis, the sensor unit can collect multiple water quality simulation signals at different times after the last analysis for analysis by the main controller; and the main controller can carry out one or more analyses before reaching a new upload time, thereby obtaining the first analysis results at different time periods during two data uploads.
[0066] For example, when the first analysis result indicates that the water quality is normal, the determined collection frequency is once every 10 minutes, the analysis frequency is once every 2 hours, and the upload frequency is once every 24 hours; when the first analysis result indicates that the water quality is suspected to be abnormal, the determined collection frequency is once every 5 minutes, the analysis frequency is once every 2 hours, and the upload frequency is once every 6 hours; when the first analysis result indicates that the water quality is abnormal, the determined collection frequency is once every 1 minute, the analysis frequency is once every 0.5 hours, and the upload frequency is once every 2 hours.
[0067] Furthermore, when the corresponding upload frequency is updated, the corresponding upload time continues to be accumulated from the time of the last upload, rather than restarting the timing. If the time interval from the last upload moment to the current moment has reached or even exceeded the latest upload frequency requirement, data upload is performed immediately; otherwise, the timing continues, and data upload is performed when the time corresponding to the latest upload frequency is reached. For example, if the time interval from the last upload moment to the current moment is 3 hours, if the latest upload frequency is updated to once every 2 hours, data upload is performed immediately; if the latest upload frequency is updated to once every 6 hours, time accumulation continues, and data upload is performed after 3 hours.
[0068] The Lora communication unit is used to send the stored water quality digital data and the first analysis result to the server through the Lora communication mode according to the latest configured upload frequency.
[0069] Based on the latest upload frequency set, when the corresponding upload time is reached, the main controller notifies the Lora communication unit to obtain the water quality digital data and the first analysis result and other information that need to be uploaded (for example, not yet uploaded) from the storage unit, and sends the information to the server through the Lora communication mode. By adopting Lora communication, low-power transmission of the above information can be achieved.
[0070] The server is used to receive the water quality digital data and the first analysis result, and determine whether to perform a second analysis on the water quality digital data according to the first analysis result.
[0071] After receiving the data uploaded by the water quality collection terminal and the first analysis result, the server can determine whether further analysis is needed and send response information to the water quality collection terminal.
[0072] Specifically, when the first analysis result indicates that the water quality is normal, there is no need to perform a second analysis; if the water quality is abnormal, the server can perform a second analysis and perform corresponding processing based on the second analysis result.
[0073] The water quality data analysis system based on the Lora format in the present application performs the first water quality analysis through the main controller of the water quality collection terminal itself, so that the water quality collection terminal can preliminarily determine whether the water quality is normal. The server can obtain the preliminary analysis results of the water quality collection terminal and determine whether further analysis is needed based on the preliminary analysis results, thereby eliminating the need to give all water quality analysis work to the server, reducing the analysis pressure on the server.
[0074] In one embodiment, the main controller is also used to analyze the numerical range of the water quality digital data and obtain a first analysis result based on the numerical range; the server is also used to determine the numerical range corresponding to each analysis result and send the numerical range to the main controller.
[0075] Among them, the server sets the numerical intervals corresponding to different water qualities and sends the numerical intervals to the water quality collection terminal. The water quality collection terminal performs a first analysis on the water quality digital data, determines the numerical interval in which the water quality digital data is located, and determines the first analysis result according to the numerical interval. For example, when the collected water quality data includes multiple copies, the water quality digital data can be subjected to mathematical statistical analysis to calculate a corresponding comprehensive water quality data, determine the numerical interval in which the comprehensive water quality data falls, and thus obtain the first analysis result. The comprehensive water quality data can be any suitable statistical data such as the average value or median of each water quality digital data. For example, when the water quality digital data includes water temperature data, pH value data, dissolved oxygen data and turbidity data, the comprehensive water temperature data, comprehensive pH value data, comprehensive dissolved oxygen data and comprehensive turbidity data are calculated respectively, and the corresponding numerical interval is determined based on the comprehensive water quality data of the four dimensions.
[0076] In one embodiment, the numerical range into which each piece of water quality digital data falls can also be calculated respectively, and the corresponding first analysis result can be finally determined according to the numerical range into which each piece of water quality digital data falls.
[0077] For example, the numerical range for normal water quality is: water temperature is 15℃~25℃, pH value is 6.8~8.1, dissolved oxygen is greater than 5.5mg / L, and turbidity is less than 4.5NTU (Nephelometric Turbidity Units). The numerical range for suspected abnormal water quality is: water temperature is 10℃~15℃, or 25℃~30℃, or pH value is 6.3~6.8, or 8.1~8.5, or dissolved oxygen is 4.5mg / L~5.5mg / L; or turbidity is 4.5NTU~5.5NTU. If it does not belong to any of the above ranges, it is judged to be abnormal water quality.
[0078] In one embodiment, the water quality digital data includes water quality original data and water quality first corrected data; the main controller is also used to digitally analyze the water quality analog signal to form water quality original data, and correct the water quality original data according to the preset latest correction function to form water quality first corrected data; the server is used to correct the original historical data set according to the preset correction model to form a corrected historical data set, fit the original historical data set with the corrected historical data set to form a correction function, and send the correction function to the main controller, the original historical data set is a collection of historically received water quality original data.
[0079] Among them, the data collected by one or more sensors in the sensor unit have certain deviations. Taking the water quality raw data including water temperature raw data, dissolved oxygen raw data, pH value raw data and turbidity raw data as an example, at different water temperatures, the dissolved oxygen raw data measured by the dissolved oxygen sensor, the pH value raw data measured by the pH value sensor, and the turbidity raw data measured by the turbidity sensor all have certain deviations compared with the actual situation in the environment.
[0080] Based on this, the server can pre-set a training sample set and a verification sample set. The data in the two sample sets include the original water quality data set measured by each sensor in the sensor unit in different environments and the real water quality data set corresponding to the environment. These data can be obtained through laboratory experiments, field measurements or historical data collection. The correction model to be constructed is trained according to the training sample set, and the trained correction model is verified by the verification sample set, so as to finally obtain the corresponding correction model. After the original water quality data measured by the sensor is corrected according to the correction model, it can be closer to the corresponding real data.
[0081] Among them, the server side maintains an original historical data set, which contains multiple copies of water quality raw data uploaded by the first water quality collection terminal in the recent period. The server regularly or on demand modifies this data set to form a modified historical data set. By comparing the original historical data set and the modified historical data set, the server can fit a correction function and send it to the main controller of the first water quality collection terminal. In this way, the main controller can use the latest correction function to correct the raw water quality data collected in real time to improve the accuracy of the data. Among them, when the server generates the correction function for the first time, it can combine the above-mentioned real water quality data as the historical original historical data set, and combine the real water quality data as the corresponding modified historical data set, so as to fit the corresponding correction function for the first time and send it to the main controller.
[0082] As water quality monitoring continues, the server will continue to receive new raw water quality data and update the original historical data set accordingly. Through continuous fitting analysis, the server can continuously optimize the correction function to ensure that the correction of water quality data is always based on the latest and most accurate information.
[0083] Optionally, the correction function may be one or more of a linear correction function, a polynomial correction function, a nonlinear correction function (such as a power function, an exponential function), a piecewise correction function, etc. Different water quality sensors construct different correction functions according to the different environments in which they are located. For example, the correction function corresponding to the pH sensor may be a linear correction function based on temperature, the correction function corresponding to the dissolved oxygen sensor and the turbidity sensor may be a first piecewise correction function based on temperature, and the correction function corresponding to the turbidity sensor may be a second piecewise correction function based on temperature. When the server optimizes the correction function, it may optimize the coefficients of the function so that the first corrected water quality data obtained based on the optimized correction function is closer to the real water quality data.
[0084] In one embodiment, the correction model used in the server may be a neural network model, specifically, a BP neural network model optimized based on a genetic algorithm. The training process is as follows:
[0085] 1) Data preprocessing, including data cleaning and data normalization. Remove outliers and missing values in the training sample set to ensure the integrity and accuracy of the data; normalize the original data and real data to make the data in the same dimension range.
[0086] 2) Construct BP neural network. According to the characteristics of the data and the correction requirements, determine the number of nodes in the input layer, hidden layer and output layer of the BP neural network; use genetic algorithm to optimize the initial weight and threshold of the BP neural network to obtain a better initial state.
[0087] 3) Model training: Use genetic algorithm to optimize BP neural network. Forward propagation: Input the original water quality data in the training sample set into the BP neural network, and obtain the predicted water quality data through the network calculation; Calculate the error: Compare the predicted water quality data with the real water quality data and calculate the error; Backward propagation: Calculate the gradient according to the error, and update the weight and threshold of the network through the gradient descent method to reduce the error; Iterative training: Repeat the process of forward propagation, error calculation and back propagation until the predetermined number of training rounds is reached or the error meets the requirements.
[0088] 4) Genetic algorithm optimization. Population initialization: Use real number coding to encode the weights and thresholds of each layer of the BP neural network into a real number string to form an individual; construct a fitness function: According to the initial weights and thresholds of the individual, use the training data to train the BP network, and use the sum of squares of the errors as the fitness of the individual to determine the position of the individual in the population; repeat the selection, crossover and mutation process until the predetermined number of optimization rounds is reached or the fitness meets the requirements. After the iteration is completed, the optimal weights and thresholds are output, and the weights and thresholds are used as the weights and thresholds in the BP neural network, and the error calculation in the above step 3 is performed.
[0089] Among them, the selection operation is to select excellent individuals (i.e., the combination of network weight and threshold) according to the fitness function. Specifically, the roulette method is used as the selection strategy to select individuals from the old group to the new group with a certain probability. The probability of individual i being selected is p i for: , Fi represents the fitness value of individual i, N represents the total number of individuals in the population, and k is the proportional coefficient; crossover operation: perform crossover operation on the selected excellent individuals to generate new individuals; mutation operation: perform mutation operation on the newly generated individuals to increase diversity.
[0090] 5) Model verification. Use the verification sample set to verify the trained modified model and evaluate the performance of the model. Specifically, the mean square error (MSE), root mean square error (RMSE), and coefficient of determination (R 2 ) and other evaluation indicators for verification. If the performance of the model meets the requirements, it can be deployed to the server for actual water quality data correction. If it does not meet the performance requirements, the above model training and genetic algorithm optimization steps are returned to make the final correction model meet the performance requirements.
[0091] In one embodiment, the Lora communication unit is also used to send the first corrected water quality data and the first analysis result to the server when the first analysis result indicates that the water quality is normal; and to send the first analysis result, the original water quality data and the first corrected water quality data to the server when the first analysis result indicates that the water quality is suspected to be abnormal; and to send the first analysis result and the original water quality data to the server when the first analysis result indicates that the water quality is abnormal.
[0092] In this embodiment, the real level of water quality can be divided into two types, including normal water quality and abnormal water quality. Taking the dissolved oxygen value as an example, the water quality is normal when the dissolved oxygen is greater than 5 mg / L, and it is abnormal when it is less than or equal to 5 mg / L. However, due to the measurement error of the sensor, although it has been corrected, the result obtained by the main control still has a certain error. Therefore, for the measurement results on the acquisition terminal side, the server comprehensively considers the redundancy of the error and sets three first analysis results, each of which corresponds to a numerical range. For example, the above-mentioned dissolved oxygen greater than 5.5 mg / L is used as the first analysis result of normal water quality, the dissolved oxygen between 4.5 mg / L and 5.5 mg / L is used as the analysis result of suspected abnormal water quality, and the dissolved oxygen less than 4.5 mg / L is used as the first analysis result of abnormal water quality.
[0093] When the main controller compares the numerical interval into which the first water quality correction data falls, it determines the corresponding first analysis result based on the numerical interval into which it falls. When the first analysis result indicates that the water quality is normal, it means that the real water quality is normal; when the first analysis result indicates that the water quality is abnormal, it means that the real water quality is abnormal; when the first analysis result indicates that the water quality is suspected to be abnormal, due to the influence of errors, the real water quality may be at a normal level or at an abnormal level.
[0094] In one embodiment, the server is also used to, when the first analysis result indicates that the water quality is normal, not conduct the second analysis; when the first analysis result indicates that the water quality is suspected to be abnormal or the water quality is abnormal, correct the received original water quality data based on a preset correction model to form second corrected water quality data; perform a second water quality analysis based on the corrected second water quality data to obtain a second analysis result; when the first analysis result indicates that the water quality is suspected to be abnormal, compare the difference between the first corrected water quality data and the second corrected water quality data, and determine whether to adjust the correction function based on the difference.
[0095] Based on this, when the first analysis result is that the water quality is normal or abnormal, only the first water quality correction data and the first analysis result need to be sent to the server, and the server will save the result accordingly without the need to conduct a second analysis. When the first analysis result is that the water quality is suspected to be abnormal, the first analysis result, the original water quality data, and the first water quality correction data are all sent to the server, and the server uses the above correction model to correct the original water quality data to obtain the second water quality correction data, and determines the true water quality based on the second water quality correction data.
[0096] Optionally, when the first analysis result is abnormal water quality, the original water quality data and the first analysis result can also be sent to the server. The server uses the above-mentioned correction model to make corrections based on the original water quality data to obtain second corrected water quality data, and determines the specific value of the water quality abnormality based on the second corrected water quality value.
[0097] In one embodiment, the server further compares the second water quality correction data with the first water quality correction data to detect the difference between the first water quality correction data and the second water quality correction data. The difference can be the absolute value of the difference between the two values or the percentage of the absolute value of the difference in the second water quality correction data.
[0098] When the difference exceeds the difference threshold, the correction function is adjusted and the adjusted correction function is sent to the main controller. If the difference does not exceed the corresponding difference threshold, there is no need to adjust the correction function.
[0099] The difference threshold can be any appropriate value pre-set by the server. The difference thresholds corresponding to different sensors are not necessarily the same. When the difference between the first corrected water quality data and the second corrected water quality data corresponding to any sensor exceeds the corresponding difference threshold, the correction function is adjusted. For example, the coefficients in the correction function can be adaptively adjusted so that the corrected data obtained by the adjusted correction function is closer to the real data.
[0100] In one embodiment, the main controller is also used to update the acquisition frequency to the first acquisition frequency and the upload frequency to the first upload frequency when the first analysis result indicates that the water quality is normal; when the first analysis result indicates that the water quality is suspected to be abnormal, update the acquisition frequency to a second acquisition frequency greater than the first acquisition frequency and update the upload frequency to a second upload frequency greater than the first upload frequency; when the first analysis result indicates that the water quality is abnormal, update the acquisition frequency to a third acquisition frequency greater than the second acquisition frequency and update the upload frequency to a third upload frequency greater than the second upload frequency.
[0101] In this embodiment, the main controller adjusts the acquisition frequency and the upload frequency accordingly for different first analysis results. Specifically, a correspondence between different first analysis results and the acquisition frequency and the upload frequency can be set. Based on the correspondence, a suitable acquisition frequency is selected as the latest acquisition frequency, and a suitable upload frequency is selected as the latest upload frequency. By flexibly adjusting the acquisition frequency and the upload frequency according to the first analysis result, the flexibility of water quality detection can be improved.
[0102] In one embodiment, the server is also used to perform a second analysis based on the water quality digital data collected by the second water quality collection terminal to obtain a second analysis result, generate frequency adjustment information based on the second analysis result, and send the frequency adjustment information to the Lora communication unit; the Lora communication unit is used to send the frequency adjustment information to the main controller, and the main controller adjusts the collection frequency and / or upload frequency based on the frequency adjustment information.
[0103] In this embodiment, the second water quality collection terminal may be a terminal that is located in the same water area as the first water quality collection terminal or has an environment-related terminal. When the second analysis result analyzed by the second water quality collection terminal indicates abnormal water quality or poor water quality, the data sent by the first water quality collection terminal and the time of the first detection result that were most recently received can be extracted to detect whether the time from the time to the current moment exceeds the preset time threshold. If so, frequency adjustment information can be sent to the first water quality collection terminal, so that the main controller in the first water quality terminal updates the corresponding frequency to the collection frequency and / or upload frequency contained in the frequency adjustment information.
[0104] By adjusting the monitoring frequency of the first water quality collection terminal based on the water quality detection conditions of other collection terminals by the server, the flexibility of water quality monitoring is further improved, and the server can make timely adjustments to the monitoring frequency when there is an abnormal risk in water quality.
[0105] In one embodiment, the main controller is also used to compress the water quality digital data according to a first compression model when the first analysis result indicates that the water quality is normal; compress the water quality digital data according to a second compression model with a compression rate lower than that of the first compression model when the first analysis result indicates that the water quality is suspected to be abnormal; and compress the water quality digital data according to a third compression model with a compression rate lower than that of the second compression model when the first analysis result indicates that the water quality is abnormal; the Lora communication unit is also used to send the compressed water quality digital data stored in the storage unit to the server.
[0106] Generally, data with normal water quality does not need to be paid too much attention, while data with abnormal water quality needs further analysis. The first compression model, the second compression model and the third compression model can be the same compression model or different compression models, but their compression rates are different. The compression rates of the first compression model, the second compression model and the third compression model decrease in sequence.
[0107] The water quality digital data to be compressed and uploaded includes a collection of all water quality digital data generated from the last upload to the current moment. The water quality digital data formed by the collection includes not only the corresponding collected values, but also the collection time of the corresponding values, which forms a corresponding time series data sequence.
[0108] For the time series data sequence, a mathematical statistical analysis can be performed on it, and the corresponding initial value, maximum value, minimum value, value with large numerical difference or more drastic numerical change and other relevant statistical values can be selected from it. In the process of selecting values with large numerical difference or more drastic numerical change, the absolute value of the numerical difference between two adjacent values in the time series data sequence can be compared, and the two adjacent values whose difference exceeds the corresponding difference threshold are both used as the data to be extracted. Among them, the difference thresholds corresponding to different types of sensors and different first analysis results are different.
[0109] After the corresponding values are preliminarily selected through the above-mentioned mathematical statistical analysis, the preset data extraction model is used to extract the corresponding time series data according to the corresponding compression rate, and the various data obtained (including the values and the corresponding acquisition time) are merged as the data set to be compressed. Among them, the data extraction model can be one or more data compression algorithms such as the rotational internal compression method, the steady-state threshold method, and the linear extrapolation method. Through the preset data extraction model, an appropriate amount of data can be extracted from the time series data sequence as the data to be compressed (or uploaded).
[0110] In one embodiment, in the time period from the last upload to the current moment, if the main controller has only performed one first water quality analysis, the time series data sequence is taken as a whole to carry out mathematical statistical analysis and the data extraction model to extract a corresponding amount of data; if multiple first water quality analyses are carried out, the time series data sequence is divided according to each analysis result of the main controller to form one or more time series data subsequences. Mathematical statistical analysis and data extraction model are carried out for each time series data subsequence to extract a corresponding amount of data.
[0111] Specifically, when two adjacent first analysis results are the same, the time series data corresponding to the two adjacent first analysis results are not split; when two adjacent first analysis results are different, the time series data corresponding to the two adjacent first analysis results are split, so that the data in the formed time series data subsequence all belong to the same first analysis result, and the data in the time series data subsequence are continuously collected data.
[0112] For example, the data in the time series data sequence corresponds to N first analysis results, and the analysis results from the 1st to the mth and the m+3th all indicate that the water quality is normal; the analysis results from the m+1th to the m+2th and the N-1th to the Nth all indicate that the water quality is suspected to be abnormal; the analysis results from the m+4th to the N-2th all indicate that the water quality is abnormal. Then the time series data sequence can be divided into 5 parts, namely: the data of the first analysis of water quality from the 1st to the mth is used as a time series data subsequence, the data of the first analysis of water quality from the m+1th to the m+2th is used as a time series data subsequence, the data of the first analysis of water quality from the m+3th is used as a time series data subsequence, the data of the first analysis of water quality from the m+4th to the N-2th is used as a time series data subsequence, and the data of the first analysis of water quality from the N-1th to the Nth is used as a time series data subsequence. m and N can be any appropriate values, such as N is 10 and m is 3.
[0113] Furthermore, during the data extraction process, the time interval between two adjacent data to be extracted is further set so that the time interval between the two extracted data does not exceed the corresponding preset time threshold. Similar to the difference threshold, different types of sensors and different first analysis results correspond to different time thresholds. After obtaining the corresponding data to be compressed, the time interval between the data to be compressed is further detected. If the time interval between two adjacent data to be compressed exceeds the corresponding time threshold, one or more corresponding values are further extracted from the original time series data sequence to supplement the corresponding data set to be compressed, so that the time interval between each data in the set does not exceed the corresponding time threshold. After the final data set to be compressed is completed, the data set can be sent to the server.
[0114] In one embodiment, during the data compression (or data extraction) process, the corresponding water quality original data and / or water quality first corrected data may be selected to be sent synchronously according to the above-mentioned first analysis result. For example, when the first analysis result indicates that the water quality is normal, the data set only includes the value of the corresponding extracted first corrected data of water quality and its corresponding collection time; when the first analysis result indicates that the water quality is suspected to be abnormal, the data extracted in the data set includes both the value of the first corrected data of water quality and its corresponding collection time, and the value of the water quality original data corresponding to the first corrected data of water quality; when the first analysis result indicates that the water quality is abnormal, the data extracted in the data set includes the value of the original data of water quality and its corresponding collection time.
[0115] In one embodiment, the server also pre-sets a corresponding time function. After receiving the extracted time series data sequence uploaded by the acquisition device, the server can perform fitting according to the time function to restore the complete time series data sequence, so that the confidence between the fitted time series data sequence and the complete time series data sequence exceeds a preset confidence threshold. The confidence threshold can be set to any appropriate value such as 95%.
[0116] The time functions corresponding to the time series data sequences collected by different sensors in the sensor unit are not necessarily the same. The time function may be a combination of one or more of a step function, a broken line function, a trigonometric function, an exponential function, a logarithmic function, a polynomial function, etc. Preferably, a broken line function can be uniformly adopted for fitting, and a broken line is used to fit between two adjacent values in the compressed (or extracted) data. Specifically, when extracting data, by comparing the absolute value of the difference between two adjacent values in the time series data sequence, the two adjacent values whose difference exceeds the corresponding difference threshold are both regarded as data to be extracted.
[0117] By completing the corresponding data compression in the acquisition terminal, the data collected by the sensor is extracted according to the compression rate that matches the first analysis result. While reducing the amount of data, the key data is retained, so that the server can carry out further analysis or storage based on the compressed data, reducing the data processing pressure on the server.
[0118] In one embodiment, Figure 3 As shown, a water quality data analysis method based on the Lora format is provided. The method is applied to a first water quality collection terminal, and includes:
[0119] Step 302, obtaining a water quality simulation signal in the environment collected according to the latest configured collection frequency.
[0120] Step 304: digitally analyze the water quality analog signal to form water quality digital data.
[0121] In one embodiment, the water quality digital data includes water quality raw data and water quality first corrected data. The water quality analog signal is digitally analyzed to form water quality raw data, and the water quality raw data is corrected according to the preset latest correction function to form water quality first corrected data. The water quality raw data includes water temperature data, and also includes one or more of pH value raw data, dissolved oxygen raw data and turbidity raw data. The water quality first corrected data includes one or more of pH value first corrected data, dissolved oxygen first corrected data and turbidity first corrected data.
[0122] Specifically, the correction function sent by the server is received and used as the latest correction function. The server corrects the original historical data set according to the preset correction model to form a corrected historical data set, fits the original historical data set with the corrected historical data set to form a correction function, and sends the correction function to the first water quality collection terminal.
[0123] Step 306: Perform a first water quality analysis based on the water quality digital data, reconfigure the acquisition frequency and upload frequency according to the first analysis result, and store the water quality digital data and the first analysis result.
[0124] In one embodiment, a numerical interval sent by a server is received, the numerical interval of the water quality digital data is analyzed, and a first analysis result is obtained according to the numerical interval.
[0125] When the first analysis result indicates that the water quality is normal, the collection frequency is updated to the first collection frequency, and the upload frequency is updated to the first upload frequency.
[0126] When the first analysis result indicates that the water quality is suspected to be abnormal, the collection frequency is updated to a second collection frequency greater than the first collection frequency, and the upload frequency is updated to a second upload frequency greater than the first upload frequency.
[0127] When the first analysis result indicates that the water quality is abnormal, the collection frequency is updated to a third collection frequency that is greater than the second collection frequency, and the upload frequency is updated to a third upload frequency that is greater than the second upload frequency.
[0128] Step 308: Send the stored water quality digital data and the first analysis result to the server through the Lora communication mode according to the latest configured upload frequency.
[0129] Specifically, when the first analysis result indicates that the water quality is normal, the first corrected water quality data and the first analysis result are sent to the server; when the first analysis result indicates that the water quality is suspected to be abnormal, the first analysis result, the original water quality data and the first corrected water quality data are sent to the server; when the first analysis result indicates that the water quality is abnormal, the first analysis result and the original water quality data are sent to the server.
[0130] Step 310: receiving response information from the server in response to the first analysis result, where the response information indicates whether the server determines whether to conduct a second analysis on the water quality digital data according to the first analysis result.
[0131] Optionally, the response information includes frequency adjustment information, and the server performs a second analysis based on the water quality digital data collected by the second water quality collection terminal to obtain a second analysis result, and generates the frequency adjustment information based on the second analysis result.
[0132] Furthermore, the above method also includes: receiving correction function adjustment information sent by the server, and adjusting the correction function based on the adjustment information.
[0133] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0134] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present application and form different embodiments. For example, all of the above embodiments may be used in any combination. The information disclosed in this background technology section is intended only to deepen the understanding of the overall background technology of the present application and should not be regarded as an admission or in any form to imply that the information constitutes prior art known to those skilled in the art.
Claims
1. A water quality data analysis system based on Lora format, characterized in that: The system includes a first water quality collection terminal and a server, wherein the first water quality collection terminal includes a main controller, and a sensor unit, a storage unit and a Lora communication unit electrically connected to the main controller respectively; The sensor unit is used to collect water quality simulation signals in the environment according to the latest configured collection frequency, and send the water quality simulation signals to the main controller; The main controller is used to digitally analyze the water quality analog signal to form water quality raw data, correct the water quality raw data according to the preset latest correction function to form water quality first correction data, perform a first water quality analysis based on the water quality digital data, and reconfigure the acquisition frequency and the upload frequency according to the first analysis result, and send the water quality digital data and the first analysis result to the storage unit for storage, wherein the water quality digital data includes the water quality raw data and the first water quality correction data; The Lora communication unit is used to send the stored water quality digital data and the first analysis result to the server through the Lora communication mode according to the latest configured upload frequency; The server is used to receive the water quality digital data and the first analysis result, and determine whether to perform a second analysis on the water quality digital data according to the first analysis result; The server is also used to correct the original historical data set according to a preset correction model to form a corrected historical data set, fit the original historical data set with the corrected historical data set to form a correction function, and send the formed correction function to the main controller. The original historical data set is a collection of historically received original water quality data.
2. The system according to claim 1, characterized in that The main controller is also used to analyze the numerical range of the water quality digital data, and obtain the first analysis result according to the numerical range; The server is further configured to determine a numerical value interval corresponding to each analysis result, and send the numerical value interval to the main controller.
3. The system according to claim 2, characterized in that The Lora communication unit is also used to send the first water quality correction data and the first analysis result to the server when the first analysis result indicates that the water quality is normal; and to send the first analysis result, the water quality original data and the first water quality correction data to the server when the first analysis result indicates that the water quality is suspected to be abnormal; and to send the first analysis result and the water quality original data to the server when the first analysis result indicates that the water quality is abnormal.
4. The system according to claim 3, characterized in that The server is also used for not conducting a second analysis when the first analysis result indicates that the water quality is normal; when the first analysis result indicates that the water quality is suspected to be abnormal or the water quality is abnormal, correcting the received original water quality data based on a preset correction model to form second corrected water quality data; conducting a second water quality analysis based on the corrected second water quality data to obtain a second analysis result; when the first analysis result indicates that the water quality is suspected to be abnormal, comparing the difference between the first corrected water quality data and the second corrected water quality data, and determining whether to adjust the correction function based on the difference.
5. The system according to claim 4, characterized in that The server is further configured to adjust the correction function when the difference exceeds a preset difference threshold, and send the adjusted correction function to the main controller.
6. The system according to claim 1, characterized in that The main controller is further configured to update the acquisition frequency to the first acquisition frequency and the upload frequency to the first upload frequency when the first analysis result indicates that the water quality is normal; update the acquisition frequency to a second acquisition frequency greater than the first acquisition frequency and the upload frequency to a second upload frequency greater than the first upload frequency when the first analysis result indicates that the water quality is suspected to be abnormal; and update the acquisition frequency to a third acquisition frequency greater than the second acquisition frequency and the upload frequency to a third upload frequency greater than the second upload frequency when the first analysis result indicates that the water quality is abnormal; The server is further configured to perform a second analysis based on the water quality digital data collected by the second water quality collection terminal to obtain a second analysis result, generate frequency adjustment information based on the second analysis result, and send the frequency adjustment information to the Lora communication unit; The Lora communication unit is used to send the frequency adjustment information to the main controller, and the main controller adjusts the acquisition frequency and / or upload frequency based on the frequency adjustment information.
7. The system according to claim 1, characterized in that The main controller is further configured to compress the water quality digital data according to a first compression model when the first analysis result indicates that the water quality is normal, compress the water quality digital data according to a second compression model with a compression rate lower than that of the first compression model when the first analysis result indicates that the water quality is suspected to be abnormal, and compress the water quality digital data according to a third compression model with a compression rate lower than that of the second compression model when the first analysis result indicates that the water quality is abnormal; The Lora communication unit is also used to send the compressed water quality digital data stored in the storage unit to the server.
8. The system according to claim 2, characterized in that The sensor unit includes a water temperature sensor and one or more of a pH sensor, a dissolved oxygen sensor and a turbidity sensor; The water quality original data includes water temperature data, and also includes one or more of pH value original data, dissolved oxygen original data and turbidity original data; the water quality first corrected data includes one or more of pH value first corrected data, dissolved oxygen first corrected data and turbidity first corrected data; The main controller is also used to correct one or more of the pH value original data, dissolved oxygen original data and turbidity original data according to the water temperature data and the correction function to form the first corrected water quality data.
9. A water quality data analysis method based on the Lora format, applied to the first water quality collection terminal in the water quality data analysis system based on the Lora format as claimed in any one of claims 1 to 8, characterized in that: The method comprises: Acquire water quality simulation signals in the environment collected according to the latest configured collection frequency; Digitally analyzing the water quality analog signal to form water quality raw data, correcting the water quality raw data according to the latest preset correction function to form first water quality corrected data, performing a first water quality analysis based on the water quality digital data, and reconfiguring the acquisition frequency and the upload frequency according to the first analysis result, storing the water quality digital data and the first analysis result, wherein the water quality digital data includes the water quality raw data and the first water quality corrected data; sending the stored digital water quality data and the first analysis result to the server via the Lora communication mode according to the latest configured upload frequency; A correction function and response information for the first analysis result sent by a server are received, wherein the response information indicates information that the server determines whether to conduct a second analysis on the water quality digital data based on the first analysis result. The server corrects the original historical data set according to a preset correction model to form a corrected historical data set, fits the original historical data set with the corrected historical data set to form a correction function, and sends the formed correction function to the main controller, wherein the original historical data set is a collection of historically received original water quality data.
10. The method according to claim 9, characterized in that The first water quality analysis is performed based on the water quality digital data, and the collection frequency and the upload frequency are reconfigured according to the first analysis result, and the water quality digital data and the first analysis result are stored, including: When the first analysis result indicates that the water quality is normal, the acquisition frequency is updated to the first acquisition frequency, and the upload frequency is updated to the first upload frequency; When the first analysis result indicates that the water quality is suspected to be abnormal, the acquisition frequency is updated to a second acquisition frequency greater than the first acquisition frequency, and the upload frequency is updated to a second upload frequency greater than the first upload frequency; When the first analysis result indicates that the water quality is abnormal, the acquisition frequency is updated to a third acquisition frequency greater than the second acquisition frequency, and the upload frequency is updated to a third upload frequency greater than the second upload frequency; The response information includes frequency adjustment information. The server performs a second analysis based on the water quality digital data collected by the second water quality collection terminal to obtain a second analysis result, and generates the frequency adjustment information based on the second analysis result.
Citation Information
Patent Citations
Intelligent monitoring system and method for aquaculture
CN104808551A
Distributed water quality remote monitoring system and monitoring method for culture fishery
CN113110211A
LORAWAN water quality adaptive monitoring system and method
CN115327059A
LoRaWAN multi-parameter water quality online monitoring system and method
CN107132329A
Water quality monitoring system and platform based on Internet of things
CN107807215A