Water purifier filter core batch life prediction method

CN122594935APending Publication Date: 2026-08-18KOROS TECH (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611012071.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-08
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0008]本发明旨在提供一种净水器滤芯批量寿命预测方法,以解决现有技术中的缺陷;本发明将事件驱动机制引入滤芯寿命预测,通过在终端侧实时检测水质事件并根据事件等级动态切换预测模式,从根本上解决了传统静态模型在突发水质变化时预测失准的问题;同时,本发明引入联邦学习框架,在保护用户数据隐私的前提下实现跨设备、跨区域的知识共享与模型协同进化

Benefits of technology

本发明通过步骤S1在终端侧实时采集水质参数序列,并配合步骤S2的多变量变点检测算法实现水质异常的毫秒级感知与分级,结合步骤S3的双模切换机制在正常工况下以稳态数据驱动模型保障预测精度、在事件工况下切换至物理约束保守模型保障鲁棒性,再通过步骤S4中嵌入事件标签的本地增量训练、步骤S5的区域联邦聚合生成区域基准模型、以及步骤S6的跨区域联邦聚合生成全局基础模型并下发,使原始数据不出设备即可实现跨设备跨区域知识共享,同时辅以应急模型快速分发、模型版本自动回滚和个体自适应校准机制,最终使滤芯更换预测准确率从约65%提升至93%以上、冷启动预测误差从35天降至12天、水质突变时预测偏差控制在25%以内,有效解决了背景技术中提及的全部缺陷。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122594935A_ABST
    Figure CN122594935A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of water purifier filter core, and relates to a water purifier filter core batch life prediction method, which comprises the following steps: sensors arranged at each water purifier terminal collect water quality parameter sequences in real time; each terminal performs real-time stream processing on the water quality parameter sequences, detects water quality events by using a multivariate variable point detection algorithm, and determines the event level according to the detection result; each terminal dynamically switches between the steady-state prediction mode and the event response mode according to the event level; each terminal performs incremental training on the prediction model by using the operation data locally, and generates terminal model parameters; each terminal uploads the terminal model parameters to a regional aggregation node through a federated learning framework; a regional benchmark model is generated; and each regional aggregation node uploads the regional benchmark model parameters to a global server. The present application realizes cross-device knowledge sharing and regional batch life prediction under data privacy protection, and improves the prediction accuracy and the emergency response capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of water purifier filter technology, and more specifically, to a method for predicting the batch lifespan of water purifier filter elements. Background Technology

[0002] With increasing public awareness of drinking water quality, the penetration rate of household and commercial water purifiers has been growing year by year. The core component of a water purifier is the filter cartridge, whose lifespan directly affects the quality of the output water and the user's health. Regularly replacing the filter cartridge is crucial to ensuring water quality; however, accurately predicting when to replace the filter cartridge remains a pressing technical challenge for the industry.

[0003] Traditional methods for predicting filter lifespan mainly fall into two categories: The first type is the fixed-cycle method, which sets a fixed replacement cycle based on the manufacturer's recommended usage time or rated water flow. This method completely ignores individual factors such as differences in water quality in different regions and differences in water consumption among different households, resulting in a serious disconnect between the predicted results and the actual condition of the filter cartridge. In areas with poor water quality, the filter cartridge may have already failed before its replacement cycle, while in areas with good water quality, the filter cartridge may still be usable but be replaced prematurely, resulting in a waste of resources.

[0004] The second type is the single-device data-driven method, which uses the operating data of a single water purifier (such as TDS value, flow rate, usage time, etc.) to build a predictive model. Although this type of method takes into account individual differences to a certain extent, it has the following shortcomings: (1) The amount of data of a single device is limited, especially in the early stage of device use (cold start stage), and there is a lack of sufficient historical data to support accurate prediction; (2) The data of each device forms a "data island", which cannot achieve knowledge sharing across devices and regions; (3) When water quality changes suddenly (such as pipeline maintenance, water source switching, seasonal change, etc.), the model trained based on historical data cannot perceive and respond in time, resulting in serious inaccurate prediction.

[0005] In recent years, some improvement schemes have attempted to incorporate regional water quality data to optimize predictions. For example, Chinese patent application CN119150702A discloses a method, system, electronic device, and storage medium for correcting the lifespan of a water purifier filter cartridge, which predicts water quality and corrects filter cartridge lifespan by acquiring influent spectral data. However, such schemes still mainly rely on a centralized data processing model, requiring user data to be uploaded to the cloud, posing a risk of privacy breaches; furthermore, their models are essentially static, lacking real-time perception and dynamic response mechanisms for sudden water quality events.

[0006] In addition, although there are attempts to use neural network regression models to predict filter life in existing technologies, their model training relies on centralized large-scale data collection. On the one hand, data privacy is difficult to guarantee, and on the other hand, the model has insufficient generalization ability when faced with regional water quality differences.

