A pool water quality prediction management method and system based on multi-source data fusion
The swimming pool water quality management system, which integrates multi-source data, utilizes seasonal trends, weather responses, and user habit learning models to achieve accurate prediction and personalized management of swimming pool water quality. This solves the problems of lag, blindness, and data silos in existing technologies, and improves water quality stability and equipment efficiency.
Patent Information
- Application Number
- CN202610517162.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-17
- Publication Date
- 2026-08-25
AI Technical Summary
Existing swimming pool water quality management systems rely on single-unit equipment and lack multi-source data fusion, making it impossible to achieve accurate and stable water quality prediction. This results in problems such as lag, blindness, lack of personalization, and data silos, making it unable to cope with sudden weather changes and high-load pollution during specific periods.
By collecting multi-source data, including pool water quality parameters, salt chlorinator status, equipment geographical location and meteorological data, and using pre-trained seasonal trend, weather response and user habit learning models, multi-objective decision fusion is performed, and control parameters are calculated and sent to the terminal salt chlorinator to achieve coordinated data regulation.
It has achieved a proactive prediction mode for prevention, accurately matched the chlorine production demand under different climatic conditions, automatically identified high-frequency pollution periods, broken down data silos, provided personalized water quality management, and avoided water quality fluctuations and resource waste.
Smart Images

