Park environment abnormity coping method and system based on machine learning model

By applying a machine learning model-based water quality monitoring and abnormal response system in the park environment, combined with the drainage network topology, the problem of difficulty in real-time monitoring and rapid response in traditional environmental management is solved, and efficient and accurate environmental abnormal response is achieved.

CN119671051APending Publication Date: 2025-03-21YANCHENG TEACHERS UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411817766.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

The traditional park environmental management model is difficult to achieve real-time monitoring and effective management of the entire drainage network, especially in water quality monitoring, which makes it difficult to respond quickly and respond to environmental abnormalities.

Method used

The park environment abnormality response method based on machine learning model is adopted, and data is collected in real time through water quality monitoring sensors, combined with the drainage network topology, and a preset classification model is used to judge the park's environmental status, and abnormality response instructions are generated to instruct the electronic valve to operate.

Benefits of technology

Real-time monitoring and rapid response to the environmental status of the park is achieved, the efficiency and accuracy of responding to abnormal water quality is improved, and the safety and health of the park environment is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119671051A_ABST
    Figure CN119671051A_ABST
Patent Text Reader

Abstract

The invention provides a park environment abnormity coping method and system based on a machine learning model. According to the method, a water quality monitoring data set of a drainage network is obtained through a water quality monitoring sensor set, and the water quality monitoring data set is sent to a monitoring server, so that the monitoring server utilizes a preset park environment monitoring model; and determining a park environment state according to the water quality monitoring data set and a drainage network topology structure corresponding to the drainage network, and when the park environment state is an abnormal state, generating an abnormality coping instruction to instruct each electronic valve in the electronic valve set to perform corresponding operation. Therefore, the environmental state of the park can be monitored, and the water quality abnormity can be quickly responded and handled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to data processing technology, and more particularly to a method and system for responding to abnormal park environment based on a machine learning model. Background Art

[0002] With the acceleration of urbanization and the increase of industrial activities, the park, as an important carrier of economic activities, has a direct impact on the health and ecological safety of residents. However, the traditional park environmental management model often relies on manual inspections and regular testing, which is not only inefficient but also difficult to detect and deal with environmental anomalies in a timely manner. Especially in terms of water quality monitoring, due to the complexity and wide distribution of the drainage network, it is difficult for traditional methods to achieve real-time monitoring and effective management of the entire drainage network.

[0003] In recent years, with the rapid development of the Internet of Things, big data and artificial intelligence technologies, new solutions have been provided for park environmental management. By integrating water quality monitoring sensors and data transmission network databases, real-time collection and storage of park drainage network water quality data can be achieved. However, how to efficiently use these massive data to judge the environmental status of the park is still a technical problem that needs to be solved. Summary of the invention

[0004] The present application provides a method and system for responding to park environmental anomalies based on a machine learning model, which is used to monitor the park environmental status and quickly respond to and cope with water quality anomalies.

[0005] In a first aspect, the present application provides a method for responding to abnormal park environment based on a machine learning model, which is applied to a park environment monitoring system, wherein the park environment monitoring system comprises: a water quality monitoring sensor set, an electronic valve set, and a monitoring server, wherein the electronic valves in the electronic valve set are distributed on water flow control nodes on a drainage network of the park to be monitored, and the water quality monitoring sensors in the water quality monitoring sensor set are used to monitor water quality monitoring data at each electronic valve; the method comprises: Acquire a water quality monitoring data set of the drainage network through the water quality monitoring sensor set, and send the water quality monitoring data set to the monitoring server; The monitoring server uses a preset park environment monitoring model and determines the park environment state according to the water quality monitoring data set and the drainage network topology structure corresponding to the drainage network, wherein the preset park environment monitoring model is a classification model trained based on a machine learning model; If the park environment state is an abnormal state, the monitoring server generates an abnormal response instruction, and the abnormal response instruction is used to instruct each electronic valve in the electronic valve set to perform a corresponding operation.

[0006] In the above scheme, first, a set of water quality monitoring sensors distributed on each water flow control node on the drainage network of the park to be monitored is used to capture and collect water quality monitoring data in real time. These data include but are not limited to key water quality indicators such as pH value, dissolved oxygen, turbidity, and heavy metal content. Subsequently, these data are sent to the monitoring server. After receiving the water quality monitoring data, the monitoring server uses a preset classification model based on machine learning model training, combined with the topological structure of the drainage network, to judge the environmental status of the park. This classification model has been trained and optimized, and can accurately map water quality monitoring data to specific environmental status categories, such as normal, slightly polluted, severely polluted, etc., to make full use of the powerful learning ability of the machine learning model and realize the judgment of the environmental status of the park. When the monitoring server determines that the environmental status of the park is abnormal, it will immediately generate abnormal response instructions. These instructions are used to instruct each electronic valve in the electronic valve set to perform corresponding operations, such as opening, closing or adjusting flow, etc., to achieve rapid response and effective processing of water quality abnormalities.

[0007] Optionally, the drainage network topology structure includes a valve physical node set, a monitoring virtual node set and a pipe edge set, wherein each valve physical node in the valve physical node set is used to represent each electronic valve in the electronic valve set, each monitoring virtual node in the monitoring virtual node set is used to represent each water quality monitoring sensor in the water quality monitoring sensor set, and each pipe edge in the pipe edge set is used to represent the drainage pipes in the drainage network used to connect between the electronic valves.

[0008] In the above scheme, the drainage network topology consists of three parts: valve entity node set, monitoring virtual node set and pipe edge set. Among them, each valve entity node in the valve entity node set directly corresponds to the electronic valve set in the park, and each valve entity node represents a specific electronic valve; the monitoring virtual node in the monitoring virtual node set corresponds to each water quality monitoring sensor in the water quality monitoring sensor set, which is used to represent the location of the sensor and its monitoring function; and the pipe edge set describes in detail the drainage pipes connecting the electronic valves in the drainage network to form the overall architecture of the entire drainage network. Among them, each valve entity node in the valve entity node set accurately reflects the physical existence of an electronic valve in the park. This mapping relationship allows us to accurately control and adjust the water flow in the drainage network through valve entity nodes. When water quality anomalies occur, the system can quickly locate the affected electronic valve and operate it through abnormal response instructions, thereby effectively curbing the spread of pollutants. Each monitoring virtual node in the monitoring virtual node set is associated with a water quality monitoring sensor, and they together constitute the neural network of water quality monitoring in the park. These monitoring virtual nodes can receive and process water quality data from sensors in real time, providing the system with accurate and comprehensive water quality information. The pipe edge set describes in detail the connection relationship between the electronic valves in the drainage network, which constitute the path of water flow in the drainage network. When dealing with water quality anomalies, the system can quickly determine the diffusion path and potential impact range of pollutants based on the information in the pipe edge set.

[0009] Optionally, before the monitoring server uses a preset park environment monitoring model and determines the park environment state according to the water quality monitoring data set and the drainage network topology structure corresponding to the drainage network, it also includes: The monitoring server generates an initial feature matrix, and fills the initial feature matrix according to the valve entity node set and the pipeline edge set, so as to generate a topological feature matrix corresponding to the drainage network topological structure.