[0007] These problems severely limit the accuracy, timeliness, and practicality of filter life prediction. Summary of the Invention

[0008] This invention aims to provide a method for predicting the batch lifespan of water purifier filter cartridges to address the shortcomings of existing technologies. This invention introduces an event-driven mechanism into filter cartridge lifespan prediction, fundamentally solving the problem of inaccurate predictions by traditional static models when faced with sudden changes in water quality by real-time detection of water quality events at the terminal and dynamically switching prediction modes according to the event level. Simultaneously, this invention introduces a federated learning framework to achieve cross-device and cross-regional knowledge sharing and model co-evolution while protecting user data privacy.

[0009] The first aspect of the present invention provides a method for predicting the batch lifespan of water purifier filter cartridges, comprising the following specific steps: S1. Sensors deployed at each water purifier terminal collect water quality parameter sequences in real time; S2. Each terminal performs real-time stream processing on the water quality parameter sequence, uses a multivariable variable point detection algorithm to detect water quality events, and determines the event level based on the detection results. S3. Each terminal dynamically switches between steady-state prediction mode and event response mode according to the event level; S4. Each terminal uses the running data locally to incrementally train the prediction model and generate terminal model parameters; the terminal model parameters carry event label information. Event tagging information includes at least the event type, event level, and event duration; event tagging information participates in model aggregation as metadata during the federated aggregation process. S5. Each terminal uploads its terminal model parameters to the regional aggregation node through the federated learning framework; Regional aggregation nodes perform regional federated aggregation to generate regional baseline models; S6. Each regional aggregation node uploads the regional baseline model parameters to the global server; The global server performs cross-region federated aggregation, generates a global basic model, and distributes the global basic model to each regional aggregation node and each terminal. Preferably, in step S1, the water quality parameters include at least the influent TDS value, the effluent TDS value, the influent turbidity, the water flow rate, and the water temperature.

[0010] Preferably, the multivariate change point detection algorithm in step S2 specifically includes: A sliding window with size W is constructed for the time series of water quality parameters. At time t, the mean value of each water quality parameter within the window is calculated. and variance ; When the cumulative sum statistic CUSUMt of any water quality parameter exceeds a preset threshold h, a statistical change point is determined to exist at that moment. The cumulative sum statistic is calculated as follows: in, The water quality parameter values ​​at the current moment. Let k be the target mean, k be the allowable offset, and h be the decision threshold; The calculation method for multivariate composite statistics is as follows: .

[0011] Where p is the number of dimensions of the water quality parameter. Let CUSUM be the value of the j-th parameter at time t. The decision threshold for the j-th parameter; when When the value is greater than 1, it is determined to be a multivariate joint change point.

[0012] Preferably, in step S2, the event levels are divided into Level 1 events, Level 2 events, and Level 3 events; The rules for determining the event level are as follows: Level 1 event: The fluctuation range of a single water quality parameter is greater than or equal to the first threshold and less than the second threshold, or the fluctuation duration is less than the first duration; Level 2 event: fluctuation amplitude of a single water quality parameter ≥ the second threshold, or joint fluctuation of multiple water quality parameters, and the duration of the fluctuation ≥ the first duration; Level 3 event: The fluctuation range of multiple water quality parameters is greater than or equal to the third threshold, and the duration of the fluctuation is greater than or equal to the second duration, wherein the third threshold is greater than the second threshold, the first threshold is greater than the second duration, and the second duration is greater than the first duration.

[0013] Preferably, in step S3, if no water quality event is detected or a Level 1 event is detected, the system maintains or switches to steady-state prediction mode and outputs the remaining lifetime prediction value based on the terminal's historical data and regional benchmark model. If a Level 2 or Level 3 event is detected, the parameter snapshot of the steady-state prediction model is frozen and the event response mode is switched. The conservative prediction model based on physical constraints outputs the remaining lifetime prediction value and attaches the corresponding confidence label to the prediction result.

[0014] Preferably, the conservative prediction model for the physical constraints in step S3 is: in, For the rated life of the filter element, This represents the current TDS value of the influent. The rated TDS value, The current water flow rate, For the rated water flow rate, The current water temperature, For the rated water temperature, For safety reasons, These are the TDS decay function, flow rate decay function, and temperature decay function, respectively. in, These are the material constants determined experimentally.

[0015] Preferably, the method for determining the confidence label in step S3 is as follows: Confidence level under steady-state prediction mode ,in This is the average relative error obtained based on historical prediction error statistics; In event response mode, confidence level ,in Based on confidence level, The attenuation coefficient is... Duration of the event Used as a reference time constant; When confidence level Below the preset reliability lower limit When the prediction results are displayed, they will be output in interval format: ,in The radius of the interval that is negatively correlated with the confidence level.

[0016] in, The coefficient for the maximum interval radius. At the current confidence level, This is the preset confidence level lower limit.

