Intelligent decision generation method and device for water supply project

By combining multi-source heterogeneous data processing and intelligent decision generation methods with RAG and LLM, the shortcomings of traditional water supply engineering systems in data processing and decision traceability are solved, achieving efficient fault response and reliable intelligent decision-making.

CN121365322AActive Publication Date: 2026-01-20SHENZHEN SHENSHUI LONGGANG WATER GRP CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511936293.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-01-20
Estimated Expiration
2045-12-22

AI Technical Summary

Technical Problem

Traditional water supply engineering systems cannot effectively process unstructured and semi-structured data, rely on manual scheduling and simple control algorithms, resulting in low prediction accuracy, low operation and maintenance efficiency, high human error rate, and a lack of traceability and security in decision-making.

Method used

By employing multi-source heterogeneous data acquisition, preprocessing, anomaly detection, feature vector fusion, retrieval enhancement generation system (RAG) and large language model (LLM) combined with deep neural networks, intelligent decision generation is achieved, and blockchain records ensure the traceability of decisions.

Benefits of technology

It improved the accuracy of anomaly detection, shortened the fault response time, improved operational efficiency, and enhanced system reliability and user trust.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121365322A_ABST
    Figure CN121365322A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent decision generation method and device for a water supply project, and belongs to the technical field of intelligent water supply projects. The method comprises the following steps: acquiring multi-source heterogeneous data, including M groups of input data; performing preprocessing to obtain M groups of feature vectors; performing abnormity judgment according to the judgment result; if the abnormity judgment result comprises the target abnormity, fusing M groups of feature vectors; obtaining an RAG system, a knowledge graph and a preferred LLM prompt instruction in the field of water supply engineering; according to target information and the preferred LLM prompt instruction, each processing step is carried out based on the preferred LLM to obtain a first processing result corresponding to each processing step, and the target information comprises an RAG system, a knowledge graph, an anomaly judgment result and a fused feature vector; if the first processing result cannot pass the manual audit, performing each processing step based on the alternative LLM according to the target information and the alternative LLM prompt instruction to obtain a second processing result; the decision strategy of the water supply project is determined based on the deep neural network, and the prediction precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of intelligent water supply engineering, and particularly relates to an intelligent decision generation method and device for a water supply engineering. BACKGROUND

[0002] At present, a water supply engineering system mainly relies on a traditional Supervisory Control And Data Acquisition (SCADA) system for monitoring and management.

[0003] The technical features of the traditional water supply engineering system include: 1. The monitoring adopts data collected in real time based on the SCADA system, mainly monitors structured data such as pressure and flow, and cannot effectively process unstructured data such as text data of maintenance reports, inspection logs, user complaints, expert suggestions, image data of pipe photos, water turbidity images, equipment state pictures, voice data of voice instructions, telephone repair, and on-site reports, and semi-structured data such as weather forecasts and social event information; 2. The control mode is mainly artificial dispatching supplemented by a simple proportion integration differentiation (PID) control algorithm; the prediction of water supply conditions relies on historical experience and a simple statistical model, and the prediction accuracy is 60-70%, which is relatively low; the operation and maintenance mode adopts regular inspection + fault response, and the average fault response time is relatively long, about 2-8 hours; 3. The human-computer interaction mode is backward. The existing system needs professional technicians to operate through a complex SCADA interface, and the threshold for use by ordinary management personnel and operation and maintenance personnel is high. Specifically, a large number of device numbers and parameter settings need to be memorized; fault diagnosis relies on expert experience, and novices are difficult to master; it is impossible to query device states and historical data through natural language; there is a lack of intelligent decision suggestions, and all decisions need to be judged manually. This leads to low system operation and maintenance efficiency, high training cost, and high human error rate; 4. The decision lacks traceability and security guarantee. The safety and traceability of control decisions of the water supply engineering system as a key infrastructure are crucial. The existing water supply engineering system has the following problems: operation logs may be tampered with or deleted; key decisions lack complete reasoning process records; multi-department coordination responsibility is not clear; and it does not meet the regulatory requirements of key infrastructure. SUMMARY

[0004] To solve the above problems, the present application embodiment provides an intelligent decision generation method and device for a water supply engineering.

[0005] In a first aspect, the present application embodiment provides an intelligent decision generation method for a water supply engineering, comprising: Obtain multi-source heterogeneous data from the same region and the same period of the water supply project, wherein the multi-source heterogeneous data comprises M groups of input data, and M is a positive integer; Preprocess the M groups of input data respectively to obtain M groups of feature vectors; According to the M groups of feature vectors, perform anomaly judgment to obtain an anomaly judgment result; If the anomaly judgment result includes a target anomaly, fuse the M groups of feature vectors to obtain a fused feature vector; Obtain a retrieval-augmented generation (RAG) system, a knowledge graph, and a preferred large language model (LLM) prompt instruction in the field of water supply engineering; According to target information and a preferred LLM prompt instruction, perform each processing step based on a preferred LLM to obtain a first processing result corresponding to each processing step, wherein the target information comprises the RAG system, the knowledge graph, the anomaly judgment result, and the fused feature vector; If the first processing result cannot pass artificial review, perform each processing step based on an alternative LLM according to the target information and an obtained alternative LLM prompt instruction to obtain a second processing result corresponding to each processing step, wherein the parameter scale of the alternative LLM is greater than that of the preferred LLM; According to the second processing result, determine a decision strategy of the water supply project based on a deep neural network.

[0006] In a second aspect, an embodiment of the present application provides an intelligent decision generation device for water supply engineering, comprising: A multi-source heterogeneous data acquisition module is configured to acquire multi-source heterogeneous data from the same region and the same period of the water supply project, wherein the multi-source heterogeneous data comprises M groups of input data, and M is a positive integer; A data preprocessing module is configured to preprocess the M groups of input data respectively to obtain M groups of feature vectors; An anomaly judgment module is configured to perform anomaly judgment according to the M groups of feature vectors to obtain an anomaly judgment result; A feature vector fusion module is configured to fuse the M groups of feature vectors to obtain a fused feature vector if the anomaly judgment result includes a target anomaly; A target acquisition module is configured to acquire a retrieval-augmented generation system, a knowledge graph, and a preferred large language model prompt instruction in the field of water supply engineering; The first processing module is configured to perform each processing step based on the preferred large language model according to the target information and the prompt instruction for the preferred large language model, and obtain a first processing result corresponding to each processing step. The second processing module is configured to perform each processing step based on the alternative large language model according to the target information and the prompt instruction for the alternative large language model if the first processing result cannot pass the manual review, and obtain a second processing result corresponding to each processing step. The decision strategy determination module is configured to determine a decision strategy of the water supply project based on a deep neural network according to the second processing result.

[0007] In a third aspect, an electronic device is provided, including: A memory and a processor, the processor and the memory complete mutual communication through a bus; the memory stores program instructions that can be executed by the processor, and the processor calling the program instructions can execute the method of the first aspect and each step in various possible implementations.

[0008] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program that is executed by a processor to implement the method of the first aspect and each step in various possible implementations.

[0009] In a fifth aspect, a computer program product containing instructions is provided, which, when the computer program product is run on a computer, causes the method of the first aspect and each step in various possible implementations to be executed by the computer.

[0010] The technical solution provided by the embodiments of the present application has the following beneficial effects: by fusing multi-modal (i.e., multi-source heterogeneous) data, intelligent processing is combined with LLM to improve the accuracy of anomaly detection, shorten the fault response time, improve operational efficiency, ensure that the decision strategy is traceable through blockchain records, and improve the reliability of the water supply project system; the reasoning process provides detailed explanations to enhance user trust. BRIEF DESCRIPTION OF DRAWINGS

[0011] Figure 1 A flowchart of a water supply project intelligent decision generation method provided by the embodiments of the present application; Figure 2 A schematic block diagram of a water supply project intelligent decision generation device provided by the embodiments of the present application; Figure 3 A schematic diagram of an electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION

[0012] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application but not all of them. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts should fall within the scope of the present application.

[0013] The terms used in the embodiments of the present application are only for the purpose of describing particular embodiments and are not intended to limit the present application. The singular forms "a," "an," and "the" used in the embodiments of the present application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0014] It should be understood that the term "and / or" used herein only describes an association relationship of associated objects, and means that there can be three relationships, for example, A and / or B, which means that there are three cases of A alone, A and B together, and B alone. In addition, the character " / " herein generally represents that the front and rear associated objects are in an "or" relationship.

[0015] Depending on the context, the word "if" as used herein can be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting." Similarly, depending on the context, the phrase "if determined" or "if monitoring (a stated condition or event)" can be interpreted to mean "when determined" or "in response to determining" or "when detecting (a stated condition or event)" or "in response to detecting (a stated condition or event)."

