River and lake status evaluation method and system based on digital twin

By building a time series model on the digital twin platform, calculating the similarity between dissolved oxygen errors and environmental parameters, conducting cluster analysis and retraining the model, the problem of not considering the influence of environmental parameters in existing technologies was solved, and the accuracy of dissolved oxygen prediction and the credibility of river and lake status evaluation were improved.

CN120373674BActive Publication Date: 2025-09-19NINGBO XINZHI INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510874176.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-09-19
Estimated Expiration
2045-06-27

AI Technical Summary

Technical Problem

The existing time series prediction model does not consider the impact of different environmental parameters on the prediction accuracy when predicting dissolved oxygen, resulting in low prediction accuracy.

Method used

Through the river and lake status evaluation method based on digital twins, a time series model is constructed, the similarity between the dissolved oxygen error series and the environmental parameter series is calculated, the degree of influence of the environmental parameters on the error is obtained, cluster analysis is performed, and the time series model is retrained to improve the prediction accuracy.

Benefits of technology

The prediction accuracy of dissolved oxygen has been improved, thereby increasing the credibility of river and lake status assessments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120373674B_ABST
    Figure CN120373674B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of river and lake status evaluation, and in particular to a river and lake status evaluation method and system based on digital twins. The method comprises: constructing a time series model for the collected dissolved oxygen sequence, obtaining a dissolved oxygen error sequence based on the model's predicted value and true value, calculating the similarity between the environmental parameter sequence and the dissolved oxygen error sequence at each moment, calculating the degree of influence of each environmental parameter on the dissolved oxygen prediction based on the similarity, and obtaining the influence degree vector at each moment; clustering the influence degree vector at each moment to obtain clusters of different environmental influences, each cluster corresponding to a time series model; and predicting the dissolved oxygen at the next moment based on the clusters of the current environmental influence to evaluate the river and lake status. By training different models based on the influence of different environmental parameters on dissolved oxygen prediction, the prediction accuracy of the model is improved, and the credibility of the river and lake evaluation is also increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of river and lake status evaluation, and in particular to a river and lake status evaluation method and system based on digital twins. Background Art

[0002] The water quality of rivers and lakes is crucial to ecological and environmental development, significantly impacting ecological balance, human health, and sustainable socioeconomic development. However, with the acceleration of urbanization and industrialization, river and lake pollution is becoming increasingly serious. Therefore, river and lake water quality prediction has become an important means of ensuring the health of river and lake water bodies. In river and lake status assessment, dissolved oxygen is a key ecological indicator in aquatic ecosystems, directly reflecting the water's self-purification capacity, ecological health, and the living conditions of organisms. Dissolved oxygen prediction provides an early understanding of the ecological status of rivers and lakes, providing a scientific basis for river and lake management, ecological protection, and pollution control.

[0003] The patent for dissolved oxygen prediction method and device with publication number CN112215412A discloses a dissolved oxygen prediction method based on LSTM. This method uses relevant monitoring data as the input of the model, outputs the dissolved oxygen content, and uses an intelligent optimization algorithm to obtain the optimal hyperparameter combination of the model.

[0004] However, when predicting dissolved oxygen, this method does not consider the impact of different environmental parameters on the prediction accuracy, nor does it consider the impact of historical dissolved oxygen on current dissolved oxygen. Therefore, how to obtain the best time series prediction model under the influence of different environmental parameters and improve the prediction accuracy of the model is an urgent problem to be solved. Summary of the Invention

[0005] In order to solve the problem that the existing time series prediction model does not consider the impact of various environmental parameters at different times on the error, resulting in low prediction accuracy, this application provides a river and lake status evaluation method and system based on digital twins.

[0006] First, this application provides a river and lake status assessment method based on digital twins, using the following technical solutions:

[0007] The river and lake status assessment method based on digital twins includes the following steps:

[0008] Based on historical river and lake data, a data sequence of time and river and lake status evaluation parameters is constructed and uploaded to the digital twin platform. River and lake status evaluation parameters include dissolved oxygen and environmental parameters in the water body. Environmental parameters include water temperature, water salinity, and water flow rate. Each environmental parameter corresponds to an environmental parameter sequence.

[0009] Set up a time series model, output the predicted value of dissolved oxygen according to the time series model, obtain the dissolved oxygen error sequence based on the absolute value of the difference between the true dissolved oxygen value and the predicted value, calculate the similarity sequence between the dissolved oxygen error sequence and the sequence of each environmental parameter, and obtain the influence degree vector of each environmental parameter on the prediction result at each moment;

[0010] Clustering the impact degree vectors, after clustering is completed, each cluster represents an environmental impact, in response to the dissolved oxygen error corresponding to the cluster being less than a set threshold, the cluster uses the time series model as a prediction model, and in response to the dissolved oxygen error corresponding to the cluster being greater than or equal to the set threshold, retraining to obtain a new time series model as the prediction model corresponding to the cluster;

[0011] Based on the clustering results, the environmental impact type at the current moment is obtained, and the prediction model is used to output the predicted dissolved oxygen value at the next moment. The state of rivers and lakes is evaluated based on the predicted dissolved oxygen value.

[0012] The beneficial effect is: by calculating the similarity between each environmental parameter and the error, the degree of influence of each environmental parameter on the error is reflected. The greater the similarity, the more consistent the change of the error and the environmental parameter, and the greater the influence of the environmental parameter on the time series model. The degree of influence of each error on the model at each moment is clustered. After the clustering is completed, each cluster represents the influence of an environmental parameter. Then, the time series prediction model under the influence of each environmental parameter is trained. When calculating the current cluster, the corresponding time series model is used for prediction, which improves the prediction accuracy of dissolved oxygen and thus improves the credibility of river and lake status evaluation.

[0013] Optionally, the time series model is ARIMA, SARIMA or LSTM.

[0014] Optionally, the similarity sequence is calculated as follows: the similarity sequence is composed of similarities at multiple moments sorted in chronological order, and the similarity is the similarity between the environmental parameter sequence and the dissolved oxygen error sequence before the target moment.

[0015] The beneficial effect is that the similarity sequence can be quickly calculated by only obtaining the target environment parameter sequence and error sequence before any time.

[0016] Optionally, the similarity sequence is calculated as follows: the similarity sequence is composed of similarities of multiple moments sorted in chronological order, and the similarity is the similarity between the environmental parameter sequence and the dissolved oxygen error sequence within a preset time length with the target moment as the center point.

[0017] The beneficial effect is that: a time length is preset with the target moment as the center point, and the similarity between the target environment parameter sequence and the error sequence within the preset time length is calculated, which can better reflect the similarity between the two sequences at the target moment.

[0018] Optionally, the similarity is calculated as the ratio of the covariance of the environmental parameter sequence and the dissolved oxygen error sequence to the product of the standard deviations of the two sequences.

[0019] The beneficial effects are: reflecting the strength and direction of the linear relationship between the two sequences (-1 to 1), suitable for analyzing whether the errors increase or decrease synchronously. If the Pearson coefficient of the water temperature and dissolved oxygen errors is 0.9, it indicates that the two are highly positively correlated.

[0020] Optionally, the similarity is calculated as the ratio of the dot product of the environmental parameter sequence and the dissolved oxygen error sequence to the moduli of the two sequences.

[0021] Optionally, the influence degree vector includes the influence degree of temperature, the influence degree of salinity and the influence degree of flow velocity, and the influence degree of the target environmental parameter at the target moment is the result of normalization of the similarity at the target moment.

[0022] Optionally, the clustering algorithm adopts ordered sample clustering or density-based clustering.

[0023] The beneficial effect is that the clustering method is used to cluster the same environmental impact conditions into one cluster without affecting the subsequent time series analysis.