[0017] Preferably, the federated aggregation within the region in step S5 employs the FedProx algorithm, whose optimization objective is: in, Let i be the local loss function of the i-th terminal. For model parameters, These are global model parameters. These are the coefficients of the proximal terms; The aggregation formula for the regional aggregation node is: ; The weighted aggregation formula is: Where N is the number of terminals participating in the aggregation within the region. The model parameters uploaded by the i-th terminal. Let the event label weight be the i-th terminal. This is the event weighting coefficient. This represents the event level value.

[0018] Preferably, step S6 also includes a rapid distribution mechanism for the emergency model: When the global server detects that more than a preset number M terminals in the same area trigger a level 2 or level 3 event successively within a preset time window ΔT, it determines that a large-scale water quality event has occurred in the area. The global server selects an emergency model that matches the event type from the pre-stored emergency model library and pushes it to all terminal devices in the region through the federated learning distribution channel; After receiving the emergency model, each terminal device replaces the current event response mode prediction model with the emergency model.

[0019] Preferably, it also includes model version management and rollback mechanisms: Each time the federated aggregation generates a new version of the regional baseline model and the global base model, the system retains the historical versions and their performance evaluation metrics. Each terminal periodically reports the deviation between the local prediction results and the actual replacement life to the cloud; When the global average prediction bias of a certain version of the model exceeds a preset bias threshold, the system automatically triggers a rollback, restoring the model for that region or the entire system to the previous version.

[0020] Preferably, it also includes an individual adaptive calibration mechanism: When a newly installed terminal is first started, it downloads the regional baseline model of the area from the cloud as the initial prediction model. During terminal operation, the model is fine-tuned online using local actual water usage data. During the fine-tuning process, the weight ratio of the regional baseline model parameters and the local incremental update parameters is dynamically adjusted over the duration of operation. in, For terminal runtime, It is a time constant. For regional baseline model parameters, These are the model parameters after local fine-tuning.

[0021] A second aspect of the present invention provides a batch life prediction system for water purifier filter cartridges, which uses the above-described method for prediction, including: The terminal sensing module, deployed in each water purifier terminal, includes a water quality sensor unit and a data acquisition unit, used to collect water quality parameter sequences in real time; The event detection module is deployed in each water purifier terminal and connected to the terminal sensing module. It is used to perform real-time stream processing of water quality parameter sequences and to detect water quality events and determine the event level using a multivariable variable point detection algorithm. The dual-mode prediction engine module is deployed in each water purifier terminal and connected to the event detection module. It includes a steady-state prediction submodule and an event response prediction submodule. It is used to dynamically switch between steady-state prediction mode and event response mode according to the event level and output the remaining life prediction value and confidence label. The local training module is deployed in each water purifier terminal and connected to the dual-mode prediction engine module. It is used to incrementally train the prediction model using terminal operation data and generate terminal model parameters. The regional aggregation module, deployed on the regional aggregation node, is used to receive model parameters uploaded by each terminal in the region and perform FedProx federated aggregation to generate a regional baseline model. The global aggregation module, deployed on the global server, is used to receive regional baseline model parameters uploaded by aggregation nodes in each region and perform cross-regional federated aggregation to generate a global base model. The model distribution module, deployed on the global server, is used to distribute the global basic model to aggregation nodes in various regions and terminals. The emergency model management module, deployed on the global server, is used to store the emergency model library and trigger rapid distribution of emergency models when a large-scale regional water quality event is detected. The model version management module is deployed on the global server and is used to manage the storage, performance evaluation, and automatic rollback of various model versions.

[0022] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.

[0023] A fourth aspect of the present invention provides a computer device including a memory and a processor, the memory storing a computer program: when the processor executes the computer program, it implements the steps of the above-described method for predicting the batch lifespan of water purifier filter cartridges.

[0024] Compared with the prior art, the present invention has the following beneficial effects: This invention achieves millisecond-level perception and classification of water quality anomalies by collecting water quality parameter sequences in real time at the terminal side in step S1, and by using a multivariable change point detection algorithm in step S2. Combined with the dual-mode switching mechanism in step S3, it ensures prediction accuracy by driving the model with steady-state data under normal operating conditions, and switches to a physically constrained conservative model to ensure robustness under event conditions. Then, through local incremental training with embedded event tags in step S4, regional benchmark models are generated by regional federated aggregation in step S5, and global basic models are generated and distributed by cross-regional federated aggregation in step S6, the original data can be shared across devices and regions without leaving the device. At the same time, it is supplemented by emergency model rapid distribution, automatic model version rollback and individual adaptive calibration mechanisms. Ultimately, the accuracy of filter replacement prediction is improved from about 65% to more than 93%, the cold start prediction error is reduced from 35 days to 12 days, and the prediction deviation during water quality changes is controlled within 25%, effectively solving all the defects mentioned in the background technology. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the drawings without creative effort. In the drawings: Figure 1 This is a flowchart of a method for predicting the batch lifespan of water purifier filter cartridges according to an embodiment of the present invention.