[0016] The traditional water supply engineering system cannot effectively process unstructured data such as text data such as maintenance reports, inspection logs, user complaints, expert suggestions, image data such as pipeline photos, water turbidity images, equipment state pictures, voice data such as voice instructions, telephone repair, and field reports, and semi-structured data such as weather forecasts and social event information. The control mode mainly relies on manual scheduling and is supplemented by a simple PID control algorithm; the prediction of water supply conditions relies on historical experience and a simple statistical model, and the prediction accuracy is 60-70%, which is relatively low; the operation and maintenance mode adopts regular inspection + fault response, and the average fault response time is relatively long, about 2-8 hours; the human-computer interaction mode is backward. The existing system needs professional technicians to operate through a complex SCADA interface, and the threshold for ordinary management personnel and operation and maintenance personnel is high. The specific performance is as follows: a large number of device numbers and parameter settings need to be remembered; fault diagnosis relies on expert experience, and beginners are difficult to master; it is impossible to query the device state and historical data through natural language; there is a lack of intelligent decision-making suggestions, and all decisions need to be made manually. This leads to low system operation and maintenance efficiency, high training cost, and high human error rate; the decision lacks traceability and safety guarantee. The safety and traceability of the control decision of the water supply engineering system as a key infrastructure are crucial. The existing water supply engineering system has the following problems: the operation log may be tampered with or deleted; the key decision lacks a complete reasoning process record; the multi-department coordination responsibility is not clear; and it does not meet the regulatory requirements of key infrastructure.

[0017] Therefore, the embodiment of the present application provides a flowchart of an intelligent decision-making generation method for a water supply engineering system. The flowchart is as shown in Figure 1 . Figure 1 The method can include the following steps: Step 101: Obtain multi-source heterogeneous data from the same region and the same period of the water supply engineering, and the multi-source heterogeneous data includes M groups of input data, and M is a positive integer.

[0018] Step 102: Preprocess the M groups of input data respectively to obtain M groups of feature vectors.

[0019] Step 103: According to the M groups of feature vectors, an abnormality judgment is performed to obtain an abnormality judgment result.

[0020] Step 104: If the abnormality judgment result includes a target abnormality, the M groups of feature vectors are fused to obtain a fused feature vector.

[0021] Step 105: Obtain the RAG system, knowledge graph, and preferred LLM prompt instruction in the field of water supply engineering.

[0022] Step 106: based on the target information and the prompt instruction for the preferred LLM, each processing step is performed based on the preferred LLM to obtain a first processing result corresponding to each processing step, and the target information includes the RAG system, the knowledge graph, the abnormality judgment result, and the fusion feature vector.

[0023] Step 107: if the first processing result cannot pass the manual review, based on the target information and the obtained prompt instruction for the alternative LLM, each processing step is performed based on the alternative LLM to obtain a second processing result corresponding to each processing step.

[0024] Step 108: based on the second processing result, a decision strategy of the water supply project is determined based on a deep neural network.

[0025] The steps in the above process and the effects that can be further produced will be described in detail below with reference to the embodiments of the present application. It should be noted that the "first", "second", and the like in the embodiments of the present application do not have the limitations of size, order, and quantity, and are only used to distinguish the names, for example, "first abnormal score" and "second abnormal score" are used to distinguish two different abnormal scores.

[0026] First, the above step 101, i.e., "obtaining multi-source heterogeneous data from the same region and the same period of the water supply project, the multi-source heterogeneous data including M groups of input data, M being a positive integer", will be described in detail with reference to the embodiments of the present application.

[0027] In the embodiments of the present application, a physical device layer is deployed, which includes the execution devices of the water supply project. For example, intelligent water pumps use variable frequency control technology to accurately control the water supply according to actual needs. Electric valves are driven by precision stepper motors to ensure fast and accurate flow regulation. The pressure equipment is equipped with an intelligent pressure regulation system, which can dynamically adjust the water supply pressure according to the actual needs of the pipe network. The water quality treatment equipment includes coagulation, sedimentation, filtration, disinfection and other processing modules, supports online real-time monitoring, and ensures that the water quality is stable and meets the standards. A sensing layer is also deployed to collect multi-source heterogeneous data. This layer deploys 2500 pressure sensors, more than 800 flow sensors, more than 200 water quality sensors, intelligent water meter groups, and environmental monitoring stations to provide environmental data support for water supply project system decision-making. Among them, the pressure sensor is used to sense the change of water supply pressure, the flow sensor is used to sense the change of water supply flow, the water quality sensor is used to sense whether the effluent water quality meets the standard, the intelligent water meter group is used to sense the change of water flow, and the environmental monitoring station is used to sense the change of weather.

[0028] In the embodiments of the present application, the M groups of input data can include structured data, unstructured data and semi-structured data. The structured data can include pressure sensor data, flow sensor data, water quality sensor data and smart water meter group data. The unstructured data can include text data, visual data and audio data. The semi-structured data can include meteorological data and pipe network structured knowledge of water supply engineering. The data lake storage adopts TimescaleDB time series database to store time series data such as pressure sensor data; in combination with MinIO object storage system to store unstructured data and semi-structured data, to ensure efficient storage and query of massive data.

[0029] Exemplarily, the pressure sensor data is as follows: the pressure sensor (number P-XXXX, located in XX district XX section): the pressure value is reduced from 0.35 MPa to 0.18 MPa for 10 minutes, the time domain feature shows that the variance exceeds the threshold value by 2.3 times, and the hydraulic gradient is abnormal. The flow sensor data is as follows: the flow sensor (number F-XXXX, associated with P-XXXX pipe network section): the flow is increased from 120 m³ / h to 185 m³ / h at the same period, which exceeds the upper limit of the daily cycle trend by 30%, and the frequency domain feature of Fast Fourier Transformation (FFT) shows no normal periodicity. The water quality sensor data is as follows: the water quality sensor (number W-XXXX, adjacent to the pipe network node): the turbidity is 0.8 Nephelometric Turbidity Unit (NTU) (up to standard), the residual chlorine is 0.3 mg / L (up to standard), and there is no abnormal data. The smart water meter group data is as follows: the smart water meter group (XX district XX section XXX household): the average water consumption is increased by 15% compared with the same period yesterday, and there is no concentrated water consumption peak (excluding concentrated water consumption of users). The text data is as follows: the operation and maintenance APP receives 3 user complaints (within 20 minutes), the contents are “the water pressure of XXX section suddenly becomes small”, “the water heater at home cannot be started, the water pressure is too low”, and the maintenance log shows that the last inspection of this pipe network section was 3 months ago, and the record is “the pipeline is seriously aged, and there is corrosion hidden danger”. The visual data is as follows: the inspection personnel uploads the photo under the pipe cover, and the ViT-Large model identifies that there are obvious water stain marks at the pipe interface, and the rust area accounts for 40% of the total interface area. The audio data is as follows: the audio recorded by the operation and maintenance personnel during the previous on-site investigation records that the continuous “sizzle” water flow sound is detected near the pipeline, and the acoustic feature matches the leakage audio template. The meteorological data is as follows: the local meteorological bureau issues a high temperature warning (38℃), and the daily water consumption is estimated to be increased by 20% (environmental monitoring station data accessed by the edge computing node) compared with the normal day. The pipe network structured knowledge is as follows: through the RAG system and the knowledge graph, it is searched that the pipe network section is a cast iron pipe laid in 1998, the design service life is 20 years, and the current service period has exceeded 5 years (knowledge graph “physical entity node-pipeline” associated data).

[0030] In the embodiments of the present application, since multiple pressure sensors can be deployed in the same region and same period of the water supply project, each pressure sensor can collect multiple data, and therefore the multiple data collected by the multiple pressure sensors can be referred to as a set of pressure sensor data representing the region and the period.

[0031] In the embodiments of the present application, since the multiple-source heterogeneous data from the same region and the same period of the water supply project is obtained, the multiple-source heterogeneous data includes M sets of input data, which reflects the state of the water supply system in the region and the period, and therefore, for example, the M sets of input data usually include a set of pressure sensor data corresponding to one or more pressure sensors, a set of flow sensor data corresponding to one or more flow sensors, a set of water quality sensor data corresponding to one or more water quality sensors, a set of smart water meter group data corresponding to a smart water meter group, a set of text data, a set of visual data, a set of audio data, a set of meteorological data, and a pipe network structured knowledge.

[0032] The step 102, i.e., “preprocessing the M sets of input data to obtain M sets of feature vectors” will be described in detail below in combination with the embodiments of the present application.

[0033] In the embodiments of the present application, a data processing layer is deployed. As a possible implementation, the data processing layer is deployed with edge computing nodes (each edge computing node is equipped with a neural processing unit (NPU) with a 5 TOPS computing power, providing powerful edge artificial intelligence (AI) computing capability) to perform data cleaning and feature engineering on the M sets of input data respectively, to obtain M sets of feature vectors.