[0010] In the above scheme, before generating the topological feature matrix, the monitoring server first creates an initial feature matrix. This matrix is ​​a square matrix whose dimension matches the number of valve entity nodes in the valve entity node set, and the initial values ​​of all elements are set to 0. This step provides a basic framework for subsequent matrix filling and feature extraction. Next, the monitoring server fills the initial feature matrix with the information of the valve entity node set and the pipe edge set. The filling process updates the element values ​​in the matrix according to the connection relationship of the pipe edges in the pipe edge set, thereby reflecting the topological relationship between the valve entity nodes, such as no connection, unidirectional connection, and bidirectional connection. After the above filling process, the initial feature matrix is ​​converted into a topological feature matrix. This matrix not only retains the basic topological structure information of the drainage network, but also quantifies the connection strength or relationship type between the valve entity nodes through the values ​​of the matrix elements. This quantitative representation enables the subsequent machine learning model to process and utilize this information more effectively. The generation of the topological feature matrix is ​​a key step for the machine learning model to accurately judge the environmental status of the park. By converting the topological structure of the drainage network into a numerical feature matrix, the model can more easily learn the interactions and influences between the nodes in the drainage network. This helps to improve the prediction accuracy and generalization ability of the model, enabling it to perform well in different drainage network environments.

[0011] Optionally, the monitoring server uses a preset park environment monitoring model and determines the park environment state according to the water quality monitoring data set and the drainage network topology structure corresponding to the drainage network, including: The monitoring server generates a water quality monitoring matrix according to the topological feature matrix and the water quality monitoring data set; The monitoring server uses the preset park environment monitoring model and determines the park environment status according to the water quality monitoring matrix.

[0012] In the above scheme, the monitoring server first generates a water quality monitoring matrix based on the topological feature matrix and the water quality monitoring data set. This step realizes the organic integration of the drainage network topology and the water quality monitoring data, so that each water quality monitoring data is closely associated with its corresponding valve entity node and drainage pipe. Among them, the water quality monitoring matrix not only contains the original water quality monitoring data, but also increases the spatial correlation and topological structure information between water quality data through the introduction of the topological feature matrix. This information enhancement helps the subsequent machine learning model to understand and analyze the water quality status more comprehensively. The generated water quality monitoring matrix is ​​used as the input of the preset park environment monitoring model. This model has been trained to recognize and process water quality data that incorporates topological structure information. The model uses the knowledge and rules it has learned based on the input water quality monitoring matrix to judge the park environment status. This process makes full use of the spatiotemporal characteristics of water quality data and the topological structure of the drainage network to improve the accuracy and reliability of state judgment. After determining the park environment status, the model can provide decision support for the subsequent generation of abnormal response instructions. If the status is abnormal, the model can indicate which electronic valves need to be operated and how to operate them to effectively respond to water quality abnormalities.

[0013] It can be seen that by generating a water quality monitoring matrix, the water quality monitoring data and drainage network topology information are utilized, which improves the utilization rate and value of the data. The water quality monitoring matrix that integrates topology information provides richer input features for the machine learning model, which helps the model to more accurately judge the state of the park environment. Accurate state judgment provides a solid foundation for the generation of abnormal response instructions, thereby improving the efficiency and accuracy of the response to abnormal park environment.

[0014] Optionally, the monitoring server uses the preset park environment monitoring model and determines the park environment state according to the water quality monitoring matrix, including: Step 1, the monitoring server generates a water quality feature matrix according to the water quality monitoring matrix; Step 2, the server splices the water quality monitoring matrix and the topological feature matrix to generate a fusion feature matrix; Step 3: The server determines the campus environment status based on the fusion feature matrix.

[0015] In the above scheme, the monitoring server generates a water quality feature matrix based on the water quality monitoring matrix. This process is essentially feature extraction of the original water quality data. Feature extraction is often accompanied by data dimensionality reduction, that is, removing redundant information and retaining the most valuable features. This helps to reduce the complexity of subsequent model processing and improve computational efficiency. The generated water quality feature matrix is ​​one of the inputs of the machine learning model, and its quality directly affects the judgment accuracy of the model. Through feature extraction, the model is provided with more refined and effective input data. Then, the server splices the water quality feature matrix with the topological feature matrix to generate a fusion feature matrix. This step realizes the deep fusion of water quality data and drainage network topological structure information, so that the model can simultaneously consider the impact of water quality conditions and drainage network structure on the environmental status of the park. The water quality feature matrix and the topological feature matrix provide different aspects of information on water quality and drainage network respectively. Through splicing, the two complement each other and together constitute a comprehensive description of the environmental status of the park. The generation of the fusion feature matrix helps the model learn the complex relationship between water quality and drainage network, thereby improving its generalization ability and enabling it to make accurate judgments in different situations. The fusion feature matrix is ​​used as the input of the preset park environment monitoring model, providing a comprehensive information basis for the model. Based on the water quality characteristics and topological characteristics in the fusion feature matrix, the model uses the learned knowledge and rules to make a comprehensive judgment on the park environment status. This process fully considers the interaction and influence of water quality and drainage network structure. Accurate judgment of the park environment status provides reliable decision support for the subsequent generation of abnormal response instructions, which helps to respond to park environmental anomalies in a timely and effective manner.

[0016] It can be seen that by generating the water quality feature matrix and the fusion feature matrix, the water quality data and the drainage network topology information are effectively integrated and fully utilized. The fusion feature matrix provides the model with more comprehensive and accurate input information, which helps the model make more accurate judgments on the park environment status. Accurate judgments on the park environment status provide a solid foundation for the generation of abnormal response instructions, thereby improving the efficiency and accuracy of the response to abnormal park environment.

[0017] Optionally, before the monitoring server uses the preset park environment monitoring model and determines the park environment state according to the water quality monitoring matrix, the method further includes: Input the training data set into the initial park environment monitoring model, and perform forward propagation according to steps 1 to 3 to determine the prediction results; Using a back propagation algorithm, and determining a gradient of a cross entropy loss function based on the prediction result; The gradient descent method is used for training updates until the cross entropy loss function converges and / or the number of training times reaches a preset number of iterations to generate the preset park environment monitoring model.

[0018] In the above scheme, the training data set is input into the initial park environment monitoring model and forward propagated according to steps 1 to 3. This process includes the generation of water quality feature matrix, the splicing of fusion feature matrix and the prediction of park environment status based on fusion feature matrix. Through forward propagation, the model generates prediction results based on the input training data set. These prediction results reflect the model's understanding and judgment of the current data set and are the basis for subsequent model training and adjustment. Then, the cross entropy loss function is calculated using the prediction results and the true labels. The cross entropy loss function is a common indicator for measuring the difference between the model prediction results and the true results. The smaller the value, the more accurate the model prediction. The gradient of the cross entropy loss function with respect to the model parameters is calculated through the back propagation algorithm. The back propagation algorithm is a key step in neural network training. It guides the update direction of the model parameters according to the gradient information of the loss function. Then, the gradient descent method is used to update the model parameters using the calculated gradient information. The model training process continues until the cross entropy loss function converges or the number of training reaches the preset number of iterations. This control mechanism ensures the adequacy and stability of model training and avoids the occurrence of overfitting or underfitting.

[0019] After the above training process, the initial park environment monitoring model is gradually optimized to the preset park environment monitoring model. The preset model has higher accuracy and stability in predicting the park environment status, and can more effectively deal with environmental anomalies in actual scenarios. Through a large amount of training data and iterative updates, the preset park environment monitoring model not only learns the specific patterns in the training data set, but also has the ability to generalize to unknown data. This enables the model to maintain a high prediction accuracy when facing new environments or new data.

