River monitoring method and device, electronic equipment and storage medium

By tracking monitoring images of multiple river sections and combining them with water flow parameters, the source of pollutants can be predicted, solving the problem of difficult pollutant observation in river management, realizing automated pollutant monitoring and source control, and improving management efficiency.

CN115861932BActive Publication Date: 2025-11-18CHENGDU INTELLIFUSION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211610381.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-12
Publication Date
2025-11-18
Estimated Expiration
2042-12-12

AI Technical Summary

Technical Problem

In the current river management process, it is difficult to monitor pollutants and thus difficult to control pollutants at their source.

Method used

By tracking target pollutants through monitoring images of multiple river sections and combining this with water flow parameters, the source of the pollutants is predicted, generating a predicted source of the pollutants.

Benefits of technology

It has enabled automatic monitoring and source control of pollutants on the river surface, improving the efficiency of urban river management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115861932B_ABST
    Figure CN115861932B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a kind of river monitoring method, obtains the monitoring image of multiple river courses, and multiple river courses are continuous multiple river courses;When detecting target pollutant in the monitoring image corresponding to any one river course, image tracking is carried out on target pollutant based on the monitoring image of multiple river courses, and the trajectory of target pollutant in multiple river courses is obtained;The trajectory of target pollutant in multiple river courses and the water flow parameter of multiple river courses are used to predict the source of target pollutant, and the predicted source of target pollutant is obtained.Through the monitoring image of multiple river courses, image tracking is carried out on target pollutant, and after the trajectory of target pollutant in multiple river courses is obtained, the source of target pollutant is predicted in combination with the water flow parameter of multiple river courses, so as to automatically monitor the pollutant on river surface, and the source of pollutant is predicted, which can help relevant departments to control pollutant from source, improve the efficiency of urban river management.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of artificial intelligence, and is applied to the field of smart city and river management, and particularly relates to a river monitoring method and device, an electronic device and a storage medium. BACKGROUND

[0002] The management of rivers in cities has always been a difficult problem. To improve the ecological quality of rivers in cities, the primary task is to solve the visible floating pollutants, which have a direct environmental damage effect. For the management of water surface pollutants in rivers, relevant departments usually organize relevant personnel to excavate and clean up. However, due to the uncertainty of the appearance of floating objects on the water surface, some of them float on the river surface and some of them sink underwater, which is difficult to observe, so that relevant departments often cannot take quick and effective solutions to clean up such pollutants or prevent the generation of floating objects from the source. Therefore, in the existing river management process, there is a problem that it is difficult to observe pollutants and difficult to manage pollutants from the source. SUMMARY

[0003] The embodiments of the present application provide a river monitoring method, which aims to solve the problem that it is difficult to observe pollutants and difficult to manage pollutants from the source in the existing river management process. By tracking the image of the target pollutant through the monitoring image of the multi-section river, the trajectory of the target pollutant in the multi-section river is obtained, and the source of the target pollutant is predicted in combination with the water flow parameters of the multi-section river, so as to automatically monitor the pollutants on the river surface and predict the source of the pollutants, which can help relevant departments to manage pollutants from the source and improve the efficiency of city river management.

[0004] In a first aspect, the embodiments of the present application provide a river monitoring method, which comprises:

[0005] obtaining monitoring images of a plurality of river sections, the plurality of river sections being continuous multi-section rivers;

[0006] when a target pollutant is detected in the monitoring image corresponding to any one of the river sections, tracking the target pollutant based on the monitoring images of the plurality of river sections to obtain a trajectory of the target pollutant in the plurality of river sections;

[0007] the trajectory of the target pollutant in the plurality of river sections and the water flow parameters of the plurality of river sections are used to predict the source of the target pollutant, and the predicted source of the target pollutant is obtained.

[0008] Optionally, the tracking of the target pollutant based on the monitoring images of the plurality of river sections to obtain the trajectory of the target pollutant in the plurality of river sections comprises:

[0009] Image tracking is performed on the monitoring images of each section of the river to obtain the tracking trajectory of the target pollutant in each section of the river;

[0010] Key points of the target pollutant are extracted to obtain the key points of the target pollutant.

[0011] Based on the key points of the target pollutant and the tracking trajectory of the target pollutant in each section of the river, the trajectory of the target pollutant in the multiple sections of the river is obtained.

[0012] Optionally, obtaining the trajectory of the target pollutant in the multiple river segments based on the key points of the target pollutant and the tracking trajectory of the target pollutant in each river segment includes:

[0013] Feature extraction is performed on the tracking trajectory of the target pollutant in each section of the river to obtain the features of each tracking trajectory;

[0014] Based on the key points of the target pollutant and the characteristics of each tracking trajectory, the tracking trajectories are matched to obtain the trajectory of the target pollutant in the multiple river sections.