[0034] It should be noted that before data cleaning and feature engineering, the pressure sensor data, the flow sensor data, the water quality sensor data, and the smart water meter group data are encoded by a sensor data encoder. The sensor data encoder adopts a long short-term memory (LSTM) network architecture, which is specially designed to process time series sensor data. The input layer of the sensor data encoder receives pressure sensor data, flow sensor data, water quality sensor data from sensors, and smart water meter group data from a smart water meter group, which is processed by a three-layer stacked LSTM network. The long-term dependence relationship of the time series is captured through the memory mechanism of the recurrent neural network. A time attention layer is added after the LSTM layer to automatically learn the importance weight of different time steps, highlighting the data features at key moments. Finally, the data features are mapped to a unified embedding space through a fully connected layer to generate a sensor representation vector. The sensor data encoder can comprehensively capture the daily cycle variation of the water supply system.

[0035] For text data, a text encoder is used for encoding. The text encoder is based on the Transformer architecture and processes unstructured text information such as maintenance logs, user complaints, and expert recommendations. The text encoder uses the text branch of the Qwen2.5-VL-72B model and can process mixed English and Chinese technical texts. The input text is first segmented by the Byte Pair Encoding (BPE) tokenizer, then converted into token embeddings and added with position encoding, and sent to the Transformer encoder for processing. The text encoder supports a context length of up to 32K tokens and can handle long technical documents and historical records. Through the self-attention mechanism, the text encoder can capture long-distance dependencies in the text and deeply understand the semantic information of the text to generate text representation vectors.

[0036] For visual data, a visual encoder is used for encoding. The visual encoder uses the Vision Transformer architecture and processes visual information such as pipe network photos, device status images, and water turbidity images. After receiving the input image, the visual encoder first divides the image into 16x16 pixel image blocks, converts them into embedding vectors through linear projection, and adds position encoding before sending them to the ViT-Large model for processing. Through the global pooling layer, the visual representation vector is finally generated. The visual encoder supports various visual diagnostic tasks such as pipe crack detection, device corrosion identification, and water turbidity analysis.

[0037] For audio data, an audio encoder is used for encoding. The audio encoder is based on the Wav2Vec2 architecture and processes sound information such as voice instructions, phone repairs, and on-site audio reports. The audio encoder receives 16kHz sampling rate audio waveforms, extracts features through a one-dimensional convolutional network, and can capture acoustic features of different time scales. The extracted features are sent to the Transformer encoder for processing. The audio encoder uses contrastive learning for pre-training and can learn robust audio representations. Through the time sequence pooling layer, the audio representation vector is finally generated. The audio encoder supports voice interaction and emergency voice alarm processing.

[0038] It should be noted that the meteorological data and pipe network structured knowledge are already encoded data.

[0039] It should be noted that, since the dimensions of the vector representations output by the various encoders are different, they need to be projected into a uniform dimensional space. For example, the 512-dimensional sensor vector representation output by the sensor data encoder is projected into 4096 dimensions by a linear transformation, the 1024-dimensional visual vector representation output by the visual encoder is projected into 4096 dimensions, the 768-dimensional audio vector representation output by the audio encoder is projected into 4096 dimensions, and the text vector representation output by the text encoder is already 4096 dimensions and does not need to be transformed.

[0040] The data cleaning implements an ETL (Extraction-Transformation-Loading) pipeline, which refers to quality checking, missing value processing, and outlier filtering on the group of vector representations corresponding to the group of pressure sensor data, the group of vector representations corresponding to the group of flow sensor data, the group of vector representations corresponding to the group of water quality sensor data, the group of vector representations corresponding to the group of smart water meters, the group of vector representations corresponding to the group of text data, the group of vector representations corresponding to the group of visual data, the group of vector representations corresponding to the group of audio data, and the group of vector representations corresponding to the group of meteorological data that are projected into a uniform dimensional space.

[0041] Feature engineering refers to extracting features contained in the groups of vector representations from multiple dimensions, including time domain features (mean, variance, skewness, kurtosis, trend, periodicity, etc.), frequency domain features (FFT transform, power spectral density, wavelet transform, etc.), and domain-specific features (hydraulic gradient, Reynolds number, friction coefficient, etc.), to obtain M groups of feature vectors.

[0042] The above step 103, i.e., "performing anomaly judgment based on the M groups of feature vectors to obtain an anomaly judgment result", will be described in detail below in conjunction with an embodiment of the present application.

[0043] In the embodiments of the present application, an intelligent analysis layer is deployed. The intelligent analysis layer adopts a three-layer cascaded detection architecture of statistical methods, machine learning methods and deep learning methods to solve the technical problems of false negatives or false positives of a single detection method and the inability to adapt to complex abnormal patterns. Each layer adopts multiple algorithms for parallel detection, and finally generates a final judgment through an intelligent fusion mechanism. As a possible implementation manner, according to M groups of feature vectors, abnormal detection is performed through statistical methods, machine learning methods and deep learning methods to obtain a first abnormal score, a second abnormal score and a third abnormal score, respectively. Exemplarily, the statistical methods include: Z-Score detection (24-hour sliding window): pressure data Z value = 3.8 (> threshold value 2.5), flow data Z value = 3.2 (> threshold value 2.5), and the abnormality is determined; the Z-Score detection method is based on the normal distribution assumption, and calculates the standard deviation multiple of the data point distance from the mean value. If the absolute value exceeds the threshold value, the abnormality is determined. The Z-Score detection has extremely fast calculation speed and is suitable for real-time detection. Interquartile Range (IQR) detection: the pressure data interquartile range exceeds 1.5 times the IQR range, and the abnormality is determined; the IQR detection method is based on the quartile and is not dependent on the distribution assumption, and is suitable for skewed distribution data such as water consumption. This method is not sensitive to abnormal values itself and has strong robustness. Grubbs algorithm: detects small sample abnormal values of pressure / flow, and determines the abnormality; the Grubbs algorithm is mainly used for abnormal value detection, and has simple calculation and easy understanding, is suitable for small sample data (small sample data amount N≥3 can be used), and has low engineering landing cost, but depends on the normal distribution assumption and cannot handle multiple abnormal values. Statistical layer score (normalized to 0-1): first abnormal score = (3.8+3.2+1.0+1.0) / 4 = 0.92. The machine learning methods include: Isolation Forest algorithm: abnormal score 0.88; the Isolation Forest algorithm does not require labeled data and is good for high-dimensional data, but has weak local abnormal detection capability. One-Class Support Vector Machine (One-Class SVM) algorithm: abnormal score 0.90; the One-Class SVM algorithm has a solid theoretical basis and is sensitive to boundary abnormalities. Local Outlier Factor (LOF) algorithm: abnormal score 0.85; the LOF algorithm can detect local abnormalities and is not dependent on the global distribution. Second abnormal score = (0.88+0.90+0.85) / 3 = 0.88. The deep learning methods include: AutoEncoder: the normalized score of reconstruction error is 0.91; the AutoEncoder learns the compressed representation of normal data to detect abnormalities. This method is unsupervised learning and can learn complex normal patterns, but needs a large amount of training data.LSTM autoencoder: time series anomaly score 0.89; the LSTM autoencoder is specially used for time series anomaly detection. The anomaly detection calculation can detect time series anomalies by capturing time dependence, but the training time is long and needs Graphics Processing Unit (GPU) acceleration. Variational Auto-Encoder (VAE): uncertainty quantification anomaly score 0.90; the variational autoencoder VAE introduces probability modeling on the basis of the autoencoder and can quantify uncertainty as a generative model, but the training is unstable and needs fine tuning. The third anomaly score=(0.91+0.89+0.90) / 3=0.90. According to the first anomaly score, the second anomaly score and the third anomaly score, and the corresponding first weight, the second weight and the third weight, the target anomaly score is determined, the target anomaly score is a one-dimensional matrix, one of the elements in the one-dimensional matrix corresponds to no anomaly, and each element in the remaining elements corresponds to one kind of anomaly; wherein the first weight=0.2, the second weight=0.35, the third weight=0.45, the target anomaly score=0.92*0.2+0.88*0.35+0.90*0.45=0.897. If the maximum element in the one-dimensional matrix is greater than the anomaly score threshold corresponding to the maximum element, the anomaly corresponding to the maximum element is determined as the target anomaly of the same region and the same period of the water supply project. If each element in the one-dimensional matrix is less than the anomaly score threshold corresponding to each element, it is determined that there is no anomaly in the same region and the same period of the water supply project. It should be noted that the embodiment of the present application determines the type of anomaly according to feature analysis. If the standard deviation of the pressure sensor data exceeds the threshold, it is classified as a pressure fluctuation anomaly, and the specific device of the pressure anomaly is located. If the mean value of the flow sensor data exceeds 115% of the expected flow, it is classified as an increase in flow anomaly; if the pressure mean value is also lower than expected, it is further classified as a suspected leakage, and the leakage area is located by the spatial distribution of pressure and flow. If the water quality parameters such as turbidity exceed the standard, it is classified as a water quality deterioration anomaly, and the affected component is the water treatment plant.In the embodiment of the present application, the comprehensive severity level = target anomaly score 0.897 x corresponding weight 0.4 + influence range (covering 120 households) normalized to 0.3 x corresponding weight 0.3 + anomaly score corresponding to the target anomaly (suspected leakage) in the one-dimensional matrix 0.8 x 0.3 = 0.7088. Since 0.7088 is between 0.6 and 0.8, the comprehensive severity level is high.

