Centralized water purification system filter element replacement prediction method, training method, equipment and medium

By using the target status space model and evaluation model in the concentrated water purification system, the future state of prediction and evaluation of the water purification node solves the problem of accurately predicting the filter element replacement time in the existing technology, and realizes the best maintenance strategy of global. Improve the reliability and operating efficiency of the system.

CN119358671APending Publication Date: 2025-01-24SHENZHEN WELLCOME WATER GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411376699.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

The prior art cannot accurately predict the filter element replacement time in centralized water purification systems, and cannot formulate maintenance strategies for each single node through global information, making it difficult to achieve global optimal maintenance strategies.

Method used

Put forward a prediction method for the concentrated water purification system filter element replacement. By obtaining the historical attribute data vectors of each water purification node, the input target status space model is predicted, the node predictive attribute data vector is obtained in the future time, and the evaluation model is evaluated. In the end Formulate a global change time strategy.

Benefits of technology

The accurate prediction of the filter element replacement time in the centralized water purification system provides the system's optimal maintenance strategy, improves the reliability and operating efficiency of system operation, and reduces maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119358671A_ABST
    Figure CN119358671A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a filter element replacement prediction method and training method of a centralized water purification system, equipment and a medium, and relates to the technical field of communication and artificial intelligence fusion. The method comprises the following steps: acquiring node attribute data vectors of water purification nodes at a plurality of continuous historical moments, wherein the plurality of water purification nodes form a distributed network; alternately and circularly performing first prediction and second prediction on the node attribute data vector through a target state space model to obtain continuous node attribute data vectors at a plurality of future moments; inputting the node attribute data vector at each future moment into an evaluation model, and evaluating the node attribute data vector at the future moment through the evaluation model to obtain future state evaluation data of the water purification node at the future moment; and making a strategy according to the future state evaluation data of all the water purification nodes to obtain a target replacement time strategy. According to the method, the replacement time of the filter element of the centralized water purification system can be predicted, so that a global optimal maintenance strategy of the system is provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication and artificial intelligence integration technology, and in particular to a centralized water purification system filter element replacement prediction method, a target state space model training method, an electronic device, and a computer-readable storage medium. Background Art

[0002] A centralized water purification system is a system that provides unified water purification services for a specific area. It is generally used in residential areas, schools, office buildings, industrial areas and other settlements. The centralized water purification system effectively provides clean water through a series of treatment steps such as coagulation, sedimentation, filtration and disinfection. However, as the number of nodes in the centralized water purification system increases, a centralized water purification network is formed. Its system maintenance, filter element maintenance and replacement strategy are crucial to the reliability of system operation, water quality consistency and operating costs. Traditionally, the method of using a unified time replacement or semi-manual and semi-automatic detection of water quality replacement is an offline judgment of a single node. It is impossible to effectively utilize global data and create information islands, which poses a huge challenge to the global maintenance strategy and operating costs of the entire water purification network.

[0003] Related patent technology [1] proposes to use the variable function relationship between purification rate and filtered water volume, which is a linear negative correlation, to deduce the purification rate for filter element replacement prediction. However, this method relies on a linear regression model and cannot handle the typical nonlinear situation of distributed water purification networks, nor can it predict the nonlinear characteristics of filter element replacement time. Reference [2] proposes a novel gated graph neural network model for water quality prediction in the water distribution network of a water supply system. However, this technology only involves water quality prediction and does not involve the prediction of system maintenance and replacement strategies. Reference [3] measures total dissolved solids and total suspended solids through traditional field and weight methods and remote sensing technology, but these methods are costly, labor-intensive and have limited spatial coverage. At the same time, remote sensing technology has problems with atmospheric interference, radiation and spectral resolution, and can only be used as a link in sensing system status in this technology.

[0004] In summary, currently: (i) the relevant technology cannot accurately predict the replacement time of the filter element in the centralized water purification system; (ii) the relevant technology cannot formulate a maintenance strategy for each single node through global information, thereby forming a global optimal maintenance strategy.

[0005] [1] Yin Xiaorong, Xian Haiying, Tang Jie, & Wen Ying. (2023). A filter life detection method, device, computer equipment and water purifier. CN116282374A.

[0006] [2] Zilin Li,Haixing Liu,Chi Zhang,Guangtao Fu, "Real-time waterquality prediction in water distribution networks using graph neural networks with sparse monitoring data," Water Research, Volume 250, 2024, ISSN 0043-1354, https: / / doi.org / 10.1016 / j.watres.2023.121018 .

[0007] [3]Adjovu GE, Stephen H, James D, Ahmad S. Measurement of Total DissolvedSolids and Total Suspended Solids in Water Systems: A Review of the Issues, Conventional, and Remote Sensing Techniques. Remote Sensing. 2023; 15(14): 3534. https: / / doi.org / 10.3390 / rs15143534. Summary of the invention

[0008] The main purpose of the embodiments of the present application is to propose a centralized water purification system filter element replacement prediction method, a target state space model training method, an electronic device and a computer-readable storage medium, which can use global information to predict the replacement time of the filter element of the centralized water purification system network, thereby providing a global optimal maintenance strategy for the system.

[0009] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a method for predicting filter replacement of a centralized water purification system, wherein the centralized water purification system includes a plurality of water purification nodes, the plurality of water purification nodes form a distributed network, and the plurality of water purification nodes belong to more than two regions, and the method includes:

[0010] Acquire node historical attribute data vectors of the water purification node at a plurality of consecutive historical moments, wherein the node historical attribute data vectors are used to represent data referenced for predicting the time for replacing the filter element of the water purification node;

[0011] Input the node historical attribute data vectors of multiple historical moments into the target state space model of the water purification node, perform a first prediction on the node historical attribute data vectors of the historical moment and the node prediction state data vector of the moment before the historical moment through the target state space model, obtain the node prediction state data vector of the moment after the historical moment, and perform a second prediction on the node prediction state data vector of the last historical moment to obtain the node prediction attribute data vector of the next moment, alternately perform the first prediction and the second prediction to obtain the node prediction attribute data vector of multiple consecutive future moments;

[0012] Inputting the node prediction attribute data vector at each future moment into the evaluation model, evaluating the node prediction attribute data vector at the future moment through the evaluation model, and obtaining the future state evaluation data of the water purification node at the future moment;

[0013] A strategy is formulated based on the future status evaluation data of all the water purification nodes to obtain a target replacement time strategy for the centralized water purification system.

[0014] Optionally, the target replacement time strategy includes a replacement sub-time of each of the water purification nodes; the strategy formulation based on the future state evaluation data of all the water purification nodes to obtain the target replacement time strategy of the centralized water purification system includes:

[0015] Compare the future state evaluation data corresponding to the future moment of the water purification node with a preset state evaluation threshold to obtain a comparison result; wherein the state evaluation threshold represents the minimum state evaluation value without replacing the filter element;