[0026] Figure 2 This is a system diagram of a water purifier filter cartridge batch life prediction system according to an embodiment of the present invention. Detailed Implementation

[0027] Hereinafter, exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments of the present invention. It should be understood that the present invention is not limited to the exemplary embodiments described herein.

[0028] Example 1 like Figure 1 As shown, this embodiment provides a method for predicting the batch lifespan of water purifier filter cartridges, which is implemented in the following steps: The solution of the present invention is implemented in the following steps: In step S1, sensors deployed at each water purifier terminal collect water quality parameter sequences in real time, including influent TDS value, effluent TDS value, influent turbidity, water flow rate and water temperature, providing a data basis for subsequent event detection and lifespan prediction.

[0029] In step S2, each terminal performs real-time stream processing on the water quality parameter sequence, uses a multivariate change point detection algorithm to calculate the cumulative sum statistics to identify statistical change points of water quality parameters, and determines the detection results as a first-level event, a second-level event, or a third-level event based on the fluctuation amplitude and duration, thereby realizing the immediate perception and classification of water quality anomalies.

[0030] In step S3, each terminal dynamically switches between two prediction modes according to the event level: when no event is detected or only a level 1 event is detected, the steady-state prediction mode is maintained, and the remaining lifetime prediction value is output based on historical data and regional benchmark models; when a level 2 or level 3 event is detected, the steady-state model parameter snapshot is frozen, and the terminal switches to the physical constraint conservative prediction model to output the remaining lifetime prediction value. A confidence label is added to the prediction result to achieve differentiated prediction that pursues accuracy under normal operating conditions and ensures robustness under abnormal operating conditions.

[0031] In step S4, each terminal uses the running data locally to incrementally train the prediction model, generate terminal model parameters, and carry event label information such as event type, event level, and duration in the parameters.

[0032] In step S5, each terminal uploads the model parameters carrying event tags to the regional aggregation node through the federated learning framework. The regional aggregation node performs FedProx federated aggregation to generate a regional benchmark model.

[0033] In step S6, each regional aggregation node uploads the regional baseline model parameters to the global server. The global server performs cross-regional federated aggregation to generate a global basic model, and then distributes the global basic model to each regional aggregation node and each terminal, completing the collaborative evolution of regional common knowledge and global collective intelligence.

[0034] To further understand the technical solution of this embodiment, a specific example is used for detailed explanation below: The solution in this embodiment is applied to a household water purifier network in a city. The city has 10,000 water purifier terminals connected to the cloud, distributed across different administrative districts. Based on historical water quality monitoring data, the city is divided into three water quality zones: Zone A (old urban area, aging pipe network, average TDS 280 ppm), Zone B (new urban area, average TDS 180 ppm), and Zone C (suburban area, using surface water, average TDS 120 ppm).

[0035] Step 1: Terminal Deployment and Data Collection Each water purifier terminal is equipped with a TDS sensor with a measurement range of 0-1000 ppm and an accuracy of ±2%; a turbidity sensor with a measurement range of 0-100 NTU and an accuracy of ±0.1 NTU; a flow sensor with a measurement range of 0-5 L / min and an accuracy of ±2%; and a temperature sensor with a measurement range of 0-50°C and an accuracy of ±0.5°C.

[0036] The sensor collects data in real time at a sampling frequency of 1 time per second. After preprocessing such as noise reduction and outlier removal, a time series data stream is formed.

[0037] Step Two: Real-time Monitoring of Water Quality Incidents Taking a terminal in Zone A as an example, the average TDS of the influent to this terminal during stable operation was 275 ppm, with a standard deviation of 15 ppm. The parameters for the CUSUM algorithm are set as follows: =275, k=10, h=30.

[0038] Starting at 8:00 AM one morning, the TDS value of the influent to this terminal began to rise continuously, reaching 340 ppm by 10:00 AM. Calculate the CUSUM statistic using the formula: when When the cumulative time exceeds h=30, the system triggers a statistical change point detection at 9:15 AM. Simultaneously, the turbidity at this terminal increases from 0.5 NTU to 2.8 NTU, and the flow rate decreases from 1.2 L / min to 0.9 L / min. According to the formula... Calculate the multivariate composite statistic >1 indicates a multivariate joint variable point.

[0039] According to the event level determination rules: if the fluctuation range of a single water quality parameter (TDS) is (340-275) / 275=23.6%≥20%, and multiple parameters fluctuate together, it is determined to be a level 2 event, indicating a significant change in water quality.

[0040] Cloud-based big data analysis confirmed that the water source in the area was switched due to municipal pipeline maintenance, which lasted for approximately 48 hours.

[0041] Step 3: Dual-mode prediction switching Upon detecting a Level 2 event, the terminal immediately performs the following operations: (1) Freeze steady-state model: Save a snapshot of the parameters of the current steady-state prediction model to prevent abnormal data during the event from polluting the normal model.