[0020] It can be seen that through the clear steps of forward propagation, back propagation and gradient descent, an efficient and stable model training process is achieved, which improves the efficiency of model training. The fully trained preset park environment monitoring model performs well in predicting the park environment status, providing accurate and reliable decision support for subsequent abnormal response. By introducing mature algorithms such as cross entropy loss function and gradient descent method, this method enhances the ability to combat data noise and overfitting, and improves the robustness and practicality of the method.

[0021] Optionally, before inputting the training data set into the initial park environment monitoring model and performing forward propagation according to steps 1 to 3 to determine the prediction result, the method further includes: Obtaining a historical water quality monitoring data set of the drainage network and a corresponding park environment status label; Generate a historical water quality monitoring matrix based on the historical water quality monitoring data set and the drainage network topology structure; A piece of training data in the training data set is generated according to the historical water quality monitoring matrix and the corresponding park environment status label.

[0022] In the above scheme, first, the historical water quality monitoring data set of the drainage network is obtained. These data are the basis of model training. They reflect the water quality status of the drainage network in different time periods and provide rich sample information for the model. At the same time, the park environment status labels corresponding to these water quality monitoring data are collected. These labels are the targets of model prediction. They indicate the actual state of the park environment under different water quality conditions and provide a basis for the supervised learning of the model. Then, according to the historical water quality monitoring data set and the topological structure of the drainage network, the historical water quality monitoring matrix is ​​generated. This step realizes the preliminary fusion of water quality data and drainage network structure, laying the foundation for subsequent feature extraction and model training. The historical water quality monitoring matrix not only contains the original water quality monitoring data, but also increases the spatial correlation and structural information between data through the introduction of the drainage network topological structure, thereby improving the quality and value of the data. Then, the historical water quality monitoring matrix is ​​combined with the corresponding park environment status label to generate a training data in the training data set. This process realizes the pairing of data and labels, and provides complete input and output for the supervised learning of the model. By repeating the above process, multiple training data can be generated to form a training data set. The size and diversity of the training dataset directly affects the training effect and generalization ability of the model.

[0023] In a second aspect, the present application provides a park environment monitoring system, comprising: a water quality monitoring sensor set, an electronic valve set, and a monitoring server, wherein the electronic valves in the electronic valve set are distributed and arranged on water flow control nodes on a drainage network of a park to be monitored, and the water quality monitoring sensors in the water quality monitoring sensor set are arranged on water inlets and outlets of each electronic valve; Acquire a water quality monitoring data set of the drainage network through the water quality monitoring sensor set, and send the water quality monitoring data set to the monitoring server; The monitoring server uses a preset park environment monitoring model and determines the park environment state according to the water quality monitoring data set and the drainage network topology structure corresponding to the drainage network, wherein the preset park environment monitoring model is a classification model trained based on a machine learning model; If the park environment state is an abnormal state, the monitoring server generates an abnormal response instruction, and the abnormal response instruction is used to instruct each electronic valve in the electronic valve set to perform a corresponding operation.

[0024] Optionally, the drainage network topology structure includes a valve physical node set, a monitoring virtual node set and a pipe edge set, wherein each valve physical node in the valve physical node set is used to represent each electronic valve in the electronic valve set, each monitoring virtual node in the monitoring virtual node set is used to represent each water quality monitoring sensor in the water quality monitoring sensor set, and each pipe edge in the pipe edge set is used to represent the drainage pipes in the drainage network used to connect between the electronic valves.

[0025] Optionally, before the monitoring server uses a preset park environment monitoring model and determines the park environment state according to the water quality monitoring data set and the drainage network topology structure corresponding to the drainage network, it also includes: The monitoring server generates an initial feature matrix, and fills the initial feature matrix according to the valve entity node set and the pipeline edge set, so as to generate a topological feature matrix corresponding to the drainage network topological structure.

[0026] Optionally, the monitoring server uses a preset park environment monitoring model and determines the park environment state according to the water quality monitoring data set and the drainage network topology structure corresponding to the drainage network, including: The monitoring server generates a water quality monitoring matrix according to the topological feature matrix and the water quality monitoring data set; The monitoring server uses the preset park environment monitoring model and determines the park environment status according to the water quality monitoring matrix.

[0027] Optionally, the monitoring server uses the preset park environment monitoring model and determines the park environment state according to the water quality monitoring matrix, including: Step 1, the monitoring server generates a water quality feature matrix according to the water quality monitoring matrix; Step 2, the server splices the water quality monitoring matrix and the topological feature matrix to generate a fusion feature matrix; Step 3: The server determines the campus environment status based on the fusion feature matrix.

[0028] Optionally, before the monitoring server uses the preset park environment monitoring model and determines the park environment state according to the water quality monitoring matrix, the method further includes: Input the training data set into the initial park environment monitoring model, and perform forward propagation according to steps 1 to 3 to determine the prediction results; Using a back propagation algorithm, and determining a gradient of a cross entropy loss function based on the prediction result; The gradient descent method is used for training updates until the cross entropy loss function converges and / or the number of training times reaches a preset number of iterations to generate the preset park environment monitoring model.

[0029] Optionally, before inputting the training data set into the initial park environment monitoring model and performing forward propagation according to steps 1 to 3 to determine the prediction result, the method further includes: Obtaining a historical water quality monitoring data set of the drainage network and a corresponding park environment status label; Generate a historical water quality monitoring matrix based on the historical water quality monitoring data set and the drainage network topology structure; A piece of training data in the training data set is generated according to the historical water quality monitoring matrix and the corresponding park environment status label.

[0030] In a third aspect, the present application provides an electronic device, including: processor; and, A memory, configured to store executable instructions of the processor; The processor is configured to perform any possible method described in the first aspect by executing the executable instructions.

[0031] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement any possible method described in the first aspect.

[0032] The method and system for responding to park environment abnormalities based on a machine learning model provided in the present application obtains a water quality monitoring data set of a drainage network through a water quality monitoring sensor set, and sends the water quality monitoring data set to a monitoring server, so that the monitoring server uses a preset park environment monitoring model to determine the park environment status according to the water quality monitoring data set and the drainage network topology structure corresponding to the drainage network, and generates abnormal response instructions when the park environment status is abnormal, so as to instruct each electronic valve in the electronic valve set to perform corresponding operations, thereby realizing the monitoring of the park environment status and rapid response and response to water quality abnormalities. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0034] Figure 1 It is a flowchart of a method for dealing with abnormal park environment based on a machine learning model according to an example embodiment of the present application; Figure 2 is a flow chart of a method for coping with abnormal park environment based on a machine learning model according to another exemplary embodiment of the present application; Figure 3 is a schematic diagram of the structure of a park environment monitoring system according to an exemplary embodiment of the present application; Figure 4 It is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present application.

[0035] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0036] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0037] In order to solve the above problems, the core of the embodiment provided in this application is to combine the Internet of Things and machine learning technologies to achieve real-time monitoring and intelligent response to the environmental status of the park.

[0038] First, the embodiment provided by this application collects water quality monitoring data of the park drainage network in real time by deploying a set of water quality monitoring sensors. These sensors are distributed at key nodes of the drainage network and can fully cover all areas of the park to ensure the accuracy and representativeness of the data. The collected water quality monitoring data include but are not limited to key indicators such as pH value, dissolved oxygen, turbidity, and heavy metal content, which can fully reflect the water quality of the park.