[0044] It should be noted that the embodiment of the present application can also determine the confidence according to the first anomaly score, the second anomaly score and the third anomaly score; wherein through the voting consistency method: the statistical method includes Z-Score detection, IQR detection, Grubbs algorithm, the machine learning method includes the isolated forest algorithm, One-Class SVM algorithm, Local Outlier Factor (LOF), deep learning method includes AutoEncoder, LSTM AutoEncoder, VAE, etc. Nine kinds of algorithms are all judged to be abnormal, and the consistency is 100%, so the confidence is 1; through uncertainty quantification: the standard deviation of the three-layer score of the statistical method, the machine learning method and the deep learning method is 0.016 (normalized to 0.04). The final confidence = 1-0.04 = 0.96. Accordingly, the foregoing anomaly judgment result can also include the confidence.

[0045] It should be noted that since the initial first weight, the initial second weight and the initial third weight are based on historical experience for the allocation ratio of the three-layer cascade detection architecture, they may not conform to the real performance of the algorithm, so continuous iteration is needed. Therefore, the embodiment of the present application uses an optimization control algorithm + a deep learning engine to jointly update the first weight, the second weight and the third weight, continuously adjusts the weight distribution according to the difference between the predicted result and the actual situation, and improves the prediction accuracy. If it is judged that the target anomaly is different from the real anomaly type, the first weight, the second weight and the third weight are updated. The updated first weight, the updated second weight and the updated third weight are used to determine each step of the target anomaly score.

[0046] The above step 104, i.e. “if the anomaly judgment result includes the target anomaly, fuse the M group feature vectors to obtain a fused feature vector”, will be described in detail below in combination with the embodiment of the present application.

[0047] In the embodiment of the present application, if the abnormality judgment result includes the target abnormality, indicating that there is an abnormality in the same region and same period of the water supply project, the M feature vectors are fused to obtain a fused feature vector, as described in step 103. The fused feature vector is the weighted sum of each feature vector, plus the weighted sum of cross-attention between all feature vectors. Exemplarily, the fused feature vector is a unified semantic representation of "pipe network segment pressure drop + abnormal increase in flow + visual water stain + audio water flow sound + user complaint". The cross-attention weight adopts the Cross-Attention cross-modal attention mechanism. This attention mechanism can process data from different modalities (i.e., multi-source heterogeneous), such as pressure sensor data, flow sensor data, water quality sensor data, smart water meter group data, text data, visual data, audio data, weather data, and pipe network structured knowledge. Each weight coefficient is dynamically learned through a gating mechanism, and the importance of each feature vector is adaptively adjusted according to the current context information. The fused representation is further deep fused by a 6-layer Transformer encoder, the model dimension is kept at 4096, each layer contains multi-head self-attention mechanism and feedforward neural network, and the activation function adopts GELU. This deep fusion can learn the complex interaction and complementary information between different feature vectors.

[0048] Through the above Cross-Attention cross-modal attention mechanism, the system can automatically learn the association between different modalities. For example, when the pressure sensor detects an abnormal decrease in pressure, and at the same time the inspection image shows a crack in the pipeline, the system can integrate the information from both aspects to determine that there is a pipeline leakage with high confidence. For another example, when the flow sensor detects a sudden increase in flow data, and at the same time the user complaint text contains the description "low water pressure", the system can quickly locate the fault area. For another example, by combining historical maintenance logs and current operation data, the system can predict the maintenance needs of the equipment.

[0049] The above step 105, i.e., "obtaining the RAG system, knowledge graph, and prompt instruction for the preferred LLM in the field of water supply engineering", is described in detail below in combination with the embodiments of the present application.

[0050] To solve the problem of limited professional knowledge of LLM, the embodiment of the application constructs a RAG system based on a vector database, and deeply integrates an external knowledge base with the LLM. The RAG system in the field of water supply engineering includes physical entity nodes, logical entity nodes, event entity nodes, parameter entity nodes and knowledge entity nodes. The physical entity nodes include pipelines, valves, water pumps, water meters, sensors, water plants, pump stations and other physical components of the water supply system. The logical entity nodes include logical divisions such as water supply areas, user groups, pipe network segments and pressure partitions. The event entity nodes include operation and maintenance events such as failures, maintenance, inspection, upgrading and emergency response. The parameter entity nodes include monitoring parameters such as pressure, flow, water quality indicators and energy consumption. The knowledge entity nodes include technical knowledge such as algorithms, standards and specifications, operation processes and expert experience. Each entity node stores corresponding knowledge. The knowledge graph in the field of water supply engineering defines multiple relationship types, including physical relationships such as connection, inclusion, control and influence, causal relationships such as cause, prevention, mitigation and aggravation, time relationships such as before, at the same time and periodic triggering, and semantic relationships such as synonym, hyponym and part-whole. The knowledge graph is stored in a Neo4j graph database. The number of relationship types can be greater than 120.

[0051] The vector database realizes semantic retrieval of massive documents. The system selects Milvus as the vector database, and uses the text-embedding-3-large model to convert text into a 3072-dimensional vector representation. The data is organized into multiple sets by type: the technical document set contains more than 10,000 design drawings, technical standards and operation manuals; the historical case set contains failure cases, maintenance records and optimization cases; the expert knowledge set contains expert experience, best practices and lessons learned. The vector index uses the Hierarchcal Navigable Small World graphs (HNSW) algorithm, and the distance metric uses cosine similarity, which ensures high recall rate while ensuring retrieval speed.

[0052] The hybrid retrieval algorithm combines the advantages of dense retrieval and sparse retrieval. Dense retrieval is based on semantic similarity, and the user query is encoded into a vector through an embedding model to search for the most similar Top-K documents in the vector database. Filtering conditions can be added during the search, such as limiting the field to water supply engineering systems. Sparse retrieval is based on keyword matching, and the Best Matching 25 (BM25) algorithm is used to search for Top-K documents containing query keywords in the document index. The result fusion adopts the Reciprocal Rank Fusion (RRF) method to weight the fusion of the results of dense retrieval and sparse retrieval, as semantic retrieval is generally more accurate. The candidate documents after fusion are re-ranked by the Cross-Encoder re-ranking model, which can more accurately calculate the relevance of the query and the document, and finally return the Top-5 most relevant documents.

[0053] The RAG process includes five steps. The first step is query understanding, which extracts key information from the user query (such as the abnormal judgment result of the intelligent analysis layer), including intent classification (fault diagnosis, demand prediction, optimization suggestion, knowledge query, etc.), entity extraction (equipment, location, time, etc.), constraint extraction (range, condition, etc.). The second step is knowledge retrieval, which retrieves relevant knowledge from multiple sources: retrieves semantically related documents from the vector database, uses hybrid retrieval and re-ranking mechanisms, and returns Top-5 documents; retrieves structured knowledge from the knowledge graph, constructs Cypher query statements based on query analysis, and retrieves related entities and relationships; if historical data is needed, query the time series database for historical records of specified time ranges and entities. The third step is context construction, which formats the retrieved knowledge and combines it with the current system state, historical similar cases, and user queries to build an enhanced prompt context. The fourth step is LLM generation, which inputs the enhanced prompt context into the LLM to generate comprehensive analysis and suggestions. The fifth step is answer verification, which checks the factual accuracy of the generated content and cross-verifies it with the retrieved knowledge, and adds constraints to regenerate if hallucination is found.

[0054] The preferred LLM prompt instructions include a first prompt instruction, a second prompt instruction, a third prompt instruction, a fourth prompt instruction, and a fifth prompt instruction.

[0055] The above step 106, i.e., "obtaining a first processing result corresponding to each processing step based on the target information and the preferred LLM prompt instruction, and performing each processing step based on the preferred LLM", will be described in detail below in combination with the embodiments of the present application.

[0056] In the embodiments of the present application, a dialogue prediction engine layer is deployed, and the layer is deployed with an LLM.

[0057] It can be understood that, in order to solve the problem that the AI decision process is black-boxed and the user cannot understand the basis of the decision, the embodiment of the application creatively proposes a Chain-of-Thought-based step-by-step reasoning mechanism. The mechanism first decomposes the problem, decomposing a complex problem into multiple sub-steps.