[0016] If the comparison result is that the future state evaluation data is less than the state evaluation threshold, the replacement sub-time is determined according to the future moment corresponding to the future state evaluation data.

[0017] Optionally, the acquiring of the node historical attribute data vector of the water purification node at a plurality of consecutive historical moments includes:

[0018] Obtaining node attribute data of the water purification node itself at multiple consecutive historical moments to obtain historical attribute data of the node;

[0019] Acquire node attribute data of the adjacent water purification nodes of the water purification node at a plurality of consecutive historical moments to obtain the adjacent node historical attribute data, wherein the adjacent water purification nodes include at least one of the following: a first adjacent water purification node in the same area as the water purification node and a second adjacent water purification node not in the same area as the water purification node;

[0020] Data integration is performed based on the historical attribute data of the current node and the historical attribute data of the adjacent nodes to obtain the historical attribute data vector of the node.

[0021] Optionally, the target state space model includes a historical data compression matrix, a current data mining matrix and a state prediction matrix;

[0022] The first prediction of the node historical attribute data vector at the historical moment and the node prediction state data vector at the moment before the historical moment is performed by the target state space model to obtain the node prediction state data vector at the moment after the historical moment includes:

[0023] The node prediction state data vector at the moment before the historical moment is compressed by the historical data compression matrix to obtain a node state transfer data vector;

[0024] Performing data mining on the node historical attribute data vector at the historical moment through the current data mining matrix to obtain a node attribute mining data vector;

[0025] Performing vector fusion according to the node state transfer data vector and the node attribute mining data vector to obtain a node prediction state data vector at a moment after the historical moment;

[0026] The second prediction of the node prediction state data vector at the last historical moment to obtain the node prediction attribute data vector at the next moment includes:

[0027] The state prediction matrix is ​​multiplied by the node prediction state data vector at the last historical moment to obtain the node prediction attribute data vector at the next moment.

[0028] Optionally, the evaluation model includes a system state weight matrix;

[0029] The step of inputting the node prediction attribute data vector at each future moment into the evaluation model, evaluating the node prediction attribute data vector at the future moment by the evaluation model, and obtaining the node state evaluation data at the future moment includes:

[0030] Performing conjugate transposition on the node prediction attribute data vector at the future moment to obtain a conjugate transposed vector of the node attribute data;

[0031] Perform vector dot multiplication on the conjugate transposed vector of the node attribute data and the system state weight matrix to obtain a target dot product vector;

[0032] Perform vector dot multiplication on the target dot product vector and the node prediction attribute data vector at the future moment to obtain the node state evaluation data at the future moment.

[0033] Optionally, before inputting the node historical attribute data vectors at multiple historical moments into the target state space model of the water purification node, the method further includes:

[0034] The target state space model is obtained by training, specifically including:

[0035] Obtaining node sample attribute data vectors of the water purification nodes of the centralized water purification system at a plurality of consecutive sample moments;

[0036] The node sample attribute data vectors of a plurality of consecutive sample moments are divided to obtain the training data and labels of the water purification node; wherein the training data is used to indicate the node sample attribute data vectors obtained from the first sample moment to the division moment, and the label is used to indicate the node sample attribute data vectors obtained from the next sample moment after the division moment to the last sample moment;

[0037] Obtaining an adjacency matrix based on the distributed network construction;

[0038] Input the training data of the water purification node into the initial state space model of the water purification node to obtain prediction data, wherein the prediction data is used to indicate the node sample attribute data vector predicted from the next sample moment after the division moment to the last sample moment;

[0039] Integrate the initial weight sub-parameters of the initial state space model of all the water purification nodes to obtain an initial global weight parameter;

[0040] Calculate the node loss according to the label and prediction data of the water purification node to obtain the node loss data;

[0041] Performing regularized loss calculation according to the adjacency matrix, the training data of all the water purification nodes and the initial global weight parameter to obtain regularized loss data;

[0042] The initial global weight parameter is adjusted according to the node loss data and the regular loss data of all the water purification nodes to obtain a target global weight parameter; the target global weight parameter includes target weight sub-parameters of multiple water purification nodes;

[0043] For each of the water purification nodes, the initial weight sub-parameters in the initial state space model are replaced with the target weight sub-parameters to obtain the target state space model.

[0044] Optionally, the adjusting the initial global weight parameter according to the node loss data and the regular loss data of all the water purification nodes to obtain a target global weight parameter includes:

[0045] Calculating the gradient of the water purification node according to the node loss data of each water purification node;

[0046] Using a local optimization function to locally optimize the initial weight sub-parameter and the gradient of the water purification node to obtain an intermediate weight sub-parameter of the water purification node;

[0047] Performing neighborhood optimization on the intermediate weight sub-parameters and the regularized loss data of the water purification node using a neighborhood optimization function to obtain updated weight sub-parameters of the water purification node;

[0048] The node loss data and the regular loss data are updated based on the updated weight sub-parameter, and the global loss data is calculated based on the updated node loss data of all the water purification nodes and the updated regular loss data;

[0049] If the global loss data is less than a preset loss threshold, the updated weight sub-parameter is determined as the target weight sub-parameter.

[0050] To achieve the above-mentioned purpose, the second aspect of the embodiment of the present application proposes a target state space model training method, wherein the target state space model is used to predict the replacement of filter cartridges in a centralized water purification system, wherein the centralized water purification system includes a plurality of water purification nodes, wherein the plurality of water purification nodes form a distributed network, and the plurality of water purification nodes belong to more than two regions; the method includes:

[0051] Obtaining node sample attribute data vectors of the water purification nodes of the centralized water purification system at a plurality of consecutive sample moments;

[0052] The node sample attribute data vectors of a plurality of consecutive sample moments are divided to obtain the training data and labels of the water purification node; wherein the training data is used to indicate the node sample attribute data vectors obtained from the first sample moment to the division moment, and the label is used to indicate the node sample attribute data vectors obtained from the next sample moment after the division moment to the last sample moment;

[0053] Obtaining an adjacency matrix based on the distributed network construction;

[0054] Input the training data of the water purification node into the initial state space model of the water purification node to obtain prediction data, wherein the prediction data is used to indicate the node sample attribute data vector predicted from the next sample moment after the division moment to the last sample moment;

[0055] Integrate the initial weight sub-parameters of the initial state space model of all the water purification nodes to obtain an initial global weight parameter;

[0056] Calculate the node loss according to the label and prediction data of the water purification node to obtain the node loss data;

[0057] Performing regularized loss calculation according to the adjacency matrix, the training data of all the water purification nodes and the initial global weight parameter to obtain regularized loss data;

[0058] The initial global weight parameter is adjusted according to the node loss data and the regular loss data of all the water purification nodes to obtain a target global weight parameter; the target global weight parameter includes target weight sub-parameters of multiple water purification nodes;