[0042] (2) Switch to event response mode: Start the conservative prediction model with physical constraints.

[0043] The reverse osmosis membrane filter cartridge used in this terminal has a rated lifespan. =730 days (approximately 2 years), rated =250 ppm, rated flow rate =1.0 L / min, rated temperature =25°C.

[0044] The average parameters during the current event period are: =320 ppm, =0.95 L / min, =22°C.

[0045] Calculate the TDS decay function, flow rate decay function, and temperature decay function respectively. Calculated = (250 / 320)^0.5 = 0.884 = (1.0 / 0.95)^0.3 = 1.016 = exp[0.04 × (25-22)] = 1.127 =0.85 × 730 × 0.884 × 1.016 × 1.127 = 615 days During the duration of the event, the remaining lifespan of the filter element is conservatively estimated at 615 days, which is about 35 days shorter than the steady-state prediction of 650 days.

[0046] (3) Calculate confidence level: The terminal has been in event response mode for 24 hours. =24, =0.85, λ=0.5, =24: =0.85 × exp(-0.5 × 24 / 24) = 0.85 × 0.6065 =0.516 Since C=0.516 is slightly higher =0.5, the system outputs a remaining life prediction of 615 days, and marks the confidence level as "low to medium" (51.6%). At the same time, it prompts the user that "the water quality has changed significantly recently, and it is recommended to pay attention to the water quality monitoring data".

[0047] Step 4: Event Recovery and Model Unfreezing Forty-eight hours later, terminal sensor data showed that the influent TDS gradually decreased to 280 ppm, turbidity dropped to 0.6 NTU, and the flow rate recovered to 1.15 L / min. The event timer recorded an event duration of 48 hours < 72 hours (the trigger threshold for a Level 3 event), classifying it as a short-term event.

[0048] The system performs a model unfreezing operation: restores the steady-state prediction model, and stores the data during the event period, including event labels: secondary events, water source switching, and a duration of 48 hours, as labeled training samples in the local database for the next round of incremental model training.

[0049] Step 5: Federated Learning and Model Update At 2:00 AM every day, each terminal performs incremental training of the local model.

[0050] Taking this terminal as an example, its local model is a 3-layer LSTM network (64 hidden layer dimensions). The input features are the water quality parameter sequence of the past 7 days (TDS, turbidity, flow rate, and temperature), and the output is the predicted remaining lifetime. After completing local training, the terminal will output the model parameters w. i The event tag metadata is encrypted and then uploaded to the regional aggregation node in area A.

[0051] Area A has a total of 3,200 online terminals, of which 2,800 participated in the federated aggregation that day. The regional aggregation node executed FedProx aggregation: =0.05, These are the parameters of the previous round of global model.

[0052] For each terminal, local optimization is performed first, followed by weighted aggregation. Event tag weights. =1+0.2× Terminals that have experienced a Level 2 event have a weight of 1.4, while terminals that have not experienced an event have a weight of 1.0.

[0053] After aggregation, the regional baseline model for region A is uploaded to the global server. The global server integrates the model parameters from regions A, B, and C, weights them according to the number of terminals in each region, generates a new global basic model, and distributes it to all terminals before 6:00 AM on the same day.

[0054] Step Six: Individual Adaptive Calibration A newly installed terminal in Area A downloaded the regional benchmark model of Area A from the cloud as the initial model on the fifth day of operation.

[0055] On the 5th day of operation: =1-exp(-5 / 30)=0.154.

[0056] The actual model parameters of this terminal are: = (1-0.154)× + 0.154× = 0.846× + 0.154× That is, the current model of this terminal relies 85% on the regional benchmark and 15% on local fine-tuning.

[0057] As the running time increases, by day 30: =1-exp(-1)=0.632, local data weight accounts for 63%; by day 90: =1-exp(-3)=0.950, local data accounts for 95% of the weight, and the model has basically achieved personalization.

[0058] This embodiment constructs a complete batch life prediction solution for water purifier filter cartridges through the aforementioned steps S1 to S6. On the terminal side, this solution only requires data collection using the existing TDS sensor, flow sensor, and temperature sensor of the water purifier. Combined with an event detection algorithm and dual-mode prediction engine deployed locally on the terminal, it can independently complete event perception and life estimation without the need for additional complex detection equipment or uploading the user's original water quality data to the cloud. The terminal hardware modification cost is low, the computing power requirement is moderate, and it is easy to deploy directly on existing water purifier product lines. On the regional side, this solution uses regional aggregation nodes to federate and aggregate the model parameters uploaded by each terminal. Only a certain number of network-enabled water purifier terminals in the region are needed to form an effective regional benchmark model, enabling integrated and batch prediction management of the filter cartridge life of all networked water purifiers in a specific geographical area or an area with similar water quality characteristics. The collaborative mechanism between the cloud and the terminal allows newly installed terminals to quickly start predictions simply by downloading the benchmark model for their region, without waiting for their own historical data to accumulate. The entire solution takes into account lightweight deployment, privacy protection, and large-scale collaborative management capabilities, and can be easily ported to various household and commercial water purifier systems to achieve intelligent batch prediction of the lifespan of water purifier filter cartridges at the regional level.