[0015] Optionally, the trajectory of the target pollutant in the multiple river segments and the flow parameters of the multiple river segments are used to predict the source of the target pollutant, resulting in a predicted source of the target pollutant, including:

[0016] Based on the trajectory of the target pollutant in the multiple river sections, determine the appearance trajectory and disappearance trajectory of the target pollutant;

[0017] Based on the appearance and disappearance trajectories of the target pollutant, a state sequence of the target pollutant is generated;

[0018] Obtain the flow parameters of the multiple river segments and generate a sequence of flow parameters for the multiple river segments;

[0019] Based on the state sequence of the target pollutant and the water flow parameter sequence of the multiple river segments, the source of the target pollutant is predicted to obtain the predicted source of the target pollutant.

[0020] Optionally, generating the state sequence of the target pollutant based on its appearance and disappearance trajectories includes:

[0021] The occurrence and disappearance trajectories of the target pollutant are discretized using a preset discretization strategy to obtain the first discrete points of the target pollutant in the multiple river sections.

[0022] Based on the appearance trajectory and disappearance trajectory of the target pollutant, determine the state value of the target pollutant at each of the first discrete points;

[0023] Arrange each of the first discrete points in order of river direction to obtain the state sequence of the target pollutant. The spatiotemporal sequence of the target pollutant includes the state values ​​of the first discrete points.

[0024] Optionally, obtaining the flow parameters of the multiple river segments and generating a sequence of flow parameters for the multiple river segments includes:

[0025] Based on each of the first discrete points, determine the second discrete points of the multiple river segments;

[0026] Based on the water flow parameters of the multiple river sections, determine the water flow parameter values ​​for each of the second discrete points;

[0027] The second discrete points are sorted in order of river direction to obtain the water flow parameter sequence of the multiple river segments, which includes the water flow parameter values ​​of the second discrete points.

[0028] Optionally, the step of predicting the source of the target pollutant based on the state sequence of the target pollutant and the flow parameter sequence of the multiple river segments to obtain the predicted source of the target pollutant includes:

[0029] The state sequence of the target pollutant and the water flow parameter sequence of the multiple river segments are fused to obtain a fused sequence;

[0030] The predicted source of the target pollutant is obtained by predicting the fusion sequence using a preset time series model.

[0031] Secondly, embodiments of the present invention provide a river monitoring device, the device comprising:

[0032] The acquisition module is used to acquire monitoring images of multiple river segments, wherein the multiple river segments are continuous segments.

[0033] The tracking module is used to perform image tracking of the target pollutant based on the monitoring images of the multiple river segments when a target pollutant is detected in the monitoring image corresponding to any segment of the river, so as to obtain the trajectory of the target pollutant in the multiple river segments.

[0034] The prediction module is used to predict the source of the target pollutant based on the trajectory of the target pollutant in the multiple river sections and the water flow parameters of the multiple river sections, thereby obtaining the predicted source of the target pollutant.

[0035] Thirdly, embodiments of the present invention provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the river monitoring method provided in embodiments of the present invention.

[0036] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the river monitoring method provided in embodiments of the present invention.

[0037] In this embodiment of the invention, monitoring images of multiple river segments are acquired, wherein the multiple river segments are continuous. When a target pollutant is detected in the monitoring image corresponding to any river segment, image tracking of the target pollutant is performed based on the monitoring images of the multiple river segments to obtain the trajectory of the target pollutant in the multiple river segments. The source of the target pollutant is predicted based on the trajectory of the target pollutant in the multiple river segments and the water flow parameters of the multiple river segments to obtain the predicted source of the target pollutant. By performing image tracking of the target pollutant in the monitoring images of multiple river segments to obtain the trajectory of the target pollutant in the multiple river segments, and combining the water flow parameters of the multiple river segments to predict the source of the target pollutant, the pollution on the river surface can be automatically monitored, and the source of the pollutant can be predicted. This can help relevant departments to control pollutants at their source and improve the efficiency of urban river management. Attached Figure Description

[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0039] Figure 1 This is a flowchart of a river monitoring method provided in an embodiment of the present invention;

[0040] Figure 2 This is a schematic diagram of the structure of a river monitoring device provided in an embodiment of the present invention;

[0041] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0043] Please see Figure 1 , Figure 1 This is a flowchart of a river monitoring method provided in an embodiment of the present invention, such as... Figure 1 As shown, this river monitoring method includes the following steps:

[0044] 101. Obtain monitoring images of multiple river sections.

