River submerging rehearsal method and device, storage medium and electronic equipment

By generating attribute data of the river water surface area and predicting the submergence height, the river submergence preview is realized, which solves the problem of low manual drawing efficiency and improves the efficiency and accuracy of the preview.

CN118568838APending Publication Date: 2024-08-30JIULING (SHANGHAI) INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410740118.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

In the existing technology, river channel inundation preview is realized by manually drawing the shape of the river channel, resulting in low efficiency of inundation preview and lack of effective solutions.

Method used

Based on the terrain point data of the target river channel, attribute data of the water surface area is generated, including shape and width data, and the submergence height is predicted based on the historical inundation data, and river channel inundation preview is performed to avoid manual drawing of the river channel shape.

Benefits of technology

It improves the efficiency and accuracy of the submersion rehearsal, enhances the authenticity of the submergence process, and reduces manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568838A
    Figure CN118568838A
Patent Text Reader

Abstract

The invention discloses a riverway submerging rehearsal method and device, a storage medium and electronic equipment. Relates to the technical field of data source processing, and the method comprises the steps that attribute data of a patch area corresponding to a water surface is generated according to terrain point location data of a target river channel, and the attribute data at least comprises shape data and width data of the patch area corresponding to the water surface; according to historical submerging data of the target river channel, determining a predicted submerging height of a patch region corresponding to the water surface; and performing riverway submerging rehearsal according to the attribute data and the predicted submerging height to obtain a rehearsal result. According to the method and the device, the problem that the riverway submerging rehearsal is relatively low in efficiency due to the fact that the riverway submerging rehearsal is realized by manually drawing the shape of the riverway in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method and device for previewing river flooding, a storage medium and an electronic device. Background Art

[0002] Hydrological monitoring is an important part of hydrological work and is of great significance to water conservancy planning, water project construction management, flood prevention and early warning, and water resources management and protection. In the study of basin hydrology, it is also particularly important to simulate and analyze the basin. In the existing technology, the generation and flooding preview of digital basins are based on the customer only providing part of the water level height information of the central section of the river and the corresponding longitude and latitude of the section, as well as the relevant partial oblique photography data. The shape of the river is directly drawn manually by manpower, and then a single facet is lifted to show the flooding situation. However, this method has the problem of low efficiency of flooding preview.

[0003] With regard to the problem that the river flooding preview is realized by artificially drawing the shape of the river in the related technology, which leads to low efficiency of the river flooding preview, no effective solution has been proposed yet. Summary of the invention

[0004] The main purpose of the present application is to provide a method and device for previewing river flooding, a storage medium and an electronic device, so as to solve the problem in the related art that river flooding preview is achieved by manually drawing the shape of the river, resulting in low efficiency of river flooding preview.