[0024] Secondly, this application provides a river and lake status evaluation system based on digital twins, which adopts the following technical solutions:

[0025] It includes: a processor and a memory, the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the river and lake status evaluation method based on digital twins is implemented.

[0026] The beneficial effect is: the above-mentioned river and lake status evaluation method based on digital twins is generated into a computer program and stored in a memory so as to be loaded and executed by a processor, thereby making a system based on the memory and the processor for easy use.

[0027] The present application has the following technical effects: constructing a time series model for the collected historical dissolved oxygen, obtaining an error sequence based on the prediction results of the time series model, obtaining the degree of influence of each environmental parameter on the error based on the similarity between the environmental parameter sequence and the error sequence, calculating the degree of influence of the error at each moment, obtaining the influence degree vector at each moment, clustering the influence degree vectors, and after clustering, each cluster represents an environmental impact. In response to the dissolved oxygen error corresponding to the cluster being less than a set threshold, the cluster uses the above-mentioned time series model. In response to the dissolved oxygen error corresponding to the cluster being greater than or equal to the set threshold, the cluster needs to retrain a time series model, and use the corresponding time series model to predict the dissolved oxygen based on the environmental impact to which the current dissolved oxygen belongs. After collecting the dissolved oxygen content and each environmental parameter at the next moment, the same method can be used to continue predicting the subsequent dissolved oxygen. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] By reading the detailed description below with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present application will become readily understood. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding numbers represent the same or corresponding parts.

[0029] Figure 1 It is a flow chart of steps S1-S4 in the river and lake status evaluation method based on digital twins in this application.

[0030] Figure 2 This is the structural block diagram of the river and lake status evaluation system based on digital twins in this application. DETAILED DESCRIPTION

[0031] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.

[0032] It should be understood that when the terms "first," "second," etc. are used in the claims, specification, and drawings of this application, they are only used to distinguish different objects, rather than to describe a specific order. The terms "comprise" and "comprising" used in the specification and claims of this application indicate the presence of the described features, integers, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or combinations thereof.

[0033] The present application embodiment discloses a river and lake status evaluation method based on digital twins, referring to Figure 1, including the following steps:

[0034] S1: Collect historical river and lake status evaluation parameters including dissolved oxygen and environmental parameters of water bodies. Environmental parameters include water temperature, water salinity and water flow rate.

[0035] It should be noted that the specific scenario targeted by this application may be: predicting future evaluation parameters through historical river and lake status evaluation parameters, and obtaining predicted river and lake status evaluation results based on the predicted evaluation parameters.

[0036] In one embodiment of the present application, the dissolved oxygen of the water body is collected using an electrode method, the water body temperature is collected using a temperature sensor, the salinity of the water body is collected using a conductivity method, and the water body flow rate is collected using an electromagnetic flow meter or a buoy tracking method. The collected data is subjected to preprocessing operations such as outlier deletion and normalization, and an environmental parameter sequence is obtained for each environmental parameter. The environmental parameter sequence includes a temperature sequence, a salinity sequence, and a flow rate sequence.

[0037] S2: Use the dissolved oxygen sequence to build a time series model, obtain the dissolved oxygen error sequence based on the model's predicted value and true value, calculate the similarity sequence between each environmental parameter sequence and the dissolved oxygen error sequence, and obtain the impact degree vector at each moment based on the similarity sequence.

[0038] In one embodiment of the present application, a time series model is used to predict dissolved oxygen. Since the model does not consider the impact of environmental parameters on dissolved oxygen, the model cannot learn the degree of influence of different environmental parameters on dissolved oxygen. When the degree of influence of environmental parameters on dissolved oxygen varies greatly, the model cannot learn the changes in dissolved oxygen caused by environmental changes, which will cause large errors in the prediction results of the time series model. Therefore, in this embodiment, the degree of influence of environmental parameters on dissolved oxygen prediction at different times is calculated, specifically:

[0039] A time series model is constructed to predict dissolved oxygen. The input of the time series model is the historical dissolved oxygen, and the output is the predicted dissolved oxygen value at the next moment. When the time series model is an ARIMA or SARIMA model, the grid method is used to set different parameters, and the best model is selected according to the AIC criterion. When the time series model is an LSTM model, the model's loss function uses the mean square error loss, and the gradient descent algorithm is used to update the model parameters. When the model reaches the preset maximum number of training times or the model loss is less than the set threshold, the model stops training. The maximum number of training times of the exemplary model is 1000, and the loss threshold is 0.001. After the model training is completed, the best model is selected based on the accuracy of the model's evaluation indicators.

[0040] The prediction error is obtained based on the absolute value of the difference between the actual dissolved oxygen and the predicted dissolved oxygen. The similarity between the dissolved oxygen error sequence and the environmental parameter sequence at the target time is calculated. The greater the similarity, the more consistent the change in the dissolved oxygen error and the change in the environmental parameters, and the greater the impact of the environmental parameters on the dissolved oxygen prediction. The specific similarity calculation formula between the dissolved oxygen error sequence and the environmental parameter sequence at the target time is as follows:

[0041]

[0042] in, Indicates the Dissolved oxygen error sequence at time The similarity of the environmental parameter sequences, represents the covariance, Indicates the Time dissolved oxygen error sequence, Indicates the Moment A sequence of environmental parameters, Indicates the The standard deviation of the dissolved oxygen error series at each moment, Indicates the Moment The standard deviation of an environmental parameter series.

[0043] In another embodiment of the present application, the similarity calculation formula between the dissolved oxygen error sequence and the environmental parameter sequence at the target time is as follows:

[0044]

[0045] in, Indicates the Dissolved oxygen error sequence at time The similarity of the environmental parameter sequences, Indicates the Time dissolved oxygen error sequence, Indicates the Moment A sequence of environmental parameters, Indicates the Dissolved oxygen error sequence at time Moment The dot product of the environmental parameter sequences, Indicates the The modulus of the dissolved oxygen error sequence at time Indicates the Moment The modulus of a sequence of environmental parameters.

[0046] The method for obtaining the target time sequence is: taking the sequence composed of all the times before the target time (including the target time) as the target time sequence. For example: the target time is time, the dissolved oxygen sequence is ,in Indicates the dissolved oxygen at the first moment, Indicates the dissolved oxygen at the second moment, Indicates the dissolved oxygen at a given moment.

[0047] In another embodiment of the present application, the method for obtaining the target time sequence is as follows: a time length is preset with the target time as the center point, and the time length is the target time sequence. For example: the target time is moment, the preset time length is 5, then the dissolved oxygen sequence is ,in, Indicates the The dissolved oxygen at that moment, Indicates the The dissolved oxygen at that moment, Indicates the The dissolved oxygen at that moment, Indicates the The dissolved oxygen at that moment, Indicates the dissolved oxygen at a given moment.

[0048] After normalizing the similarity, the influence of the environmental parameters on the dissolved oxygen error is obtained. After calculating the influence of the environmental parameters on the dissolved oxygen error at each moment, the influence of each environmental parameter on the dissolved oxygen error at each moment is obtained. The influence of each environmental parameter on the dissolved oxygen error at each moment constitutes the influence degree vector at each moment. An exemplary normalization formula is as follows:

[0049]

[0050] in, Indicates the Moment The degree of influence of environmental parameters on dissolved oxygen error Indicates the Dissolved oxygen error sequence at time The similarity of the environmental parameter sequences, Indicates taking the maximum value, Indicates taking the minimum value.

[0051] At this point, the influence degree vector at each moment is obtained.