[0045] In this embodiment of the invention, the aforementioned multiple river segments are continuous segments, each equipped with one or more image monitoring devices to monitor the river surface. Each image monitoring device can upload the captured monitoring images to a server for storage and processing. The aforementioned river monitoring method can be implemented on the server. After receiving the monitoring images of the multiple river segments, the server performs target detection on the corresponding monitoring images to detect whether target pollutants appear in the multiple river segments. If target pollutants are detected in the monitoring images corresponding to the multiple river segments, it can be determined that target pollutants are present in the multiple river segments. The aforementioned target detection can employ existing target detection algorithms, such as target detection algorithms based on the YOLOv series.

[0046] The aforementioned surveillance images can be continuous frame images, that is, they can be a video stream. Object detection algorithms can be used to perform object detection on each frame of the surveillance images, obtaining the object detection result for each frame.

[0047] 102. When a target pollutant is detected in the monitoring image corresponding to any segment of the river, the target pollutant is tracked based on the monitoring images of multiple segments of the river to obtain the trajectory of the target pollutant in multiple segments of the river.

[0048] In this embodiment of the invention, when multiple river segments are monitored, a target detection algorithm can be used to detect targets in the monitoring images corresponding to each river segment. If a target pollutant is detected in the monitoring image corresponding to any river segment, it can be determined that pollutants exist in multiple river segments. At this point, an image tracking algorithm can be used to track the target pollutant in the monitoring images of the multiple river segments. This image tracking algorithm can be an existing one. The image tracking algorithm can involve assigning a tracking ID to the target pollutant upon its first detection, tracking the target pollutant based on this tracking ID, obtaining the tracking trajectory of the target pollutant in the corresponding river segment, and connecting the tracking trajectories of the target pollutant in different river segments to obtain the trajectory of the target pollutant in multiple river segments.

[0049] The aforementioned target pollutants are solid or biological waste that can float on the water surface. However, some external factors can cause them to sink, such as being swept to the bottom by the current in turbulent waters. Examples of solid waste include discarded plastics and discarded wood planks, while examples of biological waste include biological metabolites and animal carcasses.

[0050] 103. By analyzing the trajectory of the target pollutant in multiple river sections and the water flow parameters of those sections, the source of the target pollutant can be predicted, thus obtaining the predicted source of the target pollutant.

[0051] In this embodiment of the invention, the trajectory of the target pollutant in multiple river segments can represent the movement information of the target pollutant in these segments. The aforementioned water flow parameters can include parameters such as water flow velocity, water surface width and flow rate, and river depth. These water flow parameters can affect the movement of the target pollutant. Therefore, the movement of the target pollutant can be predicted by using the water flow parameters of multiple river segments and the trajectory of the target pollutant in these segments. Furthermore, the source of the target pollutant can be determined based on its movement, and the source of the target pollutant can be a specific river segment.

[0052] In this embodiment of the invention, monitoring images of multiple river segments are acquired, wherein the multiple river segments are continuous. When a target pollutant is detected in the monitoring image corresponding to any river segment, image tracking of the target pollutant is performed based on the monitoring images of the multiple river segments to obtain the trajectory of the target pollutant in the multiple river segments. The source of the target pollutant is predicted based on the trajectory of the target pollutant in the multiple river segments and the water flow parameters of the multiple river segments to obtain the predicted source of the target pollutant. By performing image tracking of the target pollutant in the monitoring images of multiple river segments to obtain the trajectory of the target pollutant in the multiple river segments, and combining the water flow parameters of the multiple river segments to predict the source of the target pollutant, the pollution on the river surface can be automatically monitored, and the source of the pollutant can be predicted. This can help relevant departments to control pollutants at their source and improve the efficiency of urban river management.

[0053] Optionally, in the step of image tracking of the target pollutant based on monitoring images of multiple river segments to obtain the trajectory of the target pollutant in multiple river segments, image tracking can be performed on the monitoring images of each river segment to obtain the tracking trajectory of the target pollutant in each river segment; key points can be extracted from the target pollutant to obtain the key points of the target pollutant; and the trajectory of the target pollutant in multiple river segments can be obtained based on the key points of the target pollutant and the tracking trajectory of the target pollutant in each river segment.

[0054] In this embodiment of the invention, when a target pollutant is detected in the monitoring image corresponding to the nth segment of the river, an image tracking algorithm can be used to perform image tracking processing on the monitoring images of each segment of the river after the nth segment to obtain the tracking trajectory of each segment of the river after the nth segment.

[0055] After obtaining the tracking trajectory of each river segment after the nth segment, key points of the target pollutant corresponding to each tracking trajectory can be extracted. Based on the key points of the target pollutant, it can be determined whether the target pollutant in different river segments is the same. By connecting the tracking trajectories corresponding to the same target pollutant, the trajectory of the target pollutant in multiple river segments can be obtained.