[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for previewing river channel flooding is provided. The method comprises: generating attribute data of a patch area corresponding to a water surface based on topographic point data of a target river channel, wherein the attribute data at least includes shape data and width data of the patch area corresponding to the water surface; determining the predicted flooding height of the patch area corresponding to the water surface based on historical flooding data of the target river channel; and performing a river channel flooding preview based on the attribute data and the predicted flooding height to obtain a preview result.

[0006] Furthermore, based on the terrain point data of the target river channel, generating attribute data of the patch area corresponding to the water surface includes: determining target path data of the water surface based on the terrain point data of the target river channel; determining width data of the water surface based on the terrain point data of the target river channel; generating the patch area corresponding to the water surface based on the target path data of the water surface and the width data of the water surface; generating the attribute data based on the patch area corresponding to the water surface.

[0007] Furthermore, based on the terrain point data of the target river channel, determining the target path data of the water surface includes: performing coordinate conversion on the longitude and latitude in the terrain point data of the target river channel to obtain a target coordinate set; connecting the coordinate points in the target coordinate set to obtain initial path data of the water surface; and determining the target path data based on the image data of the target river channel and the initial path data.

[0008] Furthermore, determining the target path data based on the image data of the target river channel and the initial path data includes: when the data amount of the terrain point data does not meet the preset requirements, interpolating the initial path data to obtain processed initial path data; determining the deviation position in the processed initial path data based on the image data of the target river channel; and interpolating the processed initial path data based on the deviation position to obtain the target path data.

[0009] Furthermore, determining the width data of the water surface based on the terrain point data of the target river channel includes: for any two adjacent points in the terrain point data, determining the angle bisector between the adjacent points; constructing a ray based on the angle bisector, and determining the initial width data corresponding to the adjacent points based on the intersection of the ray and the riverbed model corresponding to the target river channel; and determining the width data of the water surface based on the initial width data.

[0010] Furthermore, based on the target path data of the water surface and the width data of the water surface, generating a patch area corresponding to the water surface includes: for each point in the terrain point data, determining the normal of the point; performing calculations based on the normal and the target vector to obtain an extrusion direction of the water surface, wherein the target vector is a line connecting the point and its adjacent points; and generating a patch area corresponding to the water surface based on the extrusion direction, the target path data of the water surface and the width data of the water surface.

[0011] Furthermore, determining the predicted inundation height of the patch area corresponding to the water surface based on the historical inundation data of the target river channel includes: determining a first predicted inundation height corresponding to the terrain point data based on the historical inundation data of the target river channel; determining a second predicted inundation height of a target coordinate point in the target path data based on the first predicted inundation height, wherein the target coordinate point is a coordinate point for which no predicted inundation height exists; determining the predicted inundation height of the patch area corresponding to the water surface based on the first predicted inundation height and the second predicted inundation height.

[0012] Further, determining the second predicted flooding height of the target coordinate point in the target path data based on the first predicted flooding height includes: determining a first coordinate point and a second coordinate point adjacent to the target coordinate point, and determining a first predicted flooding height corresponding to the first coordinate point and a first predicted flooding height corresponding to the second coordinate point from the first predicted flooding height; calculating a first distance value between the target coordinate point and the first coordinate point and calculating a second distance value between the target coordinate point and the second coordinate point; determining the second predicted flooding height of the target coordinate point based on the first predicted flooding height corresponding to the first coordinate point, the first predicted flooding height corresponding to the second coordinate point, the first distance value, and the second distance value.

[0013] Furthermore, when performing a river flooding preview based on the attribute data and the predicted flooding height, the method also includes: rendering a patch area corresponding to the water surface during the river flooding preview to obtain a black-and-white image; performing calculations based on the black-and-white image to obtain a gradient amplitude corresponding to the patch area corresponding to the water surface; and outlining the patch area corresponding to the water surface based on the gradient amplitude to obtain edge information of the patch area corresponding to the water surface.

[0014] Furthermore, calculation is performed based on the black-and-white image to obtain the gradient amplitude corresponding to the patch area corresponding to the water surface, including: calculating the black-and-white image through a first convolution kernel in the horizontal direction of an edge detection operator to obtain a horizontal gradient value; calculating the black-and-white image through a second convolution kernel in the vertical direction of an edge detection operator to obtain a vertical gradient value; and calculating based on the horizontal gradient value and the vertical gradient value to obtain the gradient amplitude corresponding to the patch area corresponding to the water surface.

[0015] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a preview device for river channel flooding is provided. The device comprises: a generating unit, which is used to generate attribute data of a patch area corresponding to the water surface according to the topographic point data of the target river channel, wherein the attribute data at least includes shape data and width data of the patch area corresponding to the water surface; a determining unit, which is used to determine the predicted flooding height of the patch area corresponding to the water surface according to the historical flooding data of the target river channel; and a preview unit, which is used to perform river channel flooding preview according to the attribute data and the predicted flooding height to obtain a preview result.

[0016] Furthermore, the generation unit includes: a first determination subunit, used to determine target path data of the water surface based on the terrain point data of the target river channel; a second determination subunit, used to determine width data of the water surface based on the terrain point data of the target river channel; a first generation subunit, used to generate a patch area corresponding to the water surface based on the target path data of the water surface and the width data of the water surface; and a second generation subunit, used to generate the attribute data based on the patch area corresponding to the water surface.

[0017] Furthermore, the first determination subunit includes: a conversion module, used to perform coordinate conversion on the longitude and latitude in the terrain point data of the target river channel to obtain a target coordinate set; a connection module, used to connect the coordinate points in the target coordinate set to obtain the initial path data of the water surface; a first determination module, used to determine the target path data based on the image data of the target river channel and the initial path data.

[0018] Furthermore, the first determination module includes: a first interpolation submodule, used to interpolate the initial path data to obtain processed initial path data when the data amount of the terrain point data does not meet the preset requirements; a determination submodule, used to determine the deviation position in the processed initial path data based on the image data of the target river channel; and a second interpolation submodule, used to interpolate the processed initial path data based on the deviation position to obtain the target path data.

[0019] Furthermore, the second determination subunit includes: a second determination module, used to determine the angle bisector between any two adjacent points in the terrain point data; a third determination module, used to construct a ray based on the angle bisector, and determine the initial width data corresponding to the adjacent points based on the intersection of the ray and the riverbed model corresponding to the target river channel; a fourth determination module, used to determine the width data of the water surface based on the initial width data.

[0020] Furthermore, the first generating subunit includes: a fifth determination module, used to determine the normal of each point in the terrain point data; a first calculation module, used to calculate based on the normal and the target vector to obtain the extrusion direction of the water surface, wherein the target vector is the line between the point and the adjacent point of the point; a generation module, used to generate a patch area corresponding to the water surface based on the extrusion direction, the target path data of the water surface and the width data of the water surface.

[0021] Furthermore, the determination unit includes: a third determination subunit, used to determine a first predicted flooding height corresponding to the terrain point data based on the historical flooding data of the target river channel; a fourth determination subunit, used to determine a second predicted flooding height of a target coordinate point in the target path data based on the first predicted flooding height, wherein the target coordinate point is a coordinate point for which no predicted flooding height exists; and a fifth determination subunit, used to determine a predicted flooding height of a patch area corresponding to the water surface based on the first predicted flooding height and the second predicted flooding height.

[0022] Further, the fourth determination subunit includes: a sixth determination module, used to determine a first coordinate point and a second coordinate point adjacent to the target coordinate point, and determine a first predicted flooding height corresponding to the first coordinate point and a first predicted flooding height corresponding to the second coordinate point from the first predicted flooding height; a second calculation module, used to calculate a first distance value between the target coordinate point and the first coordinate point and to calculate a second distance value between the target coordinate point and the second coordinate point; a seventh determination module, used to determine the second predicted flooding height of the target coordinate point based on the first predicted flooding height corresponding to the first coordinate point, the first predicted flooding height corresponding to the second coordinate point, the first distance value and the second distance value.

[0023] Furthermore, the device also includes: a rendering unit, which is used to render the patch area corresponding to the water surface during the river flooding preview according to the attribute data and the predicted flooding height to obtain a black and white image; a calculation unit, which is used to calculate according to the black and white image to obtain the gradient amplitude corresponding to the patch area corresponding to the water surface; and a stroking unit, which is used to stroke the patch area corresponding to the water surface according to the gradient amplitude to obtain edge information of the patch area corresponding to the water surface.

[0024] Furthermore, the calculation unit includes: a first calculation subunit, used to calculate the black and white image through a first convolution kernel in the horizontal direction of an edge detection operator to obtain a horizontal gradient value; a second calculation subunit, used to calculate the black and white image through a second convolution kernel in the vertical direction of an edge detection operator to obtain a vertical gradient value; a third calculation subunit, used to calculate based on the horizontal gradient value and the vertical gradient value to obtain the gradient amplitude corresponding to the patch area corresponding to the water surface.

[0025] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a computer-readable storage medium is provided, wherein the storage medium stores a program, wherein when the program is running, the device where the storage medium is located is controlled to execute any one of the above-mentioned river flooding rehearsal methods.

[0026] In order to achieve the above-mentioned purpose, according to another aspect of the present application, an electronic device is also provided, the electronic device includes one or more processors and a memory, and the memory is used to store the one or more processors to implement any one of the above-mentioned river flooding preview methods.

[0027] Through this application, the following steps are adopted: based on the topographic point data of the target river channel, the attribute data of the patch area corresponding to the water surface is generated, wherein the attribute data at least includes the shape data and width data of the patch area corresponding to the water surface; based on the historical flooding data of the target river channel, the predicted flooding height of the patch area corresponding to the water surface is determined; based on the attribute data and the predicted flooding height, the river channel flooding preview is performed to obtain the preview result, which solves the problem that the river channel flooding preview is achieved by manually drawing the shape of the river channel in the related technology, resulting in the relatively low efficiency of the river channel flooding preview. In this scheme, the shape data and width data of the patch area corresponding to the water surface can be generated based on the topographic point data of the target river channel, and the predicted flooding height of the patch area corresponding to the water surface can be inferred based on the historical flooding data of the target river channel. Finally, the river channel flooding preview is performed based on the shape data, width data and predicted flooding height of the patch area, avoiding the artificial drawing of the river channel shape, and determining the predicted flooding data based on the historical flooding data, thereby achieving the effect of improving the authenticity of the flooding process. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0029] Figure 1 The process of the river flooding preview method provided in the embodiment of the present application is as follows Figure 1 ;

[0030] Figure 2 is a schematic diagram of a patch area corresponding to a water surface provided in an embodiment of the present application;

[0031] Figure 3 This is a schematic diagram of a black and white image provided according to an embodiment of the present application. Figure 1 ;

[0032] Figure 4 This is a schematic diagram of a black and white image provided according to an embodiment of the present application. Figure 2 ;

[0033] Figure 5 The process of the river flooding preview method provided in the embodiment of the present application is as follows Figure 2 ;