[0059] For each of the water purification nodes, the initial weight sub-parameters in the initial state space model are replaced with the target weight sub-parameters to obtain a target state space model.

[0060] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the method described in the first aspect or the second aspect when executing the computer program.

[0061] To achieve the above objectives, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method described in the first aspect or the second aspect.

[0062] The present application proposes a method for predicting the replacement of filter cartridges in a centralized water purification system, a method for training a target state space model, an electronic device, and a computer-readable storage medium. The method first obtains the node historical attribute data vectors of each water purification node at multiple consecutive historical moments, wherein multiple water purification nodes form a distributed network and multiple water purification nodes belong to more than two regions. Then, the node attribute data vectors at multiple historical moments are predicted by the target state space model corresponding to the water purification node to obtain the node prediction attribute data vectors at multiple future moments. Specifically, the target state space is divided into a first prediction and a second prediction. The node historical attribute data vectors at multiple historical moments can be mined by using the first prediction to obtain the node prediction state data vector, and then the node prediction attribute data vector at the future moment can be predicted from the node prediction state data vector and the node historical attribute vector by using the second prediction. In this way, based on the node historical attribute data vector and the target state space model, the node prediction attribute data vector at the future moment can be predicted. Then, the node prediction attribute data is evaluated by using the evaluation model to obtain the future state evaluation data of the water purification node at the future moment. Finally, a strategy is formulated based on the future state evaluation data of all water purification nodes to obtain the target replacement time strategy of the centralized water purification system. It can be seen that the present application can predict the replacement time of the filter element in the centralized water purification system.

[0063] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1 It is an optional flow chart of the method for predicting filter element replacement in a centralized water purification system provided in an embodiment of the present application;

[0065] Figure 2 It is a schematic diagram of the network topology of the centralized water purification system provided in the embodiment of the present application;

[0066] Figure 3 yes Figure 1 Flowchart of step 101 in FIG.

[0067] Figure 4 yes Figure 1 Flowchart of step 102;

[0068] Figure 5 is a schematic diagram of the learning structure of the water purification node provided in the embodiment of the present application;

[0069] Figure 6 It is an optional flow chart of a method for predicting filter element replacement in a centralized water purification system provided by another embodiment of the present application;

[0070] Figure 7 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0071] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0072] It should be noted that, although the functional modules are divided in the structural diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the structure or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0073] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0074] The present application provides a method for predicting filter element replacement in a centralized water purification system, which can also be referred to as a method for predicting filter element replacement in a centralized water purification system based on a distributed network. The key problems that can be solved include:

[0075] 1. Improve the accuracy of filter element replacement: Through real-time monitoring and data analysis, the best time to replace the filter element can be accurately predicted to avoid replacing the filter element too early or too late, thereby ensuring water quality and reducing costs.

[0076] 2. Optimize system operation efficiency: Through multi-dimensional monitoring and prediction of the overall system status and adjacent node status, timely global and local system maintenance decisions can be made based on adjacent node attribute data such as system status, water quality, filter element status, etc., to improve the overall operation efficiency and reliability of the system.

[0077] 3. Reduce various maintenance costs: reduce unnecessary filter element replacement and maintenance operations, reduce unnecessary data collection and computing consumption, effectively reduce computing power deployment costs and communication network costs, and significantly reduce the overall maintenance cost of the system.

[0078] The centralized water purification system filter cartridge replacement prediction method of the embodiment of the present application can be executed by the server alone, or by the terminal alone, or by the terminal and the server together. In addition, the centralized water purification system filter cartridge replacement prediction method provided in the embodiment of the present application can also be software running on the server. The server can be configured as an independent physical server, or as a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the centralized water purification system filter cartridge replacement prediction method, but is not limited to the above forms.

[0079] The embodiments of the present application provide a method for predicting filter cartridge replacement in a centralized water purification system, a target state space model training method, an electronic device, and a computer-readable storage medium, which are specifically illustrated by the following embodiments. First, the method for predicting filter cartridge replacement in a centralized water purification system in the embodiments of the present application is described.

[0080] See also Figure 1 According to one embodiment of the present application, a method for predicting filter element replacement in a centralized water purification system includes:

[0081] Step 101, obtaining node historical attribute data vectors of a water purification node at a plurality of consecutive historical moments;

[0082] Step 102, inputting the node historical attribute data vectors of multiple historical moments into the target state space model of the water purification node, performing a first prediction on the node historical attribute data vectors of the historical moment and the node predicted state data vectors of the moment before the historical moment through the target state space model, obtaining the node predicted state data vectors of the moment after the historical moment, and performing a second prediction on the node predicted state data vectors of the last historical moment, obtaining the node predicted attribute data vectors of the moment after, performing the first prediction and the second prediction alternately and cyclically, obtaining the node predicted attribute data vectors of multiple consecutive future moments;

[0083] Step 103, inputting the node prediction attribute data vector at each future moment into the evaluation model, evaluating the node prediction attribute data vector at the future moment through the evaluation model, and obtaining the future state evaluation data of the water purification node at the future moment;

[0084] Step 104 , formulate a strategy based on the future state evaluation data of all water purification nodes to obtain a target replacement time strategy for the centralized water purification system.

[0085] The benefit of the embodiment of step 101 to step 104 is that it can predict the replacement time of the filter element in the centralized water purification system and can also improve the utilization rate and service life of the filter element of the entire system.

[0086] Before describing step 101, the centralized water purification system is first described.

[0087] A centralized water purification system is a system that provides clean and safe drinking water by centrally treating water sources to remove impurities, pollutants and microorganisms from water. A water purification node refers to a key device in a centralized water purification system that is used to remove pollutants, impurities and microorganisms from water. A centralized water purification system generally includes multiple water purification nodes. Each water purification node has specific functions and effects, such as filtration, disinfection, softening, etc. Through the synergistic effect of multiple water purification nodes, the water quality can be effectively improved to ensure that the water meets the safe drinking water standards. Common water purification nodes include particle filters, activated carbon filters, etc. The water purification node has a filter element, which mainly treats water through the filter element. The maintenance and replacement of the filter element is crucial to the reliability of the operation of the centralized water purification system, the consistency of water quality and the operating cost.

[0088] Multiple water purification nodes form a distributed network. The network topology is described below.

[0089] First, the network topology is represented by an undirected graph G = (V, E), where V represents the set of water purification nodes, and a water purification node includes a filter element, a pipe, and a connector; E represents the edge set, which represents the connection between water purification nodes. The network topology details can usually be obtained from the system design documents or the topology information can be formed according to the specific deployment situation. These data are used to construct the adjacency matrix of the undirected graph m represents the total number of nodes in the entire network, where each element A ij (t) is constructed according to the specific situation. Generally, it can be defined as follows:

[0090]