[0056] The key points mentioned above can be SIFT feature points of the target pollutant. Specifically, for two adjacent trajectories, the corresponding SIFT feature points of the target pollutant can be extracted, and the two adjacent trajectories can be connected using the SIFT feature points of the target pollutant. It should be noted that the two adjacent trajectories mentioned above can be two trajectories corresponding to adjacent river channels, or two trajectories corresponding to two river channels separated by at least one river channel, wherein the at least one river channel is a river channel in which the target pollutant was not detected.

[0057] By obtaining the trajectory of the target pollutant in multiple river segments through key points of the target pollutant and its tracking trajectory in each segment of the river, the trajectory of the target pollutant can be matched with multiple segments of the same target when multiple target pollutants are detected, thereby improving the accuracy of trajectory matching.

[0058] Optionally, in the step of obtaining the trajectory of the target pollutant in the multiple river segments based on the key points of the target pollutant and the tracking trajectory of the target pollutant in each river segment, feature extraction can be performed on the tracking trajectory of the target pollutant in each river segment to obtain the features of each tracking trajectory; and the tracking trajectories can be matched based on the key points of the target pollutant and the features of each tracking trajectory to obtain the trajectory of the target pollutant in the multiple river segments.

[0059] In this embodiment of the invention, the features of the tracking trajectory include speed, trajectory length, trajectory flatness, etc., and matching can be performed based on the similarity of the features of two tracking trajectories, thereby further improving the accuracy of trajectory matching.

[0060] Specifically, after obtaining the tracking trajectory of each segment of the river after the nth segment, the key points of the target pollutant corresponding to each tracking trajectory can be extracted, as well as the features of each tracking trajectory. Based on the key points of the target pollutant, it can be determined whether the target pollutant in different river channels is the same target pollutant. The feature similarity between different tracking trajectories can be used to determine whether two tracking trajectories are tracking trajectories of the same target pollutant.

[0061] More specifically, if the key points of the target pollutant determine that the target pollutant in two river sections is the same, and the feature similarity between the two tracking trajectories corresponding to the two river sections is greater than or equal to a preset similarity, then the two tracking trajectories are determined to be tracking trajectories for the same target pollutant. If the key points of the target pollutant determine that the target pollutant in the two river sections is not the same, or if the feature similarity between the two tracking trajectories corresponding to the two river sections is less than a preset similarity, then the two tracking trajectories are determined to be tracking trajectories for different target pollutants.

[0062] By connecting the tracking trajectories corresponding to the same target pollutant, the trajectory of the target pollutant in multiple river sections can be obtained.

[0063] Optionally, in the step of predicting the source of the target pollutant based on its trajectory in multiple river segments and the flow parameters of those segments, the following steps can be taken: determining the appearance and disappearance trajectories of the target pollutant based on its trajectory in multiple river segments; generating a state sequence of the target pollutant based on its appearance and disappearance trajectories; acquiring the flow parameters of the multiple river segments and generating a flow parameter sequence for each segment; and predicting the source of the target pollutant based on its state sequence and the flow parameter sequence for each segment.

[0064] In this embodiment of the invention, the appearance trajectory of the target pollutant refers to the trajectory of the target pollutant detected in the monitoring image, specifically the trajectory of the target pollutant when it floats on the water surface. The disappearance trajectory of the target pollutant refers to the trajectory between the two appearance trajectories, specifically the trajectory of the target pollutant when it sinks in the water. The trajectory of the target pollutant in multiple river sections starts from the beginning of the first appearance trajectory and ends at the end of the last appearance trajectory. Two adjacent appearance trajectories are connected by a disappearance trajectory.

[0065] The trajectory of the target pollutant in multiple river segments can be understood as its spatiotemporal trajectory, i.e., the position of the target pollutant in multiple river segments at different time points. The positions of the target pollutants at different time points can be sorted according to the river channel direction to obtain a position sequence. The state value of each position point is determined based on whether it is located on the appearance trajectory or the disappearance trajectory. If the position point is on the appearance trajectory, the state value can be 'a', indicating that the target pollutant is present at that position point; if the position point is on the disappearance trajectory, the state value can be 'b', indicating that the target pollutant is absent at that position point. Assigning a state value to each position point in the position sequence based on whether it is on the appearance or disappearance trajectory yields the state sequence of the target pollutant.

[0066] A sequence of flow parameters for multiple river segments can be obtained by measuring the flow parameters at various points along the river. These flow parameters can include parameters such as flow velocity, water surface width and flow rate, and river depth.

[0067] The aforementioned state sequence of the target pollutant contains information on the state changes of the target pollutant at different times and locations. The aforementioned water flow parameter sequence of multiple river segments contains information on the changes of water flow parameters in the river at different times and locations. By analyzing the implicit relationship between the change information of water flow parameters and the state change information of the target pollutant, the state of the target pollutant before the first segment of the trajectory appears can be predicted. Furthermore, the predicted source of the target pollutant can be obtained based on the state of the target pollutant before the first segment of the trajectory appears.