[0034] Figure 6is a schematic diagram of a river flooding rehearsal device provided according to an embodiment of the present application;

[0035] Figure 7 is a schematic diagram of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0036] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0037] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0038] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0039] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. For example, an interface is set between this system and the relevant user or organization. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.

[0040] The present invention is described below in conjunction with preferred implementation steps. Figure 1 The process of the river flooding preview method provided in the embodiment of the present application is as follows Figure 1 ,like Figure 1 As shown, the method comprises the following steps:

[0041] Step S101 , generating attribute data of a patch area corresponding to a water surface according to terrain point data of a target river channel, wherein the attribute data at least includes shape data and width data of the patch area corresponding to the water surface.

[0042] Optionally, terrain point data of the target river channel is collected. It should be noted that the terrain point data can be the cross-sectional longitude and latitude data of the target river channel. The shape data and width data of the water surface patch (i.e., the patch area corresponding to the above-mentioned water surface) in the river channel can be quickly generated through the real terrain point data of the river channel.

[0043] Step S102, determining the predicted flooding height of the patch area corresponding to the water surface based on the historical flooding data of the target river channel.

[0044] Optionally, the flooding height information of the river section of the target river channel (i.e., the historical flooding data) is collected from the hydrological data measurement point, and the predicted flooding height of the patch area corresponding to the water surface is obtained by analyzing the flooding height information of the river section. For example, the predicted flooding height of the patch area corresponding to the current water surface can be determined by comparing and analyzing the time, climate and other information corresponding to the historical flooding data with the current environmental conditions. For example, a deep learning model can also be used to learn based on historical flooding data to predict the predicted flooding height of the patch area corresponding to the current water surface.

[0045] Step S103, performing a river channel flooding preview based on the attribute data and the predicted flooding height to obtain a preview result.

[0046] Optionally, after obtaining the shape data and width data of the water surface patch in the above-mentioned river channel (ie, the patch area corresponding to the above-mentioned water surface) and the predicted flooding height, a river channel flooding preview is performed based on these data to obtain a preview result.

[0047] To summarize, in this scheme, the shape data and width data of the patch area corresponding to the water surface can be generated according to the terrain point data of the target river channel, and the predicted inundation height of the patch area corresponding to the water surface can be inferred according to the historical inundation data of the target river channel. Finally, the river channel inundation is previewed based on the shape data, width data and predicted inundation height of the patch area, thereby avoiding the need to draw the shape of the river channel artificially and determining the predicted inundation data based on the historical inundation data, thereby achieving the effect of improving the authenticity of the inundation process.

[0048] Optionally, in the preview method of river flooding provided in an embodiment of the present application, generating attribute data of a patch area corresponding to the water surface based on the terrain point data of the target river channel includes: determining target path data of the water surface based on the terrain point data of the target river channel; determining width data of the water surface based on the terrain point data of the target river channel; generating a patch area corresponding to the water surface based on the target path data and the width data of the water surface; and generating attribute data based on the patch area corresponding to the water surface.

[0049] In an optional embodiment, the following steps are used to generate shape data and width data of a water surface patch (i.e., the patch area corresponding to the water surface mentioned above): the target path data of the water surface is obtained through the terrain point data of the target river channel, i.e., the longitude and latitude data of the target river channel section. For example, the points corresponding to the longitude and latitude data of the target river channel section are connected in sequence to obtain the above-mentioned target path data.

[0050] Then, the width data of the water surface is determined according to the topographic point data of the target river channel. For example, a ray is constructed according to the points in the point data, and the width data of the water surface is determined by the intersection of the ray and the riverbed in the river channel. A water surface patch (i.e., the patch area corresponding to the water surface mentioned above) is generated through the target path data of the water surface and the width data of the water surface. Finally, the shape data and width data (i.e., the attribute data mentioned above) are generated through the patch area corresponding to the water surface.

[0051] The terrain point data of the river channel can be used to accurately simulate the shape data and width data of the patch area corresponding to the water surface, thereby improving the accuracy of subsequent river channel flooding preview.

[0052] Optionally, in the preview method of river flooding provided in an embodiment of the present application, determining the target path data of the water surface based on the terrain point data of the target river includes: performing coordinate conversion on the longitude and latitude in the terrain point data of the target river to obtain a target coordinate set; connecting the coordinate points in the target coordinate set to obtain initial path data of the water surface; and determining the target path data based on the image data and the initial path data of the target river.

[0053] In an optional embodiment, the following steps are used to determine the target path data of the water surface in the target river: first, the coordinates of the terrain point data of the target river are converted. For example, the longitude and latitude in the terrain point data are converted into spherical coordinates. The spherical coordinates help to process the corresponding path data on the web side and perform river flooding preview.

[0054] Then, the points after coordinate conversion (i.e., the coordinate points in the above target coordinate set) are connected in sequence to obtain an initial path data. In order to improve the accuracy of the path data, the actual shape of the river in the river image can be interpolated during the water surface shape generation process to further refine the accuracy of the water surface path.

[0055] Through the above steps, the target path data of the water surface can be quickly obtained, and the initial path data can be corrected by the image data of the target river channel, thereby improving the accuracy of the target path data.

[0056] Optionally, in the preview method of river flooding provided in an embodiment of the present application, determining the target path data based on the image data and initial path data of the target river includes: when the data amount of the terrain point data does not meet the preset requirements, interpolating the initial path data to obtain processed initial path data; determining the deviation position in the processed initial path data based on the image data of the target river; and interpolating the processed initial path data based on the deviation position to obtain the target path data.

[0057] In an optional embodiment, when determining the target path data based on the image data and initial path data of the target river channel, the following steps are also included: since the data volume of the terrain point data is limited, it is necessary to determine whether the data volume of the terrain point data meets the preset requirements, that is, to determine whether the data volume of the terrain point data is greater than the preset threshold. If it is greater than the preset threshold, it is considered that the data volume of the terrain point data meets the preset requirements; if it is less than the preset threshold, it is considered that the data volume of the terrain point data does not meet the preset requirements.

[0058] If the amount of terrain point data does not meet the preset requirements, the initial path data needs to be interpolated according to the shape of the target river to obtain the processed initial path data. After obtaining the processed initial path data, observe the deviation between the path shape generated by the river terrain data and the shape displayed by the river image. Then set the point with large deviation as the interpolation point, perform interpolation processing on the interpolation point, and then obtain the final target path data.

[0059] By interpolating the initial path data, the accuracy of the target path data is improved.

[0060] Optionally, in the preview method of river flooding provided in an embodiment of the present application, determining the width data of the water surface based on the terrain point data of the target river includes: for any two adjacent points in the terrain point data, determining the angle bisector between the adjacent points; constructing a ray based on the angle bisector, and determining the initial width data corresponding to the adjacent points based on the intersection of the ray and the riverbed model corresponding to the target river; and determining the width data of the water surface based on the initial width data.