[0091] Among them, i,j represent the node number, ranging from 1 to m, d j (t) represents the out-degree of node j at time t. In a directed graph, the out-degree of a node is the number of edges connected to the node. in (t): represents the in-neighbor set of node i at time t, which is a set of nodes that contain the starting points of all edges directed to node i at time t. The adjacency matrix is ​​defined in this way, that is, the time variable t and the out-degree d of the node are introduced. j (t), there are several potential advantages: 1. By introducing the time variable t, the dynamic characteristics of the network changing over time can be captured, which is conducive to analyzing the time-varying network structure. 2. By using As a weight, the inverse of the out-degree can be used to normalize the connection strength, which is convenient for probability calculation and random process analysis. At the same time, different importance can be given to different connections in the network. Nodes with smaller out-degrees have greater contributions to connection strength, which helps to identify key nodes in the network and conduct influence analysis. Among them, the water purification nodes are centralized water purification centers, which are also edge computing centers. They can increase computing efficiency and improve accuracy through mutual communication.

[0092] Multiple water purification nodes belong to more than two areas. In one example, for urban tap water supply, the following centralized water purification system network topology can be constructed. Figure 2 , the centralized water purification system includes water purification node 1 to water purification node 12, a total of 12 water purification nodes. The centralized water purification system also includes water source 1 to water source 4, a total of 4 water sources. Different water sources have different regions. Water source 1 corresponds to region 1, water source 2 corresponds to region 2, water source 3 corresponds to region 3, and water source 4 corresponds to region 4. The water source flow direction of water source 1 directly points to water purification node 1 to water purification node 3, and water purification node 1 to water purification node 3 are all in region 1. The water source flow direction of water source 2 directly points to water purification node 4 to water purification node 6, and water purification node 4 to water purification node 6 are all in region 2. The water source flow direction of water source 3 directly points to water purification node 7 to water purification node 9, and water purification node 7 to water purification node 9 are all in region 3. The water source flow direction of water source 4 directly points to water purification node 10 to water purification node 12, and water purification node 10 to water purification node 12 are all in region 4. For any two water purification nodes, if there is information transfer, there is an edge, that is, they are adjacent water purification nodes. For example, if there is information transfer between water purification node 1 and water purification node 3, then water purification node 1 and water purification node 3 are adjacent water purification nodes. Other water purification nodes are similar and will not be repeated here.

[0093] In step 101 of some embodiments, the node historical attribute data vectors of the water purification node at a plurality of consecutive historical moments are obtained. The node historical attribute data vectors are used to represent the data referenced for predicting the time to replace the filter element of the water purification node.

[0094] Specifically, for an undirected graph G = (V, E) consisting of m water purification nodes and their information transmission, V is the node set, v i is the water purification node, v i ∈V. For the water purification node v i , the node attribute data composed of the data collected by the sensor can be expressed as a column vector X i , with dimensions D, each dimension contains a type of sensor data. In a certain period of time, sampling is performed T times at a certain frequency to obtain X at different times i Composed of time series, X i In each dimension, define X i (d,t) is the node vi The d-th dimension data at time t. Therefore, for the entire centralized water purification system, a data set can be obtained m is the total number of water purification nodes in the entire network.

[0095] The node attribute X of the D dimension should include key parameters that can reflect whether the filter element needs to be replaced. The following are some examples of key indicators that may be included in the node attribute X:

[0096] (1) Water quality parameters: such as turbidity, pH value, residual chlorine, conductivity, organic matter content, etc. These are important indicators for evaluating water quality and filter performance.

[0097] (2) Filter element status indicators: such as material, pressure difference, flow rate, usage time, pollutant removal efficiency, etc., which can reflect the working status and replacement needs of the filter element.

[0098] (3) Environmental factors: such as temperature, humidity, etc. These factors may affect the performance and life of the filter element.

[0099] (4) Operational data: such as filter element replacement history, maintenance records, etc., which help predict the life and performance of the filter element.

[0100] (5) Water use habits: For example, users in a certain area are accustomed to using water during a certain period of time, how much water they are accustomed to using per day / hour, etc. These factors reflect the workload of the filter element, thus affecting the performance and life of the filter element.

[0101] In one embodiment, referring to Figure 3 , step 101 may include:

[0102] Step 301, obtaining node attribute data of the water purification node itself at multiple consecutive historical moments to obtain historical attribute data of the node;

[0103] Step 302, obtaining node attribute data of the adjacent water purification nodes of the water purification node at a plurality of consecutive historical moments, and obtaining the adjacent node historical attribute data, wherein the adjacent water purification nodes include at least one of the following: a first adjacent water purification node in the same area as the water purification node and a second adjacent water purification node in a different area from the water purification node;

[0104] Step 303: perform data integration based on the attribute data of the node and the attribute data of the adjacent nodes to obtain a node history attribute data vector.

[0105] For example, for the water purification node v i , collect water purification node v i The node attribute data at time t is obtained to obtain the historical attribute data X of this node i0 (t), and also collects node v iThe adjacent clean water nodes (including clean water node v h and water purification node v p ) node attribute data, and obtain the adjacent node historical attribute data (including the adjacent node historical attribute data X ih (t) and the historical attribute data X of the adjacent nodes ip (t)). Then the historical attribute data X of this node is i0 (t) and the historical attribute data X of the adjacent nodes ih (t) and the historical attribute data X of the adjacent nodes ip (t) By integrating the data, we can get the node historical attribute data vector X i (t). Specifically, the node historical attribute data includes D dimensions. When data integration is performed, the data of each dimension is integrated separately. For example, i The historical attribute data X of the node in the dth dimension at time t i0 (d, t), the historical attribute data X of the adjacent nodes in the dth dimension at time t ih (d, t), and the historical attribute data X of the adjacent nodes in the dth dimension at time t ip (d, t) data integration can obtain the node historical attribute data vector X of the dth dimension i (d, t). The D-dimensional node historical attribute data vector X i (d, t) to integrate data and obtain the water purification node v i The node history attribute data vector X i .

[0106] The benefit of the above-mentioned embodiment of step 301 to step 303 is that by performing multi-dimensional detection on the water purification node and adjacent water purification nodes, an information-rich node historical attribute data vector can be obtained, which helps to improve the accuracy of subsequent filter element replacement predictions.

[0107] The adjacent water purification nodes include a first adjacent water purification node in the same area as the water purification node and a second adjacent water purification node not in the same area. Figure 2 , for water purification node 3, water purification node 1 is the adjacent water purification node of water purification node 3 and both are in area 1, so water purification node 1 is the first adjacent water purification node. Water purification node 5 is the adjacent water purification node of water purification node 3, but is in area 2, so water purification node 5 is the second adjacent water purification node.

