A method and electronic device for predicting, analyzing and visualizing urban flooding
By establishing a unified time index and data stream synchronization, and splitting it into risk analysis and visualization branches, combined with graphics processors for multi-channel encoding and dynamic rendering, the problems of asynchronous multi-source data and texture distortion in urban flooding prediction were solved, improving the system's visibility and stability.
Patent Information
- Application Number
- CN202611298902.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-26
- Publication Date
- 2026-11-10
AI Technical Summary
In urban flood prediction, existing technologies suffer from several problems: asynchronous timing between multi-source rainfall and flood raster, loss of extreme values due to conventional texture quantization scaling, and distortion of fixed rainfall animation scale. These issues lead to the loss of local high-risk extreme values after image scaling, and the terminal loading, caching, and rendering efficiency are also insufficient.
By receiving multi-source rainfall data and raw urban flooding raster data, a unified time index is established for data stream synchronization, and the data is split into a risk analysis branch and a visualization branch. The risk analysis branch determines the water depth of enterprises and calculates the risk level based on the original resolution and the maximum value of the neighborhood; the visualization branch performs multi-channel high and low bit quantization encoding and extreme value pooling to generate lightweight textures, and uses a graphics processor for dual-channel decoding and dynamic rendering output.
It achieves dual extreme value maintenance in areas with minimal water accumulation and areas severely affected by urban flooding, reduces client data bandwidth and memory usage, improves the smoothness of system spatiotemporal interaction and alarm stability, and reduces animation jump phenomena caused by sudden changes in rainfall classification.
Smart Images