[0061] In an optional embodiment, the following steps are used to determine the width data of the water surface: the angle bisector between the previous point and the next point (i.e., any adjacent point mentioned above) is calculated through the points of the river shape, a ray is created based on the angle bisector, and the distance is calculated as the width of the river by calculating the intersection of the ray and the riverbed model corresponding to the target river. For example, the direction vector obtained by subtracting the spherical coordinates of the previous point from the spherical coordinates of the next point is converted into a unit vector, the above-mentioned angle bisector is determined through two adjacent unit vectors, a ray is created based on the direction of the angle bisector, the intersection of the ray and the riverbed model corresponding to the target river is detected, the current water surface width is calculated based on the intersection point, and the above-mentioned initial width data is obtained, and finally the water surface width data is determined based on the initial width data.

[0062] It should be noted that multiple initial width data will be obtained based on the calculation between two adjacent points. In order to improve the accuracy of the data, the final water surface width data can be obtained by averaging the multiple initial width data, or the largest initial width data can be selected from the multiple initial width data, and then the initial width data can be appropriately widened to obtain the above-mentioned water surface width data.

[0063] The above-mentioned water surface width data can be accurately and quickly obtained through the intersection of the angle bisector and the riverbed model.

[0064] Optionally, in the preview method of river flooding provided in an embodiment of the present application, generating a patch area corresponding to the water surface based on target path data of the water surface and width data of the water surface includes: for each point in the terrain point data, determining the normal of the point; calculating based on the normal and the target vector to obtain the extrusion direction of the water surface, wherein the target vector is a line connecting the points and the adjacent points of the points; generating a patch area corresponding to the water surface based on the extrusion direction, the target path data of the water surface and the width data of the water surface.

[0065] In an optional embodiment, the patch area corresponding to the water surface is generated by the target path data of the water surface and the width data of the water surface, including the following steps: for each point in the terrain point data, the normal of the point is determined, and then the vector of the next connection (i.e., the target vector mentioned above) is determined, and the extrusion direction of the water surface is obtained by cross-product calculation of the normal and the target vector, and the patch area corresponding to the water surface is generated according to the extrusion direction and the opposite direction of the extrusion direction and the width data of the water surface. In an optional embodiment, the schematic diagram of the patch area corresponding to the water surface is as follows: Figure 2 As shown, Figure 2 The dotted line in is the target path on the water surface. Figure 2 The arrow in the figure is the extrusion direction mentioned above.

[0066] The patch area corresponding to the water surface can be quickly generated through the extrusion direction and the width data of the water surface.

[0067] Optionally, in the preview method of river flooding provided in an embodiment of the present application, determining the predicted flooding height of the patch area corresponding to the water surface based on the historical flooding data of the target river includes: determining a first predicted flooding height corresponding to the terrain point data based on the historical flooding data of the target river; determining a second predicted flooding height of a target coordinate point in the target path data based on the first predicted flooding height, wherein the target coordinate point is a coordinate point for which no predicted flooding height exists; determining the predicted flooding height of the patch area corresponding to the water surface based on the first predicted flooding height and the second predicted flooding height.

[0068] In an optional embodiment, in order to improve the accuracy of the river channel flooding preview, the following steps are used to obtain the predicted flooding height of the patch area corresponding to the water surface: First, the first predicted flooding height corresponding to each point in the terrain point data is obtained by analyzing the historical flooding data of the target river channel. Then, according to the first predicted flooding heights corresponding to these points, coordinate points without predicted flooding heights are determined from the target path data. These coordinate points are additionally inserted to form the shape of the water patch more accurately.

[0069] After determining the target coordinate point, the predicted flooding height data corresponding to the target coordinate point is determined according to the first predicted flooding height (i.e., the second predicted flooding height). Finally, the predicted flooding height of the patch area corresponding to the water surface is determined by the first predicted flooding height and the second predicted flooding height.

[0070] Through historical inundation data, the inundation height corresponding to each point in the terrain point data can be accurately analyzed and the accuracy of subsequent river inundation preview can be improved.

[0071] Optionally, in the preview method of river flooding provided in an embodiment of the present application, determining the second predicted flooding height of the target coordinate point in the target path data based on the first predicted flooding height includes: determining the first coordinate point and the second coordinate point adjacent to the target coordinate point, and determining the first predicted flooding height corresponding to the first coordinate point and the first predicted flooding height corresponding to the second coordinate point from the first predicted flooding height; calculating the first distance value between the target coordinate point and the first coordinate point and calculating the second distance value between the target coordinate point and the second coordinate point; determining the second predicted flooding height of the target coordinate point based on the first predicted flooding height corresponding to the first coordinate point, the first predicted flooding height corresponding to the second coordinate point, the first distance value, and the second distance value.

[0072] In an optional embodiment, in order to improve the rationality of the second predicted flooding height of the target coordinate point, it is calculated by the following steps: determine two points adjacent to the target coordinate point, namely the first coordinate point and the second coordinate point mentioned above, and then determine the first predicted flooding height corresponding to the first coordinate point and the first predicted flooding height corresponding to the second coordinate point. Calculate the first distance value between the target coordinate point and the first coordinate point and the second distance value between the target coordinate point and the second coordinate point, and finally, calculate the second predicted flooding height of the target coordinate point according to the first predicted flooding height corresponding to the first coordinate point, the first predicted flooding height corresponding to the second coordinate point, the first distance value and the second distance value. For example, calculate the distance ratio from the target coordinate point to the two endpoints (namely the first coordinate point and the second coordinate point mentioned above), and use the distance ratio and the first predicted flooding height corresponding to the first coordinate point and the first predicted flooding height corresponding to the second coordinate point to calculate the second predicted flooding height.

[0073] The flooding height of the target coordinate point is calculated through two points adjacent to the target coordinate point, thereby improving the rationality and accuracy of the calculated flooding height.

[0074] Optionally, in the river flooding preview method provided in an embodiment of the present application, when performing river flooding preview based on attribute data and predicted flooding height, the method also includes: rendering the patch area corresponding to the water surface during the river flooding preview to obtain a black and white image; performing calculations based on the black and white image to obtain the gradient amplitude corresponding to the patch area corresponding to the water surface; and outlining the patch area corresponding to the water surface based on the gradient amplitude to obtain edge information of the patch area corresponding to the water surface.

[0075] In an optional embodiment, river flooding preview is performed through attribute data and predicted flooding height. For example, the position data of the attribute in geometry (which can be understood as the above-mentioned water surface shape) is dynamically changed through js, or according to the distance of the river, the relevant UV information (parameter information used to characterize the flooding height) is written into the vertex information of the water surface geometry, and a shader is written to realize the river flooding preview by reading the UV information.