[0058] In the embodiment of the application, according to the target information and the prompt instruction based on the preferred LLM of the Chain-of-Thought-based step-by-step reasoning mechanism, each processing step is performed based on the preferred LLM, and a first processing result corresponding to each processing step is obtained.

[0059] In the embodiments of the present application, as a possible implementation manner, according to the target information and the first prompt instruction, the first information is determined based on the preferred LLM, the first information being a first abnormal feature of the same region and the same period of the water supply project, such as abnormal performance of various indexes of pressure, flow, water quality and the like. Illustratively, the pressure of the target pipe network segment decreases by 48.6% within 10 minutes (exceeding the threshold value of 30%), the flow increases by 54.2% (exceeding the threshold value of 25%), accompanied by concentrated user complaints, pipeline water stains and leakage audio, and the water quality is excluded from being abnormal and concentrated water use, and the core abnormality is “pressure-flow mismatch + on-site leakage characteristics”. According to the first information, the second prompt instruction and the target information, the second information is determined based on the preferred LLM, the second information being a first cause of the first abnormal feature. Analysis is made from multiple angles such as equipment failure, pipe network leakage, demand change and the like. Illustratively, the RAG retrieves historical cases (Top-5 matching cases in the vector database): similar to the “cast iron pipe + pressure drop + flow increase” scene, 90% of which are pipe interface leakage (associated knowledge graph “fault event node”); combined with the maintenance log “pipe aging” and the visual data “rust”, it is determined that the core cause is “aging and corrosion of cast iron pipe interface leading to moderate leakage”. According to the second information, the third prompt instruction and the target information, the third information is determined based on the preferred LLM, the third information being a first influence range of the first abnormal feature, and the first influence range including the number of users affected and the duration. Illustratively, according to the pipe network topology (knowledge graph physical relationship), the leakage pipe network segment covers 2 small areas and 120 households, and the influence range is about 0.3 square kilometers; the current leakage amount is estimated to be 30 m³ / h (calculated based on the hydraulic gradient and the flow difference), and if the leakage continues, the surrounding pipe network pressure will be affected within 2 hours. According to the third information, the fourth prompt instruction and the target information, the fourth information is determined based on the preferred LLM, the fourth information being a first solution of the same region and the same period of the water supply project, including emergency measures and long-term solutions. Illustratively, the emergency measures are: closing the upstream and downstream electric valves (number V-XXXX, V-XXXX) of the pipe network segment and starting the standby booster pump (number P-XXX) to ensure water supply in the surrounding area; the long-term solution is: replacing the aging cast iron pipe interface within 24 hours, using stainless steel material instead, and simultaneously detecting the 500-meter pipe network of the road segment. According to the fourth information, the fifth prompt instruction and the target information, the fifth information is determined based on the preferred LLM, the fifth information being a first estimated implementation effect, and a quantitative improvement index is given. Illustratively, within 5 minutes after the valves are closed, the surrounding pipe network pressure can be restored to more than 0.3 MPa (up to standard); after the leakage stops, the daily water saving is about 720 m³; after the interface is replaced, the leakage risk of the pipe network segment is reduced by 80%, and the service life is prolonged by 10 years. The first prompt instruction, the second prompt instruction, the third prompt instruction, the fourth prompt instruction and the fifth prompt instruction are respectively used to instruct the preferred LLM to determine the first information, the second information, the third information, the fourth information and the fifth information.The first processing result includes first information, second information, third information, fourth information, and fifth information.

[0060] It should be noted that the above preferred LLM is a 72B (i.e., 720 billion) parameter LLM based on the Qwen2.5-VL architecture, with a context length of 32K tokens, and has strong multi-modal (i.e., multi-source heterogeneous data) understanding and reasoning capabilities.

[0061] The reasoning verification link checks the reasonableness of each step of reasoning. The system first performs physical constraint checking to verify whether the pressure range and flow value involved in the reasoning conform to physical laws such as the law of conservation of mass and the law of conservation of energy. For example, the law of conservation of mass verification, leakage = abnormal flow - normal water consumption, the calculation result 30m³ / h conforms to the physical law. Then, logical consistency checking is performed to verify whether the cause-and-effect relationship is reasonable and whether the reasoning before and after is contradictory. Then, historical case comparison is performed to compare the current reasoning result with similar cases in the knowledge base to check whether it is consistent with historical experience. If the verification finds inconsistency, the verification error information will be fed back to re-generate the reasoning content of this step to ensure the accuracy and reliability of the reasoning. For example, the 10 similar leakage cases retrieved by RAG have a success rate of 100% using the "close valve + pressurize + replace interface" scheme, and there is no secondary failure.

[0062] The above step 107, i.e., "if the first processing result cannot pass the manual audit, then according to the target information, the obtained prompt instruction for the alternative LLM, and based on the alternative LLM, each processing step is performed to obtain the second processing result corresponding to each processing step", will be described in detail below in conjunction with the embodiments of the present application.

[0063] It should be noted that the prompt instruction for the alternative LLM is obtained. The prompt instruction for the alternative LLM includes a sixth prompt instruction, a seventh prompt instruction, an eighth prompt instruction, a ninth prompt instruction, and a tenth prompt instruction. If the first processing result corresponding to each processing step obtained according to the preferred LLM cannot pass the manual audit, an alternative LLM with a larger parameter scale is triggered. For example, the larger parameter scale is greater than 72B parameters. That is, if the first processing result corresponding to each processing step cannot pass the manual audit, each processing step is performed based on the alternative LLM according to the target information and the prompt instruction for the alternative LLM to obtain the second processing result corresponding to each processing step, and the parameter scale of the alternative LLM is greater than the parameter scale of the preferred LLM.

[0064] As a possible implementation manner, according to the target information and the sixth prompt instruction, the sixth information is determined based on the alternative LLM, the sixth information being a second abnormal feature of the same region and the same period of the water supply project. According to the sixth information, the seventh prompt instruction and the target information, the seventh information is determined based on the alternative LLM, the seventh information being a second cause of the second abnormal feature. According to the seventh information, the eighth prompt instruction and the target information, the eighth information is determined based on the alternative LLM, the eighth information being a second influence range of the second abnormal feature. According to the eighth information, the ninth prompt instruction and the target information, the ninth information is determined based on the alternative LLM, the ninth information being a second solution of the same region and the same period of the water supply project. According to the ninth information, the tenth prompt instruction and the target information, the tenth information is determined based on the alternative LLM, the tenth information being a second estimated implementation effect. The sixth prompt instruction, the seventh prompt instruction, the eighth prompt instruction, the ninth prompt instruction and the tenth prompt instruction are respectively used to instruct the alternative LLM to determine the sixth information, the seventh information, the eighth information, the ninth information and the tenth information. The second processing result includes the sixth information, the seventh information, the eighth information, the ninth information and the tenth information.

[0065] It should be noted that the sixth prompt instruction is relative to the first prompt instruction, the seventh prompt instruction is relative to the second prompt instruction, the eighth prompt instruction is relative to the third prompt instruction, the ninth prompt instruction is relative to the fourth prompt instruction, and the tenth prompt instruction is relative to the fifth prompt instruction. The problem prompt information includes a problem in each processing step of the preferred LLM.

[0066] For example, if the first step and the second step of the preferred LLM are not problematic, i.e., the first abnormal feature and the first cause of the first abnormal feature are not problematic, and the problem occurs from the third step, i.e., the first influence range of the first abnormal feature is problematic, then when using the alternative LLM, the problem of the third step of the preferred LLM is used as the problem prompt information from the first step, i.e., the sixth prompt instruction is relative to the first prompt instruction, the seventh prompt instruction is relative to the second prompt instruction, the eighth prompt instruction is relative to the third prompt instruction, the ninth prompt instruction is relative to the fourth prompt instruction, and the tenth prompt instruction is relative to the fifth prompt instruction.

[0067] The above step 108, i.e., “determining a decision strategy of the water supply project based on the deep neural network according to the second processing result”, is described in detail below in combination with the embodiments of the present application.

[0068] In an embodiment of the present application, as a possible implementation, the constraint conditions, optimization objectives, and historical decision strategies of the water supply project are acquired. According to the second processing result corresponding to each processing step and the constraint conditions, optimization objectives, historical decision strategies, and M groups of feature vectors of the water supply project, a decision strategy of the water supply project is determined based on a deep neural network.

[0069] Exemplarily, the decision strategy includes the following contents: Control instruction: issued to the physical device layer, the electric valve V-0312 and V-0313 are immediately closed (step motor drive, response time < 3 seconds), the standby booster pump P-078 is started, and the water supply pressure is set to 0.32 MPa (variable frequency control).

[0070] Operation and maintenance arrangement: push a work order to the APP of 3 operation and maintenance personnel, and require them to arrive at the scene within 15 minutes and carry leak stopping tools and detection equipment; the dispatch center coordinates a pipe material supplier, and the stainless steel interface accessories are delivered within 2 hours.