[0039] Secondly, the embodiment provided by the present application sends the collected water quality monitoring data to the monitoring server, and uses the preset park environment monitoring model for data processing and analysis. The model is a classification model trained based on a machine learning algorithm, which can accurately judge the park environment status based on the water quality monitoring data and the drainage network topology. The drainage network topology includes a valve entity node set, a monitoring virtual node set, and a pipeline edge set. These nodes and edges together constitute the skeleton of the drainage network, providing the model with rich spatial information and structural information.

[0040] In the data processing process, the embodiment provided by the present application first generates an initial feature matrix, and fills the initial feature matrix according to the drainage network topology to generate a topological feature matrix. Then, the topological feature matrix is ​​combined with the water quality monitoring data set to generate a water quality monitoring matrix. This step realizes the organic fusion of water quality data and topological structure information, and provides comprehensive input features for subsequent model prediction.

[0041] Next, the embodiment provided by the present application uses a preset park environment monitoring model to process the water quality monitoring matrix, generates a water quality feature matrix, and splices it with the topological feature matrix to generate a fusion feature matrix. Finally, based on the fusion feature matrix, the model outputs the prediction result of the park environment state. If the prediction result is an abnormal state, the monitoring server immediately generates an abnormal response instruction, instructing each electronic valve in the electronic valve set to perform a corresponding operation, such as closing or adjusting the opening of a specific electronic valve to cut off or adjust the water flow in the abnormal water quality area, so as to achieve rapid response and effective processing of water quality abnormalities.

[0042] The innovative points of the embodiments provided in this application are: Real-time monitoring and intelligent response: By deploying a collection of water quality monitoring sensors and intelligent electronic valves, real-time monitoring and intelligent control of the park drainage network can be achieved, improving the efficiency and accuracy of environmental management.

[0043] Application of machine learning models: The classification model trained using machine learning algorithms can accurately judge the environmental status of the park based on water quality monitoring data and drainage network topology, providing a scientific basis for abnormal response.

[0044] Multi-source information fusion: organically integrate water quality monitoring data with drainage network topology information to generate a fusion feature matrix, which improves the accuracy and robustness of model prediction.

[0045] Automation and intelligence: Through the automated collection, transmission, processing and analysis of data, as well as the intelligent generation of response instructions, the automation and intelligence of park environmental management are achieved, which reduces labor costs and improves management efficiency.

[0046] The embodiments provided in the present application may be applied to a park environment monitoring system, which includes: a water quality monitoring sensor set, an electronic valve set, and a monitoring server. The electronic valves in the electronic valve set are distributed on water flow control nodes on the drainage network of the park to be monitored. The water quality monitoring sensors in the water quality monitoring sensor set are used to monitor the water quality monitoring data at each electronic valve.

[0047] Through the above system architecture description, the basic structure of the park environment monitoring system is clear, which includes a water quality monitoring sensor set, an electronic valve set and a monitoring server. The water quality monitoring sensor set consists of multiple water quality monitoring sensors, which are deployed at key locations in the park to be monitored, especially at various water flow control nodes related to the drainage network. The electronic valve set contains multiple electronic valves, which are also distributed on the water flow control nodes of the drainage network and are used to control the on-off or flow rate of the water flow according to instructions. As the center of the system, the monitoring server is responsible for receiving and processing data and issuing instructions.

[0048] Figure 1 FIG. 1 is a flow chart of a method for dealing with abnormal campus environment based on a machine learning model according to an example embodiment of the present application. Figure 1 As shown, the method for dealing with abnormal campus environment based on a machine learning model provided in this embodiment includes: S101. Acquire a water quality monitoring data set of a drainage network through a water quality monitoring sensor set.

[0049] In this step, a water quality monitoring data set of the drainage network is acquired through a water quality monitoring sensor set, and the water quality monitoring data set is sent to a monitoring server.

[0050] Specifically, each sensor in the water quality monitoring sensor set monitors the water quality parameters of its location in real time or regularly according to the preset sampling frequency or trigger conditions, such as pH value, dissolved oxygen, turbidity, chemical oxygen demand (COD), concentration of specific pollutants or elements, etc. The sensor converts the monitored water quality data into electrical signals and transmits them to the monitoring server via wired or wireless means. After receiving the water quality data from each sensor, the monitoring server performs preliminary data verification and format conversion to ensure the accuracy and consistency of the data. The processed water quality data set is stored in the server's database to provide a basis for subsequent data analysis and model prediction.

[0051] S102: The monitoring server uses a preset park environment monitoring model and determines the park environment status according to a water quality monitoring data set and a drainage network topology structure corresponding to the drainage network.

[0052] In this step, the monitoring server uses a preset park environment monitoring model and determines the park environment status based on the water quality monitoring data set and the drainage network topology structure corresponding to the drainage network, wherein the preset park environment monitoring model is a classification model trained based on a machine learning model.

[0053] Specifically, the monitoring server loads a preset park environment monitoring model, which is a classification model trained based on machine learning algorithms (such as decision trees, random forests, support vector machines, neural networks, etc.), and is used to predict the park environment status based on water quality monitoring data and drainage network topology.

[0054] The server takes the currently acquired water quality monitoring data set and the topological structure information of the drainage network as input and sends them to the park environment monitoring model. The model performs forward propagation calculations based on the input data and outputs the predicted results of the park environment status. The result may be a normal state or an abnormal state, depending on the learning results and decision threshold of the model. Then, the monitoring server determines whether the park environment status is abnormal based on the prediction results of the model.

[0055] Furthermore, the above-mentioned drainage network topology structure includes a valve physical node set, a monitoring virtual node set and a pipe edge set, wherein each valve physical node in the valve physical node set is used to represent each electronic valve in the electronic valve set, each monitoring virtual node in the monitoring virtual node set is used to represent each water quality monitoring sensor in the water quality monitoring sensor set, and each pipe edge in the pipe edge set is used to represent the drainage pipes in the drainage network used to connect between the electronic valves.

[0056] Specifically, each valve entity node in the valve entity node set corresponds to an electronic valve in the electronic valve set. These nodes are represented in the topological graph in the form of entities, which are used to identify the location and identity of the electronic valve. Each valve entity node contains attribute information related to the corresponding electronic valve, such as valve number, position coordinates, control status, etc. Each monitoring virtual node in the monitoring virtual node set corresponds to a water quality monitoring sensor in the water quality monitoring sensor set. Different from the valve entity node, the monitoring virtual node is represented in a virtual form in the topological graph, which is mainly used to identify the location of the water quality monitoring point. Each monitoring virtual node contains attribute information related to the corresponding sensor, such as sensor number, monitoring parameter type, sampling frequency, etc. Each pipe edge in the pipe edge set represents a drainage pipe connecting two electronic valves (or electronic valves and other parts of the drainage system) in the drainage network. The pipe edge is represented in the form of a line segment in the topological graph, connecting the valve entity node or the valve entity node and the monitoring virtual node, and is used to describe the water flow path and the pipe connection relationship. Each pipe edge can contain attribute information related to the drainage pipe, such as pipe length, diameter, material, etc.