[0076] In order to more clearly show the flooding of the water surface, when performing the river flooding preview, the surface area corresponding to the water surface is stroked. First, the surface area corresponding to the water surface during the river flooding preview is rendered, and a single black and white layer with depth information is rendered. For example, Figure 3The black and white layer is rendered into a black and white mask, and the black and white mask is applied to the interface corresponding to the river flooding preview. Then the black and white image is calculated to obtain the gradient amplitude corresponding to the patch area corresponding to the water surface. Finally, the gradient amplitude is used to stroke the patch area corresponding to the water surface to obtain the edge information of the patch area corresponding to the water surface. For example, Figure 4 The black and white image after the stroke is shown. Figure 4 The gray edge in the figure is the edge information of the patch area corresponding to the water surface.

[0077] Based on the real-time rendering of the river water surface piece based on the dynamic uplift and flooding process of the water surface, the outline of the water flooding boundary can be dynamically updated, thereby showing the water flooding boundary more clearly.

[0078] Optionally, in the preview method of river flooding provided in an embodiment of the present application, calculation is performed based on the black-and-white image to obtain the gradient amplitude corresponding to the patch area corresponding to the water surface, including: calculating the black-and-white image through the first convolution kernel in the horizontal direction of the edge detection operator to obtain the horizontal gradient value; calculating the black-and-white image through the second convolution kernel in the vertical direction of the edge detection operator to obtain the vertical gradient value; calculating based on the horizontal gradient value and the vertical gradient value to obtain the gradient amplitude corresponding to the patch area corresponding to the water surface.

[0079] In an optional embodiment, the following steps are used to calculate the gradient amplitude corresponding to the patch area corresponding to the water surface: using the convolution kernel of the sobel operator (i.e., the edge detection operator mentioned above), the horizontal and vertical gradients are calculated based on the RGB values ​​of the black and white image, and the gradient amplitude is calculated based on the horizontal and vertical gradients. The horizontal and vertical gradient convolution kernels are as follows:

[0080]

[0081] Among them, Gx is the convolution kernel used to calculate the horizontal gradient (i.e., the first convolution kernel mentioned above), and Gy is the convolution kernel used to calculate the vertical gradient (i.e., the second convolution kernel mentioned above). The values ​​of these convolution kernels are derived from the gradient calculation formula of the Sobel operator. The calculation of the gradient value is obtained by performing a convolution operation on the image. The calculation of the horizontal gradient Gx involves the horizontal change of pixels in the image, while the calculation of the vertical gradient Gy involves the vertical change of pixels in the image.

[0082] The black and white image is calculated by the first convolution kernel to obtain the horizontal gradient value, and the black and white image is calculated by the second convolution kernel to obtain the vertical gradient value. According to the horizontal gradient value and the vertical gradient value, the gradient amplitude corresponding to the patch area corresponding to the water surface is calculated. For example, the following formula is used The above gradient amplitude is obtained by calculation. The Sobel operator can detect the edge in the image, that is, the place where the gray value changes significantly in the image, and the place with a larger gradient value may be the edge.

[0083] In an optional embodiment, the gradient amplitude threshold G1 can be set to determine whether the gradient amplitude G is greater than the threshold G1. If it is greater than the threshold, the pixels in the rendering area are set to the stroke color (for example, blue), otherwise the original color is maintained. By generating a stroke of the water surface, the submerged area of ​​the water can be better seen.

[0084] Compared with the method in the prior art of dynamically subdividing the water surface grid through the corresponding fluid plug-in and then combining it with the physical engine to realize the dynamic flooding of water, the river flooding preview method provided by the present application does not require the download of a bulky installation package and the performance requirements of the graphics card and CPU are not high. Therefore, the lightweight generation of water surface sheets is realized on the web side, the generation efficiency of water surface sheets is improved, the resource occupation is reduced and the dynamic release of memory can be realized.

[0085] In an optional embodiment, the Figure 5 The flowchart shown realizes the river flooding preview; Step S501: Generate a water surface sheet. The shape of the water surface sheet is generated according to the river terrain point data (cross-section longitude and latitude data).

[0086] Step S502: Obtain water surface width data. Calculate the angle bisector between the previous point and the next point through the points of the river shape, create a ray based on the angle bisector, and calculate the distance as the width of the river by calculating the intersection of the ray and the river model. Obtain river width data (maximum width data) based on the river shape, and adjust the width of the water patch to be slightly wider than the river.

[0087] Step S503: Acquire height data. Determine the flooding height data of the water surface slice according to the historical flooding height information (generally in meters) of the river section provided by the customer.

[0088] Step S504: terrain interpolation and calculation of flood height data of interpolation points.

[0089] Determine whether the amount of river terrain data meets the requirements for creating the river shape. If not, insert the corresponding section point value into the river terrain according to the river shape, calculate the distance ratio of the section point to the adjacent original section point data, and calculate the water elevation height of the insertion point in combination with the water level height of the original section point.

[0090] Step S505: Water surface lifting: According to the calculated flooding height data, the vertex data of the river water surface piece is adjusted to achieve dynamic lifting.

[0091] Step S506: Rendering the stroke. Select the stroke of the water surface separately and render a black and white layer with depth information separately. Compare the depth information and render the black and white layer into a black and white mask. Apply the black and white mask to the screen and use the convolution kernel of the Sobel algorithm operator to draw the stroke boundary of the mask to achieve real-time rendering of the submerged boundary.

[0092] The method for previewing river flooding provided in the embodiment of the present application generates attribute data of a patch area corresponding to the water surface according to the topographic point data of the target river, wherein the attribute data at least includes shape data and width data of the patch area corresponding to the water surface; determines the predicted flooding height of the patch area corresponding to the water surface according to the historical flooding data of the target river; performs river flooding preview according to the attribute data and the predicted flooding height to obtain a preview result, thereby solving the problem that the river flooding preview is achieved by manually drawing the shape of the river in the related art, resulting in a relatively low efficiency of the river flooding preview. In this scheme, the shape data and width data of the patch area corresponding to the water surface can be generated according to the topographic point data of the target river, and the predicted flooding height of the patch area corresponding to the water surface can be inferred according to the historical flooding data of the target river. Finally, the river flooding preview is performed according to the shape data, width data and predicted flooding height of the patch area, thereby avoiding the need to manually draw the shape of the river, and determining the predicted flooding data according to the historical flooding data, thereby achieving the effect of improving the authenticity of the flooding process.

[0093] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0094] The embodiment of the present application also provides a preview device for river flooding. It should be noted that the preview device for river flooding in the embodiment of the present application can be used to execute the preview method for river flooding provided in the embodiment of the present application. The preview device for river flooding provided in the embodiment of the present application is introduced below.

[0095] Figure 6 Schematic diagram of a river flooding rehearsal device according to an embodiment of the present application. Figure 6 As shown, the device includes: a generating unit 601, a determining unit 602 and a preview unit 603.

[0096] A generating unit 601 is used to generate attribute data of a patch area corresponding to a water surface according to the topographic point data of a target river channel, wherein the attribute data at least includes shape data and width data of the patch area corresponding to the water surface;