[0068] Optionally, in the step of generating the state sequence of the target pollutant based on its appearance and disappearance trajectories, the appearance and disappearance trajectories of the target pollutant can be discretized using a preset discretization strategy to obtain each first discrete point of the target pollutant in multiple river segments; the state value of the target pollutant at each first discrete point is determined based on its appearance and disappearance trajectories; and the first discrete points are arranged in order according to the river channel direction to obtain the state sequence of the target pollutant, wherein the spatiotemporal sequence of the target pollutant includes the state values ​​of the first discrete points.

[0069] In this embodiment of the invention, the aforementioned preset discretization strategy can convert the trajectory of the target pollutant into m first discrete points. The distance between two adjacent discrete points is the least common distance d between the emergence trajectory and the disappearance trajectory. That is, each segment of the emergence trajectory is an integer multiple of the least common distance d, and each segment of the disappearance trajectory is also an integer multiple of the least common distance d. Each first discrete point corresponds to a location point. All first discrete points are sorted in order according to the river channel direction to obtain the location sequence of the target pollutant. The state value of each first discrete point is determined according to whether it is located on the emergence trajectory or the disappearance trajectory. If the first discrete point is located on the emergence trajectory, the state value can be 'a', indicating that the target pollutant is in the state of emergence at that first discrete point. If the first discrete point is located on the disappearance trajectory, the state value can be 'b', indicating that the target pollutant is in the state of disappearance at that first discrete point. The state value of each first discrete point in the location sequence is assigned according to whether the first discrete point is located on the emergence trajectory or the disappearance trajectory to obtain the state sequence a of the target pollutant. m .

[0070] Optionally, in the step of obtaining the flow parameters of the multiple river segments and generating a sequence of flow parameters for the multiple river segments, second discrete points of the multiple river segments can be determined based on each first discrete point; flow parameter values ​​of each second discrete point can be determined based on the flow parameters of the multiple river segments; and the second discrete points can be sorted in order according to the river channel direction to obtain a sequence of flow parameters for the multiple river segments, which includes the flow parameter values ​​of the second discrete points.

[0071] In this embodiment of the invention, based on the first discrete point, the entire length of multiple river segments can be discretized with a minimum common distance d as the interval, resulting in second discrete points for the multiple river segments. The distance between any two adjacent second discrete points is the minimum common distance d. Each second discrete point corresponds to a location point in the multiple river segments, and the flow parameter value of that location point can be used as the flow parameter value for the corresponding second discrete point. By sorting the various second discrete points, a flow parameter sequence b for the multiple river segments is obtained. k Where k is greater than or equal to m.

[0072] Optionally, in the step of predicting the source of the target pollutant based on the state sequence of the target pollutant and the flow parameter sequence of multiple river segments to obtain the predicted source of the target pollutant, the state sequence of the target pollutant and the flow parameter sequence of multiple river segments can be fused to obtain a fused sequence; the fused sequence can be predicted by a preset time series model to obtain the predicted source of the target pollutant.

[0073] In this embodiment of the invention, the state sequence a of the target pollutant can be transformed by linear transformation. m and the sequence of water flow parameters for multiple river sections b k The fusion process yields a fused sequence. Specifically, the state sequence a of the target pollutant can be transformed using a linear transformation. m Transform into sequence c j The sequence of water flow parameters b from multiple river segments is transformed using linear transformation. k Transform into sequence e j , sequence c j and sequence e j Channel fusion is performed to obtain the fused sequence f. j .

[0074] The fusion sequence f j The predicted sources of the target pollutants are obtained by inputting a pre-defined time series model. Specifically, the aforementioned time series model can be a time series model based on a recurrent neural network (RNN) or a long short-term memory network (LSTM).

[0075] Specifically, the time-series model can be trained using the first and second datasets to predict the fused sequence. The first dataset includes a first sample fused sequence and a label sequence. The first sample fused sequence is obtained by fusing the first sample state sequence and the sample flow parameter sequence using the above-mentioned method. Furthermore, the first sample state sequence is generated from the trajectory of the sample pollutants, and the sample flow parameter sequence is obtained from the flow parameters of the river channel where the sample pollutants are located. The label sequence is the first sample state sequence.

[0076] The second dataset includes a second sample fusion sequence and a label sequence. Specifically, the first i appearing trajectories of the sample pollutants can be modified into disappearing trajectories. Then, the modified sample pollutant trajectories are used to generate the corresponding second sample state sequence. The second sample state sequence and the sample water flow parameter sequence are fused using the above fusion method to obtain the second sample fusion sequence. The first sample state sequence is also used as the label sequence in the second dataset.