[0057] In the above scheme, the drainage network topology consists of three parts: valve entity node set, monitoring virtual node set and pipe edge set. Among them, each valve entity node in the valve entity node set directly corresponds to the electronic valve set in the park, and each valve entity node represents a specific electronic valve; the monitoring virtual node in the monitoring virtual node set corresponds to each water quality monitoring sensor in the water quality monitoring sensor set, which is used to represent the location of the sensor and its monitoring function; and the pipe edge set describes in detail the drainage pipes connecting the electronic valves in the drainage network to form the overall architecture of the entire drainage network. Among them, each valve entity node in the valve entity node set accurately reflects the physical existence of an electronic valve in the park. This mapping relationship allows us to accurately control and adjust the water flow in the drainage network through valve entity nodes. When water quality anomalies occur, the system can quickly locate the affected electronic valve and operate it through abnormal response instructions, thereby effectively curbing the spread of pollutants. Each monitoring virtual node in the monitoring virtual node set is associated with a water quality monitoring sensor, and they together constitute the neural network of water quality monitoring in the park. These monitoring virtual nodes can receive and process water quality data from sensors in real time, providing the system with accurate and comprehensive water quality information. The pipe edge set describes in detail the connection relationship between the electronic valves in the drainage network, which constitute the path of water flow in the drainage network. When dealing with water quality anomalies, the system can quickly determine the diffusion path and potential impact range of pollutants based on the information in the pipe edge set.

[0058] S103: The monitoring server generates an exception response instruction.

[0059] If the park environment status is abnormal, the monitoring server generates an abnormal response instruction, and the abnormal response instruction is used to instruct each electronic valve in the electronic valve set to perform a corresponding operation.

[0060] If the environmental status of the park is judged to be abnormal, the monitoring server immediately generates an abnormal response instruction. The instruction contains specific operation requirements, such as closing or adjusting the opening of a specific electronic valve to cut off or adjust the water flow in the abnormal water quality area. Among them, the monitoring server sends the abnormal response instruction to the relevant electronic valves in the electronic valve set through wired or wireless communication. The electronic valve that receives the instruction performs the corresponding operation according to the instruction requirements, such as closing the valve, adjusting the opening, etc., so as to achieve effective isolation or control of abnormal water quality.

[0061] In this embodiment, a water quality monitoring data set of the drainage network is obtained through a water quality monitoring sensor set, and the water quality monitoring data set is sent to a monitoring server, so that the monitoring server uses a preset park environment monitoring model and determines the park environment status according to the water quality monitoring data set and the drainage network topology structure corresponding to the drainage network, and generates abnormal response instructions when the park environment status is abnormal to instruct each electronic valve in the electronic valve set to perform corresponding operations, thereby realizing monitoring of the park environment status and rapid response and response to water quality abnormalities.

[0062] Figure 2 FIG. 1 is a flow chart of a method for dealing with abnormal campus environment based on a machine learning model according to another exemplary embodiment of the present application. Figure 2 As shown, the method for dealing with abnormal campus environment based on a machine learning model provided in this embodiment includes: S201. Acquire a water quality monitoring data set of a drainage network through a water quality monitoring sensor set.

[0063] In this step, a water quality monitoring data set of the drainage network is acquired through a water quality monitoring sensor set, and the water quality monitoring data set is sent to a monitoring server.

[0064] Specifically, each sensor in the water quality monitoring sensor set monitors the water quality parameters at its location, such as pH, dissolved oxygen, turbidity, chemical oxygen demand (COD), etc., in real time or regularly according to the preset sampling frequency or trigger conditions. The sensor converts the monitored water quality data into electrical signals and transmits them to the monitoring server via wired or wireless means. After receiving the water quality data from each sensor, the monitoring server performs preliminary data verification and format conversion to ensure the accuracy and consistency of the data. The processed water quality data set is stored in the server's database to provide a basis for subsequent data analysis and model prediction.

[0065] S202: The monitoring server generates an initial feature matrix.

[0066] Specifically, the monitoring server generates an initial feature matrix P0, wherein the initial feature matrix P0 is an n×n square matrix, and the initial value of each element of the initial feature matrix P0 is 0, and n is the number of valve entity nodes in the valve entity node set.

[0067] S203, filling the initial feature matrix according to the valve entity node set and the pipeline edge set to generate a topological feature matrix corresponding to the drainage network topological structure.

[0068] Specifically, the monitoring server uses Formula 1 and fills the initial feature matrix P0 according to the valve entity node set and the pipeline edge set to generate a topological feature matrix P corresponding to the drainage network topological structure, where P in the topological feature matrix P is ij Used to represent the relationship between the i-th valve entity node and the j-th valve entity node in the valve entity node set. The topological relationship between the valve entity nodes is as follows:

[0069] Among them, the first condition is that there is no pipeline edge for connecting the i-th valve entity node and the j-th valve entity node in the pipeline edge set; the second condition is that there is a unidirectional pipeline edge in the pipeline edge set that flows unidirectionally from the i-th valve entity node to the j-th valve entity node; the third condition is that there is a bidirectional pipeline edge between the i-th valve entity node and the j-th valve entity node in the pipeline edge set.

[0070] In the above scheme, by constructing a topological feature matrix, the connection relationship between each valve entity node in the drainage network can be accurately represented. The elements in the matrix are assigned different values ​​(0, 1 or 2) according to the existence or non-existence of the pipe edge between the valve entity nodes and the flow direction. This representation method not only intuitively reflects the physical layout of the drainage network, but also provides an important data basis for subsequent abnormal response. Before the water quality monitoring data is input into the preset park environment monitoring model, the topological feature matrix is ​​used as an input feature of the model. Since the topological feature matrix accurately represents the topological structure of the drainage network, the model can more comprehensively understand the state of the park drainage system, thereby improving the accuracy of the prediction of the park environment state. Especially when dealing with anomaly detection in complex drainage networks, this precise topological information can significantly enhance the model's discrimination ability.

[0071] S204. The monitoring server generates a water quality monitoring matrix according to the topological feature matrix and the water quality monitoring data set.

[0072] Specifically, the monitoring server uses Formula 2 and generates a water quality monitoring matrix Q according to the topological feature matrix P, where Formula 2 is:

[0073] Among them, q ij It is used to characterize the water quality monitoring characteristic value between the i-th valve entity node and the j-th valve entity node, d i is the water quality monitoring data corresponding to the position of the i-th valve entity node, d j It is the water quality monitoring data of the position corresponding to the j-th valve entity node.

[0074] It is worth noting that by combining the topological feature matrix with the water quality monitoring data and generating the water quality monitoring matrix using Formula 2, effective fusion of multi-source information is achieved. This fusion not only considers the water quality monitoring data of each valve entity node location, but also the topological relationship between nodes. Therefore, the water quality monitoring matrix can more comprehensively reflect the water quality status of the park drainage system and provide strong support for the accurate assessment of the park's environmental status.

[0075] Among them, in traditional environmental monitoring methods, only the water quality monitoring data of a single location is often focused on, while the influence of the drainage network topology on the distribution and propagation of water quality is ignored. The above scheme introduces a water quality monitoring matrix, so that the preset park environment monitoring model can take into account the influence of the topological relationship between nodes on the water quality monitoring data, thereby enhancing the adaptability of the model to complex park environments. This adaptability enables the model to maintain a high state assessment accuracy when facing complex situations such as different park layouts and different water pollution sources. The generation of the water quality monitoring matrix enables the monitoring server to more accurately capture the changing trend of water quality anomalies. Since the matrix contains the topological relationship information between nodes, when a node has water quality anomalies, its impact will quickly spread to the nodes connected to it and be reflected in the water quality monitoring matrix. This propagation effect enables the monitoring server to detect potential water quality anomalies earlier and take corresponding countermeasures, thereby improving the sensitivity and accuracy of anomaly detection. By using the water quality monitoring matrix to evaluate the park environment status, the monitoring server can more accurately determine which areas need to pay attention to the water quality status. This helps to optimize the allocation of park operation and maintenance resources and concentrate limited resources on areas that need the most attention.