[0108] In one embodiment, step 303 includes: setting a first weight for the water purification node, setting a second weight for the first adjacent water purification node, and setting a third weight for the second adjacent water purification node, wherein the first weight, the second weight, and the third weight decrease in sequence; performing weighted data fusion based on the historical attribute data of the node and the first weight, the historical attribute data of the adjacent nodes of the first adjacent water purification node and the second weight, and the historical attribute data of the adjacent nodes of the second adjacent water purification node and the third weight to obtain a node historical attribute data vector.

[0109] For example, the first weight is 1, the second weight is 0.7, and the third weight is 0.3. i The attribute data X of the node in the dth dimension at time t i0 (d, t) and 1, the adjacent node attribute data X of the dth dimension at time t ih (d, t) and 0.7, and the adjacent node attribute data X of the dth dimension at time t ip (d, t) and 0.3, we can get the node historical attribute data vector X of the dth dimension. i Then, the D-dimensional node historical attribute data vector X i (d, t) to integrate data and obtain the water purification node v i The node history attribute data vector X i .

[0110] The benefit of the above-mentioned embodiment of setting different weights is that the importance of attribute data of water purification nodes in different areas can be effectively distinguished, and both practicality and flexibility are high.

[0111] In step 102 of some embodiments, the node historical attribute data vectors of multiple historical moments are input into the target space state model of the water purification node, and the node historical attribute data vectors of the historical moment and the node predicted state data vectors of the moment before the historical moment are predicted by the target space state model to obtain the node predicted state data vector of the moment after the historical moment, and the node predicted state data vector of the last historical moment is predicted to obtain the node predicted attribute data vector of the next moment, and the first prediction and the second prediction are performed alternately to obtain the node predicted attribute data vectors of multiple consecutive future moments.

[0112] The target space state model of each water purification node includes the historical data compression matrix, the current data mining matrix and the state prediction matrix. The target state space model of each water purification node is as follows:

[0113] h i (t) = h i (t-1)*A i +B i *Xi (t)

[0114] Y i (t) = C i *h i (t)

[0115] Among them, A i is the water purification node v i The historical data compression matrix, B i is the water purification node v i The current data mining matrix, C i Water purification node v i is the state prediction matrix, h i (t) is the water purification node v i The node prediction state data vector at time t is used as the hidden layer of the model. i The Hippo matrix can be used to compress historical information, B i ,C i By input X i After a linear fully connected layer, Y i (t) is the water purification node v i The output at time t is to achieve the prediction task, so Y i (t) is output only at the last time step.

[0116] In one embodiment, referring to Figure 4 , step 102 may include:

[0117] Step 401, compressing the node prediction state data vector at the previous moment of the historical moment through the historical data compression matrix to obtain the node state transfer data vector;

[0118] Step 402, data mining is performed on the node historical attribute data vectors at the historical moment through the current data mining matrix to obtain the node attribute mining data vectors;

[0119] Step 403, performing vector fusion according to the node state transmission data vector and the node attribute mining data vector to obtain the node prediction state data vector at the next moment after the historical moment;

[0120] Step 404, multiplying the state prediction matrix and the node prediction state data vector at the last historical moment to obtain the node prediction attribute data vector at the next moment;

[0121] Step 405 , alternately performing the first prediction and the second prediction, and obtaining node prediction attribute data vectors at a plurality of consecutive future moments.

[0122] For example, refer to Figure 5 , water purification node vi The learning structure can include: (1) according to the water purification node v i The node prediction state data vector h at time t-3 i (t-3) and historical data compression matrix A i Perform matrix multiplication to obtain the node state transfer data vector at time t-3; according to the water purification node v i The node historical attribute data vector X at time t-2 i (t-2) and the current data mining matrix B i Perform matrix multiplication to obtain the node attribute mining data vector at time t-2. Perform vector fusion based on the node state transfer data vector at time t-3 and the node attribute mining data vector at time t-2 to obtain the node prediction state data vector h at time t-2 i (t-2). (2) According to the water purification node v i The node prediction state data vector h at time t-2 i (t-2) and historical data compression matrix A i Perform matrix multiplication to obtain the node state transfer data vector at time t-2; according to the water purification node v i The node historical attribute data vector X at time t-1 i (t-1) and the current data mining matrix B i Perform matrix multiplication to obtain the node attribute mining data vector at time t-1. Perform vector fusion based on the node state transfer data vector at time t-2 and the node attribute mining data vector at time t-1 to obtain the node prediction state data vector h at time t-1 i (t-1). (2) According to the water purification node v i The node prediction state data vector h at time t-1 i (t-1) and historical data compression matrix A i Perform matrix multiplication to obtain the node state transfer data vector at time t-1; according to the water purification node v i The node historical attribute data vector X at time t i (t) and the current data mining matrix B i Perform matrix multiplication to obtain the node attribute mining data vector at time t. Perform vector fusion based on the node state transfer data vector at time t-1 and the node attribute mining data vector at time t to obtain the node prediction state data vector h at time t i (t). (4) The state prediction matrix C i and the node prediction state data vector h at time t i (t) is multiplied to get the predicted result Y i (t). Prediction result Y i(t) contains a vector of node prediction attribute data for multiple consecutive future moments, which can be expressed as Y i (t) = {X i (t+1),X i (t+2),......,X i (t+n)}.

[0123] In step 103 of some embodiments, the node prediction attribute data vector at each future moment is input into the evaluation model, and the node prediction attribute data vector at the future moment is evaluated by the evaluation model to obtain future state evaluation data of the water purification node.

[0124] The evaluation model refers to a function or neural network model that can evaluate the node status. It can be designed by designing a specific function or by AI. Specifically, since the goal of this application is to predict the replacement of the filter element of the water purification node, it is necessary to evaluate the current system status. i The d-dimensional data X at time t i (d, t), an evaluation criterion function F(X i (t)) = u i (t), where u i (t) is the water purification node v i The state indicator at time t. At the same time, set a water purification node v i The state assessment threshold u i,th , when u i (t) ith Indicates that the filter element needs to be replaced. This allows the system status to be evaluated at any time to determine whether the filter element needs to be replaced.

[0125] In one embodiment, the evaluation model includes a system state weight matrix, and step 103 may include:

[0126] Perform conjugate transposition on the node prediction attribute data vector at the future moment to obtain the conjugate transposed vector of the node attribute data;

[0127] Perform vector dot multiplication on the conjugate transposed vector of the node attribute data and the system state weight matrix to obtain the target dot product vector;

[0128] Perform vector dot multiplication on the target dot product vector and the node prediction attribute data vector at the future moment to obtain the node status evaluation data at the future moment.

[0129] The process of determining the node status evaluation data at the future time can be as follows:

[0130] F(X i (t+1)) = X i ​(t+1) H ·Q·X i (t+1).

[0131] Among them, F(X i (t)) is the stage state evaluation data at time t+1, Q is the system state weight matrix, and the value of its diagonal elements represents the weight of the node attribute data in the evaluation function. i (t+1) is the water purification node v i The node prediction attribute data vector at time t+1. The node prediction attribute data vectors at different future times are input into the evaluation model to obtain the node status evaluation data corresponding to the future time.