Figure CN123071503A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of urban flood disaster monitoring and early warning, geographic information systems, spatiotemporal raster data processing, insurance risk assessment and graphics processor dynamic rendering technology, and in particular to an urban flooding prediction analysis and visualization method and electronic device. Background Technology
[0002] Urban short-duration heavy rainfall is characterized by strong locality, rapid development, and significant spatial differences. Urban flooding prediction systems typically output water depth as raster files from multiple consecutive time points, while meteorological systems describe rainfall processes using rainfall raster data or observation records. Existing geographic information systems (GIS) usually directly convert raster results into grayscale images or color layers with bilinear scaling. This approach reduces the accuracy of physical quantities, averages narrow areas of high water depth with surrounding low-value areas, and causes the loss of local high-risk extreme values after image scaling, leading to potential missed disaster assessments. Conventional enterprise impact analysis locates enterprises by repeatedly converting enterprise coordinates to raster rows and columns frame by frame. When the number of enterprises and time frames is large, this results in a large amount of repetitive spatial calculations. The front-end rendering layer uses rain lines or particles with fixed pixel widths and spacing, causing dynamic texture distortion when the map is zoomed in, and the direct switching of discrete hourly rainfall frames creates noticeable jumps. Large-scale continuous frames also suffer from inefficiencies in terminal loading, caching, and rendering. Summary of the Invention
[0003] This application provides a method and electronic device for predicting, analyzing and visualizing urban flooding, which solves the technical problems of asynchronous time between multi-source rainfall and flooding raster, loss of extreme values caused by conventional texture quantization scaling, and distortion of fixed rainfall animation scale.
[0004] This application provides a method for predicting, analyzing, and visualizing urban flooding, comprising: receiving multi-source rainfall data and original flooding raster data; establishing a unified time index and using the unified time index to synchronize the data streams of the multi-source rainfall data and the original flooding raster data; splitting the original flooding raster data into a risk analysis branch and a visualization branch; in the risk analysis branch, determining the water depth of enterprises and calculating the risk level based on the original resolution and the maximum value of the neighborhood; in the visualization branch, performing multi-channel high and low bit quantization encoding and extreme value pooling to generate a lightweight texture from the original flooding raster data; using a graphics processor to perform dual-channel decoding on the lightweight texture, and dynamically calculating and generating raindrop animations based on map zoom level and screen projection for rendering output.
[0005] In the visualization branch, the original urban flooding raster data is subjected to multi-channel high and low bit quantization encoding and extreme value pooling to generate a lightweight texture, including: extracting the water depth value from the original urban flooding raster data; using the transparency channel, the first color channel and the second color channel to perform 16-bit quantization storage of the water depth value; and performing extreme value pooling that retains local maximum values when performing downsampling operation.
[0006] The water depth value is stored using 16-bit quantization through the transparency channel, the first color channel, and the second color channel. During downsampling, extremum pooling that preserves local maxima is performed, including: converting the water depth value to a 16-bit quantized value; splitting the 16-bit quantized value into high 8 bits and low 8 bits; storing the high 8 bits in the first color channel and the low 8 bits in the second color channel; establishing a target downsampling region; scanning all pixels within the target downsampling region; and extracting the maximum value among all pixels as the downsampled pixel value.
[0007] In the risk analysis branch, the enterprise's water depth and risk level are determined based on the original resolution and the maximum value in the neighborhood. This includes: generating a grid header signature based on spatial header information; reusing the enterprise row and column search sampling plan in multi-frame processing; obtaining the target grid and a preset radius neighborhood; and determining the enterprise's water depth using the maximum value in the target grid and the preset radius neighborhood.
[0008] The process involves generating a raster header signature based on spatial header information and reusing the enterprise row-column search sampling plan in multi-frame processing. This includes: extracting the spatial header information of the original flooding raster data; performing a hash calculation on the spatial header information to generate the raster header signature for the current frame; comparing the raster header signature of the current frame with the raster header signature of the previous frame; and if the raster header signature of the current frame matches the raster header signature of the previous frame, then calling the enterprise row-column search sampling plan cached in memory for the previous frame to perform spatial sampling calculations.
[0009] The lightweight texture is decoded in dual channels using a graphics processor, and raindrop animation is generated and rendered by dynamically calculating the map zoom level and screen projection. This includes: calculating the projection size of the original flooding raster data in the viewport; dynamically adjusting the upper limit of the rainfall texture resolution, the aspect ratio of the raindrops, and the distribution spacing based on the projection size and the map zoom level; and generating the raindrop animation based on the adjusted upper limit of the rainfall texture resolution, the aspect ratio of the raindrops, and the distribution spacing.
[0010] The lightweight texture is decoded in dual channels using a graphics processor, and raindrop animation is generated and rendered by combining map zoom level and screen projection dynamic calculation. The method also includes: performing spatiotemporal unified frame transaction control; obtaining the multi-channel texture temporal phase of the graphics processor; and performing continuous interpolation decoding based on the multi-channel texture temporal phase of the graphics processor.
[0011] Establishing a unified time index and using the unified time index to synchronize the data streams of the multi-source rainfall data and the original urban flooding raster data includes: comparing the timestamps of the multi-source rainfall data with the timestamps of the original urban flooding raster data; and aligning the multi-source rainfall data and the original urban flooding raster data according to the unified time index.
[0012] This application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the aforementioned method.
[0013] This application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned method.
[0014] This application splits the original urban flooding raster data into a risk analysis branch and a visualization branch. The risk analysis branch maintains the original resolution and uses the target raster and the maximum value of its radius neighborhood to extract the enterprise's water depth, achieving dual extreme value preservation to prevent omissions in both minimal water accumulation areas and severely flooded impact points. The visualization branch uses transparency and the first and second color channels to store 16-bit quantized values, and performs extreme value pooling to retain local maxima during downsampling, reducing the bandwidth and memory usage of clients concurrently downloading large amounts of raster data. Based on the projection size of the raster space in the viewport and the map zoom level, the upper limit of the rainfall texture resolution, the aspect ratio of raindrops, and the distribution spacing are dynamically adjusted. Multi-channel texture temporal phase continuous interpolation decoding is introduced to reduce the animation jump phenomenon caused by abrupt changes in rainfall classification, ensuring good visibility of the underlying area at different zoom levels and improving the system's spatiotemporal interaction smoothness and alarm stability. Attached Figure Description
[0015] Figure 1 A flowchart of an urban flooding prediction, analysis, and visualization method according to an embodiment of this application is shown;
[0016] Figure 2 An exemplary system architecture diagram according to an embodiment of this application is shown;
[0017] Figure 3 An exemplary block diagram of a dual-branch and dual-extreme-preservation logic structure for an urban flooding grid according to an embodiment of this application is shown;
[0018] Figure 4 An exemplary block diagram of the logic structure for underwriting enterprise neighborhood sampling and sampling plan reuse according to an embodiment of this application is shown;
[0019] Figure 5 An exemplary multi-source data common time index and frame synchronization timing diagram according to an embodiment of this application is shown;
[0020] Figure 6 An exemplary block diagram of the logic structure for generating dynamic rainfall based on an embodiment of this application is shown.
[0021] Figure 7 A schematic diagram of the structure of an electronic device according to an embodiment of this application is shown. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this application clearer, the application will now be described in further detail with reference to the accompanying drawings.
[0023] Figure 1 A flowchart of an urban flooding prediction, analysis, and visualization method according to an embodiment of this application is shown. The method is primarily executed by a computing device or server-side background equipped with a processor and memory. The method includes steps S101 to S106.
[0024] Step S101: Receive multi-source rainfall data and raw urban flooding raster data. Specifically, the equipment acquires the urban flooding prediction raster frame sequence, rainfall raster frame sequence, and insured company location data corresponding to the target project. The urban flooding prediction raster frames and rainfall raster frames respectively include time stamps and spatial extent information, while the insured company location data includes company identifiers and geographic coordinates (i.e., attached...). Figure 4 (The source data is the "insured enterprise sampling" mentioned above). The engineering forecast duration is limited to 3 to 74 hours. After receiving the engineering metadata, the equipment constructs a forecast access and status scheduling flow. It should be noted that the above engineering forecast duration is only an example, and those skilled in the art can make adaptive adjustments according to the output specifications of the actual meteorological forecast system.
[0025] Step S102: Establish a unified time index and use it to synchronize the data streams of multi-source rainfall data and the original urban flooding raster data. Since the timestamps of the multi-source rainfall data and the original urban flooding raster data may be offset, the device establishes a time alignment mechanism. Based on the time identifiers, a common time index is established between the urban flooding prediction raster frames, rainfall raster frames, and engineering prediction time periods. Furthermore, a basic transformation relationship between raster coordinates and geographic coordinates is established based on spatial extent information.
[0026] Step S103 involves splitting the original flooding raster data into a risk analysis branch and a visualization branch. In this step, the device initiates bidirectional splitting processing for each received flooding prediction raster frame. This ensures that the backend business logic is based on high-precision physical quantities while simultaneously guaranteeing the rendering of a large-scale terrain environment on the frontend.
[0027] Step S104: In the risk analysis branch, the enterprise's water depth is determined based on the original resolution and the maximum value of the neighborhood, and the risk level is calculated.
[0028] Step S104 includes: generating a raster header signature based on spatial header information; reusing the enterprise row-column search sampling plan in multi-frame processing; obtaining the target raster and a preset radius neighborhood; and determining the enterprise water depth using the maximum value within the target raster and the preset radius neighborhood. The step of generating a raster header signature based on spatial header information and reusing the enterprise row-column search sampling plan in multi-frame processing further includes: extracting the spatial header information of the original flooding raster data; performing a hash calculation on the spatial header information to generate the raster header signature for the current frame; comparing the raster header signature of the current frame with the raster header signature of the previous frame; if the raster header signature of the current frame is consistent with the raster header signature of the previous frame, then calling the enterprise row-column search sampling plan cached in memory for the previous frame to perform spatial sampling calculations.
[0029] The risk analysis branch directly utilizes the flood prediction raster, which retains the original spatial resolution, for calculation. Based on the geographic coordinates of each insured enterprise, its target raster position within the original spatial resolution flood prediction raster frame is determined, and the maximum effective flood depth is extracted within the neighborhood corresponding to the target raster position. This maximum effective flood depth is then determined as the influence depth of that insured enterprise under the corresponding time index. The influence depth is compared with a preset influence threshold and at least two risk level intervals to obtain the set of affected insured enterprises, risk level, and statistical results for each time index.
[0030] Step S105 involves performing multi-channel high and low bit quantization encoding and extreme value pooling on the original flooding raster data in the visualization branch to generate a lightweight texture. Step S105 further includes: extracting water depth values from the original flooding raster data; storing the water depth values using 16-bit quantization using the transparency channel, the first color channel, and the second color channel; and performing extreme value pooling that preserves local maxima during downsampling.
[0031] The method of storing the water depth value using 16-bit quantization through the transparency channel, the first color channel, and the second color channel, and performing extreme value pooling to retain local maxima during downsampling, further includes: converting the water depth value into a 16-bit quantized value; splitting the 16-bit quantized value into high 8 bits and low 8 bits; storing the high 8 bits in the first color channel and the low 8 bits in the second color channel; establishing a target downsampling region; scanning all pixels within the target downsampling region; and extracting the maximum value among all pixels as the downsampled pixel value.
[0032] When the size of the source raster exceeds the maximum size of the preset texture supported by the graphics processor, the flood depth value is split and encoded into at least two color channels of the image texture according to the preset quantization ratio, and invalid raster data is identified by the transparency channel.
[0033] Step S106: The lightweight texture is decoded in dual channels using a graphics processor, and raindrop animation is generated by dynamically calculating the map zoom level and screen projection for rendering output.
[0034] The process of step S106 includes: calculating the projection size of the original waterlogging raster data in the viewport; dynamically adjusting the upper limit of rainfall texture resolution, the aspect ratio of raindrops and the distribution spacing according to the projection size and the map zoom level; and generating the raindrop animation according to the adjusted upper limit of rainfall texture resolution, the aspect ratio of raindrops and the distribution spacing.
[0035] Optionally, step S106 further includes: performing spatiotemporal unified frame transaction control; obtaining the multi-channel texture temporal phase of the graphics processor; and performing continuous interpolation decoding based on the multi-channel texture temporal phase of the graphics processor.
[0036] According to one embodiment, in step S106, the device performs concurrent texture decoding on the current rainfall raster frame and the next rainfall raster frame corresponding to the current time index, and performs smooth temporal interpolation on the rainfall of the two frames according to the current playback phase. Optionally, raindrop animation is dynamically calculated and generated for rendering output based on the projection size and map zoom level. The device obtains the projection size of the rainfall raster space range in the current map viewport and the current map zoom level, adaptively determines the output resolution of the dynamic rainfall texture, the aspect ratio of the raindrops, and the distribution spacing, and generates a continuously abrupt raindrop animation.
[0037] Next, the results of flooding, rainfall, and enterprise impact are output synchronously. Based on the established common time index, the visual texture frames of flooding, dynamic rainfall textures, the set of affected insured enterprises, and corresponding detailed statistics and global peak statistics are output synchronously. Through the above splitting and synchronization process, large-scale physical quantities are stored independently using high-order and low-order channels, reducing data transmission volume while ensuring the complete preservation of local extrema.
[0038] The following is combined Figure 2 To explain, Figure 2 An exemplary system architecture diagram according to an embodiment of this application is provided. The system architecture, from top to bottom, includes a data source layer, a preprocessing layer, an analysis service layer, a spatiotemporal linkage layer, and a visualization interaction layer. The data source layer includes an intelligent flood prediction module for outputting grid files, a rainfall module, a weather station interface, an insured enterprise database, and an engineering database. After the above data flows into the preprocessing layer, this layer performs raster scanning, unit conversion, 16-bit quantization encoding, transparency mask generation, and extreme value pooling operations. The processed data enters the analysis service layer, where unified frame list construction, insured enterprise neighborhood sampling, risk classification, site inverse distance weighted interpolation, and caching and export control are performed. The spatiotemporal linkage layer receives the analysis results and performs engineering time index synchronization, current frame and next frame prefetching, impact result synchronous output, and request failure control. The visualization interaction layer is responsible for visual presentation, including flood water surface rendering, scale-adaptive rainfall drawing, enterprise aggregation point display, timeline control, and effective value pop-up display.
[0039] The following is combined Figure 3 To explain, Figure 3 This demonstrates the specific workflow of the dual-branch flooding raster and dual extremum preservation logic structure. After the original flooding raster data is input, it is distributed to two independent branches (left and right) via a simultaneous time index. The left branch is the risk analysis branch, which strictly preserves the original resolution, performs maximum neighbor extraction for each enterprise, and generates frame-by-frame enterprise risk results. The right branch is the visualization branch, which performs multi-channel quantization encoding and local maximum pooling to generate texture frames for output to the display terminal.
[0040] For the quantization encoding process in the visualization branch, the equipment extracts water depth values from the original flooding raster data, converting the source flooding depth values (in meters) into target flooding depth values (in millimeters). The water depth values are then quantized and stored using the transparency channel, the first color channel, and the second color channel. The equipment executes the core mathematical model, performing quantization encoding according to the following calculation logic:
[0041] (1)
[0042] Wherein, variable C represents the calculated 16-bit quantized value, variable V represents the input target flood depth or rainfall, variable O represents the quantization offset, and variable S represents the quantization scaling factor. Function The function is used to remove invalid minimum values below the offset. The function is used to perform discretization operations such as rounding. This is used to strictly truncate and constrain the calculation results to an integer range of 0 to 65535. In this embodiment, the quantization ratio S for rainfall is 0.01 mm, and the quantization ratio S for flood depth is 1 mm. For specific flood control scenarios with higher accuracy requirements, those skilled in the art can reduce the coefficient S to obtain more granular storage results.
[0043] After calculating the quantization value, the device splits the 16-bit quantization value C into high 8 bits and low 8 bits. The high 8 bits are stored in the first color channel (R channel) of the image texture, and the low 8 bits are stored in the second color channel (G channel) of the image texture. The alpha channel (A channel) corresponding to the location with no data is set as a transparent mask to mark that pixel as invalid raster data.
[0044] Downsampling is performed when the physical width of the source raster exceeds the preset maximum texture width. The device establishes the target downsampling region (i.e., the pooling window) based on the coverage of the target texture pixels in the original raster. The device scans all pixels within the target downsampling region and extracts the maximum value among all pixels as the downsampled pixel value. The device executes extreme value pooling logic, following the mathematical model below:
[0045] (2)
[0046] (3)
[0047] Among them, variable C' j The variable C represents the final encoded value of the target texture pixel. i This represents the original quantized encoded value of the i-th pixel within the target downsampling region. Variable A' j The variable A represents the final transparency mask value of the target texture pixel. i This represents the original transparency channel value within the region. The maximum value within the region is extracted to ensure that the original physical limit characteristics are preserved after mesh merging and downsampling.
[0048] At the rendering terminal, after the device extracts texture data through the graphics processor, it performs dual-channel decoding using the fragment shader. The specific calculation logic for physical quantity recovery is as follows:
[0049] (4)
[0050] In this process, variable V represents the recovered actual water depth or rainfall physical quantity, variable R represents the high eight bits of the value read from the first color channel, and variable G represents the low eight bits of the value read from the second color channel. This process achieves efficient and lossless reverse analysis of image data into spatial physical quantities.
[0051] The following is combined Figure 4 To explain, Figure 4 The logic of neighbor sampling and sampling plan reuse for insured enterprises is demonstrated. For the aforementioned risk analysis branch, the device introduces a cached reuse mechanism for raster header signatures. Spatial header information of the original flooding raster data is extracted, including the number of rows and columns, cell size, spatial origin coordinates, and a "no data" identifier. Based on the spatial header information, a raster header signature for the current frame is generated using hash calculation. During continuous raster frame flow, the device compares the raster header signature of the current frame with that of the previous frame. If the raster header signature of the current frame matches that of the previous frame, the enterprise row and column search sampling plan (including target row intervals, column intervals, and enterprise indexes) cached in memory from the previous frame is invoked for spatial sampling calculation. This is reused across multiple frames, and only the requested rows are parsed.
[0052] When conducting water depth sampling for a company, the equipment maps the company's geographic coordinates to a raster matrix system. The target raster coordinates are calculated, and the column and row coordinates are obtained using the following formulas:
[0053] (5)
[0054] (6)
[0055] In this context, variable `col` represents the target raster column number after mapping, and variable `row` represents the target raster row number after mapping. Variables `lng` and `lat` represent the longitude and latitude coordinates of the insured enterprise, respectively. Variables `xmin` and `ymax` represent the minimum longitude boundary and maximum latitude boundary of the spatial origin, respectively. Variable `cellsize` represents the physical cell size of a single raster. (The text then mentions a rounding down symbol.) Used to achieve forced dimensionality reduction and assignment from continuous geographic space to discrete grid space.
[0056] After acquiring the target grid, the device constructs a two-dimensional neighborhood centered on the target grid location with a preset radius. In this embodiment, the search radius of the target grid neighborhood is set to 1 unit, corresponding to a 3×3 grid area for the search neighborhood matrix. The device excludes no-data values and non-finite values in this neighborhood, extracts the maximum value from all remaining pixels, and multiplies it by the source value conversion ratio to obtain the final influence depth of the enterprise (i.e., the attached depth). Figure 4 (As mentioned in "Enterprise Risk Results"). The maximum value generalization search centered on the enterprise coordinates avoids the omission of enterprise disaster assessment due to point position errors or grid edge drift when sampling a single pixel.
[0057] After extracting the enterprise influence depth, the device compares it with a preset influence threshold. The minimum influence threshold is set to 270 mm. The device adds insured enterprises with an influence depth of at least 270 mm to the affected insured enterprise set. Risk levels are assessed for enterprises based on multiple consecutive depth ranges. The defined risk level ranges are: 270 to 400 mm is marked as medium risk, 400 to 600 mm as high risk, and at least 600 mm as high risk. The device output includes the number of affected insured enterprises at the current time index, the maximum enterprise influence depth, and statistical results of deduplication and cumulative peak values throughout the entire project.
[0058] The following is combined Figure 5 Please provide an explanation. Figure 5 An exemplary multi-source data common time index and frame synchronization timing diagram according to an embodiment of this application is shown. (Refer to...) Figure 5 The device constructs a multi-source data common time index and frame synchronization control mechanism. The parallel data stream includes a sequence of flooding prediction frames, current and next rainfall frames, enterprise impact result sequences, and site rainfall interpolation sequences. The device extracts timestamps from the file names, frame tags, or project metadata of each data source for comparison, mapping data with the same prediction time period or falling within a preset time tolerance range to a unified time index for vertical time alignment. The synchronization frame interval is set to 1 hour. Spatiotemporal unified frame transaction control is executed to ensure that the flooding grid, rainfall particles, and enterprise highlighted alarm points simultaneously overlaid in the map viewport are on the same physical tile.
[0059] The following is combined Figure 6 Please provide an explanation. Figure 6 An exemplary logic structure block diagram for scale-adaptive rainfall dynamic texture generation according to an embodiment of this application is shown. (Refer to...) Figure 6 The device employs a scale-adaptive dynamic texture generation logic for rainfall. It adjusts the morphological parameters of the rainfall animation based on both the projection size and the map zoom level. At the underlying level, the device loads the texture of the current frame and the texture of the next frame through a dual-channel decoding process using the graphics processor. The device then performs temporal interpolation between the two frames based on the playback phase of the current animation to calculate the physical quantities of rainfall. The linear interpolation logic is as follows:
[0060] (7)
[0061] Where, variable P represents the interpolated rainfall amount rendered per current screen pixel. t This represents the decoded value of the current rainfall raster frame; the variable is... This represents the decoded value of the next rainfall raster frame. (Variable) This indicates the temporal phase of the current graphics processor's multi-channel texture. Temporal interpolation reduces the visual jarring caused by switching between discrete hourly-level rainfall frames.
[0062] After calculating the interpolated physical quantities, the device introduces preset rainfall grading nodes to segment and color the interpolation results. The segmented interpolation nodes are set to 0, 1, 2, 5, 10, 25, 50, 100, and 250 mm. The device performs transparency and validity control, converting the geographic corner points of the rainfall raster spatial range into map container coordinates, and calculating the screen projection width and height of the original urban flooding raster data in the viewport. The logic for dynamically adjusting the long side size of the off-screen rainfall dynamic texture follows the following mathematical model:
[0063] (8)
[0064] Where, variable L represents the final determined pixel size of the long side of the off-screen dynamic texture, variable L source This represents the original long side size of the rainfall source raster data itself. Variable W p and H p These represent the actual projected width and height of the rainfall area on the current display device screen, respectively. (Function) This is used to force the size to be constrained between a first resolution threshold and a second resolution threshold. When the map viewport is zoomed, the rendering engine automatically adjusts the resolution of the off-screen buffer.
[0065] After acquiring the dynamic texture dimensions, the device synchronously changes the geometry of the raindrops according to the map zoom level. As the map zoom level increases, the device reduces the raindrop width, the spacing between raindrops, and the display intensity of individual raindrops. By combining the inherent random phase and periodic wake function of each column of pixels, the device maintains the coordination of raindrop density and visual volume per unit viewport.
[0066] To enhance the 3D realism of flooded areas on the terminal, the visualization branch includes dynamic rendering of the flooded water surface. For flooded areas that reach the display threshold, the rendering engine loads at least two water surface normal textures with different rotation directions and flow offsets in parallel. Based on the mixed-sampled water surface normals, refraction coordinate offset calculations, Fresnel ambient reflection calculations, ambient light diffuse reflection calculations, and sunglass specular highlight calculations are performed continuously to generate a dynamic texture of the flooded water surface with a diffuse reflection model and time-series flow offset animation. If the terminal device has limited graphics capabilities, the device reverts to outputting a planar canvas texture.
[0067] When the weather forecast model provides rainfall data from discrete stations, the device incorporates a station-based spatial interpolation control module. It retrieves cumulative rainfall slices for each weather station within a preset time window from the engineering database and converts the station's latitude and longitude coordinates to local metric coordinates based on the regional center latitude. An inverse distance weighting algorithm is then used for data evolution. The interpolation mathematical model includes the following calculation logic:
[0068] (9)
[0069] (10)
[0070] Here, variable P(x) represents the estimated rainfall at the target grid point x. i This represents the actual observed rainfall at the i-th weather station. Variable w i This represents the distance weight attenuation coefficient corresponding to the i-th weather station. Variable d i This represents the planar distance between the target grid point x and the i-th weather station. (Constant) As a very small positive number, division by zero is prevented. The variable p represents the exponent factor. In this embodiment, the number of nearest participating stations K is 12, the exponent p is 2.0, the output grid width is set to 720 pixels, and interpolation is performed in blocks of 48 rows each. The calculated grid matrix is encapsulated into a multi-channel texture through 16-bit quantization and stored in the cache. This mechanism enables the smooth expansion of discrete meteorological stations to surface-level pixels, supporting the interactive display of multi-source data.
[0071] According to one embodiment, this application establishes a map click validity value determination process and an asynchronous constraint mechanism. When the map viewport receives click coordinates, the device generates an incremental request number with a timestamp. The first determination node is executed to check if the coordinates are within the grid area; if not, an exit node is executed. If the spatial determination passes, the second depth data determination node is executed to check if the transparency channel is valid and if the flooding depth reaches the display threshold, or if valid rainfall data has been extracted. When a pass instruction exists within the above verification matrix, the device outputs a display window containing coordinates, data time, and physical quantities. If the request number is no longer the latest value when the asynchronous callback returns, the device discards the returned result, using frame token sequences to prevent out-of-order data from overwriting the current state, ensuring the continuity of disaster inspection operations.
[0072] According to the solution in this application, the original flooding raster data is split into a risk analysis branch and a visualization branch. The risk analysis branch maintains the original resolution and uses the target raster and the maximum value of the radius neighborhood to extract the water depth of enterprises, achieving dual extreme value preservation to prevent omissions in both minimal water accumulation areas and severely flooded impact points. The visualization branch uses transparency and the first and second color channels to store 16-bit quantized values, and performs extreme value pooling to retain local maxima during downsampling, reducing the bandwidth and memory usage of clients concurrently downloading large amounts of raster data. Based on the projection size of the raster space in the viewport and the map zoom level, the upper limit of the rainfall texture resolution, the aspect ratio of raindrops, and the distribution spacing are dynamically adjusted. Multi-channel texture temporal phase continuous interpolation decoding is introduced to reduce the animation jump phenomenon caused by abrupt changes in rainfall classification, ensuring good visibility of the underlying area at different zoom levels, and improving the system's spatiotemporal interaction smoothness and alarm stability.
[0073] Figure 7 The diagram illustrates the structure of an electronic device suitable for implementing the methods and / or technical solutions in the embodiments of this application.
[0074] Electronic device 700 includes a CPU 701 (Central Processing Unit), which can perform various appropriate actions and processes based on programs stored in ROM 702 (Read Only Memory) or programs loaded from storage section 708 into RAM 703 (Random Access Memory). RAM 703 also stores various programs and data required for system operation. The CPU 701, ROM 702, and RAM 703 are interconnected via bus 704. An I / O interface 705 (Input / Output) is also connected to bus 704.
[0075] The following components are connected to I / O interface 705: an input section 706 including a keyboard, mouse, touchscreen, microphone, infrared sensor, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), LED display, OLED display, etc., and speakers, etc.; a storage section 708 including one or more computer-readable media such as hard disk, optical disk, magnetic disk, semiconductor memory, etc.; and a communication section 709 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet.
[0076] In particular, the methods and / or embodiments in this application can be implemented as computer software programs. For example, the embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. When the computer program is executed by CPU 701, it performs the functions defined in the methods of this application.
[0077] This application provides a non-volatile computer-readable storage medium on which computer-executable instruction code is persistently stored. When this execution code is loaded and executed by the computing resources of an external intelligent traffic control node or an on-board processor, it fulfills the requirements of each step in the reinforcement learning-based vehicle obstacle avoidance and pathfinding method for dealing with pedestrian congestion. This non-volatile medium enables the Markov decision control scheme to be rapidly deployed across multiple heterogeneous industrial host devices.
[0078] This application provides a computer program product. The product includes a compiled software application entity and a set of logic scripts. When this computer program product is mounted on a computing platform and triggered to run, it can respond to the periodic sweep input of the vehicle-mounted radar, allocate internal computing power, and execute the aforementioned Gaussian distribution viewing benefit calculation and time difference closed-loop prediction collision avoidance path planning method logic.
[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
[0080] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices described in an apparatus may also be implemented by a single unit or device through software or hardware. Terms such as "first," "second," etc., are used to indicate names and do not indicate any specific order.
Claims
1. A method for predicting, analyzing, and visualizing urban flooding, characterized in that, include: Receive multi-source rainfall data and raw urban flooding raster data; Establish a unified time index and use the unified time index to synchronize the multi-source rainfall data with the original urban flooding raster data; The original urban flooding raster data is split into a risk analysis branch and a visualization branch; In the risk analysis branch, the enterprise's water depth is determined and the risk level is calculated based on the original resolution and the maximum value of the neighborhood. In the visualization branch, the original waterlogging raster data is subjected to multi-channel high and low bit quantization encoding and extreme value pooling to generate lightweight textures; The lightweight texture is decoded in dual channels using a graphics processor, and raindrop animations are generated and rendered by combining map zoom level and screen projection dynamic calculations.
2. The method according to claim 1, characterized in that, In the visualization branch, the original waterlogging raster data undergoes multi-channel high-low bit quantization encoding and extreme value pooling to generate a lightweight texture, including: Extract the water depth values from the original waterlogging raster data; The water depth value is stored using 16-bit quantization using the transparency channel, the first color channel, and the second color channel; during downsampling, extreme value pooling that preserves local maxima is performed.
3. The method according to claim 2, characterized in that, The water depth value is stored using 16-bit quantization via the transparency channel, the first color channel, and the second color channel. During downsampling, extreme value pooling that preserves local maxima is performed, including: The water depth value is converted into a 16-bit quantized value; the 16-bit quantized value is split into high 8 bits and low 8 bits; the high 8 bits are stored in the first color channel and the low 8 bits are stored in the second color channel; a target downsampling region is established; all pixels within the target downsampling region are scanned; the maximum value among all pixels is extracted as the downsampled pixel value.
4. The method according to claim 1, characterized in that, In the risk analysis branch, the enterprise's water depth is determined and the risk level is calculated based on the original resolution and the maximum value of the neighborhood, including: Generate a raster header signature based on spatial header information; In multi-frame processing, the enterprise row and column search sampling plan is reused to obtain the target grid and its preset radius neighborhood. The water depth of the enterprise is determined by using the target grid and the maximum value within the preset radius neighborhood.
5. The method according to claim 4, characterized in that, A raster header signature is generated based on spatial header information, and the enterprise row and column search sampling plan is reused in multi-frame processing, including: Extract the spatial header information of the original waterlogging raster data; perform hash calculation on the spatial header information to generate the raster header signature of the current frame; compare the raster header signature of the current frame with the raster header signature of the previous frame; if the raster header signature of the current frame is consistent with the raster header signature of the previous frame, then call the enterprise row and column search sampling plan of the previous frame cached in memory to perform spatial sampling calculation.
6. The method according to claim 1, characterized in that, The lightweight texture is decoded in dual channels using a graphics processor, and raindrop animation is generated and rendered by dynamically calculating the map zoom level and screen projection. This includes: Calculate the projection size of the original flooding raster data in the viewport; dynamically adjust the upper limit of rainfall texture resolution, the aspect ratio of raindrops, and the distribution spacing based on the projection size and the map zoom level; perform spatiotemporal unified frame transaction control; obtain the multi-channel texture temporal phase of the graphics processor; perform continuous interpolation decoding based on the multi-channel texture temporal phase of the graphics processor; and generate the raindrop animation based on the adjusted upper limit of rainfall texture resolution, the aspect ratio of raindrops, and the distribution spacing.
7. The method according to claim 1, characterized in that, Establishing a unified time index and using the unified time index to synchronize the multi-source rainfall data with the original urban flooding raster data includes: The timestamps of the multi-source rainfall data are compared with the timestamps of the original urban flooding raster data; the multi-source rainfall data and the original urban flooding raster data are time-aligned according to the unified time index.
8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 7.