Figure CN122635964A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent water treatment technology, and in particular to a method and system for predicting and managing swimming pool water quality based on multi-source data fusion. Background Technology
[0002] Swimming pool water quality safety is the core guarantee for the safety of swimming pool operation management and public use. Achieving accurate and stable water quality prediction management is crucial for the safe operation of swimming pools.
[0003] Existing swimming pool water quality management largely relies on equipment such as chlorinators, whose control methods are mostly stand-alone intelligent systems or simple timed and feedback controls. This type of control mode is centered on the operation of individual devices, relying solely on real-time parameters such as ORP (Oxidation-Reduction Potential) and pH (Potential of Hydrogen) collected by locally installed water quality sensors, or user-preset timed operating parameters, to perform basic adjustments to processes such as electrolytic chlorination. It lacks a cloud-based collaborative global control architecture, and does not integrate multi-source heterogeneous environmental data or user behavior data. The devices operate independently, unable to achieve data interconnection and collaborative scheduling, and lack the ability to predict water quality changes.
[0004] Existing swimming pool water quality management solutions suffer from the following four problems: First, they are outdated. Traditional ORP and pH feedback controls adjust water quality only after it has already changed, a reactive approach that cannot cope with sudden weather changes such as heavy rain or heat waves. Second, they are insensitive. These solutions fail to detect seasonal changes and geographical differences, easily leading to over-chlorination in winter or insufficient disinfection in summer. Third, they lack personalization. These solutions cannot recognize user habits; for example, fixed operating patterns are insufficient to handle high pollution loads during weekend pool parties. Fourth, they create data silos. Equipment operates independently, lacking the support of multi-source environmental big data, making long-term predictive management based on data fusion impossible. Summary of the Invention
[0005] In view of this, it is necessary to provide a swimming pool water quality prediction and management method based on multi-source data fusion to address the aforementioned shortcomings of existing technologies.
[0006] To address the aforementioned problems, in a first aspect, embodiments of the present invention provide a swimming pool water quality prediction and management method based on multi-source data fusion, comprising:
[0007] Collect multi-source data affecting swimming pool water quality; wherein, the multi-source data includes swimming pool water quality parameters, salt chlorination machine operating status, equipment geographical coordinates, and meteorological data of the corresponding area;
[0008] Based on the multi-source data, a pre-trained seasonal trend prediction model, a weather response prediction model, and a user habit learning model are run. The seasonal trend prediction model predicts the seasonal baseline chlorine production coefficient based on the equipment's geographical coordinates and historical meteorological data. The weather response prediction model calculates the weather influencing factor through the mapping relationship between meteorological parameters and chlorine consumption rate. The user habit learning model performs feature mining on historical water quality fluctuation data, identifies high-frequency pollution periods, and generates appointment tasks.
[0009] The seasonal baseline chlorine production coefficient, weather influencing factors, and scheduled tasks are integrated into a multi-objective decision-making process to calculate control parameters and send them to the terminal salt chlorinator for execution.
[0010] Furthermore, after collecting multi-source data affecting pool water quality, the method also includes:
[0011] The collected multi-source data is standardized by using linear interpolation to align the timestamps of the multi-source data and construct a unified time series vector; outlier removal is performed by median filtering algorithm.
[0012] Furthermore, after completing the standardization process of the multi-source data, the method also includes:
[0013] Feature layer fusion is performed on the standardized multi-source data to complete multi-dimensional feature extraction, and light consumption features, anthropogenic pollution features, and weather trend features are extracted respectively. The extracted feature factors are used as inputs to the seasonal trend prediction model, the weather response prediction model, and the user habit learning model.
[0014] Furthermore, the multidimensional feature extraction includes:
[0015] Extract the light consumption feature, and the calculation formula for the light consumption feature is as follows:
[0016] F uv =α1·UV(t)+α2·Temp(t)
[0017] In the formula, F uv The light consumption characteristics are represented by α1, which is the ultraviolet weighting coefficient, UV(t) is the ultraviolet index at the current moment, α2 is the water temperature weighting coefficient, and Temp(t) is the water temperature at the current moment.
[0018] Extracting human-caused pollution features, the calculation formula for these human-caused pollution features is as follows:
[0019] F load =β·|ORP(t)-ORP(t-Δt)|
[0020] In the formula, F loadFor characteristics of anthropogenic pollution, β is the weighting coefficient for changes in redox potential, ORP(t) is the redox potential value at the current moment, ORP(t-Δt) is the redox potential value at interval Δt, and Δt is the sampling time interval.
[0021] Extract weather trend features and obtain statistical features of meteorological data for the next 24 hours, including cumulative rainfall forecast and maximum temperature forecast.
[0022] Furthermore, based on the aforementioned multi-source data, pre-trained seasonal trend prediction models, weather response prediction models, and user habit learning models are run, including:
[0023] Run a seasonal trend prediction model, based on the equipment's geographical coordinates, historical meteorological data, and historical water quality data, to correct the impact of seasonal changes on chlorine loss and pool load, and output the corresponding seasonal baseline chlorine production coefficient for the pool.
[0024] Run the weather response prediction model, establish the mapping relationship between meteorological parameters and chlorine consumption rate based on real-time meteorological data and future weather forecast data, correct the impact of daily weather changes on chlorine loss and pool water quality, and calculate the weather impact factor for the corresponding pool.
[0025] Run a user habit learning model and use unsupervised clustering or anomaly detection algorithms to perform feature mining on historical water quality fluctuation data of the swimming pool, identify periodic high-frequency pollution periods of the swimming pool, and generate reservation tasks for the corresponding periods.
[0026] Furthermore, the seasonal baseline chlorine production coefficient, weather influencing factors, and scheduled tasks are fused into a multi-objective decision-making process to calculate control parameters and distribute them to the terminal salt chlorination unit for execution. Specifically, this includes:
[0027] By combining the seasonal baseline chlorine production coefficient, weather influencing factors, and scheduled tasks, a multi-objective decision fusion calculation is performed to obtain the control parameter set of the salt chlorinator. The control parameter set includes the target chlorine production percentage, special operating mode, and recommended speed of the circulating pump.
[0028] Based on the set of control parameters, control instructions for the salt chlorinator are generated, and the control instructions are sent to the terminal salt chlorinator for execution via a communication protocol.
[0029] Furthermore, the expression for the multi-objective decision fusion calculation is as follows:
[0030] P final =(P base ×K season +ΔP weather )×W dynamic +P boost
[0031] In the formula, Pfinal The final chlorine production capacity to be issued to the salt chlorinator; P base The basic chlorine production capacity of the salt chlorinator set for the user; K season The seasonal baseline chlorine production coefficient generated for the seasonal trend forecasting model; ΔP weather Weather impact factors generated for weather response prediction models; W dynamic P is a dynamic weighting factor adjusted based on the reliability of sensor data. boost The impulse compensation value corresponding to the appointment task generated by the user habit learning model.
[0032] Furthermore, after the user habit learning model generates the reservation task for the corresponding time period, and before performing multi-objective decision fusion, the method further includes a spatiotemporal correlation matching step, which specifically includes:
[0033] Obtain the rainfall probability data for the time period corresponding to the scheduled task, as output by the weather response prediction model;
[0034] When the trigger time of the scheduled task arrives, the execution conditions of the scheduled task are logically verified. If the scheduled task meets the time conditions of the identified periodic high-frequency pollution period and the probability of rainfall is lower than the first preset threshold, the chlorine production pulse compensation value corresponding to the scheduled task is activated and the super oxidation special working mode corresponding to the scheduled task is executed.
[0035] If the probability of rainfall during the time period corresponding to the scheduled task is higher than the second preset threshold, the scheduled task will be blocked, and the control parameters of the salt chlorinator corresponding to the rainstorm emergency control mode will be switched.
[0036] Secondly, embodiments of the present invention provide a swimming pool water quality prediction and management system based on multi-source data fusion, comprising:
[0037] The data acquisition layer is used to collect multi-source data that affects pool water quality; wherein, the multi-source data includes pool water quality parameters, salt chlorinator operating status, equipment geographical coordinates, and meteorological data of the corresponding area;
[0038] The cloud-based AI model layer includes a pre-trained seasonal trend prediction model, a weather response prediction model, and a user habit learning model. The seasonal trend prediction model predicts the seasonal baseline chlorine production coefficient based on the device's geographical coordinates and historical meteorological data. The weather response prediction model calculates weather influencing factors through the mapping relationship between meteorological parameters and chlorine consumption rates. The user habit learning model performs feature mining on historical water quality fluctuation data, identifies high-frequency pollution periods, and generates scheduled tasks.
[0039] The decision fusion control layer is used to perform multi-objective decision fusion of the seasonal benchmark chlorine production coefficient, weather influencing factors, and scheduled tasks, calculate control parameters, and send them to the terminal salt chlorinator for execution.
[0040] Thirdly, the present invention also provides an electronic device, including a memory and a processor, wherein,
[0041] The memory is used to store programs;
[0042] The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the swimming pool water quality prediction and management method based on multi-source data fusion as described in the first aspect embodiment of the present invention.
[0043] The swimming pool water quality prediction and management method and system based on multi-source data fusion provided by this invention have the following advantages compared with the prior art:
[0044] (1) By collecting multi-source data such as meteorological data, water quality parameters and user behavior, this invention runs a pre-trained seasonal trend prediction model, weather response prediction model and user habit learning model, which can adjust control parameters in advance before rainstorms or pool parties, transforming the passive adjustment mode of post-event remediation in traditional technology into an active prediction mode of pre-event prevention, effectively avoiding water quality fluctuations.
[0045] (2) This invention uses a seasonal trend prediction model to predict the seasonal baseline chlorine production coefficient based on the geographical coordinates of the equipment and historical meteorological data. It combines a weather response prediction model to establish a mapping relationship between meteorological parameters and chlorine consumption rate. It can automatically sense seasonal changes and geographical differences, accurately match the chlorine production demand under different climatic conditions, and solve the problems of excessive chlorination in winter and insufficient disinfection in summer in the existing technology.
[0046] (3) This invention uses an unsupervised clustering algorithm to mine features of historical water quality fluctuation data through a user habit learning model, automatically identifies periodic high-frequency pollution periods and generates scheduled tasks, so that the system can “understand you better the more you use it” and can adapt to the unique usage scenarios of different families without the need for tedious programming by users, thus solving the problem that fixed working modes are difficult to cope with high-load pollution during specific periods.
[0047] (4) This invention integrates equipment operating status, environmental meteorological data and user behavior data through a cloud-based collaborative global control architecture, breaking the data silo state of independent operation between traditional equipment, avoiding unnecessary excessive chlorination, saving salt and electricity, and extending the service life of electrolysis equipment, so that ordinary users can also enjoy professional-grade water quality management solutions. Attached Figure Description
[0048] Figure 1A flowchart of the swimming pool water quality prediction and management method based on multi-source data fusion provided by the present invention;
[0049] Figure 2 The overall architecture diagram of the swimming pool water quality prediction and management system based on multi-source data fusion provided by the present invention;
[0050] Figure 3 This is a structural block diagram of the electronic device provided by the present invention. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0052] The naming or numbering of steps in the embodiments of the present invention does not mean that the steps in the method flow must be executed in the time / logical order indicated by the naming or numbering. The execution order of the named or numbered process steps can be changed according to the technical purpose to be achieved, as long as the same or similar technical effect can be achieved.
[0053] Before describing the specific implementation methods, the core technical terms involved in this invention will be defined and explained first:
[0054] Oxidation-Reduction Potential (ORP): An indicator reflecting the strength of water disinfection. The higher the value, the stronger the disinfection ability. It is directly related to residual chlorine concentration and pollutant content.
[0055] Long Short-Term Memory (LSTM) network: a time series analysis algorithm used to capture the long-term dependencies of water quality parameters as they change with the seasons.
[0056] Unsupervised clustering algorithm: A learning method that discovers hidden patterns in unlabeled data, used to identify periodic water quality fluctuation patterns corresponding to user habits.
[0057] Regression Analysis Algorithm: A statistical analysis method used to establish the mapping relationship between dependent and independent variables. In this invention, it is used to construct a mathematical correlation between meteorological parameters and chlorine consumption rate.
[0058] Seasonal baseline chlorine production coefficient: A long-term correction factor output by the seasonal trend forecasting model, used to adjust the baseline chlorine production under different seasonal conditions.
[0059] Weather impact factor: Short-term dynamic compensation value output by the weather response prediction model, used to address the impact of daily weather changes on chlorine consumption rate.
[0060] Scheduled tasks: The user habit learning model generates pre-control instructions based on the identified periodic high-frequency pollution periods, including execution time and compensation intensity.
[0061] Dynamic weighting factor: The fusion weighting coefficient is adjusted in real time based on the reliability of sensor data. The weight is automatically reduced when the sensor malfunctions or the readings are unstable.
[0062] Pulse compensation value: The amount of chlorine production compensation corresponding to the reservation task generated by the user habit learning model, which is used to increase chlorine production reserves in advance before the periodic high-frequency pollution period.
[0063] Figure 1 A flowchart illustrating the swimming pool water quality prediction and management method based on multi-source data fusion provided by this invention. (Refer to...) Figure 1 The method includes the following steps:
[0064] Step S1: Collect multi-source data affecting pool water quality; wherein, the multi-source data includes pool water quality parameters, salt chlorinator operating status, equipment geographical coordinates, and meteorological data of the corresponding area.
[0065] Specifically, the terminal equipment, consisting of the chlorinator and its associated sensors, collects data in real time at a preset frequency and uploads all collected data to a cloud server. The typical preset collection frequency is once every 5 minutes. The data collected by the terminal equipment includes three categories: First, pool water quality parameters, including oxidation-reduction potential (ORP), pH value, water temperature, and current salinity. Second, chlorinator operating status parameters, specifically including the current operating current of the electrolyzer, cumulative chlorine production, and equipment fault codes. Third, environmental positioning parameters, specifically the device's own GPS coordinates.
[0066] The cloud server uses the GPS geographic coordinates uploaded by the terminal device to call the interface of a third-party meteorological service provider to capture external meteorological data in real time for the area corresponding to the geographic coordinates. The captured meteorological data includes two categories: the first category is weather forecast data, specifically temperature data and precipitation probability data for the next 24 to 168 hours. The second category is environmental indicator data, including UV index, wind speed, and air quality data.
[0067] In some embodiments of this application, after collecting multi-source data affecting pool water quality in step S1, the pool water quality prediction and management method based on multi-source data fusion provided by the present invention further includes:
[0068] S11, Data Cleaning and Spatiotemporal Alignment: The collected multi-source data is mapped to feature factors with clear physical meaning. Light consumption features, anthropogenic pollution features, and weather trend features are extracted respectively, and the extracted feature factors are used as inputs to seasonal trend prediction models, weather response prediction models, and user habit learning models.
[0069] It is understandable that the water quality data collected by terminal devices is high-frequency data, while the meteorological data accessed from the cloud is low-frequency discrete data. The two types of data have different collection frequencies, data sources, and time dimensions, making direct fusion calculation and model input impossible. To address these issues, this invention performs multi-source data standardization processing. Through timestamp alignment and outlier removal, it achieves the standardization of multi-source data and constructs a unified, computable time series vector.
[0070] Timestamp alignment is achieved using linear interpolation. Linear interpolation maps discrete low-frequency meteorological data to each high-frequency water quality sampling time point. Specifically, it involves linearly fitting meteorological data from two adjacent time points and assigning the fitted data to the corresponding water quality data point. For example, linearly fitting meteorological data from 14:00 and 15:00 and assigning it to the water quality data point at 14:05. Finally, a unified time series vector X(t) = [W] is constructed. quality W weather ], where W quality For water quality sampling data set, W weather This is the aligned meteorological data set. Simultaneously, a median filtering algorithm is used to remove transient data jumps caused by sensor malfunctions, preventing erroneous data from misleading subsequent AI model predictions.
[0071] In some embodiments of this application, after data cleaning and spatiotemporal alignment are completed, the swimming pool water quality prediction and management method based on multi-source data fusion provided by the present invention further includes:
[0072] S12, Multidimensional Feature Extraction: The original data is mapped to physically meaningful feature factors, and light consumption features, anthropogenic pollution features, and weather trend features are extracted respectively. These extracted feature factors are then used as inputs to the seasonal trend prediction model, the weather response prediction model, and the user habit learning model. Step S12 specifically includes the following sub-steps S121~S123:
[0073] S121, extract light consumption features.
[0074] Light consumption characteristics are used to characterize the natural decomposition rate of chlorine in water bodies due to environmental factors. The calculation formula for these light consumption characteristics is as follows:
[0075] F uv =α1·UV(t)+α2·Temp(t)
[0076] In the formula, F uv The light consumption characteristics are represented by α1, which is the ultraviolet weighting coefficient, UV(t) is the ultraviolet index at the current moment, α2 is the water temperature weighting coefficient, and Temp(t) is the water temperature at the current moment.
[0077] S122, Extracting characteristics of human-caused pollution.
[0078] Anthropogenic pollution characteristics are used to characterize real-time pollution load fluctuations in swimming pools, quantify water load changes under scenarios such as sudden increases in swimmers and instantaneous introduction of pollutants, and provide a basis for adjusting chlorination production strategies. The calculation formula for the anthropogenic pollution characteristics is as follows:
[0079] F load =β·|ORP(t)-ORP(t-Δt)|
[0080] In the formula, F load The characteristics of human pollution are represented by β, which is the weighting coefficient for the change in redox potential. ORP(t) is the redox potential value at the current moment, and ORP(t-Δt) is the redox potential value at the interval Δt, where Δt is the sampling time interval, i.e., the preset time step.
[0081] The correlation between anthropogenic pollution characteristics and swimming pool load is as follows:
[0082] When the pool load suddenly increases, including a surge in the number of swimmers, the introduction of pollutants through sweat and organic matter, and rainwater, the amount of reducing pollutants in the water increases, the oxidation-reduction potential value drops rapidly, and the value of |ORP(t)-ORP(t-Δt)| increases, ultimately leading to F load The value increases;
[0083] When the pool load drops sharply, including during water changes, addition of oxidants, and subsequent return to a stable state, the amount of reducing pollutants in the water decreases, the oxidation-reduction potential (ORP) rises rapidly, and the value of |ORP(t)-ORP(t-Δt)| increases, ultimately leading to F... load The value increases;
[0084] When the pool load is stable, including when there are no swimmers and the water quality is stable, the oxidation-reduction potential value remains essentially unchanged, and the value of |ORP(t)-ORP(t-Δt)| approaches 0, ultimately F load The value approaches 0.
[0085] The above correlation indicates that the greater the change in redox potential, the more drastic the fluctuation in pool load and the more urgent the real-time demand for chlorine production. (This is achieved through F...) load Water quality fluctuations can be converted into chlorine production correction factors, enabling adaptive load adjustment.
[0086] The calibration principles and typical values of the core parameters in the formula for calculating the characteristics of anthropogenic pollution are as follows:
[0087] (1) Principles for setting the sampling time interval Δt
[0088] The sampling time interval Δt needs to be set to match the actual rate of change of the pool water quality, taking into account both timely response and anti-interference.
[0089] For small or public swimming pools, the load is prone to sudden changes. The typical value of the sampling time interval Δt is 10 to 30 seconds to achieve a rapid response to load changes.
[0090] For large swimming pools or private pools with stable load conditions, the typical sampling time interval Δt is 1 to 5 minutes to avoid false corrections caused by slight fluctuations in the sensor.
[0091] The sampling time interval Δt should not be set to less than 5 seconds to avoid interference from sensor noise, and it should not be set to more than 10 minutes to avoid response lag.
[0092] (2) Calibrating principle of weighting coefficient β for change in redox potential
[0093] The calibration of the weighting coefficient β for the change in redox potential needs to ensure that the numerical range of Fload is adapted to the chlorine production correction requirements. F is recommended. load The value range is from 0 to 1.5 to avoid excessive correction.
[0094] The typical value for the weighting coefficient β of the redox potential change is 0.002~0.01 (1 / mV), which is suitable for the conventional range of redox potential change from 0mV to 500mV.
[0095] Example of parameter calibration: Using a weighting coefficient β of 0.005 (1 / mV) for the change in oxidation-reduction potential (ORP), and a sampling time interval Δt of 30 seconds, if the current ORP(t) value is 650mV, and the ORP(t-30s) value at the 30-second interval is 600mV, then the anthropogenic pollution characteristic F... load =0.005×|650-600|=0.25, which means that the redox potential value drops by 50mV within 30 seconds, the pool load fluctuates slightly, and the chlorine production rate or chlorine production power needs to be corrected by 0.25 times.
[0096] S123, extract weather trend features.
[0097] Weather trend features are used to characterize the impact of meteorological changes on water quality over a future period. The method for extracting weather trend features is to obtain the statistical features of meteorological data for the next 24 hours. The statistical features specifically include the predicted cumulative rainfall and the predicted maximum temperature.
[0098] All extracted light consumption features, anthropogenic pollution features, and weather trend features are used as input data for the seasonal trend prediction model, the weather response prediction model, and the user habit learning model.
[0099] This invention overcomes the data silo problem in traditional swimming pool water quality management by comprehensively collecting multi-dimensional heterogeneous data; it achieves spatiotemporal alignment of data from different sources through standardized processing, ensuring data consistency and validity; and it maps raw data into feature factors with clear physical meaning through feature layer fusion, providing accurate and identifiable input for predictive models. This invention can accurately quantify the impact of environmental changes and human pollution on swimming pool water quality, providing core support for subsequent predictive chlorine production control and solving the problems of lagging control and poor adaptability in traditional solutions.
[0100] Step S2: Based on the multi-source data, run the pre-trained seasonal trend prediction model, weather response prediction model, and user habit learning model.
[0101] The seasonal trend prediction model predicts the seasonal baseline chlorine production coefficient based on the equipment's geographical location coordinates and historical meteorological data. The weather response prediction model calculates the weather impact factor through the mapping relationship between meteorological parameters and chlorine consumption rate. The user habit learning model performs feature mining on historical water quality fluctuation data, identifies high-frequency pollution periods, and generates appointment tasks.
[0102] Reference Figure 2 The swimming pool water quality prediction and management system based on multi-source data fusion provided by this invention includes a data acquisition layer, a cloud-based AI model layer, and a decision fusion and control layer. The cloud-based AI model layer has built-in pre-trained seasonal trend prediction models, weather response prediction models, and user habit learning models.
[0103] The swimming pool water quality prediction and management method based on multi-source data fusion of this invention completes the collection, cleaning, alignment, and feature fusion of multi-source data at the data acquisition layer, and then enters the cloud AI model layer to execute intelligent decision-making. The cloud server has three pre-trained artificial intelligence models built in, which respectively handle the three dimensions of long-term macro prediction, short-term dynamic compensation, and personalized unsupervised learning, and achieve accurate prediction and adaptive control of water quality changes through multi-timescale collaboration.
[0104] In some embodiments of this application, step S2 specifically includes the following sub-steps S21 to S23:
[0105] S21 runs a seasonal trend prediction model. Based on the equipment's geographical coordinates, historical meteorological data, and historical water quality data, it corrects the impact of seasonal changes on chlorine loss and pool load, and outputs the corresponding seasonal baseline chlorine production coefficient for the pool.
[0106] The seasonal trend prediction model is deployed on a cloud server. The model is constructed using a Long Short-Term Memory (LSTM) network or time series analysis algorithm to handle long-term macroscopic forecasting tasks. The model takes the device's geographical coordinates, historical water temperature data, and a meteorological database as input. It combines latitude information to capture seasonal variation patterns in different regions, and uses a LSTM algorithm to learn the trend characteristics of water temperature changes with the seasons. This allows the model to predict the natural trend curve of water temperature changes in the current season, as well as the baseline for bacterial growth specific to that season.
[0107] The execution process of the seasonal trend prediction model is as follows: The seasonal trend prediction model combines the latitude information corresponding to the geographical coordinates of the device's global positioning system, matches the historical water temperature and meteorological database of the corresponding latitude region, fits the seasonal water temperature change trend and bacterial growth pattern of the current year, and finally outputs the seasonal benchmark chlorine production coefficient of the corresponding swimming pool.
[0108] Taking a private swimming pool located at 23 degrees north latitude in South China as an example, the model uses historical meteorological data and water temperature records from the past three years for this location. Through analysis using a Long Short-Term Memory (LSTM) network algorithm, it finds that during the summer months of May to September each year, the average water temperature rises to between 28 and 32 degrees Celsius, and the bacterial growth rate increases by approximately 40% compared to spring. Based on this analysis, the model predicts that the rainy season will begin next week, and the high humidity environment will easily promote mold growth. Therefore, it automatically generates a seasonal baseline chlorine production coefficient K. season =1.4 indicates that the chlorine production power needs to be increased by 40% from the user-defined baseline to address the dilution and mold growth risks associated with frequent rain. If the pool is located in North China at 40 degrees north latitude, where winter water temperatures drop below 5 degrees Celsius, bacterial activity significantly decreases, and the chlorine consumption rate declines accordingly. The model output K... season =0.7 indicates that chlorine production can be reduced by 30%, avoiding resource waste caused by excessive chlorination in winter.
[0109] S22, run the weather response prediction model, establish the mapping relationship between meteorological parameters and chlorine consumption rate based on real-time meteorological data and future weather forecast data, correct the impact of daily weather changes on chlorine loss and pool water quality, and calculate the corresponding weather impact factor for the pool.
[0110] The weather response prediction model employs a regression analysis algorithm to handle short-term dynamic compensation tasks. The model establishes a mapping relationship between meteorological parameters and chlorine consumption rates, using real-time meteorological data and future weather forecasts as inputs to calculate weather influencing factors in advance and correct for the impact of daily weather changes on chlorine loss and pool water quality.
[0111] Taking hot and sunny summer weather as an example, meteorological forecast data predicts that the ultraviolet index (UV index) will be 9 and the temperature will be 34 degrees Celsius the next day. The model, through regression analysis, determines that the combined effects of ultraviolet radiation and high temperature significantly accelerate the chlorine volatilization rate, and calculates the weather impact factor ΔP. weather =+30% means that the chlorine production for the next day needs to be increased by an additional 30% on top of the seasonal baseline. At the same time, the model generates specific execution instructions: start the chlorine production enhancement mode in advance at night to ensure sufficient residual chlorine reserves during the daytime of the next day.
[0112] Taking heavy rain as an example, meteorological forecast data predicts an 85% probability of rainfall the following day, with a predicted cumulative rainfall of 50 mm. The model determines a high risk of rainwater dilution and calculates the weather impact factor ΔP. weather =+40%, and at the same time generate a special execution order: one hour before the start of rainfall, forcibly increase the chlorine production rate to 150% of the base value, and extend the running time of the circulation pump to continuous operation, in order to offset the pollutants and dilution effect brought in by rainwater.
[0113] S23, run the user habit learning model, use unsupervised clustering algorithm or anomaly detection algorithm to perform feature mining on the historical water quality fluctuation data of the swimming pool, identify the periodic high-frequency pollution periods of the swimming pool, and generate reservation tasks for the corresponding periods.
[0114] The user habit learning model employs unsupervised clustering algorithms (such as K-Means clustering) or anomaly detection algorithms to achieve personalized unsupervised learning. The model requires no manual annotation; it automatically identifies implicit user usage patterns by mining features from historical pool water quality fluctuation data, generating reservation tasks for corresponding time periods.
[0115] The cloud server continuously monitors the bound chlorine concentration and redox potential (OPP) data of the swimming pool water. When the bound chlorine concentration increases or the OPP value suddenly drops, it indicates that organic pollutants have entered the water, corresponding to a scenario where the pool is used. The user habit learning model uses unsupervised clustering or anomaly detection algorithms to perform feature mining on time segments of historical OPP drops and bound chlorine concentration increases, identifying the periodic patterns hidden in the data. Based on the identified high-frequency pollution periods, the user habit learning model automatically generates corresponding reservation tasks, which include pre-controlled execution times and pre-controlled strategies. A typical generation strategy is as follows: the user habit learning model generates a reservation task to automatically activate the super oxidation mode every Saturday afternoon at 16:00 to increase the residual chlorine reserve in the water in advance and offset the pollution load during the evening high-frequency pollution period.
[0116] Taking a family swimming pool as an example, the system continuously monitors the changing trend of ORP values. The algorithm performs cluster analysis on water quality data from the past three months and finds that around 8:00 PM every Saturday, the ORP value experiences a regular and significant drop, decreasing from 650 mV to 580 mV, a decrease of 70 mV, and this state lasts for about 2 hours before gradually recovering. According to the core process logic, the sudden drop in ORP value indicates that organic pollutants have entered the water, meaning someone is swimming. Based on this, the model determines that this period is a "periodic high-frequency pollution period" and identifies the user's habit of having pool parties every Saturday night.
[0117] Based on the above learning results, the user habit learning model automatically generates a reservation task: every Saturday afternoon at 16:00, four hours before the expected use, automatically activate the "super oxidation mode" to increase the residual chlorine reserve in advance. The reservation task includes a pulse compensation value P. boost =+20% represents an additional 20% increase in chlorine production capacity on top of seasonal baselines and weather corrections, to offset the high pollution load from evening pool parties. The model also binds reservation tasks to time conditions, enabling intelligent scheduling that "automatically executes every Saturday afternoon."
[0118] If user habits change, such as from Saturday evenings to Wednesday evenings, the user habit learning model continuously monitors changes in ORP values, re-clusters and analyzes the data through a sliding time window, automatically identifies new cyclical fluctuation patterns, and dynamically updates the trigger time and compensation intensity of scheduled tasks without requiring manual resetting, achieving a self-evolutionary capability that "understands you better the more you use it".
[0119] This invention achieves multi-timescale collaborative prediction and adaptive control by constructing a seasonal trend prediction model, a weather response prediction model, and a user habit learning model. The seasonal trend prediction model uses a Long Short-Term Memory (LSTM) network algorithm to capture interannual seasonal variation patterns, avoiding excessive chlorination in winter and insufficient disinfection in summer. The weather response prediction model establishes a mapping relationship between meteorological parameters and chlorine consumption rates through regression analysis, proactively addressing chlorine dilution caused by heavy rain and chlorine volatilization due to high temperatures and strong sunlight. The user habit learning model uses an unsupervised clustering algorithm to automatically discover periodic usage patterns, enabling personalized scheduling without manual programming. The three models operate collaboratively, transforming pool water quality management from "post-event remediation" to "pre-event prediction," improving water quality stability and equipment operating efficiency.
[0120] Step S3: The seasonal baseline chlorine production coefficient, weather influencing factors, and scheduled tasks are fused into a multi-objective decision-making system to calculate control parameters and send them to the terminal salt chlorinator for execution.
[0121] Multi-objective decision fusion refers to a decision-making mechanism that integrates the outputs of seasonal trend prediction models, weather response prediction models, and user habit learning models, and weights these outputs based on data confidence and timeliness to generate the final control parameters for the salt chlorinator. In this embodiment, the seasonal baseline chlorine production coefficient output by the seasonal trend prediction model, the weather influencing factors output by the weather response prediction model, and the reservation tasks generated by the user habit learning model are integrated, and weighted based on confidence and timeliness to generate the final set of control parameters, which are then sent to the terminal salt chlorinator for execution via a communication protocol.
[0122] Table 1 below shows the operating condition combinations and chlorine production rate correction parameters. Referring to Table 1, this invention combines the actual seasonal and weather combinations of swimming pool operation to provide typical seasonal baseline chlorine production coefficients and weather influence factor values, as well as the final chlorine production rate correction effect, directly adapting to engineering practice. Table 1 uses a baseline chlorine production rate of 20g / h under standard operating conditions as the basis for calculation, and sets up six data columns: operating condition combination, seasonal baseline chlorine production coefficient, weather influence factor, total correction coefficient, final chlorine production rate, and core correction objective, covering four groups of typical seasonal and weather combinations of actual swimming pool operation.
[0123] Table 1. Operating Condition Combinations and Chlorine Production Rate Correction Parameters
[0124]
[0125] Table 1 shows the typical engineering values of seasonal baseline chlorine production coefficient and weather influencing factors, as well as the calculation logic and actual correction effect of chlorine production rate correction in the multi-objective decision fusion process. It can provide direct parameter value and working condition adaptation guidance for the engineering practice of pool salt chlorinators, and intuitively demonstrate the precise control logic of the multi-dimensional parameter fusion of the present invention on the chlorine production rate of salt chlorinators.
[0126] The multi-objective decision fusion calculation process is executed in the decision fusion control layer of the cloud server. The cloud server integrates the outputs of the seasonal trend prediction model, the weather response prediction model, and the user habit learning model, and performs weighted synthesis based on data confidence and timeliness to generate the final control parameters of the salt chlorination machine.
[0127] The expression for multi-objective decision fusion computation is:
[0128] P final =(P base ×K season +ΔP weather )×W dynamic +P boost
[0129] In the formula, P final The final chlorine production capacity to be issued to the salt chlorinator; P base The basic chlorine production capacity of the salt chlorinator set for the user; K season The seasonal baseline chlorine production coefficient generated for the seasonal trend forecasting model; ΔP weather Weather impact factors generated for weather response prediction models; W dynamic P is a dynamic weighting factor adjusted based on the reliability of sensor data. boost The impulse compensation value corresponding to the appointment task generated by the user habit learning model.
[0130] The specific execution process of multi-objective decision fusion computation is as follows:
[0131] 1. Obtain the seasonal baseline chlorine production coefficient K output by the seasonal trend forecasting model. season Weather impact factor ΔP output by the weather response prediction model weather And the chlorine pulse compensation value P corresponding to the reservation task generated by the user habit learning model. boost ;
[0132] 2. Obtain the user-defined basic chlorine production power P of the salt chlorinator. base Combined with the seasonal baseline chlorine production coefficient K season Weather Influence Factor ΔP weather Calculate the environmental correction value for the baseline chlorine production power;
[0133] 3. The cloud server obtains the reliability of the current water quality sensor data and adjusts the dynamic weighting factor W accordingly. dynamic The value of is used to weight and adjust the environmental correction value;
[0134] 4. The cloud-based main control engine overlays the chlorine production pulse compensation value P corresponding to the user habit learning model. boost The final chlorine production power percentage P sent to the terminal chlorinator was calculated. final ;
[0135] 5. A special task queue is generated synchronously on the cloud server. The special task queue contains scheduled tasks generated by the user habit learning model. The scheduled tasks correspond to the trigger instructions of special working modes.
[0136] Dynamic weighting factor W dynamic A typical implementation is as follows: when the redox potential sensor malfunctions or its readings are unstable, resulting in low confidence of the sensor data, the cloud-based main control engine automatically reduces the dynamic weight factor W. dynamic The value of is adjusted to increase the dependence weight on the output of the weather response prediction model, forming a safe operation mode with open-loop prediction as the main method and closed-loop feedback as a supplement.
[0137] Based on the results of multi-objective decision fusion calculations, the cloud server generates a set of control parameters for the salt chlorinator. These parameters include the target chlorine production percentage, special operating modes, and recommended circulating pump speed. Next, the cloud server generates corresponding control commands for the salt chlorinator based on these parameters and securely sends them to the terminal salt chlorinator via MQTT or HTTPS protocols.
[0138] This invention utilizes a cloud-based collaborative global control architecture to deeply integrate equipment operating status, environmental meteorological data, and user behavior data. This breaks down the data silos that previously allowed independent operation between devices, avoids unnecessary excessive chlorination, saves salt and electricity, extends the lifespan of electrolysis equipment, and enables ordinary users to enjoy professional-grade water quality management solutions.
[0139] In some embodiments of this application, after step S3 calculates the control parameters and sends them to the terminal salt chlorinator for execution, the swimming pool water quality prediction and management method based on multi-source data fusion provided by this invention further includes:
[0140] Step S4: Local execution and feedback loop.
[0141] Specifically, after receiving the control command from the cloud server, the terminal salt chlorinator prioritizes using the parameters in the cloud control command, overriding the default settings of the terminal salt chlorinator, and executes the corresponding chlorine production and circulation pump operation according to the control command.
[0142] If the network connection between the terminal salt chlorinator and the cloud server is interrupted, the terminal salt chlorinator will automatically switch back to the local sensor control mode to ensure the basic operational safety of the pool water quality management system.
[0143] The actual water quality data after the terminal chlorinator executes the control command, including the oxidation-reduction potential value and pH value, are transmitted back to the cloud server in real time.
[0144] Based on the actual water quality data transmitted back, the cloud server uses reinforcement learning to optimize the prediction accuracy of the seasonal trend prediction model, weather response prediction model, and user habit learning model for the next prediction, forming a complete feedback loop of operational effectiveness.
[0145] In this embodiment, the terminal salt chlorinator prioritizes executing cloud commands to achieve predictive control. When the network is interrupted, it automatically switches to local mode to ensure operational safety. Actual water quality data is transmitted back to the cloud in real time and the model prediction accuracy is optimized through reinforcement learning, forming a complete feedback loop. This ensures system reliability and continuous evolution capabilities while achieving proactive prevention.
[0146] In some embodiments of this application, after the user habit learning model generates the reservation task for the corresponding time period and before performing multi-objective decision fusion, the method further includes a spatiotemporal correlation matching step, which specifically includes:
[0147] Obtain the rainfall probability data for the time period corresponding to the scheduled task output by the weather response prediction model. The rainfall probability data is calculated and generated by the weather response prediction model based on the meteorological forecast data of the corresponding region.
[0148] When the trigger time for the corresponding time period of the reservation task arrives, the cloud server initiates the logic gate verification process for the execution conditions of the reservation task.
[0149] The execution conditions of the scheduled task are validated using logic gate rules. The specific execution logic is divided into two categories:
[0150] The first type of execution logic: When the time period corresponding to the scheduled task meets the time condition of a periodic high-frequency pollution period identified by the user habit learning model, and the probability of rainfall during the time period corresponding to the scheduled task is lower than the first preset threshold, the cloud server activates the chlorine production pulse compensation value corresponding to the scheduled task and sends an instruction to the salt chlorinator to execute the super oxidation special working mode corresponding to the scheduled task. A typical application scenario is: the user habit learning model learns that Saturday afternoon is a high-frequency pollution period, the probability of rainfall during the time period corresponding to the scheduled task is 20%, which is lower than the first preset threshold of 30%. The cloud server activates the chlorine production pulse compensation value, executes the super oxidation mode, and increases the residual chlorine reserve in the water in advance.
[0151] The second type of execution logic: When the probability of rainfall for the time period corresponding to the scheduled task is higher than the second preset threshold, the cloud server blocks the scheduled task and switches to generate the control parameters for the chlorinator corresponding to the rainstorm emergency control mode. A typical scenario for resolving fusion conflicts is as follows: The user habit learning model learns the pattern of swimming every Saturday. If a sudden rainstorm occurs on a certain Saturday, the probability of rainfall for the time period corresponding to the scheduled task is 90%, which is higher than the second preset threshold of 80%. The cloud server reads the output of the weather response prediction model, determines that the current scenario is a high-risk scenario with no user activity, blocks the scheduled task generated by the user habit learning model, and instead executes the rainstorm emergency mode to prevent ineffective chlorine dosing.
[0152] The above logic gate rules can be expressed using logic gate statements as follows:
[0153] IF (Current time == Saturday afternoon) AND (Probability of rain < 30%):
[0154] Then, the "super oxidation mode" (Pboost activation) is executed.
[0155] ELSE IF (probability of rainfall > 80%):
[0156] THEN disables the usual mode and switches to "Rainstorm Emergency Mode" (to prevent ineffective additions).
[0157] The swimming pool water quality prediction and management method based on multi-source data fusion provided by this invention performs a spatiotemporal correlation matching step after the user habit learning model generates the reservation task for the corresponding time period and before executing multi-objective decision fusion. This step uses a logic gate fusion mechanism to jointly verify the time conditions of the time period corresponding to the reservation task with the rainfall probability data output by the weather response prediction model, and dynamically decides whether to activate the reservation task or switch to emergency control mode.
[0158] In some embodiments of this application, taking a private swimming pool in summer as an example, the multi-objective decision fusion and spatiotemporal correlation matching steps provided by the present invention are specifically described.
[0159] The time is 16:00 on a summer Friday. The user-set base chlorine production capacity P of the salt chlorinator. base The percentage is 30%. The cloud server runs three pre-trained models to make predictions based on the collected multi-source data.
[0160] The seasonal trend forecasting model, based on the equipment's geographical coordinates (23 degrees North latitude) and historical meteorological data, predicts that tomorrow will be the start of a high-temperature weekend, and outputs the seasonal baseline chlorine production coefficient K. season =1.1 indicates that the basic chlorine production power needs to be increased by 10% based on the user's settings.
[0161] Based on real-time meteorological data and future weather forecasts, the weather response prediction model predicts sunny weather, a UV index of 9, and no rainfall for tomorrow, Saturday. The weather impact factor ΔP is calculated accordingly. weather =+10% means that the chlorine production on the next day needs to be increased by an additional 10% on top of the seasonal baseline.
[0162] The user habit learning model uses an unsupervised clustering algorithm to mine features from historical pool water quality fluctuation data. Based on historical data, it determines that there is a 90% probability of a pool party on Saturday night, generates a reservation task, and suggests adding an impulse compensation value P on Saturday afternoon. boost =20%, used to offset high pollution loads at night.
[0163] Before the scheduled task trigger time arrives, the cloud server performs a spatiotemporal correlation matching step. The system obtains the rainfall probability data for the time period corresponding to the scheduled task from the weather response prediction model. The rainfall probability for Saturday afternoon is 0%, which is lower than the first preset threshold of 30%. At the same time, the time period corresponding to the scheduled task (Saturday afternoon 16:00) meets the time condition of the periodic high-frequency pollution period (every Saturday) identified by the user habit learning model. When both conditions are met, the system activates the pulse compensation value P corresponding to the scheduled task. boost =20%.
[0164] The cloud server performs multi-objective decision fusion computation. First, environmental baseline fusion is performed, and the environmental correction value P is calculated. env :
[0165] P env =P base ×K season +ΔP weather =30% × 1.1 + 10% = 43%
[0166] Environmental correction value P env =43% represents the continuous chlorine production capacity required to maintain water quality.
[0167] Subsequently, behavioral decision fusion is performed, and the impulse compensation value P generated by the user habit learning model is superimposed. boost =20%, calculate the final chlorine production power P final :
[0168] P final =P env +P boost =43% + 20% = 63%
[0169] Dynamic weighting factor W dynamic When the sensor data reliability is normal, a value of 1.0 is used, and the final chlorine production power P is... final It is 63%.
[0170] The cloud server generates a set of control parameters based on the fusion calculation results, including the target chlorine production percentage of 63%, the special operating mode "Pre-Party_Shock", and the recommended speed of the circulating pump to be increased to 120% of the rated speed. The cloud converts the set of control parameters into control commands for the salt chlorinator and securely sends them to the terminal salt chlorinator via Message Queuing Telemetry Transport Protocol (MQTT).
[0171] After receiving instructions from the cloud, the terminal salt chlorinator prioritizes using cloud parameters to override local default settings, and runs in super oxidation mode at 63% power for the next 4 hours before returning to the environmental baseline value.
[0172] Understandably, without the multi-source data fusion and predictive management method provided by this invention, traditional equipment can only maintain 30% of the user-set base power. On Saturday afternoon, a large number of people entered the pool, instantly depleting the chlorine reserve and causing turbidity in the water on Saturday night. Using the method provided by this invention, the system increases the chlorine reserve to 63% four hours before the pool party begins, effectively offsetting high-load pollution and ensuring stable water quality.
[0173] Figure 2 The overall architecture diagram of the swimming pool water quality prediction and management system based on multi-source data fusion provided by this invention is shown below. Figure 2 The system includes:
[0174] The data acquisition layer is used to collect multi-source data that affects pool water quality; wherein, the multi-source data includes pool water quality parameters, salt chlorinator operating status, equipment geographical coordinates, and meteorological data of the corresponding area;
[0175] The cloud-based AI model layer includes a pre-trained seasonal trend prediction model, a weather response prediction model, and a user habit learning model. The seasonal trend prediction model predicts the seasonal baseline chlorine production coefficient based on the device's geographical coordinates and historical meteorological data. The weather response prediction model calculates weather influencing factors through the mapping relationship between meteorological parameters and chlorine consumption rates. The user habit learning model performs feature mining on historical water quality fluctuation data, identifies high-frequency pollution periods, and generates scheduled tasks.
[0176] The decision fusion control layer is used to perform multi-objective decision fusion of the seasonal benchmark chlorine production coefficient, weather influencing factors, and scheduled tasks, calculate control parameters, and send them to the terminal salt chlorinator for execution.
[0177] The swimming pool water quality prediction and management system based on multi-source data fusion provided by the present invention is used to execute the swimming pool water quality prediction and management method based on multi-source data fusion provided in the foregoing embodiments. The swimming pool water quality prediction and management method based on multi-source data fusion has been described in detail in the above embodiments, and will not be repeated here.
[0178] Reference Figure 2 The swimming pool water quality prediction and management system based on multi-source data fusion provided by this invention adopts a three-layer architecture. The data acquisition layer is entirely deployed on the terminal device side, while the cloud-based AI model layer and the decision fusion control layer are jointly deployed on the cloud server. The terminal device consists of a salt and chlorinator and its supporting sensors, specifically including a water quality parameter sensor group, an operating status sensor group, and a global positioning system module. The water quality parameter sensor group includes a redox potential sensor, a pH sensor, a temperature sensor, and a salinity sensor. The terminal device establishes a bidirectional communication connection with the cloud server through a message queue telemetry transmission protocol or a hypertext transfer secure protocol. On the one hand, it uploads the collected multi-source data to the cloud server at a preset frequency; on the other hand, it receives control commands issued by the cloud server and prioritizes executing cloud parameters, overriding local default settings.
[0179] The cloud server and the user terminal application (APP) establish a connection via a hypertext transfer security protocol. Users can view real-time water quality data, equipment operating status, and system-generated predictive control logs through the application, and can set personalized parameters such as basic chlorine production power. The cloud server's built-in cloud AI model layer runs seasonal trend prediction models, weather response prediction models, and user habit learning models, while the decision fusion control layer performs multi-objective decision fusion calculations. After the cloud server completes the fusion calculation and generates a set of control parameters, it sends control commands, including the target chlorine production percentage, special operating modes, and recommended circulating pump speed, to the terminal chlorinator via a message queue telemetry transmission protocol. If the network connection is interrupted, the terminal chlorinator automatically switches back to local sensor control mode to ensure basic operational safety. The actual water quality data after the terminal device executes the commands is transmitted back to the cloud in real time. Reinforcement learning is used to optimize the model's prediction accuracy, forming a complete closed-loop system of data acquisition, prediction, decision-making, execution, and feedback.
[0180] Figure 3 A structural block diagram of the electronic device provided by the present invention, such as Figure 3 As shown, the present invention also provides an electronic device, which can be a mobile terminal, desktop computer, laptop, handheld computer, server, or other computing device. The electronic device 300 includes a processor 301 and a memory 302, wherein the memory 302 stores a swimming pool water quality prediction and management program 303 based on multi-source data fusion.
[0181] In some embodiments, memory 302 may be an internal storage unit of a computer device, such as a hard disk or memory. In other embodiments, memory 302 may be an external storage device of a computer device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc. Further, memory 302 may include both internal and external storage units of the computer device. Memory 302 is used to store application software and various types of data installed on the computer device, such as program code installed on the computer device. Memory 302 can also be used to temporarily store data that has been output or will be output. In one embodiment, when the pool water quality prediction and management program 303 based on multi-source data fusion is executed by processor 301, the following steps are implemented:
[0182] Collect multi-source data affecting swimming pool water quality; wherein, the multi-source data includes swimming pool water quality parameters, salt chlorination machine operating status, equipment geographical coordinates, and meteorological data of the corresponding area;
[0183] Based on the multi-source data, a pre-trained seasonal trend prediction model, a weather response prediction model, and a user habit learning model are run. The seasonal trend prediction model predicts the seasonal baseline chlorine production coefficient based on the equipment's geographical coordinates and historical meteorological data. The weather response prediction model calculates the weather influencing factor through the mapping relationship between meteorological parameters and chlorine consumption rate. The user habit learning model performs feature mining on historical water quality fluctuation data, identifies high-frequency pollution periods, and generates appointment tasks.
[0184] The seasonal baseline chlorine production coefficient, weather influencing factors, and scheduled tasks are integrated into a multi-objective decision-making process to calculate control parameters and send them to the terminal salt chlorinator for execution.
[0185] In some embodiments, processor 301 may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program code stored in memory 302 or process data, such as executing a swimming pool water quality prediction and management program based on multi-source data fusion.
[0186] This embodiment also provides a computer-readable storage medium storing a swimming pool water quality prediction and management program based on multi-source data fusion. When the swimming pool water quality prediction and management program based on multi-source data fusion is executed by a processor, it implements the steps of the swimming pool water quality prediction and management method based on multi-source data fusion.
[0187] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.
[0188] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting and managing swimming pool water quality based on multi-source data fusion, characterized in that, include: Collect multi-source data affecting swimming pool water quality; wherein, the multi-source data includes swimming pool water quality parameters, salt chlorination machine operating status, equipment geographical coordinates, and meteorological data of the corresponding area; Based on the multi-source data, a pre-trained seasonal trend prediction model, a weather response prediction model, and a user habit learning model are run. The seasonal trend prediction model predicts the seasonal baseline chlorine production coefficient based on the equipment's geographical coordinates and historical meteorological data. The weather response prediction model calculates the weather influencing factor through the mapping relationship between meteorological parameters and chlorine consumption rate. The user habit learning model performs feature mining on historical water quality fluctuation data, identifies high-frequency pollution periods, and generates appointment tasks. The seasonal baseline chlorine production coefficient, weather influencing factors, and scheduled tasks are integrated into a multi-objective decision-making process to calculate control parameters and send them to the terminal salt chlorinator for execution.
2. The swimming pool water quality prediction and management method based on multi-source data fusion according to claim 1, characterized in that, After collecting multi-source data affecting pool water quality, the method further includes: The collected multi-source data is standardized by using linear interpolation to align the timestamps of the multi-source data and construct a unified time series vector; outlier removal is performed by median filtering algorithm.
3. The swimming pool water quality prediction and management method based on multi-source data fusion according to claim 2, characterized in that, After completing the standardization process of the multi-source data, the method further includes: Feature layer fusion is performed on the standardized multi-source data to complete multi-dimensional feature extraction, and light consumption features, anthropogenic pollution features, and weather trend features are extracted respectively. The extracted feature factors are used as inputs to the seasonal trend prediction model, the weather response prediction model, and the user habit learning model.
4. The swimming pool water quality prediction and management method based on multi-source data fusion according to claim 3, characterized in that, The multidimensional feature extraction includes: Extract the light consumption feature, and the calculation formula for the light consumption feature is as follows: F uv =α1·UV(t)+α2·Temp(t) In the formula, F uv The light consumption characteristics are represented by α1, which is the ultraviolet weighting coefficient, UV(t) is the ultraviolet index at the current moment, α2 is the water temperature weighting coefficient, and Temp(t) is the water temperature at the current moment. Extract human-caused pollution features, the calculation formula for which the human-caused pollution features are: F load =β·|ORP(t)-ORP(t-Δt)| In the formula, F load For characteristics of anthropogenic pollution, β is the weighting coefficient for changes in redox potential, ORP(t) is the redox potential value at the current moment, ORP(t-Δt) is the redox potential value at interval Δt, and Δt is the sampling time interval. Extract weather trend features and obtain statistical features of meteorological data for the next 24 hours, including cumulative rainfall forecast and maximum temperature forecast.
5. The swimming pool water quality prediction and management method based on multi-source data fusion according to claim 1, characterized in that, Based on the aforementioned multi-source data, pre-trained seasonal trend prediction models, weather response prediction models, and user habit learning models are run, including: Run a seasonal trend prediction model, based on the equipment's geographical coordinates, historical meteorological data, and historical water quality data, to correct the impact of seasonal changes on chlorine loss and pool load, and output the corresponding seasonal baseline chlorine production coefficient for the pool. Run the weather response prediction model, establish the mapping relationship between meteorological parameters and chlorine consumption rate based on real-time meteorological data and future weather forecast data, correct the impact of daily weather changes on chlorine loss and pool water quality, and calculate the weather impact factor for the corresponding pool. Run a user habit learning model and use unsupervised clustering or anomaly detection algorithms to perform feature mining on historical water quality fluctuation data of the swimming pool, identify periodic high-frequency pollution periods of the swimming pool, and generate reservation tasks for the corresponding periods.
6. The swimming pool water quality prediction and management method based on multi-source data fusion according to claim 1, characterized in that, The seasonal baseline chlorine production coefficient, weather influencing factors, and scheduled tasks are integrated into a multi-objective decision-making process to calculate control parameters, which are then sent to the terminal salt chlorination unit for execution. Specifically, this includes: By combining the seasonal baseline chlorine production coefficient, weather influencing factors, and scheduled tasks, a multi-objective decision fusion calculation is performed to obtain the control parameter set of the salt chlorinator. The control parameter set includes the target chlorine production percentage, special operating mode, and recommended speed of the circulating pump. Based on the set of control parameters, control instructions for the salt chlorinator are generated, and the control instructions are sent to the terminal salt chlorinator for execution via a communication protocol.
7. The swimming pool water quality prediction and management method based on multi-source data fusion according to claim 6, characterized in that, The expression for the multi-objective decision fusion calculation is: P final =(P base ×K season +ΔP weather )×W dynamic +P boost In the formula, P final The final chlorine production capacity to be issued to the salt chlorinator; P base The basic chlorine production capacity of the salt chlorinator set for the user; K season The seasonal baseline chlorine production coefficient generated for the seasonal trend forecasting model; ΔP weather Weather impact factors generated for weather response prediction models; W dynamic P is a dynamic weighting factor adjusted based on the reliability of sensor data. boost The impulse compensation value corresponding to the appointment task generated by the user habit learning model.
8. The swimming pool water quality prediction and management method based on multi-source data fusion according to claim 5, characterized in that, After the user habit learning model generates the reservation task for the corresponding time period, and before performing multi-objective decision fusion, the method further includes a spatiotemporal correlation matching step, which specifically includes: Obtain the rainfall probability data for the time period corresponding to the scheduled task, as output by the weather response prediction model; When the trigger time of the scheduled task arrives, the execution conditions of the scheduled task are logically verified. If the scheduled task meets the time conditions of the identified periodic high-frequency pollution period and the probability of rainfall is lower than the first preset threshold, the chlorine production pulse compensation value corresponding to the scheduled task is activated and the super oxidation special working mode corresponding to the scheduled task is executed. If the probability of rainfall during the time period corresponding to the scheduled task is higher than the second preset threshold, the scheduled task will be blocked, and the control parameters of the salt chlorinator corresponding to the rainstorm emergency control mode will be switched.
9. A swimming pool water quality prediction and management system based on multi-source data fusion, the system being used to execute the swimming pool water quality prediction and management method based on multi-source data fusion as described in any one of claims 1-8, characterized in that, The system includes: The data acquisition layer is used to collect multi-source data that affects pool water quality; wherein, the multi-source data includes pool water quality parameters, salt chlorinator operating status, equipment geographical coordinates, and meteorological data of the corresponding area; The cloud-based AI model layer includes a pre-trained seasonal trend prediction model, a weather response prediction model, and a user habit learning model. The seasonal trend prediction model predicts the seasonal baseline chlorine production coefficient based on the device's geographical coordinates and historical meteorological data. The weather response prediction model calculates weather influencing factors through the mapping relationship between meteorological parameters and chlorine consumption rates. The user habit learning model performs feature mining on historical water quality fluctuation data, identifies high-frequency pollution periods, and generates scheduled tasks. The decision fusion control layer is used to perform multi-objective decision fusion of the seasonal benchmark chlorine production coefficient, weather influencing factors, and scheduled tasks, calculate control parameters, and send them to the terminal salt chlorinator for execution.
10. An electronic device, Its features are, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the swimming pool water quality prediction and management method based on multi-source data fusion as described in any one of claims 1 to 8.