[0132] The benefit of the above embodiment is that, on the basis of being able to perform evaluation, the complexity of evaluation is reduced and the evaluation efficiency is high.

[0133] In step 104 of some embodiments, a strategy is formulated based on the future state evaluation data of all water purification nodes to obtain a target replacement time strategy for the centralized water purification system.

[0134] Specifically, the input of the entire learning structure is the data X of the current water purification node before time t i , the output is the predicted data of the current node at the future time {X i (t+1),…,X i (t+n)}. Thus, through the evaluation model mentioned above, we can obtain the future state evaluation data for a period of time in the future {F i (X i (t+1)),…,F i (X i (t+n))}, to complete the filter element replacement prediction and obtain the target replacement time strategy.

[0135] In one embodiment, the target replacement time strategy includes a replacement sub-time for each water purification node, and step 104 includes:

[0136] Compare the future state evaluation data corresponding to the future time of the water purification node with the preset state evaluation threshold to obtain a comparison result; wherein the state evaluation threshold represents the minimum state evaluation value without replacing the filter element;

[0137] If the comparison result is that the future state evaluation data is less than the state evaluation threshold, the replacement sub-time is determined according to the future moment corresponding to the future state evaluation value.

[0138] For example, for the water purification node v i , the future state evaluation data corresponding to time t+1, time t+2, ..., time t+n is F(X i (t+1))、F(Xi (t+2))、……、F(X i (t+n)). Assume that F(X i (t+1)) is less than the state evaluation threshold u i,th , it means that the filter element does not need to be replaced at time t+1. Assuming F(X i (t+2)) is greater than the state evaluation threshold u i,th , it means that the filter element needs to be replaced at time t+2, and the future state evaluation data after time t+2 does not need to be compared with the state evaluation threshold. Time t+2 is determined as the replacement sub-time. If F(X i (t+2)) is less than the state evaluation threshold u i,th , then continue to compare the next future moment until the future moment corresponding to the state evaluation data being less than the state evaluation threshold is found.

[0139] The benefit of the above embodiment is that by setting a status assessment threshold, the time for replacing the filter element of each water purification node can be accurately predicted.

[0140] In one embodiment, the target replacement time strategy is the system centralized replacement time, and step 104 further includes: performing statistical analysis based on the replacement sub-times of all water purification nodes to obtain the system centralized replacement time.

[0141] For example, the centralized water purification system includes water purification nodes 1 to 6. The replacement sub-time of water purification node 1 is t+3, the replacement sub-time of water purification node 2 is t+5, the replacement sub-time of water purification node 3 is t+7, the replacement sub-time of water purification node 4 is t+2, the replacement sub-time of water purification node 5 is t+4, and the replacement sub-time of water purification node 6 is t+3. The 6 times are averaged to obtain the centralized replacement time of the system, which is t+4.

[0142] The benefit of the above embodiment is that it can predict a unified filter element replacement time for the entire centralized water purification system, thereby improving the convenience of filter element replacement.

[0143] In one embodiment, the target replacement time strategy includes a regional centralized replacement time, and step 104 also includes: extracting water purification nodes belonging to the same area from all water purification nodes to obtain a water purification node group; averaging the replacement sub-times of the water purification nodes in the water purification node group to obtain the regional centralized replacement time.

[0144] For example, the centralized water purification system includes water purification nodes 1 to 6. Water purification nodes 1 to 3 are in area 1, and water purification nodes 3 to 6 are in area 2. The replacement sub-time of water purification node 1 is t+3, the replacement sub-time of water purification node 2 is t+5, and the replacement sub-time of water purification node 3 is t+7. Averaging these three moments, the regional centralized replacement time of area 1 is t+5. The replacement sub-time of water purification node 4 is t+2, the replacement sub-time of water purification node 5 is t+4, and the replacement sub-time of water purification node 6 is t+3. Averaging these three moments, the regional centralized replacement time of area 2 is t+3.

[0145] The benefit of the above embodiment is that it can predict a unified filter element replacement time for water purification nodes in different areas, thereby improving the convenience and practicality of filter element replacement.

[0146] In one embodiment, referring to Figure 6 Before step 102, the centralized water purification system filter element replacement prediction method further includes: training to obtain a target state space model, specifically including:

[0147] Step 601, obtaining node sample attribute data vectors of water purification nodes of a centralized water purification system at a plurality of consecutive sample moments;

[0148] Step 602, dividing the node sample attribute data vectors at a plurality of consecutive sample moments to obtain training data and labels of water purification nodes;

[0149] Step 603, obtaining an adjacency matrix based on the distributed network construction;

[0150] Step 604, inputting the training data of the water purification node into the initial state space model of the water purification node to obtain prediction data;

[0151] Step 605, integrating the initial weight sub-parameters of the initial state space model of all water purification nodes to obtain the initial global weight parameter;

[0152] Step 606, performing node loss calculation according to the label of the water purification node and the predicted data to obtain node loss data;

[0153] Step 607, performing regularization loss calculation according to the adjacency matrix, the training data of all water purification nodes and the initial global weight parameter to obtain regularization loss data;

[0154] Step 608, adjusting the initial global weight parameter according to the node loss data and the regularized loss data of all water purification nodes to obtain a target global weight parameter; the target global weight parameter includes target weight sub-parameters of multiple water purification nodes;

[0155] Step 609: for each water purification node, the initial weight sub-parameters in the initial state space model are replaced with the target weight sub-parameters to obtain the target state space model.

[0156] For example, for the water purification node v i At time t, take the historical data sequence X with a length of t at the current time i , for the prediction step number n, the following training data and labels can be obtained:

[0157] X′ i (t) = X i (1:tn)

[0158] Y′ i (t) = X i (t-n+1:t)

[0159] where X′ i is the training data, Y i is a label. The training data is used to indicate the node sample attribute data vector obtained from the first sample moment (1 moment) to the split moment (tn moment), and the label is used to indicate the node sample attribute data vector obtained from the next sample moment after the split moment (t-n+1 moment) to the last sample moment (t moment). The loss function can be the mean square error or the cross entropy function. For example, there is a node loss function Among them, Y i,j (t), Y′ i,j (t) are Y i (t), Y′ i The jth component of (t), Y i (t) is the predicted data, Y′ i (t) is the label.

[0160] It can be understood that the node sample attribute data vector is similar to the node history attribute data vector mentioned above, and is also used to represent the data referenced for predicting the time to replace the filter element of the water purification node. However, the node history attribute data vector is used in the actual use stage of the model, while the node sample attribute data vector is used in the model training stage.