[0077] Training consists of two steps. First, a time-series model is trained using a first dataset, enabling it to output the same result as the label sequence (first sample state sequence) from the fused sequence of the first sample, resulting in a pre-trained time-series model. Second, the pre-trained model is further trained using a second dataset, outputting the same result as the label sequence (first sample state sequence) from the second fused sequence. This allows the model to predict the state values ​​corresponding to the modified trajectories, thus enabling forward prediction capabilities and resulting in a final trained time-series model. This final model can predict the state sequences corresponding to previously missing trajectories based on existing trajectories; the previously missing trajectories represent the sources of the target pollutants.

[0078] It should be noted that the river monitoring method provided in this embodiment of the invention can be applied to devices such as smart cameras, smartphones, computers, and servers that are capable of river monitoring.

[0079] Optional, please see Figure 2 , Figure 2 This is a schematic diagram of the structure of a river monitoring device provided in an embodiment of the present invention, as shown below. Figure 2 As shown, the device includes:

[0080] The acquisition module 201 is used to acquire monitoring images of multiple river segments, wherein the multiple river segments are continuous segments.

[0081] The tracking module 202 is used to perform image tracking on the target pollutant based on the monitoring images of the multiple river segments when a target pollutant is detected in the monitoring image corresponding to any segment of the river, so as to obtain the trajectory of the target pollutant in the multiple river segments.

[0082] The prediction module 203 is used to predict the source of the target pollutant based on the trajectory of the target pollutant in the multiple river sections and the water flow parameters of the multiple river sections, thereby obtaining the predicted source of the target pollutant.

[0083] Optionally, the tracking module 202 includes:

[0084] The tracking submodule is used to perform image tracking on the monitoring images of each section of the river to obtain the tracking trajectory of the target pollutant in each section of the river;

[0085] An extraction submodule is used to extract key points from the target pollutant to obtain the key points of the target pollutant.

[0086] The processing submodule is used to obtain the trajectory of the target pollutant in the multiple river segments based on the key points of the target pollutant and the tracking trajectory of the target pollutant in each river segment.

[0087] Optional, the processed submodules include:

[0088] An extraction unit is used to extract features from the tracking trajectory of the target pollutant in each section of the river, thereby obtaining the features of each tracking trajectory;

[0089] The matching unit is used to match each of the tracking trajectories based on the key points of the target pollutant and the characteristics of each tracking trajectory to obtain the trajectory of the target pollutant in the multiple river sections.

[0090] Optionally, the prediction module 203 includes:

[0091] The determination submodule is used to determine the appearance trajectory and disappearance trajectory of the target pollutant based on the trajectory of the target pollutant in the multiple river sections;

[0092] The first generation submodule is used to generate a state sequence of the target pollutant based on the appearance trajectory and disappearance trajectory of the target pollutant;

[0093] The second generation submodule is used to obtain the water flow parameters of the multiple river segments and generate a sequence of water flow parameters for the multiple river segments.

[0094] The prediction submodule is used to predict the source of the target pollutant based on the state sequence of the target pollutant and the water flow parameter sequence of the multiple river segments, so as to obtain the predicted source of the target pollutant.

[0095] Optionally, the first generation submodule includes:

[0096] The discretization unit is used to discretize the occurrence trajectory and disappearance trajectory of the target pollutant through a preset discretization strategy, so as to obtain the first discrete points of the target pollutant in the multiple river sections.

[0097] The first determining unit is used to determine the state value of the target pollutant at each of the first discrete points based on the appearance trajectory and disappearance trajectory of the target pollutant.

[0098] An arrangement unit is used to arrange each of the first discrete points in order of the river channel direction to obtain the state sequence of the target pollutant, wherein the spatiotemporal sequence of the target pollutant includes the state values ​​of the first discrete points.

[0099] Optionally, the second generation submodule includes:

[0100] The second determining unit is used to determine the second discrete points of the multiple river segments based on each of the first discrete points;

[0101] The third determining unit is used to determine the water flow parameter values ​​of each of the second discrete points based on the water flow parameters of the multiple river segments.

[0102] The sorting unit is used to sort each of the second discrete points in the order of the river channel direction to obtain the water flow parameter sequence of the multiple river segments, wherein the water flow parameter sequence of the multiple river segments includes the water flow parameter values ​​of the second discrete points.

[0103] Optionally, the prediction submodule includes:

[0104] The fusion unit is used to fuse the state sequence of the target pollutant and the water flow parameter sequence of the multiple river segments to obtain a fused sequence;

[0105] The prediction unit is used to predict the fusion sequence using a preset time series model to obtain the predicted source of the target pollutant.