[0071] User notification: a water stop notification is pushed to 120 affected users through a short message, and it is informed that “due to pipeline maintenance, the water is expected to be stopped for 3 hours (15:00-18:00), and the standby booster pump guarantees basic water use during the period”.

[0072] It should be noted that, in view of the technical problems of the water supply project as a key infrastructure and the lack of traceability and security guarantee of AI decision, an embodiment of the present application proposes a private blockchain network based on Hyperledger Fabric. The private blockchain network records all key decisions and control instructions, ensures the non-tamperability and traceability of the decision process. The blockchain network adopts a multi-organization consortium chain architecture. Three channels are created to realize business isolation. The supply-operations channel is used for decisions and controls related to water supply operation, the maintenance-management channel is used for equipment maintenance management, and the audit-trail channel is used for audit tracking. Each channel runs independently, and the data are isolated from each other. Organizations can join different channels according to permissions. The consensus algorithm adopts a Practical Byzantine Fault Tolerance (PBFT) algorithm, which can still reach consensus in the case of Byzantine failure (arbitrary error or malicious behavior) of part of the nodes. A maximum of 1 node failure is tolerated in 5 Orderer nodes, and at least 4 nodes (more than 2 / 3 of the total) need to be confirmed to reach consensus. The smart contract is written in Go language and runs in the Docker container of the Peer node. The state database adopts CouchDB, which supports rich query functions and can perform complex queries according to attributes.

[0073] The embodiments of the present application can record decision strategies through the decision record contract of the blockchain. The decision strategy record structure includes fields such as decision unique ID, timestamp, decision type (optimization, emergency, maintenance, etc.), LLM model version, hash value of input data, content of each step of the inference chain, final decision content, confidence, executor identity, approval status, execution result, affected device list, record hash, etc. The contract provides a RecordDecision function to record new decisions. The function first parses the decision data, generates a decision ID and a timestamp, calculates the Secure Hash Algorithm 256 (SHA256) hash value of the decision to ensure that it cannot be tampered with, performs permission checks to ensure that only authorized LLM systems and operations personnel can record, and finally stores the decision record in the blockchain state database. The QueryDecision function queries historical decisions according to the decision ID, and the QueryDecisionsByTimeRange function queries a list of decisions by time range. The function supports the rich query function of CouchDB and can filter and sort by time, type, executor, etc. The VerifyDecisionIntegrity function verifies the integrity of the decision record, recalculates the hash value and compares it with the stored hash value. If they are inconsistent, it means that the data may have been tampered with. The UpdateDecisionExecutionResult function updates the execution result of the decision, records the execution time, state (success, failure, partial success), and performance indicators. Exemplarily, the decision strategy ID is DL-20250715-008, the timestamp is 2025-07-1514:42:36, the large language model version is Qwen2.5-VL-72B, the input data hash is the SHA256 encrypted multi-source heterogeneous data (ensuring that it cannot be tampered with), the inference chain is a complete record of each processing step based on the large language model LLM (such as five processing steps according to the first prompt instruction, the second prompt instruction, the third prompt instruction, the fourth prompt instruction, and the fifth prompt instruction), the confidence is 0.98 (the weighted score of 9 anomaly detection algorithms is 0.92, and the voting consistency is 100%), the execution result is that the operations personnel arrived on site at 14:55, closed the valve at 15:00, completed the interface replacement at 17:30, restored water supply at 17:40, and the actual water outage time was 40 minutes (better than the estimated 3 hours).

[0074] The embodiment of the application records the control instructions and state changes of physical devices in the water supply project through the device management contract of the blockchain. The device state structure includes device ID, device type (water pump, valve, sensor), location, online state, control instruction, instruction source (LLM or manual), last update time, operation log, etc. The RecordDeviceControl function records the device control instruction. The function is first associated with the corresponding decision record, verifies the validity of the decision ID, obtains the current state of the device, updates the control instruction, instruction source and update time of the device, appends the operation to the log, and finally stores it in the blockchain. The operation log record format includes timestamp, instruction content, source, associated decision ID, etc. Complete information, forming a traceable operation chain.

[0075] The embodiment of the application manages the user permissions of the water supply project through the access control contract of the blockchain. The permission structure includes user ID, role (administrator, operator, viewer, auditor), permission list (read, write, execute, audit), valid start time, valid end time, etc. The CheckPermission function checks whether the user has the permission to perform a certain operation. The function first obtains the user's permission record, checks whether the current time is within the valid period, then iterates through the permission list to check whether it contains the required permission or all permissions, and returns the check result. The contract also provides GrantPermission and RevokePermission functions for granting and revoking permissions. Only the administrator role can perform these operations.

[0076] The embodiment of the application records the audit log of user operations through the audit tracking contract of the blockchain. The audit log structure includes log ID, timestamp, user ID, operation type, operation resource, operation result (success or failure), IP address, detailed information, etc. The RecordAuditLog function records a new audit log, generates a log ID and a timestamp, and stores it in the blockchain. The QueryAuditLogs function queries the audit log, supports filtering by user, time range, operation type, etc. Conditions provide complete operation records for security audit and accident investigation.

[0077] The embodiments of the present application realize seamless docking of LLM and blockchain through a blockchain integration module. When LLM generates a decision, the integration module first constructs a decision record, including complete information such as decision ID, timestamp, decision type, model version, input data hash, inference chain, decision content, confidence, executor, approval status, execution result, and affected device. Then, the smart contract calling interface of the Fabric client is called, and the decision record is passed as a parameter to the RecordDecision function of the decision record contract. After the contract is executed, the transaction ID is returned, and the system waits for the transaction to be packaged into a block and verified, with a timeout of 10 seconds. If the transaction verification state is VALID, it means that the decision has been successfully recorded to the blockchain, and the system returns a successful result containing the decision ID, transaction ID, and block number. If the verification fails, an exception is thrown and an error log is recorded.

[0078] After the decision execution is completed, the system calls the UpdateDecisionExecutionResult function to update the execution result. The execution result data includes the decision ID, detailed information of the execution result, execution time, state (success, failure, partial success), performance indicators, and the like. These information are also recorded to the blockchain, forming a complete tracking chain from decision generation to execution completion.

[0079] When querying the decision history record, the system calls the QueryDecisionsByTimeRange or other query functions, and specifies the start time, end time, and optional decision type as filtering conditions. The contract performs a rich query in the CouchDB state database and returns a list of decisions that meet the conditions. The system can display the query result to the user or use it for data analysis and model training.

[0080] When verifying the integrity of the decision, the system calls the VerifyDecisionIntegrity function and inputs the decision ID to be verified. The contract reads the decision record from the blockchain, recalculates the hash value of the record, and compares it with the stored hash value. If they are consistent, it means that the record has not been tampered with, and the verification is passed; if they are not consistent, it means that the data may have been tampered with, and the verification fails and a warning is given.

[0081] The technical scheme provided by the embodiment of the application has the beneficial effects that: the preferred LLM is taken as the core of cognitive decision-making, breaking through the limitation of traditional water supply engineering that can only process structured data. If the first processing result corresponding to each processing step obtained according to the preferred LLM cannot pass artificial auditing, the alternative LLM with a larger parameter scale is triggered; through the four multi-modal encoders, the system can uniformly process sensor data, text data, image data and voice data, and realize real multi-modal understanding; the cross-modal attention mechanism automatically learns the correlation between different modalities, so that the system can make more accurate judgments by comprehensively considering multiple aspects of information; by fusing multi-modal (i.e. multi-source heterogeneous) data, the precision of anomaly detection is improved by combining intelligent processing with large language model LLM; the Chain-of-Thought reasoning mechanism decomposes the complex decision-making process into multiple clear steps, each step has clear reasoning basis, solves the problem of AI decision-making black box, and enables users to understand and trust the decision-making of AI. The RAG system deeply integrates the large language model and the professional knowledge base, and the accuracy of professional knowledge is improved from 70% to more than 95%, the illusion phenomenon is reduced by 85%, and the accuracy and reliability of the generated content are ensured; the first layer of statistical method provided by the embodiment of the application provides rapid preliminary screening, the second layer of machine learning method performs intelligent judgment, and the third layer of deep learning method captures complex patterns. Each layer uses three different algorithms for parallel detection, and the advantages of each algorithm are integrated through a soft voting fusion mechanism to overcome the limitations of a single method. The confidence evaluation quantifies the credibility of the detection results, and the context adjustment considers historical patterns and special events, which significantly reduces the false positive rate. The anomaly classification module can judge the specific type of anomaly, and the severity evaluation provides decision-making basis for emergency response. The accuracy of integrated detection reaches 96.8%, the false positive rate is only 2.1%, the precision is improved by 7.9% compared with the best existing method, and the quality of anomaly detection capability is greatly improved; the blockchain technology is applied to the record and traceability of AI decision-making of water supply engineering, solving the problem of decision-making credibility of critical infrastructure. The private blockchain network based on Hyperledger Fabric adopts the PBFT consensus algorithm, which ensures safety while achieving high throughput and low delay of less than 500 milliseconds. Four types of smart contracts are responsible for decision record, device management, access control and audit tracking, forming a complete security system. All LLM generated decisions and control instructions are recorded in the tamper-proof blockchain ledger, and each record contains a complete reasoning chain, decision content, execution result and performance indicators. The multi-organization consortium chain architecture realizes the collaborative supervision of operators, regulators and auditors, ensuring the transparency and fairness of decision-making. The system meets the relevant compliance requirements, providing necessary security for the critical infrastructure of water supply; shortens the fault response time; improves operational efficiency; blockchain records ensure that decision strategies are traceable, improving the reliability of the water supply engineering system; the reasoning process provides detailed explanations, enhancing user trust.