[0059] Example 2 Unlike Example 1, this example focuses on illustrating the application scenarios of the rapid distribution mechanism for emergency models.

[0060] One day, due to a sudden rainstorm at the upstream water source, the turbidity of the raw water in Area B rose sharply from 2 NTU to 45 NTU, and the TDS of the influent fluctuated from 180 ppm to 210-350 ppm.

[0061] Within a 6-hour period from 6:00 AM to 12:00 PM on the same day, the aggregation node in Area B detected that more than 35% (M=30%) of the terminals in the area had triggered Level 2 or Level 3 events.

[0062] Once the event monitoring module of the global server detects this abnormal pattern, it automatically performs the following operations: (1) Retrieve matching emergency models from the emergency model library. The model library is pre-trained based on 12,000 sets of water quality-filter cartridge consumption data collected during historical rainstorm events (a total of 8 times). The input features are “turbidity surge magnitude + TDS fluctuation magnitude + duration”, and the output is “filter cartridge life accelerated consumption coefficient”.

[0063] (2) Select the emergency model with the highest matching degree and push it to all 3,500 terminal devices in Area B within 30 minutes through the federated learning distribution channel.

[0064] (3) After receiving the emergency model, each terminal replaces the current event response mode prediction model. Taking a terminal in Zone B as an example, its filter cartridge rated lifespan... =365 days, 180 days have been used so far. Steady-state model predicts remaining lifetime of 185 days.

[0065] Based on current turbidity (45 NTU) and TDS fluctuation data, the emergency model calculates an accelerated depletion factor (κ) of 1.45, and the corrected remaining lifetime prediction is as follows: = 185 / 1.45 = 128 days The terminal also outputs a confidence level of C=0.45, which is lower than... =0.5, therefore output in interval form: =0.3×(1-0.45) / (1-0.5)=0.33 =[128 × 0.67, 128 × 1.33] = [86 days, 170 days] The system displays the message to users: "The water quality in your area has changed significantly recently. We recommend that you closely monitor the water quality data. The filter replacement is expected within 3-6 months." Water quality returned to normal after five days of torrential rain. The emergency model was automatically deactivated, and the terminal switched back to steady-state prediction mode. However, the data from this event, including the event tags: Level 3 event, torrential rain, lasting 5 days, and acceleration consumption coefficient of 1.45, was retained and uploaded for subsequent updates to the emergency model library and the global model.

[0066] This embodiment first collects water quality parameter sequences in real time through terminal sensors, and uses a multivariable change point detection algorithm to identify and classify water quality events online. Second, it constructs a dual-mode switching engine for steady-state prediction and event response. Under normal operating conditions, it outputs high-precision predictions based on historical data and a regional benchmark model. Once a water quality event of level II or above is detected, the steady-state model is frozen and switched to a conservative prediction model with physical constraints. Simultaneously, it dynamically outputs confidence labels and interval predictions to manage user expectations. Then, it incrementally trains models locally on each terminal using running data, encrypting and uploading model parameters and event label information. Through the FedProx federated learning framework, it aggregates regional benchmark models within the region and aggregates global basic models across regions for distribution, enabling collective intelligence without leaving the device. Finally, it employs three mechanisms: rapid distribution of emergency models, automatic model version rollback, and individual adaptive calibration. When a regional water quality event occurs, the cloud can push a dedicated emergency model in real time. When model performance deteriorates, it automatically reverts to a stable version. Newly installed terminals cold-start from the regional benchmark and gradually adjust weights locally over time to achieve personalization. This method improves the accuracy of filter replacement prediction from about 65% in the traditional fixed cycle method to over 93%, reduces the prediction error of cold start of new equipment from 35 days to 12 days, and controls the prediction deviation to within 25% when water quality changes suddenly, while the traditional method exceeds 60%. It achieves the organic unity of regional group intelligence and individual accurate prediction while protecting user data privacy, and is suitable for cloud-based collaborative management of large-scale water purifier equipment.

[0067] Example 3 like Figure 2 As shown, the overall system architecture of this invention includes three layers: include: The terminal sensing module, deployed in each water purifier terminal, includes a water quality sensor unit and a data acquisition unit, used to collect water quality parameter sequences in real time; each water purifier terminal includes: sensor group: TDS sensor, turbidity sensor, flow sensor, temperature sensor; data is collected at a sampling rate of 1 Hz, and a moving average filter window size of 10 and outlier removal are performed; The event detection module is deployed in each water purifier terminal and connected to the terminal sensing module. It is used to perform real-time stream processing of water quality parameter sequences and to detect water quality events and determine the event level using a multivariable change point detection algorithm. It runs the multivariable CUSUM change point detection algorithm and outputs the event level in real time. The dual-mode prediction engine module is deployed in each water purifier terminal and connected to the event detection module. It includes a steady-state prediction submodule and an event response prediction submodule. It is used to dynamically switch between steady-state prediction mode and event response mode according to the event level and output the remaining life prediction value and confidence label. The dual-mode prediction engine includes a steady-state prediction model based on LSTM and a conservative prediction model based on physical equations.