[0076] S205. The monitoring server uses a preset park environment monitoring model and determines the park environment status according to a water quality monitoring matrix.

[0077] Step 1: The monitoring server uses formula 3 to generate a water quality feature matrix F based on the water quality monitoring matrix Q, where formula 3 is:

[0078] Among them, W q is the first weight matrix of water quality detection data, b q is the first bias vector of water quality detection data, ρ is the activation function; Step 2: The server concatenates the water quality monitoring matrix Q and the topological feature matrix P to generate a fusion feature matrix T; Step 3: The server uses formula 4 and determines the campus environment state S according to the fusion feature matrix T, where formula 4 is:

[0079] in, is the decision function of the classification model, Ws is the second weight matrix of the environment state, b s is the second bias vector of the environment state.

[0080] In the above scheme, the monitoring server generates a water quality feature matrix using the water quality monitoring matrix through formula 3. This process realizes the nonlinear transformation and feature extraction of water quality monitoring data by introducing the first weight matrix and the first bias vector and combining the activation function. This feature extraction method can capture the deep information in the water quality data and improve the model's understanding of the water quality status, thereby providing more accurate and rich feature input for subsequent environmental status judgment. In step 2, the monitoring server splices the water quality monitoring matrix with the topological feature matrix to generate a fusion feature matrix. This step realizes the effective fusion of water quality monitoring data and drainage network topological structure information. Through the splicing operation, the model can simultaneously consider the impact of water quality status and drainage network structure on the park environment status, thereby enhancing the comprehensive understanding of complex environmental systems. This feature fusion strategy helps to improve the adaptability and robustness of the model in a complex park environment. In step 3, the monitoring server determines the park environment status using formula 4 and the fusion feature matrix. This process realizes further processing and decision-making of fusion features by introducing the decision function of the classification model, the second weight matrix and the second bias vector. Since the fusion feature matrix already contains water quality monitoring data and topological structure information, the model can make a more accurate environmental status judgment based on these comprehensive features. This judgment method can not only identify abnormal conditions in the park environment, but also make a preliminary assessment of the type, degree and impact range of the abnormality, providing strong support for subsequent response measures.

[0081] The feature extraction and fusion strategies in the above scheme help optimize the training efficiency of the model. By extracting more accurate and rich feature inputs, the model can converge to the optimal solution faster during training, thereby saving training time and computing resources. At the same time, because the feature fusion strategy enhances the model's ability to understand complex environmental systems, the model can better generalize to unseen data during training, improving the generalization ability and robustness of the model.

[0082] In addition, in order to train the preset park environment monitoring model in this application, the activation function Can be a corrected linear unit function, a decision function It can be a normalized exponential function; correspondingly, before the monitoring server uses the preset park environment monitoring model and determines the park environment state according to the water quality monitoring matrix Q, it also includes: Step a: the first weight matrix W q , the first bias vector b q , the second weight matrix W sand the second bias vector b s Initialize and construct the cross entropy loss function; Step b: input the training data set into the initial park environment monitoring model, and perform forward propagation according to steps 1 to 3 to determine the prediction results; Step c: Use the back propagation algorithm and determine the cross entropy loss function for the first weight matrix W according to the prediction results. q , the first bias vector b q , the second weight matrix W s and the second bias vector b s The derivative of Step d: Update the first weight matrix W using the gradient descent method q , the first bias vector b q , the second weight matrix W s and the second bias vector b s ; Repeat steps b to d until the cross entropy loss function converges and / or the number of training iterations reaches a preset number of times to generate a preset park environment monitoring model.

[0083] Through the above training steps, in step a, by initializing the first weight matrix, the first bias vector, the second weight matrix and the second bias vector, and constructing the cross entropy loss function, a solid foundation is laid for the subsequent training process. This step ensures that the model has a reasonable starting point at the beginning of training, which helps to accelerate the convergence speed of the model and improve the training efficiency.

[0084] In step b, the training data set is input into the initial park environment monitoring model, and forward propagation is performed according to the established steps to determine the prediction results. This process simulates the performance of the model in actual applications. Through forward propagation, the model can gradually learn and adapt to the data characteristics, providing a basis for subsequent back propagation and parameter adjustment.

[0085] Steps c and d constitute the core of model training. By using the back propagation algorithm, the derivatives of the cross entropy loss function for each parameter are determined based on the prediction results, and the weights and biases are updated using the gradient descent method. The model can continuously optimize its internal parameters to reduce the prediction error. This process is repeated until the cross entropy loss function converges or reaches the preset number of iterations, thereby generating a high-precision preset park environment monitoring model.

[0086] Then, the modified linear unit function is used as the activation function, making the model more flexible in dealing with nonlinear relationships and more accurately capturing complex features in the data. At the same time, the normalized exponential function is used as a decision function to help the model make more accurate judgments in multi-classification problems. The combination of these technical features makes the model more sensitive and accurate when dealing with abnormal park environments.

[0087] In addition, before inputting the training data set into the initial park environment monitoring model and performing forward propagation according to steps 1 to 3 to determine the prediction results, it also includes: Obtain the historical water quality monitoring data set of the drainage network and the corresponding park environmental status labels; Generate a historical water quality monitoring matrix based on the historical water quality monitoring data set and the drainage network topology; A training data piece in the training data set is generated based on the historical water quality monitoring matrix and the corresponding park environment status label.

[0088] In the above scheme, first, the historical water quality monitoring data set of the drainage network is obtained. These data are the basis of model training. They reflect the water quality status of the drainage network in different time periods and provide rich sample information for the model. At the same time, the park environment status labels corresponding to these water quality monitoring data are collected. These labels are the targets of model prediction. They indicate the actual state of the park environment under different water quality conditions and provide a basis for the supervised learning of the model. Then, according to the historical water quality monitoring data set and the topological structure of the drainage network, the historical water quality monitoring matrix is ​​generated. This step realizes the preliminary fusion of water quality data and drainage network structure, laying the foundation for subsequent feature extraction and model training. The historical water quality monitoring matrix not only contains the original water quality monitoring data, but also increases the spatial correlation and structural information between data through the introduction of the drainage network topological structure, thereby improving the quality and value of the data. Then, the historical water quality monitoring matrix is ​​combined with the corresponding park environment status label to generate a training data in the training data set. This process realizes the pairing of data and labels, and provides complete input and output for the supervised learning of the model. By repeating the above process, multiple training data can be generated to form a training data set. The size and diversity of the training dataset directly affects the training effect and generalization ability of the model.