[0082] According to another embodiment, an intelligent decision generation device for water supply projects is provided. Figure 2 A schematic block diagram of an intelligent decision-making generation device for a water supply project according to one embodiment is shown. Figure 2 As shown, the device 200 may include: a multi-source heterogeneous data acquisition module 201, a data preprocessing module 202, an anomaly detection module 203, a feature vector fusion module 204, a target acquisition module 205, a first processing module 206, a second processing module 207, and a decision strategy determination module 208. The main functions of each component module are as follows: The multi-source heterogeneous data acquisition module 201 is used to acquire multi-source heterogeneous data from the same area and time period of the water supply project. The multi-source heterogeneous data includes M sets of input data, where M is a positive integer. The data preprocessing module 202 is used to preprocess the M sets of input data respectively to obtain M sets of feature vectors; The anomaly detection module 203 is used to perform anomaly detection based on the M sets of feature vectors and obtain anomaly detection results; The feature vector fusion module 204 is used to fuse the M feature vectors to obtain a fused feature vector if the anomaly judgment result includes the target anomaly. The target acquisition module 205 is used to acquire retrieval enhancement generation systems, knowledge graphs, and preferred LLM prompts in the field of water supply engineering. The first processing module 206 is used to perform various processing steps based on the preferred large language model according to the target information and the preferred LLM prompt instructions, and obtain the first processing result corresponding to each processing step. The target information includes the retrieval enhancement generation system, the knowledge graph, the anomaly judgment result, and the fusion feature vector. The second processing module 207 is used to perform various processing steps based on the target information and the obtained alternative LLM prompts, according to the target information and the alternative large language model, to obtain the second processing result corresponding to each processing step if the first processing result cannot pass the manual review. The decision strategy determination module 208 is used to determine the decision strategy of the water supply project based on the second processing result and a deep neural network.

[0083] In one possible implementation, the data preprocessing module 202 is specifically used to perform data cleaning and feature engineering on the M sets of input data respectively to obtain the M sets of feature vectors.

[0084] In one possible implementation, the anomaly detection module 203 includes a first submodule, a second submodule, a third submodule, and a fourth submodule; The first sub-module is configured to perform abnormality detection according to the M groups of feature vectors by statistical methods, machine learning methods and deep learning methods, and obtain a first abnormality score, a second abnormality score and a third abnormality score, respectively. The second sub-module is configured to determine a target abnormality score according to the first abnormality score, the second abnormality score and the third abnormality score, and corresponding first weights, second weights and third weights. The target abnormality score is a one-dimensional matrix. One element in the one-dimensional matrix corresponds to no abnormality, and each of the remaining elements corresponds to one kind of abnormality. The third sub-module is configured to determine the target abnormality of the same region and the same period of the water supply project as the maximum element in the one-dimensional matrix is greater than the abnormality score threshold corresponding to the maximum element. The fourth sub-module is configured to determine a comprehensive severity level according to the target abnormality and the weight of the target abnormality. The abnormality judgment result includes the first abnormality score, the second abnormality score and the third abnormality score, the target abnormality score, the target abnormality and the comprehensive severity level.

[0085] In a possible implementation, the apparatus further includes an updating module. The updating module is configured to update the first weight, the second weight and the third weight if the target abnormality is different from a real abnormality.

[0086] In a possible implementation, the first processing module 206 includes a first processing sub-module, a second processing sub-module, a third processing sub-module, a fourth processing sub-module and a fifth processing sub-module. The first processing sub-module is configured to determine first information based on a preferred large language model according to the target information and a first prompt instruction. The first information is a first abnormality feature of the same region and the same period of the water supply project. The second processing sub-module is configured to determine second information based on the preferred large language model according to the first information, a second prompt instruction and the target information. The second information is a first reason for the abnormality feature. The third processing sub-module is configured to determine third information based on the preferred large language model according to the second information, a third prompt instruction and the target information. The third information is a first impact range of the abnormality feature. The fourth processing sub-module is configured to determine fourth information based on the preferred large language model according to the third information, a fourth prompt instruction and the target information. The fourth information is a first solution of the same region and the same period of the water supply project. The fifth processing submodule is configured to determine fifth information based on the preferred large language model according to the fourth information, a fifth prompt instruction, and the target information, the fifth information being a first estimated implementation effect. The first prompt instruction, the second prompt instruction, the third prompt instruction, the fourth prompt instruction, and the fifth prompt instruction are respectively used to instruct the preferred large language model to determine the first information, the second information, the third information, the fourth information, and the fifth information.

[0087] In a possible implementation, the second processing module 207 is specifically configured to determine sixth information based on an alternative large language model according to the target information and a sixth prompt instruction, the sixth information being a second abnormal feature of the water supply project in the same region and the same period; determine seventh information based on the alternative large language model according to the sixth information, a seventh prompt instruction, and the target information, the seventh information being a second cause of the second abnormal feature; determine eighth information based on the alternative large language model according to the seventh information, an eighth prompt instruction, and the target information, the eighth information being a second influence range of the second abnormal feature; determine ninth information based on the alternative large language model according to the eighth information, a ninth prompt instruction, and the target information, the ninth information being a second solution of the water supply project in the same region and the same period; determine tenth information based on the alternative large language model according to the ninth information, a tenth prompt instruction, and the target information, the tenth information being a second estimated implementation effect; the sixth prompt instruction, the seventh prompt instruction, the eighth prompt instruction, the ninth prompt instruction, and the tenth prompt instruction are respectively used to instruct the alternative large language model to determine the sixth information, the seventh information, the eighth information, the ninth information, and the tenth information, and the second processing result includes the sixth information, the seventh information, the eighth information, the ninth information, and the tenth information.

[0088] In a possible implementation, the apparatus further includes a first contract recording module, a second contract recording module, a third contract recording module, and a fourth contract recording module. The first contract recording module is configured to record the decision strategy by a decision recording contract of a blockchain. The second contract recording module is configured to record control instructions and state changes of physical devices in the water supply project by a device management contract of the blockchain. The third contract recording module is configured to manage user permissions of the water supply project by an access control contract of the blockchain. The fourth contract recording module is configured to record audit logs of user operations by an audit tracking contract of the blockchain.

[0089] In a possible implementation, the apparatus further includes a target acquisition module; The target acquisition module is configured to acquire the constraint condition, the optimization target, and the historical decision strategy of the water supply project. The decision strategy determination module 208 is configured to determine, based on the second processing result and the constraint condition, the optimization target, the historical decision strategy, and the M groups of feature vectors of the water supply project, a decision strategy of the water supply project based on a deep neural network.

[0090] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, for the apparatus embodiments, since they are basically similar to the method embodiments, they are described more simply, and the related parts can be referred to the part of the method embodiments. The apparatus embodiments described above are only schematic, and the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., they can be located in one place, or distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment. Those skilled in the art can understand and implement it without creative labor.

[0091] In addition, the embodiment of the application further provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the steps of the method in any one of the preceding method embodiments.

[0092] An electronic device includes: One or more processors; and A memory associated with the one or more processors, the memory configured to store program instructions that, when executed by the one or more processors, perform the steps of the method in any one of the preceding method embodiments.

[0093] The embodiment of the application further provides a computer program product, which includes a computer program, and the computer program, when executed by a processor, implements the steps of the method in any one of the preceding method embodiments.

[0094] In the embodiment of the application, Figure 3The architecture of the electronic device is exemplarily shown, which can specifically include a processor 310, a video display adapter 311, a disk drive 312, an input / output interface 313, a network interface 314, and a memory 320. The processor 310, the video display adapter 311, the disk drive 312, the input / output interface 313, the network interface 314, and the memory 320 can be communicatively connected through a communication bus 330.

[0095] The processor 310 can be implemented in the form of a general-purpose CPU, a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute related programs to implement the technical solutions provided by the embodiments of the present application.