[0097] A determination unit 602 is used to determine the predicted flooding height of the patch area corresponding to the water surface according to the historical flooding data of the target river channel;

[0098] The preview unit 603 is used to perform river channel flooding preview based on the attribute data and the predicted flooding height to obtain a preview result.

[0099] The preview device for river flooding provided in the embodiment of the present application generates attribute data of the patch area corresponding to the water surface according to the topographic point data of the target river through the generating unit 601, wherein the attribute data at least includes the shape data and width data of the patch area corresponding to the water surface; the determining unit 602 determines the predicted flooding height of the patch area corresponding to the water surface according to the historical flooding data of the target river; the preview unit 603 performs river flooding preview according to the attribute data and the predicted flooding height to obtain the preview result, which solves the problem that the river flooding preview is realized by manually drawing the shape of the river in the related art, resulting in the low efficiency of the river flooding preview. In this scheme, the shape data and width data of the patch area corresponding to the water surface can be generated according to the topographic point data of the target river, and the predicted flooding height of the patch area corresponding to the water surface can be inferred according to the historical flooding data of the target river, and finally the river flooding preview is performed according to the shape data, width data and predicted flooding height of the patch area, avoiding the artificial drawing of the shape of the river, and determining the predicted flooding data according to the historical flooding data, so as to achieve the effect of improving the authenticity of the flooding process.

[0100] Optionally, in the river flooding rehearsal device provided in the embodiment of the present application, the generation unit includes: a first determination subunit, used to determine target path data of the water surface based on the terrain point data of the target river channel; a second determination subunit, used to determine width data of the water surface based on the terrain point data of the target river channel; a first generation subunit, used to generate a patch area corresponding to the water surface based on the target path data of the water surface and the width data of the water surface; and a second generation subunit, used to generate attribute data based on the patch area corresponding to the water surface.

[0101] Optionally, in the river flooding rehearsal device provided in an embodiment of the present application, the first determination subunit includes: a conversion module, used to perform coordinate conversion on the longitude and latitude in the terrain point data of the target river to obtain a target coordinate set; a connection module, used to connect the coordinate points in the target coordinate set to obtain initial path data of the water surface; a first determination module, used to determine the target path data based on the image data and initial path data of the target river.

[0102] Optionally, in the river flooding rehearsal device provided in the embodiment of the present application, the first determination module includes: a first interpolation sub-module, used to interpolate the initial path data to obtain processed initial path data when the data amount of the terrain point data does not meet the preset requirements; a determination sub-module, used to determine the deviation position in the processed initial path data based on the image data of the target river; and a second interpolation sub-module, used to interpolate the processed initial path data based on the deviation position to obtain target path data.

[0103] Optionally, in the river flooding rehearsal device provided in the embodiment of the present application, the second determination subunit includes: a second determination module, used to determine the angle bisector between any two adjacent points in the terrain point data; a third determination module, used to construct a ray based on the angle bisector, and determine the initial width data corresponding to the adjacent points based on the intersection of the ray and the riverbed model corresponding to the target river; a fourth determination module, used to determine the width data of the water surface based on the initial width data.

[0104] Optionally, in the river flooding rehearsal device provided in the embodiment of the present application, the first generating subunit includes: a fifth determination module, used to determine the normal of each point in the terrain point data; a first calculation module, used to calculate based on the normal and the target vector to obtain the extrusion direction of the water surface, wherein the target vector is the line between the point and the adjacent points of the point; a generation module, used to generate a patch area corresponding to the water surface based on the extrusion direction, the target path data of the water surface and the width data of the water surface.

[0105] Optionally, in the river flooding rehearsal device provided in an embodiment of the present application, the determination unit includes: a third determination subunit, used to determine a first predicted flooding height corresponding to the terrain point data based on the historical flooding data of the target river; a fourth determination subunit, used to determine a second predicted flooding height of a target coordinate point in the target path data based on the first predicted flooding height, wherein the target coordinate point is a coordinate point for which no predicted flooding height exists; and a fifth determination subunit, used to determine the predicted flooding height of a patch area corresponding to the water surface based on the first predicted flooding height and the second predicted flooding height.

[0106] Optionally, in the river flooding rehearsal device provided in the embodiment of the present application, the fourth determination subunit includes: a sixth determination module, used to determine the first coordinate point and the second coordinate point adjacent to the target coordinate point, and determine the first predicted flooding height corresponding to the first coordinate point and the first predicted flooding height corresponding to the second coordinate point from the first predicted flooding height; a second calculation module, used to calculate the first distance value between the target coordinate point and the first coordinate point and the second distance value between the target coordinate point and the second coordinate point; a seventh determination module, used to determine the second predicted flooding height of the target coordinate point based on the first predicted flooding height corresponding to the first coordinate point, the first predicted flooding height corresponding to the second coordinate point, the first distance value and the second distance value.

[0107] Optionally, in the river flooding preview device provided in the embodiment of the present application, the device also includes: a rendering unit, which is used to render the patch area corresponding to the water surface during the river flooding preview when the river flooding preview is performed based on the attribute data and the predicted flooding height, and obtain a black and white image; a calculation unit, which is used to calculate based on the black and white image to obtain the gradient amplitude corresponding to the patch area corresponding to the water surface; and a stroking unit, which is used to stroke the patch area corresponding to the water surface based on the gradient amplitude to obtain edge information of the patch area corresponding to the water surface.

[0108] Optionally, in the river flooding preview device provided in the embodiment of the present application, the calculation unit includes: a first calculation subunit, used to calculate the black and white image through the first convolution kernel in the horizontal direction of the edge detection operator to obtain the horizontal gradient value; a second calculation subunit, used to calculate the black and white image through the second convolution kernel in the vertical direction of the edge detection operator to obtain the vertical gradient value; a third calculation subunit, used to calculate based on the horizontal gradient value and the vertical gradient value to obtain the gradient amplitude corresponding to the patch area corresponding to the water surface.

[0109] The rehearsal device for river flooding includes a processor and a memory. The above-mentioned generation unit 601, determination unit 602 and rehearsal unit 603 are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.

[0110] The processor includes a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the accurate rehearsal of river flooding can be achieved by adjusting kernel parameters.

[0111] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0112] An embodiment of the present invention provides a computer-readable storage medium having a program stored thereon, and when the program is executed by a processor, a method for rehearsing river flooding is implemented.

[0113] An embodiment of the present invention provides a processor, which is used to run a program, wherein the program executes a preview method of river flooding when running.

[0114] like Figure 7 As shown, an embodiment of the present invention provides an electronic device, the device includes a processor, a memory and a program stored in the memory and executable on the processor, and the processor implements the following steps when executing the program: generating attribute data of a patch area corresponding to a water surface based on terrain point data of a target river channel, wherein the attribute data includes at least shape data and width data of the patch area corresponding to the water surface; determining a predicted flooding height of the patch area corresponding to the water surface based on historical flooding data of the target river channel; and performing a river channel flooding preview based on the attribute data and the predicted flooding height to obtain a preview result.

