Lake ecological capacity calculation method and system based on deep learning
By conducting regional division and water quality testing of lakes, a color difference distribution map is constructed, relevant data are collected, and a runoff ecological allowable calculation model is constructed, which solves the problem of large errors caused by unreasonable regional division in the existing technology, and improves the accuracy and effectiveness of lake ecological capacity calculation.
Patent Information
- Application Number
- CN202511047325.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-29
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-07-29
AI Technical Summary
The existing lake ecological capacity calculation technology fails to refine the regional division, resulting in large errors in data collection and excessive gap between the calculation results and the actual value, affecting the protection of ecological resources and the rational development and utilization of ecological resources.
By dividing the lake area, the initial partition is obtained, and the initial partition is merged to obtain the second partition, water quality is detected, a color difference distribution map is constructed, the partition is analyzed and merged, relevant data is collected, and the runoff ecological allowable calculation model is constructed to obtain the ecological capacity of the lake.
It has achieved refined division of water quality indicators based on different areas of the lake, reduced data collection errors, improved the accuracy and effectiveness of ecological capacity calculation, and considered various influencing factors to accurately measure changes in ecological capacity and make predictions.
Smart Images

Figure CN120541340A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of lake ecological capacity calculation, and specifically to a lake ecological capacity calculation method and system based on deep learning. Background Art
[0002] Lake ecological capacity calculation technology refers to a comprehensive technology that uses scientific methods and models to quantitatively evaluate the maximum pollutant load or human activity interference that a lake ecosystem can sustainably bear while maintaining its own structural stability, normal functions and biodiversity. Its core goal is to provide a scientific basis for lake environmental protection, pollution control and resource utilization, and ensure the sustainable development of the ecosystem.
[0003] In order to ensure the coordination between the protection and rational development and utilization of high-quality ecological resources within the lake basin, it is particularly important to conduct a comprehensive assessment of the ecological capacity within the lake basin. The existing lake ecological capacity calculation technology usually divides the lake into multiple areas for multi-point random sampling. However, when performing regional division, the water quality differences in different areas are not taken into account, and the lake area is not divided finely. The rough division will cause the collected lake data to differ too much from the actual value, resulting in errors in the final calculated ecological capacity, which will further lead to problems in the protection and rational development and utilization of the lake's ecological resources. For example, in the patent application with publication number CN110824133A, a "method for accurately calculating the ecological capacity of lakes at all levels" is disclosed. This scheme is to roughly divide the lake into multiple rectangular areas of 100-200 square meters, generate a lake grid model, and then perform multi-point random sampling on the rectangular areas. The data collected by this method is not reasonable and cannot be accurately calculated. The existing lake ecological capacity calculation technology also has the problem of unreasonable regional division when collecting lake data, resulting in a large gap between the calculated ecological capacity and the actual value. Summary of the Invention
[0004] The present invention aims to solve one of the technical problems in the prior art to at least a certain extent, by dividing the lake into regions to obtain initial partitions, merging the initial partitions to obtain second partitions, then conducting water quality testing on the second partitions to obtain partition water quality, constructing a color difference distribution map based on the partition water quality, and then analyzing the color difference distribution map. Based on the analysis results, the second partitions are merged to obtain lake partitions, and then relevant data in the lake partitions are collected. Finally, a runoff ecological allowable amount calculation model is constructed, and the relevant data are calculated to obtain the ecological capacity of the lake, so as to solve the problem that the existing lake ecological capacity calculation technology still has unreasonable regional division when collecting lake data, resulting in a large gap between the calculated ecological capacity and the actual value.
[0005] To achieve the above objectives, in a first aspect, the present application provides a method for calculating lake ecological capacity based on deep learning, comprising the following steps: Divide the lake into regions to obtain initial partitions, and then merge the initial partitions to obtain second partitions; Conduct water quality testing on the second partition, merge the second partitions based on the partition water quality, and obtain the lake partition; Collect relevant data in lake sub-regions; A runoff ecological tolerance calculation model was constructed, and relevant data were calculated to obtain the ecological capacity of the lake.
[0006] Furthermore, dividing the lake into regions to obtain initial partitions, and then merging the initial partitions to obtain second partitions includes the following sub-steps: Obtain a bird's-eye view of the lake, construct a rectangle with the first length as the side length, name it a standard area, fill the bird's-eye view with the standard area, and evenly divide the bird's-eye view into several standard areas. Mark the standard area with the lake as the initial partition. The area occupied by lakes in the initial partition is named as the intra-partition area, the area of the initial partition is named as the partition area, and the ratio of the intra-partition area to the partition area is calculated and named as the lake ratio; The initial partition whose lake proportion is lower than the first proportion threshold is marked as the partition to be divided, the partition to be divided is merged with the initial partition closest to it to obtain the second partition, and the remaining initial partitions are also marked as the second partition.
[0007] Furthermore, water quality testing is performed on the second partition, and the second partition is merged according to the partition water quality to obtain the lake partition, which includes the following sub-steps: Conduct water quality testing on the second partition to obtain the partition water quality; Construct a color difference distribution map by zoning water quality; The color difference distribution map was analyzed, and the second partition was merged based on the analysis results to obtain the lake partition.
[0008] Furthermore, performing water quality testing on the second partition includes the following sub-steps: If the second partition is directly obtained by marking the initial partition, a water quality detection device is set at the center point of the rectangle of the second partition; If the second partition is obtained by merging the partition to be divided and the initial partition, a water quality detection device is set at the center point of the rectangle of the initial partition in the second partition; The water quality of the second partition is detected by a water quality detection device to obtain the partition water quality.
[0009] Furthermore, merging the second partitions by partition water quality includes the following sub-steps: Obtain the range of the zoned water quality, name it the water quality index range, and evenly divide the water quality index range into 256 sub-ranges, name them the water quality index sub-ranges; The sub-ranges of water quality indicators are numbered in ascending order, and the symbol H n Indicates that, where n is a positive integer and n is the serial number of H, H n Set the standard color, marked as CL n , the CL n Set to 256-n; Set the second partition to the standard color of the water quality index sub-range corresponding to the partition water quality, and name the color filled in the second partition as the partition color; Analyze each second partition, name the second partition currently being analyzed as a target partition, name the second partition adjacent to the target partition as an adjacent partition, name the partition color of the target partition as a target color, and name the color of the adjacent partition as an adjacent color; Calculate the difference between the target color and each adjacent color, named color difference, and calculate the color difference of each second partition; Count the number of different color differences, name it the difference number, establish a two-dimensional coordinate system with the color difference as the X-axis and the difference number as the Y-axis, name it the color difference distribution map, and enter the difference number into the color difference distribution map according to the color difference; Name the coordinate points in the color difference distribution graph as color difference distribution points; Adjacent color difference distribution points are connected by a smooth curve to obtain a color difference distribution curve.
[0010] Furthermore, analyzing the color difference distribution map and merging the second partitions based on the analysis result includes the following sub-steps: Obtaining the peak of the color difference distribution curve, naming it the color difference distribution peak, obtaining the highest color difference distribution peak, naming it the highest peak, marking the color difference distribution peak after the highest peak as the boundary peak to be determined, and obtaining the highest peak among the boundary peaks to be determined, naming it the boundary peak; Get the color difference corresponding to the boundary peak and name it the boundary threshold; With any H n Start by adding H n The color difference of the H is compared with the boundary threshold, and the color difference less than the boundary threshold is named as the similar difference. The adjacent partitions corresponding to the similar difference are compared with the H n Merge to form a third partition, and mark the adjacent partitions corresponding to the color difference greater than or equal to the boundary threshold as the fifth partition; Calculate the average value of the subarea colors in the third subarea, named as the subarea average color, obtain the second subarea adjacent to the third subarea, named as the fourth subarea, calculate the difference between the subarea average color and the subarea color of each fourth subarea, named as the color average difference, compare the color average difference with the boundary threshold, incorporate the fourth subarea corresponding to the color average difference less than the boundary threshold into the third subarea, and mark the fourth subarea corresponding to the color average difference greater than or equal to the boundary threshold as the fifth subarea; The fifth zone does not participate in the calculation of the average color difference, and the process is repeated until only the fifth zone is adjacent to the third zone. The third zone obtained at this time is the lake zone. Reset the fifth partition to the second partition. The lake partition does not belong to the second partition. Loop to extract new lake partitions until all second partitions are divided into different lake partitions.
[0011] Furthermore, collecting relevant data in the lake partition includes the following sub-steps: For any lake partition, randomly setting a first number of data acquisition devices in the lake partition; The lake zones are numbered by the symbol A j Indicates, where j is a positive integer and j is the serial number of A; The data acquisition device is used to collect relevant data in the lake partition; The relevant data of the lake partition is the average value of the data collected by the data collection devices of the first number of devices.
[0012] Furthermore, the relevant data includes A j The water volume and water surface area on day i are marked as and , A j The inflow and outflow of day i are marked as and , A j The rainfall and evaporation on day i are marked as and , A j The water quality index for day i is marked as , A j Entry A on day i j The runoff water quality is marked as , the pollutant concentration and dry deposition rate in the rainfall on day i are marked as and , A j The target water quality is marked as .
[0013] Furthermore, a runoff ecological tolerance calculation model is constructed and relevant data are calculated to obtain the ecological capacity of the lake, which includes the following sub-steps: in, A j The water environment capacity on day i, A j The amount of pollution load entering with runoff on day i, A j The atmospheric dry and wet deposition load on day i, K is the comprehensive degradation coefficient; Calculate each A j The water environment capacity of the lake on day i can be obtained by adding up all the water environment capacities.
[0014] In a second aspect, the present application provides a lake ecological capacity calculation system based on deep learning, including a region division module, a lake partition module, a data acquisition module, and an ecological capacity calculation module; the region division module, the lake partition module, and the data acquisition module are respectively connected to the ecological capacity calculation module data; The region division module is used to divide the lake into regions to obtain initial regions, and then merge the initial regions to obtain second regions; The lake partition module is used to perform water quality detection on the second partition, and merge the second partitions according to the partition water quality to obtain the lake partition; The data acquisition module is used to collect relevant data in the lake partition; The ecological capacity calculation module is used to construct a runoff ecological allowable amount calculation model, calculate relevant data, and obtain the ecological capacity of the lake.
[0015] Beneficial effects of the present invention: The present invention divides the lake into regions to obtain initial partitions, then merges the initial partitions to obtain second partitions, then performs water quality testing on the second partitions to obtain partition water quality, constructs a color difference distribution map based on the partition water quality, then analyzes the color difference distribution map, and merges the second partitions based on the analysis results to obtain lake partitions. The advantage of the present invention is that the lake partitions can be finely divided based on the water quality indicators of different areas in the lake, ensuring that the water quality indicators in each lake area are similar, greatly reducing the error in data collection, and improving the accuracy of the lake ecological capacity calculation and the rationality of the regional division; The present invention collects relevant data from lake partitions, finally constructs a runoff ecological allowance calculation model, calculates the relevant data, and obtains the ecological capacity of the lake. The advantage is that the ecological capacity of the lake can be calculated based on comprehensive data, fully considering multiple influencing factors such as rainfall, runoff flow, dry deposition and water quality, and can accurately measure the daily changes in ecological capacity and make predictions, thereby improving the accuracy and effectiveness of the lake ecological capacity calculation. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a principle block diagram of the system of the present invention; Figure 2 is a schematic diagram of a top view of the present invention; Figure 3 Schematic diagram of the initial partition of the present invention; Figure 4 Schematic diagram of initial partition 1 to initial partition 6 of the present invention; Figure 5 is a schematic diagram of the second partition of the present invention; Figure 6 Schematic diagram of the second partition and the initial partition of the present invention; Figure 7 A schematic diagram of filling the second partition with a partition color according to the present invention; Figure 8 Schematic diagram of nine second partitions of the present invention; Figure 9 is a schematic diagram of a color difference distribution curve of the present invention; Figure 10 Schematic diagram of the third and fifth partitions of the present invention; Figure 11 A schematic diagram of lake zoning according to the present invention; Figure 12 Flow chart of the steps of the method of the present invention. DETAILED DESCRIPTION
[0017] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0018] Example 1, please refer to Figure 1As shown, the present application provides a lake ecological capacity calculation system based on deep learning, including a region division module, a lake partition module, a data acquisition module and an ecological capacity calculation module; the region division module, the lake partition module and the data acquisition module are respectively connected to the ecological capacity calculation module data; The regional division module is used to divide the lake into regions, obtain initial partitions, and then merge the initial partitions to obtain second partitions; The regional division module is configured with regional division strategies, which include: See also Figures 2 to 3 As shown, a bird's-eye view of the lake is obtained, a rectangle with the first length as the side length is constructed, named as a standard area, the bird's-eye view is filled with the standard area, the bird's-eye view is evenly divided into several standard areas, and the standard area with the lake is marked as the initial partition; See also Figure 4 As shown, the area occupied by lakes in the initial partition is named as the intra-district area, the area of the initial partition is named as the partition area, and the ratio of the intra-district area to the partition area is calculated and named as the lake ratio; See also Figure 5 As shown, the initial partition whose lake proportion is lower than the first proportion threshold is marked as a partition to be divided, the partition to be divided is merged with the initial partition closest to it to obtain the second partition, and the remaining initial partitions are also marked as the second partition; In actual application, the first length is set by the surveyor. In this embodiment, the first length is set to 100m. The standard area is a rectangular area of 10,000 square meters. The top view is as follows: Figure 2 As shown, the top view has a boundary. Starting from the upper left vertex of the top view, a standard area is filled. The subsequent standard areas are aligned with the first standard area and arranged in sequence to obtain the initial partitions as shown in Figure 3 As shown in the figure, the initial partition has parts that exceed the boundaries of the top view. The boundaries of the top view can be removed. The calculation of the lake proportion is to calculate the proportion of lakes in the initial partition to the area of the initial partition. If the area is too small, the initial partitions are merged. The first proportion threshold is set to 0.5. This is to ensure that most areas in the initial partition are lakes. If the proportion of land is too large, it will affect the collected relevant data; for example Figure 4The initial partitions 1 to 6 are shown in the figure. Among them, the proportion of lakes in the initial partition 5 is significantly less than 0.5, while the proportion of lakes in the initial partition 6 is significantly greater than 0.5. Therefore, the initial partition 5 needs to be merged with other initial partitions, while the initial partition 6 does not need to be merged. Therefore, the initial partition 5 can be merged with the initial partition 2 or with the initial partition 6. However, it is observed that the contact length between the initial partition 5 and the lakes in the initial partition 2 is greater than the contact length between the initial partition 5 and the lakes in the initial partition 6. Therefore, the initial partition 5 is merged with the initial partition 2 to obtain a second partition, and the initial partition 6 forms a second partition alone. Finally, the second partition is obtained as shown in FIG. Figure 5 shown.
[0019] The lake partitioning module is used to detect the water quality of the second partition and merge the second partitions according to the partition water quality to obtain the lake partition; the lake partitioning module includes a water quality detection unit, a color difference distribution analysis unit and a lake partitioning unit; The water quality detection unit is used to detect the water quality of the second partition to obtain the partition water quality; The water quality detection module is equipped with a water quality detection strategy, which includes: If the second partition is directly obtained by marking the initial partition, a water quality detection device is set at the center point of the rectangle of the second partition; See also Figure 6 As shown, if the second partition is obtained by merging the partition to be divided and the initial partition, a water quality detection device is set at the center point of the rectangle of the initial partition in the second partition; The water quality of the second partition is tested by a water quality testing device to obtain the partition water quality; In practical applications, the center point of the second partition rectangle is the intersection of the two diagonals of the rectangle. If the second partition is obtained by merging the partition to be divided and the initial partition, such as Figure 6 As shown, Figure 6 The image on the left is the second partition, and the image on the right is the initial partition corresponding to the second partition. The rectangle in the upper left corner and the rectangle in the lower right corner are both partitions to be divided, and only the rectangle in the lower left corner is the initial partition. Therefore, the water quality detection device is set at the center point of the rectangle of the initial partition in the lower left corner. The partition water quality is actually the average value of pollutants contained in each liter of lake water in the lake of the second partition, in mg / L. The smaller the partition water quality, the less pollutants contained in each liter of lake water in the lake. This embodiment focuses on calculating the capacity of pollutants in the lake, which also belongs to ecological capacity calculation.
[0020] The color difference distribution analysis unit is used to construct a color difference distribution map by zoning water quality; The color difference distribution analysis module is equipped with a color difference distribution analysis strategy, which includes: Obtain the range of the zoned water quality, name it the water quality index range, and evenly divide the water quality index range into 256 sub-ranges, name them the water quality index sub-ranges; The sub-ranges of water quality indicators are numbered in ascending order, and the symbol H n Indicates that, where n is a positive integer and n is the serial number of H, H n Set the standard color, marked as CL n , CL n Set to 256-n; See also Figure 7 As shown, the second partition is set to the standard color of the water quality index sub-range corresponding to the partition water quality, and the color filled in the second partition is named the partition color; In practical applications, the water quality index range obtained is [0.138, 0.256], which is divided into 256 water quality index sub-ranges. The span of each water quality index sub-range is 0.0004609375, that is, the difference between the total maximum and minimum values of each water quality index sub-range is 0.0004609375. H is obtained by numbering. n , 1≤n≤256, and get CL n , CL n Set to 256-n. For example, when n=1, CL1 is 255, representing white. When n=256, CL 256 That is 0, representing black. Therefore, the smaller the water quality of the second partition, the closer its standard color difference is to white, and the larger the water quality, the closer its standard color is to black. After filling the second partition with the partition color, we get Figure 7 ; See also Figure 8 As shown, each second partition is analyzed, the second partition currently being analyzed is named the target partition, the second partition adjacent to the target partition is named the adjacent partition, the partition color of the target partition is named the target color, and the color of the adjacent partition is named the adjacent color; Calculate the difference between the target color and each adjacent color, named color difference, and calculate the color difference of each second partition; See also Figure 9 As shown, the number of different color differences is counted and named as the difference number. A two-dimensional coordinate system is established with the color difference as the X axis and the difference number as the Y axis, named as the color difference distribution map. The difference number is entered into the color difference distribution map according to the color difference; Name the coordinate points in the color difference distribution graph as color difference distribution points; Connect adjacent color difference distribution points through a smooth curve to obtain a color difference distribution curve; In practical applications, Figure 8 For example, Figure 8 There are 9 second partitions in Figure 8 The second partition in the center is marked as the target partition. The second partitions of the region are all adjacent to the target partition, so they are all marked as adjacent partitions. The target color is 206, among which the adjacent colors of the adjacent partitions in the first row are 206, 207 and 168 from left to right, the adjacent colors of the adjacent partitions on the left side of the second row are 180, the adjacent colors on the right side are 207, and the adjacent colors of the adjacent partitions in the third row are 199, 199 and 206 from left to right. Therefore, the calculated color differences are 0, 1, 38, 26, 1, 7, 7 and 0 respectively. The color difference of each second partition is calculated. Taking the color difference value 0 as an example, the number of color difference values 0 is 52, that is, the number of differences of color difference value 0 is 52, and the color difference distribution diagram is constructed. The color difference distribution curve is as follows Figure 9 As shown; The lake partition unit is used to analyze the color difference distribution map, and based on the analysis results, the second partition is merged to obtain the lake partition; The lake partitioning module is configured with lake partitioning strategies, which include: Obtaining the peak of the color difference distribution curve, naming it the color difference distribution peak, obtaining the highest color difference distribution peak, naming it the highest peak, marking the color difference distribution peak after the highest peak as the boundary peak to be determined, and obtaining the highest peak among the boundary peaks to be determined, naming it the boundary peak; Get the color difference corresponding to the boundary peak and name it the boundary threshold; In practical applications, Figure 9There are 5 color difference distribution peaks, which are named as the first peak, second peak, third peak, fourth peak and fifth peak from left to right. Among them, the first peak is the highest, so the first peak is marked as the highest peak. The second to fifth peaks are all behind the highest peak, so the second to fifth peaks are all boundary peaks to be determined. Among the boundary peaks to be determined, the third peak is the highest, so the third peak is named the boundary peak. The color difference corresponding to the boundary peak is 26, that is, the boundary threshold is 26; the highest peak represents that in the second partition, the difference in water quality between most of the second partitions and the adjacent second partitions is at the highest peak. This is because different areas in the lake may have different water quality, but the water quality in most areas varies. The change is small, and only a few areas will experience significant changes in water quality. After finding the highest peak, it can be ensured that the second partition can form a larger lake partition to prevent too many lake partitions. In order to distinguish different lake partitions, it is necessary to find the boundary threshold. The boundary threshold must be greater than the color difference corresponding to the highest peak. Therefore, it is necessary to extract the boundary pending peak. The highest peak in the boundary pending peak is selected as the boundary peak because the color difference thresholds of most second partitions with obvious differences are at the highest peak in the boundary pending peak. In order to prevent too few lake partitions from being divided, the highest peak of the boundary pending peak is used as the boundary peak. The highest peak can ensure that the size of each lake partition is not too small, and the boundary peak can ensure that the number of lake partitions is not too small. See also Figure 10 As shown, with any H n Start by adding H n The color difference of the H is compared with the boundary threshold, and the color difference less than the boundary threshold is named as the similar difference. The adjacent partitions corresponding to the similar difference are compared with the H n Merge to form a third partition, and mark the adjacent partitions corresponding to the color difference greater than or equal to the boundary threshold as the fifth partition; Calculate the average value of the subarea colors in the third subarea, named as the subarea average color, obtain the second subarea adjacent to the third subarea, named as the fourth subarea, calculate the difference between the subarea average color and the subarea color of each fourth subarea, named as the color average difference, compare the color average difference with the boundary threshold, incorporate the fourth subarea corresponding to the color average difference less than the boundary threshold into the third subarea, and mark the fourth subarea corresponding to the color average difference greater than or equal to the boundary threshold as the fifth subarea; The fifth zone does not participate in the calculation of the average color difference, and the process is repeated until only the fifth zone is adjacent to the third zone. The third zone obtained at this time is the lake zone. See also Figure 11 As shown, the fifth partition is reset to the second partition, the lake partition does not belong to the second partition, and new lake partitions are extracted cyclically until all second partitions are divided into different lake partitions; In actual applications, Figure 8 For example, Figure 8 H in the center n For example, the color difference values are 0, 1, 38, 26, 1, 7, 7 and 0 respectively. Among them, 38 and 26 are greater than or equal to the boundary threshold. Therefore, the second partition corresponding to the color difference values 38 and 26 is marked as the fifth partition, and the second partitions corresponding to the remaining color differences are marked as H n Form a third partition, such as Figure 10 As shown, the average value of the color of the third partition is obtained, where the partition colors include 206, 207, 206, 199, 199 and 206. The average color of the partition is calculated to be 204.8. The calculation result is rounded to one decimal place. Then the second partition adjacent to the third partition is obtained and named as the fourth partition. It should be noted that Figure 10 Although the fifth zone is adjacent to the third zone, it does not belong to the fourth zone and is therefore not included in the reference range. The comparison is performed again and the third zone is expanded until the third zone is only adjacent to the fifth zone, that is, the color difference between the third zone and the surrounding adjacent second zones is greater than or equal to the difference threshold. After the analysis of a third zone is completed, a lake zone can be obtained. The fifth zone is reset to the second zone and the analysis is continued. It should be noted that the lake zone at this time no longer participates in the analysis. The final lake zone is divided as follows Figure 11 shown.
[0021] The data collection module is used to collect relevant data in lake partitions; The data acquisition module is configured with a data acquisition strategy, which includes: For any lake partition, randomly setting a first number of data acquisition devices in the lake partition; The lake zones are numbered by the symbol A j Indicates, where j is a positive integer and j is the serial number of A; The data acquisition device is used to collect relevant data in the lake partition; The relevant data of the lake partition is the average value of the data collected by the data collection devices of the first number of devices; Relevant data include A j The water volume and water surface area on day i are marked as and , A j The inflow and outflow of day i are marked as and , A j The rainfall and evaporation on day i are marked as and , A j The water quality index for day i is marked as , Aj Entry A on day i j The runoff water quality is marked as , the pollutant concentration and dry deposition rate in the rainfall on day i are marked as and , A j The target water quality is marked as , the comprehensive degradation coefficient of the lake, marked as K; In actual applications, the number of the first devices is set by the surveyors themselves, with reference to the number of survey equipment carried. In this embodiment, the number of the first devices is set to 4, that is, 4 data acquisition devices are randomly placed in each lake partition. The data acquisition device is not a single device, but a general term for multiple devices, which are used to collect different related data. The related data can be directly collected by the data acquisition device or obtained through certain calculations. This embodiment no longer describes the specific process of data collection, and the related data are all known data.
[0022] The ecological capacity calculation module is used to build a runoff ecological allowable amount calculation model, calculate relevant data, and obtain the ecological capacity of the lake; The ecological capacity calculation module is configured with an ecological capacity calculation strategy, which includes: in, A j The water environment capacity on day i, A j The amount of pollution load entering with runoff on day i, A j Atmospheric dry and wet deposition loads on day i; Calculate each A j The water environment capacity of the lake on day i can be obtained by adding up all water environment capacities. In practical applications, in this embodiment, it is assumed that when j=1, 87263m 3 , 0.01km 2 , 23843m 3 , 23843m 3 , 236m 3 , 258m 3 , 0.176 mg / L, 0.154 mg / L, 0.142 mg / L, 13865g / km 2 , is 0.150 mg / L, and the comprehensive degradation coefficient is 0.42, among which, and Most of the time they are the same, but if there are branches in the lake, there may be differences; substitute the calculation to get 87241m 3 , is 3671822mg, is 47377 mg, which can be further substituted into the calculation to obtain The ecological capacity is 4655511.96mg≈46555g. The calculation result is rounded to an integer. The ecological capacity is 46555g, which means that in A j Able to purify itself without affecting A j Under the premise of the water quality of the zone, A j The total amount of pollutants that can be accommodated in the water is 46555g. In the entire calculation process, i is used to predict the future water environment capacity. i=1 is to calculate the accurate water environment capacity of the day, and i=2 is to predict the water environment capacity of the next day. If only the water environment capacity of the day is calculated, i can be ignored and the calculated water environment capacity of each Adding them together gives the ecological capacity of the lake.
[0023] Example 2, please refer to Figure 12 As shown, this application provides a lake ecological capacity calculation method based on deep learning, which includes the following steps: Step S1, dividing the lake into regions to obtain initial partitions, and then merging the initial partitions to obtain second partitions; Step S1 includes the following sub-steps: Step S101: Obtain a bird's-eye view of the lake, construct a rectangle with a first length as a side length, name it a standard area, fill the bird's-eye view with the standard area, and evenly divide the bird's-eye view into a plurality of standard areas. Mark the standard area where the lake is located as an initial partition. Step S102: Name the area occupied by the lakes in the initial partition as the intra-partition area, name the area of the initial partition as the partition area, and calculate the ratio of the intra-partition area to the partition area, which is named as the lake ratio; Step S103: Mark the initial partition whose lake proportion is lower than the first proportion threshold as a partition to be divided, merge the partition to be divided with the initial partition closest to it to obtain a second partition, and also mark the remaining initial partitions as second partitions; Step S2: testing the water quality of the second partition, merging the second partitions based on the partition water quality to obtain lake partitions. Step S2 includes the following sub-steps: Step S201, performing water quality testing on the second partition to obtain the partition water quality; Step S201 includes the following sub-steps: Step S2011: If the second partition is directly marked from the initial partition, a water quality detection device is set at the center point of the rectangle of the second partition; Step S2012: If the second partition is obtained by merging the partition to be divided and the initial partition, a water quality detection device is set at the center point of the rectangle of the initial partition in the second partition; Step S2013, detecting the water quality of the second partition by a water quality detection device to obtain the partition water quality; Step S202, constructing a color difference distribution map by dividing the water quality into different zones; Step S202 includes the following sub-steps: Step S2021: Obtain the range of the zoned water quality, name it as the water quality index range, and evenly divide the water quality index range into 256 sub-ranges, name them as the water quality index sub-ranges; Step S2022: number the water quality index sub-ranges in ascending order, using the symbol H n Indicates that, where n is a positive integer and n is the serial number of H, H n Set the standard color, marked as CL n , CL n Set to 256-n; Step S2023, setting the second partition as the standard color of the water quality index sub-range corresponding to the partition water quality, and naming the color filled in the second partition as the partition color; Step S2024, analyzing each second partition, naming the second partition currently being analyzed as a target partition, naming the second partition adjacent to the target partition as an adjacent partition, naming the partition color of the target partition as a target color, and naming the color of the adjacent partition as an adjacent color; Step S2025 , calculating the difference between the target color and each adjacent color, named as color difference, and calculating the color difference of each second subarea; Step S2026: Count the number of different color differences, name it "difference number", establish a two-dimensional coordinate system with color difference as the X-axis and difference number as the Y-axis, name it "color difference distribution map", and enter the difference number into the color difference distribution map according to the color difference; Step S2027, naming the coordinate point in the color difference distribution map as a color difference distribution point; Step S2028, connecting adjacent color difference distribution points using a smooth curve to obtain a color difference distribution curve; Step S203, analyzing the color difference distribution map, and merging the second partitions based on the analysis results to obtain lake partitions; Step S203 includes the following sub-steps: Step S2031, obtaining the peaks of the color difference distribution curve and naming them as color difference distribution peaks, obtaining the highest color difference distribution peak and naming them as the highest peak, marking the color difference distribution peaks after the highest peak as boundary peaks to be determined, and obtaining the highest peak among the boundary peaks to be determined and naming them as boundary peaks; Step S2032, obtaining the color difference corresponding to the boundary peak, which is named the boundary threshold; Step S2033, with any H n Start by adding H n The color difference of the H is compared with the boundary threshold, and the color difference less than the boundary threshold is named as the similar difference. The adjacent partitions corresponding to the similar difference are compared with the H n Merge to form a third partition, and mark the adjacent partitions corresponding to the color difference greater than or equal to the boundary threshold as the fifth partition; Step S2034: Calculate the average value of the subarea colors in the third subarea, named as the subarea average color, obtain a second subarea adjacent to the third subarea, named as the fourth subarea, calculate the difference between the subarea average color and the subarea color of each fourth subarea, named as the color average difference, compare the color average difference with the boundary threshold, incorporate the fourth subarea corresponding to the color average difference less than the boundary threshold into the third subarea, and mark the fourth subarea corresponding to the color average difference greater than or equal to the boundary threshold as the fifth subarea; Step S2035: The fifth subarea is not included in the calculation of the average color difference, and the process is repeated until only the fifth subarea is adjacent to the third subarea. The third subarea obtained at this time is the lake subarea. Step S2036: reset the fifth partition to the second partition. The lake partition does not belong to the second partition. New lake partitions are extracted cyclically until all second partitions are divided into different lake partitions. Step S3, collecting relevant data in the lake partition; Step S3 includes the following sub-steps: Step S301: for any lake partition, randomly setting a first number of data acquisition devices in the lake partition; Step S302: number the lake partitions, using symbol A j Indicates, where j is a positive integer and j is the serial number of A; Step S303, the data acquisition device is used to collect relevant data in the lake partition; Step S304, the relevant data of the lake partition is the average value of the data collected by the data collection devices of the first number of devices; Step S305, the relevant data includes Aj The water volume and water surface area on day i are marked as and , A j The inflow and outflow of day i are marked as and , A j The rainfall and evaporation on day i are marked as and , A j The water quality index for day i is marked as , A j Entry A on day i j The runoff water quality is marked as , the pollutant concentration and dry deposition rate in the rainfall on day i are marked as and , A j The target water quality is marked as ; Step S4, constructing a runoff ecological tolerance calculation model, calculating relevant data, and obtaining the ecological capacity of the lake; Step S4 includes the following sub-steps: Step S401, calculate in, A j The water environment capacity on day i, A j The amount of pollution load entering with runoff on day i, A j The atmospheric dry and wet deposition load on day i, K is the comprehensive degradation coefficient; Step S402, calculate each A j The water environment capacity of the lake on day i can be obtained by adding up all the water environment capacities.
[0024] In Example 3, the present application provides an electronic device, which may include: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus. The memory stores computer-readable instructions, and the processor can call the instructions in the memory. When the computer-readable instructions are executed by the processor, the steps in the method for calculating the ecological capacity of a lake based on deep learning are executed to achieve the following functions: dividing the lake into regions to obtain initial partitions, and then merging the initial partitions to obtain second partitions; performing water quality testing on the second partitions, and merging the second partitions based on the partition water quality to obtain lake partitions; collecting relevant data from the lake partitions; constructing a runoff ecological allowable amount calculation model, calculating the relevant data, and obtaining the ecological capacity of the lake.
[0025] In addition, the logical instructions in the above-mentioned memory can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application, or the part that contributes to the existing technology, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program code.
[0026] Example 4. The present application also provides a computer-readable storage medium. The present application provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method for calculating the ecological capacity of a lake based on deep learning are executed to achieve the following functions: dividing the lake into regions to obtain initial partitions, and then merging the initial partitions to obtain second partitions; conducting water quality testing on the second partitions, and merging the second partitions according to the partitioned water quality to obtain lake partitions; collecting relevant data in the lake partitions; constructing a runoff ecological tolerance calculation model, calculating the relevant data, and obtaining the ecological capacity of the lake.
[0027] Through the description of the above embodiments, the embodiments of the present invention can be provided as methods, systems, or computer program products. Based on this understanding, the essence of the above technical solutions or the portion that contributes to the prior art can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for enabling a computer device (such as a personal computer, server, or network device) to execute the methods described in various embodiments or certain portions of the embodiments.
[0028] In the embodiments provided in this application, it should be understood that the disclosed system or method can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of systems, modules and units can be electrical, mechanical or other forms.
[0029] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for calculating lake ecological capacity based on deep learning, characterized by: The steps include: Divide the lake into regions to obtain initial partitions, and then merge the initial partitions to obtain second partitions; Conduct water quality testing on the second partition, merge the second partitions based on the partition water quality, and obtain the lake partition; Collect relevant data in lake sub-regions; A runoff ecological tolerance calculation model was constructed, and relevant data were calculated to obtain the ecological capacity of the lake.
2. The method for calculating lake ecological capacity based on deep learning according to claim 1, characterized in that: Dividing the lake into regions to obtain initial partitions and then merging the initial partitions to obtain second partitions includes the following sub-steps: Obtain a bird's-eye view of the lake, construct a rectangle with the first length as the side length, name it a standard area, fill the bird's-eye view with the standard area, and evenly divide the bird's-eye view into several standard areas. Mark the standard area with the lake as the initial partition. The area occupied by lakes in the initial partition is named as the intra-partition area, the area of the initial partition is named as the partition area, and the ratio of the intra-partition area to the partition area is calculated and named as the lake ratio; The initial partition whose lake proportion is lower than the first proportion threshold is marked as the partition to be divided, the partition to be divided is merged with the initial partition closest to it to obtain the second partition, and the remaining initial partitions are also marked as the second partition.
3. The method for calculating lake ecological capacity based on deep learning according to claim 2, characterized in that: Testing the water quality of the second partition and merging the second partitions based on the partition water quality to obtain the lake partition includes the following sub-steps: Conduct water quality testing on the second partition to obtain the partition water quality; Construct a color difference distribution map by zoning water quality; The color difference distribution map was analyzed, and the second partition was merged based on the analysis results to obtain the lake partition.
4. The method for calculating lake ecological capacity based on deep learning according to claim 3 is characterized in that: The water quality test for the second zone includes the following sub-steps: If the second partition is directly obtained by marking the initial partition, a water quality detection device is set at the center point of the rectangle of the second partition; If the second partition is obtained by merging the partition to be divided and the initial partition, a water quality detection device is set at the center point of the rectangle of the initial partition in the second partition; The water quality of the second partition is detected by a water quality detection device to obtain the partition water quality.
5. The method for calculating lake ecological capacity based on deep learning according to claim 4 is characterized in that: Merging the second zone by zone water quality includes the following sub-steps: Obtain the range of the zoned water quality, name it the water quality index range, and evenly divide the water quality index range into 256 sub-ranges, name them the water quality index sub-ranges; The sub-ranges of water quality indicators are numbered in ascending order, and the symbol H n Indicates that, where n is a positive integer and n is the serial number of H, H n Set the standard color, marked as CL n , the CL n Set to 256-n; Set the second partition to the standard color of the water quality index sub-range corresponding to the partition water quality, and name the color filled in the second partition as the partition color; Analyze each second partition, name the second partition currently being analyzed as a target partition, name the second partition adjacent to the target partition as an adjacent partition, name the partition color of the target partition as a target color, and name the color of the adjacent partition as an adjacent color; Calculate the difference between the target color and each adjacent color, named color difference, and calculate the color difference of each second partition; Count the number of different color differences, name it the difference number, establish a two-dimensional coordinate system with the color difference as the X-axis and the difference number as the Y-axis, name it the color difference distribution map, and enter the difference number into the color difference distribution map according to the color difference; Name the coordinate points in the color difference distribution graph as color difference distribution points; Adjacent color difference distribution points are connected by a smooth curve to obtain a color difference distribution curve.
6. The method for calculating lake ecological capacity based on deep learning according to claim 5, characterized in that: Analyzing the color difference distribution map and merging the second partitions based on the analysis results includes the following sub-steps: Obtaining the peak of the color difference distribution curve, naming it the color difference distribution peak, obtaining the highest color difference distribution peak, naming it the highest peak, marking the color difference distribution peak after the highest peak as the boundary peak to be determined, and obtaining the highest peak among the boundary peaks to be determined, naming it the boundary peak; Get the color difference corresponding to the boundary peak and name it the boundary threshold; With any H n Start by adding H n The color difference of the H is compared with the boundary threshold, and the color difference less than the boundary threshold is named as the similar difference. The adjacent partitions corresponding to the similar difference are compared with the H n Merge to form a third partition, and mark the adjacent partitions corresponding to the color difference greater than or equal to the boundary threshold as the fifth partition; Calculate the average value of the subarea colors in the third subarea, named as the subarea average color, obtain the second subarea adjacent to the third subarea, named as the fourth subarea, calculate the difference between the subarea average color and the subarea color of each fourth subarea, named as the color average difference, compare the color average difference with the boundary threshold, incorporate the fourth subarea corresponding to the color average difference less than the boundary threshold into the third subarea, and mark the fourth subarea corresponding to the color average difference greater than or equal to the boundary threshold as the fifth subarea; The fifth zone does not participate in the calculation of the average color difference, and the process is repeated until only the fifth zone is adjacent to the third zone. The third zone obtained at this time is the lake zone. Reset the fifth partition to the second partition. The lake partition does not belong to the second partition. Loop to extract new lake partitions until all second partitions are divided into different lake partitions.
7. The method for calculating lake ecological capacity based on deep learning according to claim 6, characterized in that: Collecting relevant data in lake zones includes the following sub-steps: For any lake partition, randomly setting a first number of data acquisition devices in the lake partition; The lake zones are numbered by the symbol A j Indicates, where j is a positive integer and j is the serial number of A; The data acquisition device is used to collect relevant data in the lake partition; The relevant data of the lake partition is the average value of the data collected by the data collection devices of the first number of devices.
8. The method for calculating lake ecological capacity based on deep learning according to claim 7, characterized in that: The relevant data include A j The water volume and water surface area on day i are marked as and , A j The inflow and outflow of day i are marked as and , A j The rainfall and evaporation on day i are marked as and , A j The water quality index for day i is marked as , A j Entry A on day i j The runoff water quality is marked as , the pollutant concentration and dry deposition rate in the rainfall on day i are marked as and , A j The target water quality is marked as .
9. The method for calculating lake ecological capacity based on deep learning according to claim 8, characterized in that: Constructing a model to calculate the ecological tolerance of runoff and calculating the relevant data to obtain the ecological capacity of the lake includes the following sub-steps: in, A j The water environment capacity on day i, A j The amount of pollution load entering with runoff on day i, A j The atmospheric dry and wet deposition load on day i, K is the comprehensive degradation coefficient; Calculate each A j The water environment capacity of the lake on day i can be obtained by adding up all the water environment capacities.
10. A lake ecological capacity calculation system based on deep learning, used to implement the lake ecological capacity calculation method based on deep learning according to any one of claims 1 to 9, characterized in that: It includes a region division module, a lake division module, a data acquisition module and an ecological capacity calculation module; the region division module, the lake division module and the data acquisition module are respectively connected to the ecological capacity calculation module; The region division module is used to divide the lake into regions to obtain initial regions, and then merge the initial regions to obtain second regions; The lake partition module is used to perform water quality detection on the second partition, and merge the second partitions according to the partition water quality to obtain the lake partition; The data acquisition module is used to collect relevant data in the lake partition; The ecological capacity calculation module is used to construct a runoff ecological allowable amount calculation model, calculate relevant data, and obtain the ecological capacity of the lake.
Citation Information
Patent Citations
lake water environment capacity calculation method based on MIKE21
CN109657418A
Accurate calculation method for ecological capacities of lake at all levels
CN110824133A
Regional water environment capacity calculation and management system based on water consumption management
CN115271148A
Multi-element ecological environment admission intelligent analysis system based on AI large model
CN120028257A
Water environment pollution source analysis method and system
CN120162507A