[0089] It is worth noting that the above-mentioned park environment monitoring system may also include a park environment monitoring terminal, which is in communication connection with the monitoring server. Correspondingly, after determining the park environment state according to the water quality monitoring data set and the drainage network topology structure corresponding to the drainage network, it also includes: If the park environment is in an abnormal state, the monitoring server generates a pollution factor diffusion trend vector set based on the water quality monitoring sensor set and the drainage network topology. The pollution factor diffusion trend vector in the pollution factor diffusion vector set is used to indicate the pollution factor diffusion trend corresponding to each pipe edge in the pipe edge set. The pollution factor diffusion trend vector is used to point from the end with a higher pollution factor concentration to the end with a lower pollution factor concentration. The monitoring server generates a pollution factor diffusion trend map according to the pollution factor diffusion trend vector set and the drainage network topology structure, and sends the pollution factor diffusion trend map to the park environment monitoring terminal to display the pollution factor diffusion trend map in the park environment monitoring terminal.

[0090] In the above scheme, after the monitoring server determines that the environmental status of the park is abnormal based on the water quality monitoring data set and the drainage network topology, the system can respond quickly. The monitoring server further generates a set of pollution factor diffusion trend vectors based on the water quality monitoring sensor set and the drainage network topology. This step not only reflects the system's ability to quickly identify abnormal situations, but also demonstrates its ability to accurately analyze the diffusion trend of pollution factors in complex environments. Through the pollution factor diffusion trend vector, the system can clearly indicate the diffusion direction of the pollution factors corresponding to each pipe edge in the pipe edge set, from the end with higher pollution factor concentration to the end with lower concentration, providing a scientific basis for subsequent response measures.

[0091] After generating a set of pollution factor diffusion trend vectors, the monitoring server further generates a pollution factor diffusion trend graph based on these vectors and the drainage network topology, and sends the graph to the park environment monitoring terminal for display. This step converts complex pollution diffusion data into intuitive and easy-to-understand graphical information, allowing park managers to quickly grasp the overall situation of pollution diffusion. Through the park environment monitoring terminal, managers can monitor the diffusion of pollution factors in real time, which greatly facilitates the formulation of effective response plans.

[0092] The application of the park's environmental monitoring terminal and pollution factor diffusion trend chart has significantly improved the park's emergency response efficiency in the event of an abnormal environment. By real-time monitoring of the spread of pollution, managers can quickly assess the scope of pollution impact, mobilize resources in a timely manner, and take necessary isolation and cleanup measures to prevent further spread of pollution.

[0093] Furthermore, the monitoring server generates an abnormality response instruction, which is used to instruct each electronic valve in the electronic valve set to perform a corresponding operation, including: The monitoring server determines a target valve entity node in the drainage network topology structure according to the water quality monitoring data set, wherein the target valve entity node is the valve entity node corresponding to the water quality monitoring data with the highest pollution factor concentration in the water quality monitoring data set; The monitoring server generates at least one pollution factor diffusion path according to the valve entity nodes, the pollution factor diffusion trend vector set and the drainage network topology structure, the pollution factor diffusion path includes a valve entity node sequence, the valve entity node sequence includes some valve entity nodes in the valve entity node set, the end node of the pollution factor diffusion path is a drainage outlet node in the drainage network topology structure, and two adjacent valve entity nodes in the valve entity node sequence are connected in sequence through the pollution factor diffusion trend vector in the pollution factor diffusion trend vector set, wherein the direction from the previous valve entity node in the valve entity node sequence to the next valve entity node matches the corresponding pollution factor diffusion trend vector; The monitoring server generates an abnormal response instruction, which is used to instruct the electronic valve of each valve entity node in the passage valve entity node sequence to open to the maximum flow, and instruct the electronic valve of each valve entity node in the control valve entity node sequence to close, wherein the control valve entity node sequence is the difference between the valve entity node set and the passage valve entity node sequence.

[0094] In the above solution, the monitoring server can accurately locate the valve entity node corresponding to the water quality monitoring data with the highest pollution factor concentration in the drainage network topology by deeply analyzing the water quality monitoring data set, that is, the target valve entity node. This step is the key basis for the subsequent formulation of effective response measures, which ensures that the response measures can be directly targeted at the most polluted areas and improve the response efficiency.

[0095] After determining the target valve entity node, the monitoring server further uses the valve entity node, the pollution factor diffusion trend vector set and the drainage network topology to generate at least one pollution factor diffusion path. These paths not only take into account the actual diffusion trend of the pollution factor, but also combine the specific layout of the drainage network to ensure the scientificity and rationality of the path. By planning the pollution factor diffusion path, the system can more accurately predict the diffusion range and impact of the pollution factor, providing strong support for the formulation of response measures.

[0096] Based on the above analysis, the monitoring server intelligently generates abnormal response instructions. These instructions directly instruct the electronic valves of each valve entity node in the valve entity node sequence to open to the maximum flow rate to accelerate the discharge of pollution factors; at the same time, they instruct the electronic valves of each valve entity node in the control valve entity node sequence to close to block the further spread of pollution factors.

[0097] Through real-time monitoring, precise analysis and intelligent response, this method significantly improves the speed and efficiency of the park's emergency response to abnormal environmental conditions. Once an abnormal situation is detected, the system can quickly generate response measures and guide the electronic valve to perform corresponding operations, effectively preventing the spread of pollution and the deterioration of the situation.

[0098] Figure 3 FIG. 1 is a schematic diagram of a park environment monitoring system according to an exemplary embodiment of the present application. Figure 3 As shown, the park environment monitoring system 300 provided in this embodiment includes: a water quality monitoring sensor set 310, an electronic valve set 320 and a monitoring server 330, wherein the electronic valves in the electronic valve set 320 are distributed on the water flow control nodes of the drainage network of the park to be monitored, and the water quality monitoring sensors in the water quality monitoring sensor set are arranged on the water inlet and outlet of each electronic valve; Acquire a water quality monitoring data set of the drainage network through the water quality monitoring sensor set, and send the water quality monitoring data set to the monitoring server 330; The monitoring server 330 uses a preset park environment monitoring model and determines the park environment state according to the water quality monitoring data set and the drainage network topology structure corresponding to the drainage network, wherein the preset park environment monitoring model is a classification model trained based on a machine learning model; If the park environment state is an abnormal state, the monitoring server 330 generates an abnormal response instruction, and the abnormal response instruction is used to instruct each electronic valve in the electronic valve set 320 to perform a corresponding operation.

[0099] Optionally, the drainage network topology structure includes a valve physical node set, a monitoring virtual node set and a pipe edge set, wherein each valve physical node in the valve physical node set is used to represent each electronic valve in the electronic valve set 320, each monitoring virtual node in the monitoring virtual node set is used to represent each water quality monitoring sensor in the water quality monitoring sensor set, and each pipe edge in the pipe edge set is used to represent the drainage pipes in the drainage network for connecting between the electronic valves.

[0100] Optionally, before the monitoring server 330 uses a preset park environment monitoring model and determines the park environment state according to the water quality monitoring data set and the drainage network topology structure corresponding to the drainage network, it also includes: The monitoring server 330 generates an initial feature matrix, and fills the initial feature matrix according to the valve entity node set and the pipeline edge set to generate a topological feature matrix corresponding to the drainage network topology structure.

[0101] Optionally, the monitoring server 330 uses a preset park environment monitoring model and determines the park environment state according to the water quality monitoring data set and the drainage network topology structure corresponding to the drainage network, including: The monitoring server 330 generates a water quality monitoring matrix according to the topological feature matrix and the water quality monitoring data set; The monitoring server 330 uses the preset park environment monitoring model and determines the park environment status according to the water quality monitoring matrix.