[0106] It should be noted that the river monitoring device provided in this embodiment of the invention can be applied to devices such as smart cameras, smartphones, computers, and servers that are capable of river monitoring methods.

[0107] The river monitoring device provided in this embodiment of the invention can realize all the processes implemented by the river monitoring method in the above-described method embodiments, and can achieve the same beneficial effects. To avoid repetition, it will not be described again here.

[0108] See Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, such as... Figure 3 As shown, it includes: a memory 302, a processor 301, and a computer program for a river monitoring method stored in the memory 302 and executable on the processor 301, wherein:

[0109] The processor 301 is used to call the computer program stored in the memory 302 and perform the following steps:

[0110] Acquire monitoring images of multiple river segments, wherein the multiple river segments are continuous segments;

[0111] When a target pollutant is detected in the monitoring image corresponding to any segment of the river, the target pollutant is image tracked based on the monitoring images of the multiple river segments to obtain the trajectory of the target pollutant in the multiple river segments.

[0112] The trajectory of the target pollutant in the multiple river sections and the water flow parameters of the multiple river sections are used to predict the source of the target pollutant, thus obtaining the predicted source of the target pollutant.

[0113] Optionally, the processor 301 executes image tracking of the target pollutant based on the monitoring images of the multiple river segments to obtain the trajectory of the target pollutant in the multiple river segments, including:

[0114] Image tracking is performed on the monitoring images of each section of the river to obtain the tracking trajectory of the target pollutant in each section of the river;

[0115] Key points of the target pollutant are extracted to obtain the key points of the target pollutant.

[0116] Based on the key points of the target pollutant and the tracking trajectory of the target pollutant in each section of the river, the trajectory of the target pollutant in the multiple sections of the river is obtained.

[0117] Optionally, the step of processor 301 executing the step of obtaining the trajectory of the target pollutant in the multiple river segments based on the key points of the target pollutant and the tracking trajectory of the target pollutant in each river segment includes:

[0118] Feature extraction is performed on the tracking trajectory of the target pollutant in each section of the river to obtain the features of each tracking trajectory;

[0119] Based on the key points of the target pollutant and the characteristics of each tracking trajectory, the tracking trajectories are matched to obtain the trajectory of the target pollutant in the multiple river sections.

[0120] Optionally, the processor 301 executes the trajectory of the target pollutant in the multiple river segments and the water flow parameters of the multiple river segments to predict the source of the target pollutant, obtaining the predicted source of the target pollutant, including:

[0121] Based on the trajectory of the target pollutant in the multiple river sections, determine the appearance trajectory and disappearance trajectory of the target pollutant;

[0122] Based on the appearance and disappearance trajectories of the target pollutant, a state sequence of the target pollutant is generated;

[0123] Obtain the flow parameters of the multiple river segments and generate a sequence of flow parameters for the multiple river segments;

[0124] Based on the state sequence of the target pollutant and the water flow parameter sequence of the multiple river segments, the source of the target pollutant is predicted to obtain the predicted source of the target pollutant.

[0125] Optionally, the step of generating a state sequence of the target pollutant based on the appearance trajectory and disappearance trajectory of the target pollutant, executed by processor 301, includes:

[0126] The occurrence and disappearance trajectories of the target pollutant are discretized using a preset discretization strategy to obtain the first discrete points of the target pollutant in the multiple river sections.

[0127] Based on the appearance trajectory and disappearance trajectory of the target pollutant, determine the state value of the target pollutant at each of the first discrete points;

[0128] Arrange each of the first discrete points in order of river direction to obtain the state sequence of the target pollutant. The spatiotemporal sequence of the target pollutant includes the state values ​​of the first discrete points.

[0129] Optionally, the step of processor 301 executing the acquisition of water flow parameters of the multiple river segments and the generation of water flow parameter sequences of the multiple river segments includes:

[0130] Based on each of the first discrete points, determine the second discrete points of the multiple river segments;

[0131] Based on the water flow parameters of the multiple river sections, determine the water flow parameter values ​​for each of the second discrete points;

[0132] The second discrete points are sorted in order of river direction to obtain the water flow parameter sequence of the multiple river segments, which includes the water flow parameter values ​​of the second discrete points.

[0133] Optionally, the processor 301 executes the process of predicting the source of the target pollutant based on the state sequence of the target pollutant and the water flow parameter sequence of the multiple river segments, to obtain the predicted source of the target pollutant, including:

[0134] The state sequence of the target pollutant and the water flow parameter sequence of the multiple river segments are fused to obtain a fused sequence;

[0135] The predicted source of the target pollutant is obtained by predicting the fusion sequence using a preset time series model.

[0136] The electronic device provided in this embodiment of the invention can implement all the processes of the river monitoring method in the above-described method embodiments, and can achieve the same beneficial effects. To avoid repetition, it will not be described again here.