[0068] The local training module, deployed on each water purifier terminal, connects to the dual-mode prediction engine module to incrementally train the prediction model using terminal operating data and generate terminal model parameters; incremental training is performed every morning at midnight using the Adam optimizer; it also includes a federated learning client: implementing local optimization of FedProx and encrypting the upload of model parameters.

[0069] The regional aggregation module, deployed on the regional aggregation node, receives model parameters uploaded by terminals within the region and performs FedProx federated aggregation to generate a regional baseline model. One regional aggregation node is set up for each water quality region, containing: Regional model aggregation module: Receives model parameters uploaded by terminals within the region and performs FedProx aggregation; Regional event monitoring module: Monitors event reporting from various terminals within the region and identifies regional event patterns; Regional Model Storage Module: Stores historical versions of regional baseline models.

[0070] The global cloud server includes: The global aggregation module, deployed on the global server, is used to receive regional baseline model parameters uploaded by aggregation nodes in each region and perform cross-regional federated aggregation to generate a global base model; it also receives model parameters from each region and performs cross-regional federated aggregation. Emergency Model Management Module: Deployed on a global server, it stores the emergency model library and triggers rapid distribution of emergency models when a large-scale regional water quality event is detected; it also stores the emergency model library and triggers rapid distribution of emergency models. Model version management module: Deployed on the global server, it is used to manage the storage, performance evaluation and automatic rollback of each version of the model; Model distribution module: Deployed on the global server, it is used to distribute the global basic model to the aggregation nodes in each region and to each terminal.

[0071] Data transmission between the three layers is conducted via the TLS 1.3 encrypted communication protocol. The terminal only uploads model parameters, which fundamentally protects user privacy.

[0072] Example 4 According to one aspect of the present invention, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations described above.

[0073] In another aspect, the present invention also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to implement the water purifier filter cartridge batch life prediction method described in the above embodiments.

[0074] It should be noted that although several modules or units of the device for performing actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0075] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, portable hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of the present invention.

[0076] Those skilled in the art will readily conceive of embodiments of the invention upon consideration of the specification and practice of the methods disclosed herein. The invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein.

[0077] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A method for predicting the batch lifespan of water purifier filter cartridges, characterized in that, The specific steps include the following: S1. Sensors deployed at each water purifier terminal collect water quality parameter sequences in real time; S2. Each terminal performs real-time stream processing on the water quality parameter sequence, uses a multivariable variable point detection algorithm to detect water quality events, and determines the event level based on the detection results. S3. Each terminal dynamically switches between steady-state prediction mode and event response mode according to the event level; S4. Each terminal uses the running data locally to incrementally train the prediction model and generate terminal model parameters; the terminal model parameters carry event label information. Event tagging information should include at least the event type, event level, and event duration; Event tag information participates in model aggregation as metadata during the federated aggregation process; S5. Each terminal uploads its terminal model parameters to the regional aggregation node through the federated learning framework; Regional aggregation nodes perform regional federated aggregation to generate regional baseline models; S6. Each regional aggregation node uploads the regional baseline model parameters to the global server; The global server performs cross-regional federated aggregation, generates a global basic model, and distributes the global basic model to each regional aggregation node and each terminal.

2. The method for predicting the batch lifespan of water purifier filter cartridges according to claim 1, characterized in that, In step S1, the water quality parameters include at least the influent TDS value, the effluent TDS value, the influent turbidity, the water flow rate, and the water temperature.

3. The method for predicting the batch lifespan of water purifier filter cartridges according to claim 1, characterized in that, The multivariate change point detection algorithm in step S2 specifically includes: A sliding window with size W is constructed for the time series of water quality parameters. At time t, the mean value of each water quality parameter within the window is calculated. and variance ; When the cumulative sum statistic CUSUMt of any water quality parameter exceeds the preset threshold h, a statistical change point is determined to exist at that moment. The cumulative sum statistic is calculated as follows: in, The water quality parameter values ​​at the current moment. Let k be the target mean, k be the allowable offset, and h be the decision threshold; The calculation method for multivariate composite statistics is as follows: 。 Where p is the number of dimensions of the water quality parameter. Let CUSUM be the value of the j-th parameter at time t. The decision threshold for the j-th parameter; when When the value is greater than 1, it is determined to be a multivariate joint change point.