[0052] S3: Cluster the impact degree vectors at each moment to obtain clusters with different environmental impacts. In response to the dissolved oxygen error corresponding to the cluster being less than a set threshold, the cluster uses the above-mentioned time series model as a prediction model. In response to the dissolved oxygen error corresponding to the cluster being greater than or equal to the set threshold, a new time series model is retrained as the prediction model corresponding to the cluster.

[0053] In one embodiment of the present application, the degree of influence at each moment is clustered using ordered sample clustering. Ordered sample clustering enforces the original order of the samples (e.g., temporal sequence and spatial continuity) during the clustering process, avoiding the disruption of the sequence by traditional clustering (e.g., K-means), which results in results that are unsuitable for subsequent time series analysis of the present application. After clustering is completed, each cluster represents an environmental influence, such as indicating a greater influence of temperature and less influence of salinity and flow rate; a greater influence of salinity and less influence of temperature and flow rate; and a greater influence of flow rate and less influence of temperature and salinity.

[0054] The error of dissolved oxygen prediction corresponding to each cluster after clustering is calculated, and the average of the absolute value of the difference between the actual dissolved oxygen and the predicted dissolved oxygen at all times in the cluster is used as the dissolved oxygen error corresponding to the cluster. The dissolved oxygen error corresponding to the cluster reflects the impact of the environment represented by the cluster on the dissolved oxygen prediction. The larger the dissolved oxygen error, the greater the impact of the environment represented by the cluster on the dissolved oxygen prediction, and it is necessary to retrain a new time series model to obtain a prediction model that fits the environment better. The smaller the dissolved oxygen error, the smaller the impact of the environment represented by the cluster on the dissolved oxygen prediction. The time series model obtained by S2 already fits the environment, and there is no need to retrain a new time series model.

[0055] In response to the dissolved oxygen error being less than a set threshold, the cluster uses the aforementioned time series model as the prediction model. In response to the dissolved oxygen error corresponding to the cluster being greater than or equal to the set threshold, a new time series model is retrained as the prediction model for that cluster. An exemplary threshold is set at 0.1. A dissolved oxygen error less than 0.1 indicates that the predicted value and the true value are very close, and within this error range, it will not significantly affect subsequent evaluations of river and lake conditions.

[0056] In another embodiment of the present application, the clustering algorithm uses density-based clustering. When the density-based distance is used, the time at which the influence degree vector is located is taken into account. When judging whether two influence degree vectors belong to the same cluster cluster, the time difference between the two is required to be less than a set threshold. The exemplary threshold is 5. When the time interval is greater than or equal to 5, the time distance between the two is far, and it is considered that the two do not belong to the same cluster cluster.

[0057] S4: Obtain the environmental impact cluster to which the current moment belongs, use the corresponding time series model to predict dissolved oxygen, and use the same steps to predict subsequent dissolved oxygen.

[0058] In one embodiment of the present application, after clustering is completed, the cluster to which the current moment belongs is obtained. The time series model corresponding to the cluster to which the current moment belongs is used to predict the dissolved oxygen at the next moment. The state of the river and lake is evaluated based on the prediction results, and the dissolved oxygen prediction and evaluation results are displayed on the digital twin platform. After the true value of the dissolved oxygen at the next moment is obtained, the error at the next moment is calculated. A new error sequence is obtained based on the error at the next moment and the error sequence. The most suitable time series model can be obtained for the new error sequence according to the above steps, and the dissolved oxygen is predicted based on the most suitable time series model.

[0059] The present application also discloses a river and lake status evaluation system based on digital twins, such as Figure 2 As shown, it includes a processor and a memory, and the memory stores computer program instructions. When the computer program instructions are executed by the processor, the river and lake status evaluation method based on digital twins according to the present application is implemented.

[0060] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface. The configuration and functions of these components are known in the art and will not be described in detail here.

[0061] In this application, the aforementioned memory can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium can be any suitable magnetic storage medium or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc., or any other medium that can be used to store the required information and can be accessed by an application, module, or both. Any such computer storage medium can be part of, accessible to, or connected to the device.