[0137] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the river monitoring method provided in this invention and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0138] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (RON), or random access memory (RAN), etc.

[0139] The above description discloses only preferred embodiments of the present invention and should not be construed as limiting the scope of the present invention. Therefore, equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.

Claims

1. A method for monitoring river channels, characterized in that, Includes the following steps: Acquire monitoring images of multiple river segments, wherein the multiple river segments are continuous segments; When a target pollutant is detected in the monitoring image corresponding to any segment of the river, the target pollutant is image tracked based on the monitoring images of the multiple river segments to obtain the trajectory of the target pollutant in the multiple river segments. Based on the trajectory of the target pollutant in the multiple river sections, determine the appearance trajectory and disappearance trajectory of the target pollutant; based on the appearance trajectory and disappearance trajectory of the target pollutant, generate a state sequence of the target pollutant; obtain the water flow parameters of the multiple river sections, and generate a water flow parameter sequence of the multiple river sections. Based on the state sequence of the target pollutant and the water flow parameter sequence of the multiple river segments, the source of the target pollutant is predicted to obtain the predicted source of the target pollutant.

2. The river monitoring method as described in claim 1, characterized in that, The step of image tracking of the target pollutant based on monitoring images of the multiple river segments to obtain the trajectory of the target pollutant in the multiple river segments includes: Image tracking is performed on the monitoring images of each section of the river to obtain the tracking trajectory of the target pollutant in each section of the river; Key points of the target pollutant are extracted to obtain the key points of the target pollutant. Based on the key points of the target pollutant and the tracking trajectory of the target pollutant in each section of the river, the trajectory of the target pollutant in the multiple sections of the river is obtained.

3. The river monitoring method as described in claim 2, characterized in that, The step of obtaining the trajectory of the target pollutant in the multiple river segments based on the key points of the target pollutant and the tracking trajectory of the target pollutant in each segment of the river includes: Feature extraction is performed on the tracking trajectory of the target pollutant in each section of the river to obtain the features of each tracking trajectory; Based on the key points of the target pollutant and the characteristics of each tracking trajectory, the tracking trajectories are matched to obtain the trajectory of the target pollutant in the multiple river sections.

4. The river monitoring method as described in claim 1, characterized in that, The step of generating a state sequence of the target pollutant based on its appearance and disappearance trajectories includes: The occurrence and disappearance trajectories of the target pollutant are discretized using a preset discretization strategy to obtain the first discrete points of the target pollutant in the multiple river sections. Based on the appearance trajectory and disappearance trajectory of the target pollutant, determine the state value of the target pollutant at each of the first discrete points; Arrange each of the first discrete points in order of river direction to obtain the state sequence of the target pollutant. The spatiotemporal sequence of the target pollutant includes the state values ​​of the first discrete points.

5. The river monitoring method as described in claim 4, characterized in that, The step of obtaining the flow parameters of the multiple river segments and generating the flow parameter sequence of the multiple river segments includes: Based on each of the first discrete points, determine the second discrete points of the multiple river segments; Based on the water flow parameters of the multiple river sections, determine the water flow parameter values ​​for each of the second discrete points; The second discrete points are sorted in order of river direction to obtain the water flow parameter sequence of the multiple river segments, which includes the water flow parameter values ​​of the second discrete points.

6. The river monitoring method as described in claim 1, characterized in that, The method of predicting the source of the target pollutant based on the state sequence of the target pollutant and the flow parameter sequence of the multiple river segments, to obtain the predicted source of the target pollutant, includes: The state sequence of the target pollutant and the water flow parameter sequence of the multiple river segments are fused to obtain a fused sequence; The predicted source of the target pollutant is obtained by predicting the fusion sequence using a preset time series model.

7. A river monitoring device, characterized in that, The device includes: The acquisition module is used to acquire monitoring images of multiple river segments, wherein the multiple river segments are continuous segments. The tracking module is used to perform image tracking of the target pollutant based on the monitoring images of the multiple river segments when a target pollutant is detected in the monitoring image corresponding to any segment of the river, so as to obtain the trajectory of the target pollutant in the multiple river segments. The prediction module is used to determine the appearance trajectory and disappearance trajectory of the target pollutant based on its trajectory in multiple river segments; generate a state sequence of the target pollutant based on its appearance trajectory and disappearance trajectory; acquire the water flow parameters of the multiple river segments and generate a water flow parameter sequence of the multiple river segments; and predict the source of the target pollutant based on the state sequence of the target pollutant and the water flow parameter sequence of the multiple river segments to obtain the predicted source of the target pollutant.

8. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the river monitoring method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the river monitoring method as described in any one of claims 1 to 6.