4. The method for predicting the batch lifespan of water purifier filter cartridges according to claim 1, characterized in that, In step S2, the event levels are divided into Level 1 events, Level 2 events, and Level 3 events; The rules for determining the event level are as follows: Level 1 event: The fluctuation range of a single water quality parameter is greater than or equal to the first threshold and less than the second threshold, or the fluctuation duration is less than the first duration; Level 2 event: fluctuation amplitude of a single water quality parameter ≥ the second threshold, or joint fluctuation of multiple water quality parameters, and the duration of the fluctuation ≥ the first duration; Level 3 event: The fluctuation range of multiple water quality parameters is greater than or equal to the third threshold, and the duration of the fluctuation is greater than or equal to the second duration, wherein the third threshold is greater than the second threshold, the first threshold is greater than the second duration, and the second duration is greater than the first duration.

5. The method for predicting the batch lifespan of water purifier filter cartridges according to claim 4, characterized in that, In step S3, if no water quality event is detected or a Level 1 event is detected, maintain or switch to steady-state prediction mode, and output the remaining lifetime prediction value based on the historical data of the terminal and the regional benchmark model. If a Level 2 or Level 3 event is detected, the parameter snapshot of the steady-state prediction model is frozen and the event response mode is switched. The conservative prediction model based on physical constraints outputs the remaining lifetime prediction value and attaches the corresponding confidence label to the prediction result.

6. The method for predicting the batch lifespan of water purifier filter cartridges according to claim 5, characterized in that, The conservative prediction model for the physical constraints in step S3 is as follows: in, For the rated life of the filter element, This represents the current TDS value of the influent. The rated TDS value, The current water flow rate, For the rated water flow rate, The current water temperature, For the rated water temperature, For safety reasons, These are the TDS decay function, flow rate decay function, and temperature decay function, respectively.

7. The method for predicting the batch lifespan of water purifier filter cartridges according to claim 5, characterized in that, The method for determining the confidence label in step S3 is as follows: Confidence level under steady-state prediction mode ,in This is the average relative error obtained based on historical prediction error statistics; In event response mode, confidence level ,in Based on confidence level, The attenuation coefficient is... Duration of the event Used as a reference time constant; When confidence level Below the preset reliability lower limit When the prediction results are displayed, they will be output in interval format: ,in The radius of the interval that is negatively correlated with the confidence level.

8. The method for predicting the batch lifespan of water purifier filter cartridges according to claim 1, characterized in that, The federated aggregation within the region described in step S5 uses the FedProx algorithm, and its optimization objective is: in, Let i be the local loss function of the i-th terminal. For model parameters, These are global model parameters. These are the coefficients of the proximal terms; The aggregation formula for the regional aggregation node is: Where N is the number of terminals participating in the aggregation within the region. The model parameters uploaded for the i-th terminal.

9. The method for predicting the batch lifespan of water purifier filter cartridges according to claim 1, characterized in that, Step S6 also includes a rapid distribution mechanism for emergency models: When the global server detects that more than a preset number M terminals in the same area trigger a level 2 or level 3 event successively within a preset time window ΔT, it determines that a large-scale water quality event has occurred in the area. The global server selects an emergency model that matches the event type from the pre-stored emergency model library and pushes it to all terminal devices in the region through the federated learning distribution channel; After receiving the emergency model, each terminal device replaces the current event response mode prediction model with the emergency model.

10. A system for predicting the batch lifespan of water purifier filter cartridges, comprising using the method described in any one of claims 1-9 for prediction, characterized in that, include: The terminal sensing module, deployed in each water purifier terminal, includes a water quality sensor unit and a data acquisition unit, used to collect water quality parameter sequences in real time; The event detection module is deployed in each water purifier terminal and connected to the terminal sensing module. It is used to perform real-time stream processing of water quality parameter sequences and to detect water quality events and determine the event level using a multivariable variable point detection algorithm. The dual-mode prediction engine module is deployed in each water purifier terminal and connected to the event detection module. It includes a steady-state prediction submodule and an event response prediction submodule. It is used to dynamically switch between steady-state prediction mode and event response mode according to the event level and output the remaining life prediction value and confidence label. The local training module is deployed in each water purifier terminal and connected to the dual-mode prediction engine module. It is used to incrementally train the prediction model using terminal operation data and generate terminal model parameters. The regional aggregation module, deployed on the regional aggregation node, is used to receive model parameters uploaded by each terminal in the region and perform FedProx federated aggregation to generate a regional baseline model. The global aggregation module, deployed on the global server, is used to receive regional baseline model parameters uploaded by aggregation nodes in each region and perform cross-regional federated aggregation to generate a global base model. The model distribution module, deployed on the global server, is used to distribute the global basic model to aggregation nodes in various regions and terminals. The emergency model management module, deployed on the global server, is used to store the emergency model library and trigger rapid distribution of emergency models when a large-scale regional water quality event is detected. The model version management module is deployed on the global server and is used to manage the storage, performance evaluation, and automatic rollback of various model versions.

Citation Information

Patent Citations

  • Service life correction method and system of water purification filter element, electronic equipment and storage medium

    CN119150702A