[0102] Optionally, the monitoring server 330 uses the preset park environment monitoring model and determines the park environment state according to the water quality monitoring matrix, including: Step 1, the monitoring server 330 generates a water quality characteristic matrix according to the water quality monitoring matrix; Step 2, the server splices the water quality monitoring matrix and the topological feature matrix to generate a fusion feature matrix; Step 3: The server determines the campus environment status based on the fusion feature matrix.

[0103] Optionally, before the monitoring server 330 uses the preset park environment monitoring model and determines the park environment state according to the water quality monitoring matrix, the method further includes: Input the training data set into the initial park environment monitoring model, and perform forward propagation according to steps 1 to 3 to determine the prediction results; Using a back propagation algorithm, and determining a gradient of a cross entropy loss function based on the prediction result; The gradient descent method is used for training updates until the cross entropy loss function converges and / or the number of training times reaches a preset number of iterations to generate the preset park environment monitoring model.

[0104] Optionally, before inputting the training data set into the initial park environment monitoring model and performing forward propagation according to steps 1 to 3 to determine the prediction result, the method further includes: Obtaining a historical water quality monitoring data set of the drainage network and a corresponding park environment status label; Generate a historical water quality monitoring matrix based on the historical water quality monitoring data set and the drainage network topology structure; A piece of training data in the training data set is generated according to the historical water quality monitoring matrix and the corresponding park environment status label.

[0105] Figure 4 is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present application. Figure 4 As shown, an electronic device 400 provided in this embodiment includes: a processor 401 and a memory 402; wherein: The memory 402 is used to store computer programs, and the memory may also be a flash memory.

[0106] The processor 401 is used to execute the execution instructions stored in the memory to implement each step in the above method. For details, please refer to the relevant description in the above method embodiment.

[0107] Optionally, the memory 402 may be independent or integrated with the processor 401 .

[0108] When the memory 402 is a device independent of the processor 401, the electronic device 400 may further include: The bus 403 is used to connect the memory 402 and the processor 401 .

[0109] This embodiment further provides a readable storage medium, in which a computer program is stored. When at least one processor of an electronic device executes the computer program, the electronic device executes the methods provided in the above-mentioned various implementation modes.

[0110] This embodiment also provides a program product, which includes a computer program stored in a readable storage medium. At least one processor of the electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device implements the methods provided in the above various embodiments.

[0111] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the claims.

[0112] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for dealing with abnormal park environment based on a machine learning model, characterized in that: Applied to a park environment monitoring system, the park environment monitoring system comprises: a water quality monitoring sensor set, an electronic valve set and a monitoring server, the electronic valves in the electronic valve set are distributed on the water flow control nodes of the drainage network of the park to be monitored, and the water quality monitoring sensors in the water quality monitoring sensor set are used to monitor the water quality monitoring data at each electronic valve; the method comprises: Acquire a water quality monitoring data set of the drainage network through the water quality monitoring sensor set, and send the water quality monitoring data set to the monitoring server; The monitoring server uses a preset park environment monitoring model and determines the park environment state according to the water quality monitoring data set and the drainage network topology structure corresponding to the drainage network, wherein the preset park environment monitoring model is a classification model trained based on a machine learning model; If the park environment state is an abnormal state, the monitoring server generates an abnormal response instruction, and the abnormal response instruction is used to instruct each electronic valve in the electronic valve set to perform a corresponding operation.

2. The method for dealing with abnormal park environment based on a machine learning model according to claim 1, characterized in that: The drainage network topology structure includes a valve physical node set, a monitoring virtual node set and a pipe edge set, wherein each valve physical node in the valve physical node set is used to represent each electronic valve in the electronic valve set, each monitoring virtual node in the monitoring virtual node set is used to represent each water quality monitoring sensor in the water quality monitoring sensor set, and each pipe edge in the pipe edge set is used to represent the drainage pipes in the drainage network for connecting between the electronic valves.

3. The method for dealing with abnormal park environment based on a machine learning model according to claim 2, characterized in that: Before the monitoring server uses the preset park environment monitoring model and determines the park environment state according to the water quality monitoring data set and the drainage network topology structure corresponding to the drainage network, it also includes: The monitoring server generates an initial feature matrix, and fills the initial feature matrix according to the valve entity node set and the pipeline edge set, so as to generate a topological feature matrix corresponding to the drainage network topological structure.

4. The method for dealing with abnormal park environment based on a machine learning model according to claim 3 is characterized in that: The monitoring server uses a preset park environment monitoring model and determines the park environment state according to the water quality monitoring data set and the drainage network topology structure corresponding to the drainage network, including: The monitoring server generates a water quality monitoring matrix according to the topological feature matrix and the water quality monitoring data set; The monitoring server uses the preset park environment monitoring model and determines the park environment status according to the water quality monitoring matrix.

5. The method for dealing with abnormal park environment based on a machine learning model according to claim 4 is characterized in that: The monitoring server uses the preset park environment monitoring model and determines the park environment status according to the water quality monitoring matrix, including: Step 1, the monitoring server generates a water quality feature matrix according to the water quality monitoring matrix; Step 2, the server splices the water quality monitoring matrix and the topological feature matrix to generate a fusion feature matrix; Step 3: The server determines the campus environment status based on the fusion feature matrix.

6. The method for dealing with abnormal park environment based on a machine learning model according to claim 5 is characterized in that: Before the monitoring server uses the preset park environment monitoring model and determines the park environment state according to the water quality monitoring matrix, the method further includes: Input the training data set into the initial park environment monitoring model, and perform forward propagation according to steps 1 to 3 to determine the prediction results; Using a back propagation algorithm, and determining a gradient of a cross entropy loss function based on the prediction result; The gradient descent method is used for training updates until the cross entropy loss function converges and / or the number of training times reaches a preset number of iterations to generate the preset park environment monitoring model.

7. The method for dealing with abnormal park environment based on a machine learning model according to claim 6 is characterized in that: Before inputting the training data set into the initial park environment monitoring model and performing forward propagation according to steps 1 to 3 to determine the prediction result, the method further includes: Obtaining a historical water quality monitoring data set of the drainage network and a corresponding park environment status label; Generate a historical water quality monitoring matrix based on the historical water quality monitoring data set and the drainage network topology structure; A piece of training data in the training data set is generated according to the historical water quality monitoring matrix and the corresponding park environment status label.

8. A park environment monitoring system, characterized in that: include: A water quality monitoring sensor set, an electronic valve set and a monitoring server, wherein the electronic valves in the electronic valve set are distributed on the water flow control nodes of the drainage network of the park to be monitored, and the water quality monitoring sensors in the water quality monitoring sensor set are arranged on the water inlet and outlet of each electronic valve; Acquire a water quality monitoring data set of the drainage network through the water quality monitoring sensor set, and send the water quality monitoring data set to the monitoring server; The monitoring server uses a preset park environment monitoring model and determines the park environment state according to the water quality monitoring data set and the drainage network topology structure corresponding to the drainage network, wherein the preset park environment monitoring model is a classification model trained based on a machine learning model; If the park environment state is an abnormal state, the monitoring server generates an abnormal response instruction, and the abnormal response instruction is used to instruct each electronic valve in the electronic valve set to perform a corresponding operation.

9. An electronic device, characterized in that: include: processor; as well as, A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 7 by executing the executable instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.