[0062] Although this specification has shown and described a number of embodiments of the present application, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, variations, and alternatives without departing from the spirit and scope of the present application. It should be understood that in practicing the present application, various alternatives to the embodiments of the present application described herein may be employed.

[0063] The above are all preferred embodiments of the present application, and are not intended to limit the scope of protection of the present application. Therefore, any equivalent changes made based on the structure, shape, and principle of the present application should be included in the scope of protection of the present application.

Claims

1. The river and lake status evaluation method based on digital twins is characterized by: The following steps are involved: Based on historical river and lake data, a data sequence of time and river and lake status evaluation parameters is constructed and uploaded to the digital twin platform. River and lake status evaluation parameters include dissolved oxygen and environmental parameters in the water body. Environmental parameters include water temperature, water salinity, and water flow rate. Each environmental parameter corresponds to an environmental parameter sequence. Set up a time series model, output the predicted value of dissolved oxygen according to the time series model, obtain the dissolved oxygen error sequence based on the absolute value of the difference between the true dissolved oxygen value and the predicted value, calculate the similarity sequence between the dissolved oxygen error sequence and the sequence of each environmental parameter, and obtain the influence degree vector of each environmental parameter on the prediction result at each moment; Clustering the impact degree vectors, after clustering is completed, each cluster represents an environmental impact, in response to the dissolved oxygen error corresponding to the cluster being less than a set threshold, the cluster uses the time series model as a prediction model, and in response to the dissolved oxygen error corresponding to the cluster being greater than or equal to the set threshold, retraining to obtain a new time series model as the prediction model corresponding to the cluster; Based on the clustering results, the environmental impact type at the current moment is obtained, and the prediction model is used to output the predicted dissolved oxygen value at the next moment. The state of rivers and lakes is evaluated based on the predicted dissolved oxygen value. After clustering is completed, the cluster to which the current moment belongs is obtained, and the time series model corresponding to the cluster to which the current moment belongs is used to predict the dissolved oxygen at the next moment; After obtaining the true value of dissolved oxygen at the next moment, calculate the error at the next moment, and obtain a new error sequence based on the error at the next moment and the error sequence. The most suitable time series model can be obtained for the new error sequence according to the above steps, and the dissolved oxygen is predicted based on the most suitable time series model.

2. The method according to claim 1, characterized in that The time series model is ARIMA, SARIMA or LSTM.

3. The method according to claim 1, characterized in that The calculation method of the similarity sequence is as follows: the similarity sequence is composed of similarities at multiple moments arranged in chronological order, and the similarity is the similarity between the environmental parameter sequence and the dissolved oxygen error sequence before the target moment.

4. The method according to claim 1, wherein The similarity sequence is calculated as follows: the similarity sequence is composed of the similarities of multiple moments sorted in chronological order, and the similarity is the similarity between the environmental parameter sequence and the dissolved oxygen error sequence within a preset time length with the target moment as the center point.

5. The method according to claim 3 or 4, characterized in that The similarity is calculated as the ratio of the covariance of the environmental parameter sequence and the dissolved oxygen error sequence to the product of the standard deviations of the two sequences.

6. The method according to claim 3 or 4, characterized in that The similarity is calculated as the ratio of the dot product of the environmental parameter sequence and the dissolved oxygen error sequence to the modulus of each of the two sequences.

7. The method according to claim 1, characterized in that The influence degree vector includes the influence degree of temperature, the influence degree of salinity and the influence degree of flow velocity. The influence degree of the target environmental parameter at the target moment is the result after the similarity at the target moment is normalized.

8. The method according to claim 1, characterized in that The clustering algorithm adopts ordered sample clustering or density-based clustering.

9. The river and lake status evaluation system based on digital twins is characterized by: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a river and lake status evaluation method based on digital twins according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Dissolved oxygen prediction method and device

    CN112215412A

  • River water quality real-time monitoring platform

    CN118052450A