[0161] Combined with the above definition, the predicted data Y i (t) = H(w i ,X′ i (t)). i is the water purification node v iThe corresponding initial weight parameter, H, refers to the initial spatial state model. The predicted data is used to indicate the node sample attribute data vector predicted from the next sample moment (t-n+1 moment) to the last sample moment (t moment). It is also defined that W = [w1w2......w m ] is the initial global weight parameter. For a topological structure composed of multiple water purification nodes, a global loss function can be defined:

[0162]

[0163] Among them, L(A,X,W) is a regularizer, which contains the topological information of the entire distributed network. A represents the adjacency matrix, and X represents the training data of all water purification nodes. The learning goal is to find the target weight parameter W * Make W * =argmin W G(X,A,W).

[0164] In one embodiment, step 608 includes: calculating the gradient of the water purification node based on the node loss data of each water purification node; using a local optimization function to locally optimize the initial weight sub-parameters and the gradient of the water purification node to obtain the intermediate weight sub-parameters of the water purification node; using a neighborhood optimization function to neighborhood optimize the intermediate weight sub-parameters and regular loss data of the water purification node to obtain updated weight sub-parameters of the water purification node; updating the node loss data and regular loss data based on the updated weight sub-parameters, and calculating the global loss data based on the updated node loss data of all water purification nodes and the updated regular loss data; if the global loss data is less than a preset loss threshold, the updated weight sub-parameter is determined as the target weight sub-parameter.

[0165] Specifically, consider the case where the data distribution is unknown and the gradient cannot be calculated. The gradient descent method can be used. Define the water purification node v i The gradient of is: At the same time, considering the distributed learning structure, considering the water purification node v i In the jth iteration, the intermediate weight sub-parameter φ is introduced i,j Optimization is divided into local optimization and neighborhood optimization.

[0166] Local optimization:

[0167] Neighborhood optimization:

[0168] Where S i is the neighborhood optimizer corresponding to node i, and its purpose is to introduce the gradient information of the neighborhood corresponding to the regularization term in G(X,A,W).

[0169] Set ε, when iterating the jth round, Wj So that G(X,A,W j )-G(X,A,W j-1 )|<ε, it is considered convergent. Finally, let W * =W j .

[0170] In an application example, the process of training to obtain the target state space model may include the following steps:

[0171] (1) Data collection, obtaining input X′(1:t) from all collected data X

[0172] (2) Data division: construct training data X′ for each water purification node i and label Y i .

[0173] (3) Initialize the initial global weight parameter W and set the number of shutdown rounds N.

[0174] (4) Construct an adjacency matrix A based on the node topology of the distributed network.

[0175] (5) Cycle 1: For water purification node v i Iteration j:

[0176] 1. Calculate the gradient of each node:

[0177]

[0178] 2. Perform local optimization to obtain the intermediate weight sub-parameters:

[0179]

[0180] 3. According to φ i,j , perform neighborhood optimization to update the initial weight sub-parameters of each node and obtain the updated weight sub-parameters:

[0181]

[0182] 4. Update the weight sub-parameter w according to i,j Calculate global loss data:

[0183]

[0184] 5. Convergence judgment, if G(X,A,W j )-G(X,A,W j-1 )|<ε, that is, convergence, let W * =W j Exit loop 1 and output the target global weight parameter W * ε is the loss threshold.

[0185] 6. If j > N, it is considered that the current data cannot converge W, terminate Loop 1 and return to Step (1), let t = t + l, and increase the data volume with step length l. If j < N, it is considered that the number of rounds is insufficient, and return to Loop 1 to loop again.

[0186] 7. Update the round number j = j + 1.

[0187] 8. If j > N, it is considered that the current data cannot converge W, terminate Loop 1 and return to Step (1), let t = t + l, and increase the data volume with step length l.

[0188] (6) Output the target global weight parameter W * , and the target global weight parameter includes target weight sub-parameters of m water purification nodes.

[0189] The embodiment of the present application also provides a method for training a target state space model. It should be noted that the specific implementation manner of this method for training a target state space model is the same as Steps 601 to 609 above, and will not be repeated here.

[0190] The embodiment of the present application also provides an electronic device, which includes: a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for realizing the connection and communication between the processor and the memory. When the program is executed by the processor, it realizes the above-mentioned method for predicting the replacement of the filter element of the centralized water purification system. This electronic device can be any intelligent terminal including a tablet computer, an in-vehicle computer, etc.

[0191] Please refer to Figure 7 , Figure 7 which shows the hardware structure of an electronic device in another embodiment. The electronic device includes:

[0192] A processor 701, which can be implemented in ways such as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided by the embodiments of the present application;

[0193] The memory 702 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 702 can store an operating system and other application programs. When the technical solution provided in the embodiments of this specification is implemented by software or firmware, the relevant program code is stored in the memory 702, and the processor 701 calls and executes the centralized water purification system filter element replacement prediction method and / or the target state space model training method of the embodiments of this application;

[0194] Input / output interface 703, used to implement information input and output;

[0195] Communication interface 704, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);

[0196] A bus 705 that transmits information between the various components of the device (e.g., the processor 701, the memory 702, the input / output interface 703, and the communication interface 704);

[0197] The processor 701 , the memory 702 , the input / output interface 703 and the communication interface 704 are connected to each other in communication within the device via a bus 705 .

[0198] An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium used for computer-readable storage. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned centralized water purification system filter element replacement prediction method and / or target state space model training method.

[0199] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0200] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0201] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0202] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0203] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0204] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0205] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0206] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0207] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable an electronic device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0208] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A method for predicting filter element replacement in a centralized water purification system, characterized in that: The centralized water purification system includes a plurality of water purification nodes, the plurality of water purification nodes form a distributed network, and the plurality of water purification nodes belong to more than two areas, and the method includes: Acquire node historical attribute data vectors of the water purification node at a plurality of consecutive historical moments, wherein the node historical attribute data vectors are used to represent data referenced for predicting the time for replacing the filter element of the water purification node; Input the node historical attribute data vectors of multiple historical moments into the target state space model of the water purification node, perform a first prediction on the node historical attribute data vectors of the historical moment and the node prediction state data vector of the moment before the historical moment through the target state space model, obtain the node prediction state data vector of the moment after the historical moment, and perform a second prediction on the node prediction state data vector of the last historical moment to obtain the node prediction attribute data vector of the next moment, alternately perform the first prediction and the second prediction to obtain the node prediction attribute data vector of multiple consecutive future moments; Inputting the node prediction attribute data vector at each future moment into the evaluation model, evaluating the node prediction attribute data vector at the future moment through the evaluation model, and obtaining the future state evaluation data of the water purification node at the future moment; A strategy is formulated based on the future status evaluation data of all the water purification nodes to obtain a target replacement time strategy for the centralized water purification system.