[0115] Optionally, generating attribute data of a patch area corresponding to the water surface based on the terrain point data of the target river channel includes: determining target path data of the water surface based on the terrain point data of the target river channel; determining width data of the water surface based on the terrain point data of the target river channel; generating a patch area corresponding to the water surface based on the target path data and the width data of the water surface; generating attribute data based on the patch area corresponding to the water surface.

[0116] Optionally, determining the target path data of the water surface based on the terrain point data of the target river channel includes: performing coordinate conversion on the longitude and latitude in the terrain point data of the target river channel to obtain a target coordinate set; connecting the coordinate points in the target coordinate set to obtain initial path data of the water surface; determining the target path data based on the image data and the initial path data of the target river channel.

[0117] Optionally, determining the target path data based on the image data and initial path data of the target river channel includes: when the data amount of the terrain point data does not meet the preset requirements, interpolating the initial path data to obtain processed initial path data; determining the deviation position in the processed initial path data based on the image data of the target river channel; and interpolating the processed initial path data based on the deviation position to obtain the target path data.

[0118] Optionally, determining the width data of the water surface based on the terrain point data of the target river channel includes: for any two adjacent points in the terrain point data, determining the angle bisector between the adjacent points; constructing a ray based on the angle bisector, and determining the initial width data corresponding to the adjacent points based on the intersection of the ray and the riverbed model corresponding to the target river channel; and determining the width data of the water surface based on the initial width data.

[0119] Optionally, based on the target path data of the water surface and the width data of the water surface, generating a patch area corresponding to the water surface includes: for each point in the terrain point data, determining the normal of the point; calculating based on the normal and the target vector to obtain the extrusion direction of the water surface, wherein the target vector is a line connecting the points and the adjacent points of the point; generating the patch area corresponding to the water surface based on the extrusion direction, the target path data of the water surface and the width data of the water surface.

[0120] Optionally, determining the predicted inundation height of the patch area corresponding to the water surface based on the historical inundation data of the target river channel includes: determining a first predicted inundation height corresponding to the terrain point data based on the historical inundation data of the target river channel; determining a second predicted inundation height of a target coordinate point in the target path data based on the first predicted inundation height, wherein the target coordinate point is a coordinate point for which no predicted inundation height exists; determining the predicted inundation height of the patch area corresponding to the water surface based on the first predicted inundation height and the second predicted inundation height.

[0121] Optionally, determining the second predicted flooding height of the target coordinate point in the target path data based on the first predicted flooding height includes: determining the first coordinate point and the second coordinate point adjacent to the target coordinate point, and determining the first predicted flooding height corresponding to the first coordinate point and the first predicted flooding height corresponding to the second coordinate point from the first predicted flooding height; calculating the first distance value between the target coordinate point and the first coordinate point and calculating the second distance value between the target coordinate point and the second coordinate point; determining the second predicted flooding height of the target coordinate point based on the first predicted flooding height corresponding to the first coordinate point, the first predicted flooding height corresponding to the second coordinate point, the first distance value and the second distance value.

[0122] Optionally, when performing a river flooding preview based on the attribute data and the predicted flooding height, the method also includes: rendering the patch area corresponding to the water surface during the river flooding preview to obtain a black and white image; performing calculations based on the black and white image to obtain a gradient amplitude corresponding to the patch area corresponding to the water surface; and outlining the patch area corresponding to the water surface based on the gradient amplitude to obtain edge information of the patch area corresponding to the water surface.

[0123] Optionally, calculation is performed based on the black-and-white image to obtain the gradient amplitude corresponding to the patch area corresponding to the water surface, including: calculating the black-and-white image through the first convolution kernel in the horizontal direction of the edge detection operator to obtain the horizontal gradient value; calculating the black-and-white image through the second convolution kernel in the vertical direction of the edge detection operator to obtain the vertical gradient value; calculating based on the horizontal gradient value and the vertical gradient value to obtain the gradient amplitude corresponding to the patch area corresponding to the water surface.

[0124] The devices in this article can be servers, PCs, PADs, mobile phones, etc.

[0125] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having the following method steps: generating attribute data of a patch area corresponding to the water surface based on the terrain point data of the target river channel, wherein the attribute data at least includes shape data and width data of the patch area corresponding to the water surface; determining a predicted flooding height of the patch area corresponding to the water surface based on the historical flooding data of the target river channel; and performing a river channel flooding preview based on the attribute data and the predicted flooding height to obtain a preview result.

[0126] Optionally, generating attribute data of a patch area corresponding to the water surface based on the terrain point data of the target river channel includes: determining target path data of the water surface based on the terrain point data of the target river channel; determining width data of the water surface based on the terrain point data of the target river channel; generating a patch area corresponding to the water surface based on the target path data and the width data of the water surface; generating attribute data based on the patch area corresponding to the water surface.

[0127] Optionally, determining the target path data of the water surface based on the terrain point data of the target river channel includes: performing coordinate conversion on the longitude and latitude in the terrain point data of the target river channel to obtain a target coordinate set; connecting the coordinate points in the target coordinate set to obtain initial path data of the water surface; determining the target path data based on the image data and the initial path data of the target river channel.

[0128] Optionally, determining the target path data based on the image data and initial path data of the target river channel includes: when the data amount of the terrain point data does not meet the preset requirements, interpolating the initial path data to obtain processed initial path data; determining the deviation position in the processed initial path data based on the image data of the target river channel; and interpolating the processed initial path data based on the deviation position to obtain the target path data.

[0129] Optionally, determining the width data of the water surface based on the terrain point data of the target river channel includes: for any two adjacent points in the terrain point data, determining the angle bisector between the adjacent points; constructing a ray based on the angle bisector, and determining the initial width data corresponding to the adjacent points based on the intersection of the ray and the riverbed model corresponding to the target river channel; and determining the width data of the water surface based on the initial width data.

[0130] Optionally, based on the target path data of the water surface and the width data of the water surface, generating a patch area corresponding to the water surface includes: for each point in the terrain point data, determining the normal of the point; calculating based on the normal and the target vector to obtain the extrusion direction of the water surface, wherein the target vector is a line connecting the points and the adjacent points of the point; generating the patch area corresponding to the water surface based on the extrusion direction, the target path data of the water surface and the width data of the water surface.

[0131] Optionally, determining the predicted inundation height of the patch area corresponding to the water surface based on the historical inundation data of the target river channel includes: determining a first predicted inundation height corresponding to the terrain point data based on the historical inundation data of the target river channel; determining a second predicted inundation height of a target coordinate point in the target path data based on the first predicted inundation height, wherein the target coordinate point is a coordinate point for which no predicted inundation height exists; determining the predicted inundation height of the patch area corresponding to the water surface based on the first predicted inundation height and the second predicted inundation height.