[0096] The memory 320 can be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 320 can store an operating system 321 for controlling the operation of the electronic device 300, a basic input / output system (BIOS) 322 for controlling the low-level operation of the electronic device 300. In addition, a web browser 323, a data storage management system 324, and an intelligent decision-making generation device for water supply projects 325, etc. can also be stored. The intelligent decision-making generation device for water supply projects 325 can be an application program for implementing the above-mentioned steps in the embodiments of the present application. In summary, when the technical solutions provided by the embodiments of the present application are implemented by software or firmware, the related program codes are stored in the memory 320 and executed by the processor 310.

[0097] The input / output interface 313 is configured to connect an input / output module to realize information input and output. The input / output module can be configured as a component in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. The input device can include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device can include a display, a speaker, a vibrator, an indicator light, etc.

[0098] The network interface 314 is configured to connect a communication module (not shown in the figure) to realize the communication interaction between the device and other devices. The communication module can realize communication through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.).

[0099] Bus 330 includes a path for transferring information between the various components (e.g., processor 310, video display adapter 311, disk drive 312, input / output interface 313, network interface 314, and memory 320) of the device.

[0100] It should be noted that although the above device only shows the processor 310, video display adapter 311, disk drive 312, input / output interface 313, network interface 314, memory 320, bus 330, etc., but in the process of implementation, the device can also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device can also contain only the components necessary to implement the scheme of the present application, and does not have to contain all the components shown in the figure.

[0101] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software and the necessary general hardware platform, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of software product, which can be stored in a computer readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including a number of instructions to make a computer device (which can be a personal computer, server, or network device, etc.) execute the method described in each embodiment or some part of the embodiment.

[0102] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the embodiments of the present application, and not to limit them; although the embodiments of the present application have been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for intelligent decision making for water supply projects, characterized in that, The method comprises the following steps: acquiring multi-source heterogeneous data from the same region and the same period of the water supply project, the multi-source heterogeneous data comprising M groups of input data; respectively pre-processing the M groups of input data to obtain M groups of feature vectors; performing abnormality judgment according to the M groups of feature vectors to obtain an abnormality judgment result; if the abnormality judgment result includes a target abnormality, fusing the M groups of feature vectors to obtain a fused feature vector; acquiring a search enhancement generation system, a knowledge graph, and a preferred large language model prompt instruction in the field of water supply projects; based on a preferred large language model, performing each processing step according to target information and the preferred large language model prompt instruction to obtain a first processing result corresponding to each processing step, wherein the target information comprises the search enhancement generation system, the knowledge graph, the abnormality judgment result, and the fused feature vector; if the first processing result cannot pass artificial review, based on an alternative large language model, performing each processing step according to the target information and an acquired alternative large language model prompt instruction to obtain a second processing result corresponding to each processing step; based on a deep neural network, determining a decision strategy for the water supply project according to the second processing result.

2. The method of claim 1, wherein, The method further comprises the following steps: based on statistical methods, machine learning methods, and deep learning methods, performing abnormality detection according to the M groups of feature vectors to respectively obtain a first abnormality score, a second abnormality score, and a third abnormality score; determining a target abnormality score based on the first abnormality score, the second abnormality score, the third abnormality score, and corresponding first, second, and third weights, wherein the target abnormality score is a one-dimensional matrix, one element in the one-dimensional matrix corresponds to no abnormality, and each of the remaining elements corresponds to one type of abnormality; if the largest element in the one-dimensional matrix is greater than an abnormality score threshold corresponding to the largest element, determining the abnormality corresponding to the largest element as a target abnormality of the water supply project in the same region and the same period; determining a comprehensive severity level based on the target abnormality and a weight of the target abnormality, wherein the abnormality judgment result comprises the first abnormality score, the second abnormality score, the third abnormality score, the target abnormality score, the target abnormality, and the comprehensive severity level.

3. The method of claim 2, wherein, The method further comprises the following steps: if the target abnormality is different from a real abnormality, updating the first weight, the second weight, and the third weight.

4. The method of claim 1, wherein, The method further comprises the following steps: based on a preferred large language model, determining first information according to the target information and a first prompt instruction, wherein the first information is a first abnormality feature of the water supply project in the same region and the same period; based on the preferred large language model, determining second information according to the first information, a second prompt instruction, and the target information, wherein the second information is a first reason for the generation of the first abnormality feature. determine, according to the second information, a third prompt instruction, and the target information, third information based on the preferred large language model, the third information being a first influence range of the first abnormal feature; determine, according to the third information, a fourth prompt instruction, and the target information, fourth information based on the preferred large language model, the fourth information being a first solution of the water supply project in the same region and the same period; determine, according to the fourth information, a fifth prompt instruction, and the target information, fifth information based on the preferred large language model, the fifth information being a first estimated implementation effect. The first prompt instruction, the second prompt instruction, the third prompt instruction, the fourth prompt instruction, and the fifth prompt instruction are respectively used to instruct the preferred large language model to determine the first information, the second information, the third information, the fourth information, and the fifth information. The first processing result includes the first information, the second information, the third information, the fourth information, and the fifth information.

5. The method of claim 1, wherein, If the first processing result cannot pass artificial audit, then according to the target information, a prompt instruction of an obtained alternative large language model, and based on the alternative large language model, each processing step is performed to obtain a second processing result corresponding to each processing step, including: determine, according to the target information and a sixth prompt instruction, sixth information based on the alternative large language model, the sixth information being a second abnormal feature of the water supply project in the same region and the same period; determine, according to the sixth information, a seventh prompt instruction, and the target information, seventh information based on the alternative large language model, the seventh information being a second cause of the second abnormal feature; determine, according to the seventh information, an eighth prompt instruction, and the target information, eighth information based on the alternative large language model, the eighth information being a second influence range of the second abnormal feature; determine, according to the eighth information, a ninth prompt instruction, and the target information, ninth information based on the alternative large language model, the ninth information being a second solution of the water supply project in the same region and the same period; determine, according to the ninth information, a tenth prompt instruction, and the target information, tenth information based on the alternative large language model, the tenth information being a second estimated implementation effect. The sixth prompt instruction, the seventh prompt instruction, the eighth prompt instruction, the ninth prompt instruction, and the tenth prompt instruction are respectively used to instruct the alternative large language model to determine the sixth information, the seventh information, the eighth information, the ninth information, and the tenth information. The second processing result includes the sixth information, the seventh information, the eighth information, the ninth information, and the tenth information.

6. The method of claim 1, wherein, The method further includes: record the decision strategy through a decision record contract of a blockchain; record control instructions and state changes of physical devices in the water supply project through a device management contract of the blockchain; manage user permissions of the water supply project through an access control contract of the blockchain; The audit log of the user operation is recorded by an audit tracking contract of the blockchain.

7. The method according to claim 1 or 2, characterized in that, The method further comprises: obtaining constraint conditions, optimization objectives, and historical decision strategies of the water supply project; the method further comprises: obtaining constraint conditions, optimization objectives, and historical decision strategies of the water supply project; 8. An intelligent decision making device for water supply works, characterized in that, the method further comprises: obtaining constraint conditions, optimization objectives, and historical decision strategies of the water supply project; comprise: a multi-source heterogeneous data acquisition module configured to acquire multi-source heterogeneous data from the same region and the same period of the water supply project, the multi-source heterogeneous data comprising M groups of input data, M being a positive integer; a data preprocessing module configured to preprocess the M groups of input data respectively to obtain M groups of feature vectors; an anomaly judgment module configured to perform anomaly judgment based on the M groups of feature vectors to obtain an anomaly judgment result; a feature vector fusion module configured to fuse the M groups of feature vectors to obtain a fused feature vector if the anomaly judgment result comprises a target anomaly; a target acquisition module configured to acquire a search enhanced generation system, a knowledge graph, and a preferred large language model prompt instruction in the field of the water supply project; a first processing module configured to perform each processing step based on a preferred large language model according to target information and the preferred large language model prompt instruction to obtain a first processing result corresponding to each processing step, the target information comprising the search enhanced generation system, the knowledge graph, the anomaly judgment result, and the fused feature vector; 9. An electronic device, comprising: a second processing module configured to perform each processing step based on an alternative large language model according to the target information and an acquired alternative large language model prompt instruction to obtain a second processing result corresponding to each processing step if the first processing result cannot pass artificial review; a decision strategy determination module configured to determine a decision strategy of the water supply project based on a deep neural network according to the second processing result. comprise:

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, a memory and a processor, the processor and the memory communicate with each other through a bus; the memory stores program instructions executable by the processor, and the processor calling the program instructions can execute the method of any one of claims 1 to 7. The computer program is executed by the processor to implement the method of any one of claims 1 to 7. The computer program is executed by the processor to implement the method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Intelligent operation and maintenance method fusing multi-modal data and active learning

    CN120198106A

  • Risk abnormal behavior event identification method based on multi-source risk abnormal behavior data fusion analysis

    CN120930001A

  • Big language model-based biomedical relationship extraction method and system

    CN121009198A