2. The method according to claim 1, characterized in that The target replacement time strategy includes a replacement sub-time for each of the water purification nodes; The strategy formulation based on the future state evaluation data of all the water purification nodes to obtain the target replacement time strategy of the centralized water purification system includes: Compare the future state evaluation data corresponding to the future moment of the water purification node with a preset state evaluation threshold to obtain a comparison result; wherein the state evaluation threshold represents the minimum state evaluation value without replacing the filter element; If the comparison result is that the future state evaluation data is less than the state evaluation threshold, the replacement sub-time is determined according to the future moment corresponding to the future state evaluation data.

3. The method according to claim 1, characterized in that The step of obtaining the node historical attribute data vector of the water purification node at a plurality of consecutive historical moments includes: Obtaining node attribute data of the water purification node itself at multiple consecutive historical moments to obtain historical attribute data of the node; Acquire node attribute data of the adjacent water purification nodes of the water purification node at a plurality of consecutive historical moments to obtain the adjacent node historical attribute data, wherein the adjacent water purification nodes include at least one of the following: a first adjacent water purification node in the same area as the water purification node and a second adjacent water purification node not in the same area as the water purification node; Data integration is performed based on the historical attribute data of the current node and the historical attribute data of the adjacent nodes to obtain the historical attribute data vector of the node.

4. The method according to claim 1, characterized in that: The target state space model includes a historical data compression matrix, a current data mining matrix and a state prediction matrix; The first prediction of the node historical attribute data vector at the historical moment and the node prediction state data vector at the moment before the historical moment is performed by the target state space model to obtain the node prediction state data vector at the moment after the historical moment includes: The node prediction state data vector at the moment before the historical moment is compressed by the historical data compression matrix to obtain a node state transfer data vector; Performing data mining on the node historical attribute data vector at the historical moment through the current data mining matrix to obtain a node attribute mining data vector; Performing vector fusion according to the node state transfer data vector and the node attribute mining data vector to obtain a node prediction state data vector at a moment after the historical moment; The second prediction of the node prediction state data vector at the last historical moment to obtain the node prediction attribute data vector at the next moment includes: The state prediction matrix is ​​multiplied by the node prediction state data vector at the last historical moment to obtain the node prediction attribute data vector at the next moment.

5. The method according to any one of claims 1 to 4, characterized in that: The evaluation model includes a system state weight matrix; The step of inputting the node prediction attribute data vector at each future moment into the evaluation model, evaluating the node prediction attribute data vector at the future moment by the evaluation model, and obtaining the node state evaluation data at the future moment includes: Performing conjugate transposition on the node prediction attribute data vector at the future moment to obtain a conjugate transposed vector of the node prediction attribute data; Perform vector dot multiplication on the conjugate transposed vector of the node prediction attribute data and the system state weight matrix to obtain a target dot product vector; Perform vector dot multiplication on the target dot product vector and the node prediction attribute data vector at the future moment to obtain the node state evaluation data at the future moment.

6. The method according to any one of claims 1 to 4, characterized in that: Before inputting the node historical attribute data vectors at multiple historical moments into the target state space model of the water purification node, the method further includes: The target state space model is obtained by training, specifically including: Obtaining node sample attribute data vectors of the water purification nodes of the centralized water purification system at a plurality of consecutive sample moments; The node sample attribute data vectors of a plurality of consecutive sample moments are divided to obtain the training data and labels of the water purification node; wherein the training data is used to indicate the node sample attribute data vectors obtained from the first sample moment to the division moment, and the label is used to indicate the node sample attribute data vectors obtained from the next sample moment after the division moment to the last sample moment; Obtaining an adjacency matrix based on the distributed network construction; Input the training data of the water purification node into the initial state space model of the water purification node to obtain prediction data, wherein the prediction data is used to indicate the node sample attribute data vector predicted from the next sample moment after the division moment to the last sample moment; Integrate the initial weight sub-parameters of the initial state space model of all the water purification nodes to obtain an initial global weight parameter; Calculate the node loss according to the label and prediction data of the water purification node to obtain the node loss data; Performing regularized loss calculation according to the adjacency matrix, the training data of all the water purification nodes and the initial global weight parameter to obtain regularized loss data; The initial global weight parameter is adjusted according to the node loss data and the regular loss data of all the water purification nodes to obtain a target global weight parameter; the target global weight parameter includes target weight sub-parameters of multiple water purification nodes; For each of the water purification nodes, the initial weight sub-parameters in the initial state space model are replaced with the target weight sub-parameters to obtain the target state space model.

7. The method according to claim 6, characterized in that The step of adjusting the initial global weight parameter according to the node loss data and the regular loss data of all the water purification nodes to obtain the target global weight parameter includes: Calculating the gradient of the water purification node according to the node loss data of each water purification node; Using a local optimization function to locally optimize the initial weight sub-parameter and the gradient of the water purification node to obtain an intermediate weight sub-parameter of the water purification node; Performing neighborhood optimization on the intermediate weight sub-parameters and the regularized loss data of the water purification node using a neighborhood optimization function to obtain updated weight sub-parameters of the water purification node; The node loss data and the regular loss data are updated based on the updated weight sub-parameter, and the global loss data is calculated based on the updated node loss data of all the water purification nodes and the updated regular loss data; If the global loss data is less than a preset loss threshold, the updated weight sub-parameter is determined as the target weight sub-parameter.

8. A target state space model training method, characterized in that: The target state space model is used to predict the replacement of filter cartridges in a centralized water purification system, wherein the centralized water purification system includes a plurality of water purification nodes, the plurality of water purification nodes form a distributed network, and the plurality of water purification nodes belong to more than two regions; the method includes: Obtaining node sample attribute data vectors of the water purification nodes of the centralized water purification system at a plurality of consecutive sample moments; The node sample attribute data vectors of a plurality of consecutive sample moments are divided to obtain the training data and labels of the water purification node; wherein the training data is used to indicate the node sample attribute data vectors obtained from the first sample moment to the division moment, and the label is used to indicate the node sample attribute data vectors obtained from the next sample moment after the division moment to the last sample moment; Obtaining an adjacency matrix based on the distributed network construction; Input the training data of the water purification node into the initial state space model of the water purification node to obtain prediction data, wherein the prediction data is used to indicate the node sample attribute data vector predicted from the next sample moment after the division moment to the last sample moment; Integrate the initial weight sub-parameters of the initial state space model of all the water purification nodes to obtain an initial global weight parameter; Calculate the node loss according to the label and prediction data of the water purification node to obtain the node loss data; Performing regularized loss calculation according to the adjacency matrix, the training data of all the water purification nodes and the initial global weight parameter to obtain regularized loss data; The initial global weight parameter is adjusted according to the node loss data and the regular loss data of all the water purification nodes to obtain a target global weight parameter; the target global weight parameter includes target weight sub-parameters of multiple water purification nodes; For each of the water purification nodes, the initial weight sub-parameters in the initial state space model are replaced with the target weight sub-parameters to obtain a target state space model.

9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 or claim 8 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method of any one of claims 1 to 7 or claim 8 is implemented.