[0132] Optionally, determining the second predicted flooding height of the target coordinate point in the target path data based on the first predicted flooding height includes: determining the first coordinate point and the second coordinate point adjacent to the target coordinate point, and determining the first predicted flooding height corresponding to the first coordinate point and the first predicted flooding height corresponding to the second coordinate point from the first predicted flooding height; calculating the first distance value between the target coordinate point and the first coordinate point and calculating the second distance value between the target coordinate point and the second coordinate point; determining the second predicted flooding height of the target coordinate point based on the first predicted flooding height corresponding to the first coordinate point, the first predicted flooding height corresponding to the second coordinate point, the first distance value and the second distance value.

[0133] Optionally, when performing a river flooding preview based on the attribute data and the predicted flooding height, the method also includes: rendering the patch area corresponding to the water surface during the river flooding preview to obtain a black and white image; performing calculations based on the black and white image to obtain a gradient amplitude corresponding to the patch area corresponding to the water surface; and outlining the patch area corresponding to the water surface based on the gradient amplitude to obtain edge information of the patch area corresponding to the water surface.

[0134] Optionally, calculation is performed based on the black-and-white image to obtain the gradient amplitude corresponding to the patch area corresponding to the water surface, including: calculating the black-and-white image through the first convolution kernel in the horizontal direction of the edge detection operator to obtain the horizontal gradient value; calculating the black-and-white image through the second convolution kernel in the vertical direction of the edge detection operator to obtain the vertical gradient value; calculating based on the horizontal gradient value and the vertical gradient value to obtain the gradient amplitude corresponding to the patch area corresponding to the water surface.

[0135] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0136] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0137] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0138] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0139] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0140] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0141] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0142] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0143] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0144] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A method for rehearsing river flooding, characterized in that: include: Generate attribute data of a patch area corresponding to the water surface according to the topographic point data of the target river channel, wherein the attribute data at least includes shape data and width data of the patch area corresponding to the water surface; Determining the predicted flooding height of the patch area corresponding to the water surface based on the historical flooding data of the target river channel; A river channel flooding preview is performed based on the attribute data and the predicted flooding height to obtain a preview result.

2. The method according to claim 1, characterized in that Based on the topographic point data of the target river channel, the attribute data of the patch area corresponding to the water surface is generated, including: Determining target path data on the water surface based on the topographic point data of the target river channel; Determining the width data of the water surface according to the topographic point data of the target river channel; Generating a patch area corresponding to the water surface according to the target path data of the water surface and the width data of the water surface; The attribute data is generated according to the patch area corresponding to the water surface.

3. The method according to claim 2, characterized in that Determining target path data of the water surface based on the topographic point data of the target river includes: Performing coordinate conversion on the longitude and latitude in the terrain point data of the target river channel to obtain a target coordinate set; The coordinate points in the target coordinate set are connected to obtain the initial path data of the water surface; and the target path data is determined based on the image data of the target river channel and the initial path data.

4. The method according to claim 3, characterized in that Determining the target path data according to the image data of the target river channel and the initial path data includes: When the amount of the terrain point data does not meet the preset requirements, interpolation processing is performed on the initial path data to obtain processed initial path data; Determining the deviation position in the processed initial path data according to the image data of the target river channel; The processed initial path data is interpolated according to the deviation position to obtain the target path data.

5. The method according to claim 2, characterized in that: Determining the width data of the water surface based on the topographic point data of the target river channel includes: For any two adjacent points in the terrain point data, determining an angle bisector between the adjacent points; Constructing a ray according to the angle bisector, and determining initial width data corresponding to the adjacent points according to the intersection of the ray and the riverbed model corresponding to the target river channel; The width data of the water surface is determined according to the initial width data.

6. The method according to claim 2, characterized in that Generating a patch area corresponding to the water surface according to the target path data of the water surface and the width data of the water surface includes: For each point in the terrain point data, determining a normal of the point; Calculating according to the normal and the target vector to obtain the extrusion direction of the water surface, wherein the target vector is a line connecting the point and an adjacent point of the point; A patch area corresponding to the water surface is generated according to the extrusion direction, the target path data of the water surface and the width data of the water surface.

7. The method according to claim 2, characterized in that Determining the predicted flood height of the patch area corresponding to the water surface based on the historical flood data of the target river channel includes: Determining a first predicted flooding height corresponding to the terrain point data based on the historical flooding data of the target river channel; Determining a second predicted flooding height of a target coordinate point in the target path data according to the first predicted flooding height, wherein the target coordinate point is a coordinate point for which no predicted flooding height exists; The predicted flooding height of the patch area corresponding to the water surface is determined according to the first predicted flooding height and the second predicted flooding height.

8. The method according to claim 7, characterized in that Determining a second predicted flooding height of the target coordinate point in the target path data according to the first predicted flooding height includes: Determine a first coordinate point and a second coordinate point adjacent to the target coordinate point, and determine a first predicted flooding height corresponding to the first coordinate point and a first predicted flooding height corresponding to the second coordinate point from the first predicted flooding height; Calculating a first distance value between the target coordinate point and the first coordinate point and calculating a second distance value between the target coordinate point and the second coordinate point; The second predicted flooding height of the target coordinate point is determined according to the first predicted flooding height corresponding to the first coordinate point, the first predicted flooding height corresponding to the second coordinate point, the first distance value, and the second distance value.

9. The method according to claim 1, characterized in that: When performing a river flooding preview based on the attribute data and the predicted flooding height, the method further includes: Render the patch area corresponding to the water surface during the river flooding preview to obtain a black and white image; Calculating according to the black and white image to obtain the gradient amplitude corresponding to the patch area corresponding to the water surface; The patch area corresponding to the water surface is outlined according to the gradient amplitude to obtain edge information of the patch area corresponding to the water surface.

10. The method according to claim 9, characterized in that The gradient amplitude corresponding to the patch area corresponding to the water surface is calculated based on the black and white image and includes: The black-and-white image is calculated by using a first convolution kernel in the horizontal direction of an edge detection operator to obtain a horizontal gradient value; The black-and-white image is calculated by a second convolution kernel in a vertical direction of an edge detection operator to obtain a vertical gradient value; A calculation is performed based on the horizontal gradient value and the vertical gradient value to obtain a gradient amplitude corresponding to the patch area corresponding to the water surface.

11. A rehearsal device for river flooding, characterized in that: include: A generating unit, configured to generate attribute data of a patch area corresponding to a water surface according to the topographic point data of a target river channel, wherein the attribute data at least includes shape data and width data of the patch area corresponding to the water surface; A determination unit, configured to determine a predicted flooding height of a patch area corresponding to the water surface according to historical flooding data of the target river channel; The rehearsal unit is used to perform a river channel flooding rehearsal based on the attribute data and the predicted flooding height to obtain a rehearsal result.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the storage medium is controlled to execute the river flooding preview method according to any one of claims 1 to 10 on a device.

13. An electronic device, characterized in that: It comprises one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the river flooding preview method described in any one of claims 1 to 10.