Three-dimensional map visualization method and apparatus, electronic device, and storage medium
By acquiring scalable vector graphics data from a global map, forming a map array and displaying vulnerability information, and combining a 3D sphere model and WebGL technology, the problems of visual distortion and unclear information in 3D map display are solved, achieving a clear and intuitive 3D map display.
Patent Information
- Application Number
- CN202211475825.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-23
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2042-11-23
AI Technical Summary
Existing technologies for displaying 3D maps suffer from problems such as insufficiently intuitive visual effects, distortion when zoomed in, and a lack of clear display of regional risks and vulnerabilities.
By acquiring scalable vector graphics data from a global map, a map array is formed. Color attribute values are determined based on the vulnerability information of a region, and vulnerability information is displayed using an overlay method. A clear and intuitive 3D map rendering is achieved by combining a 3D sphere model and WebGL technology.
It solves the distortion problem caused by zooming in on 3D maps, clearly and intuitively presents the severity of risks and vulnerability information in various regions, and improves the user experience.
Smart Images

Figure CN116263984B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer data processing technology, and in particular to a three-dimensional map visualization method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] Typically, scalable vector graphics data map files created from map drafts are generated using programming language tools through data interfaces to load scalable vector files and form visualized two-dimensional maps. However, their drawback is that they are limited to planar graphics, and their ability to express some cool effects is relatively weak, resulting in a less intuitive and impactful visual effect. For heat map displays, most use open-source visualization libraries to generate bitmaps. These bitmaps are composed of individual points called pixels, describing the color of each pixel in the image. When a bitmap is enlarged, the individual pixels increase in size, causing the image to blur into multiple individual squares, resulting in uneven line shapes and distortion. For three-dimensional earth models, readily available ordinary bitmap layers are generally used, such as images in specified formats developed by the Joint Group of Image Experts or portable web graphics formats, or world maps generated by a chart library and then converted into images. The interactive effects with these three-dimensional earth models are limited to zooming in, zooming out, and dragging and rotating the earth sphere. Summary of the Invention
[0003] To address the existing technical problems, this application provides a three-dimensional map visualization method, apparatus, electronic device, and computer-readable storage medium that can clearly and intuitively present the severity of risks in various regions and sequentially display specific vulnerability information in each region.
[0004] To achieve the above objectives, the technical solution of this application embodiment is implemented as follows:
[0005] A 3D map visualization method includes: acquiring scalable vector graphics data of a global map; forming map arrays corresponding to various regions based on the scalable vector graphics data; wherein the map arrays include region-specific identifier attributes, color attribute values, and location attribute values; acquiring vulnerability information for each region; determining a maximum and minimum vulnerability value based on the number of vulnerabilities in each region; determining color attribute values for the map arrays of each region based on the maximum and minimum vulnerability values and the number of vulnerabilities corresponding to each region; rendering the map based on the color attribute values; traversing the map arrays; sequentially determining target regions based on the location attribute values in the map arrays; acquiring vulnerability information corresponding to each target region; and displaying the vulnerability information as an associated layer with the target region.
[0006] Optionally, the step of acquiring scalable vector graphics data of a map and forming map arrays corresponding to each region based on the scalable vector graphics data includes: acquiring a draft file of a global map and determining the standard scalable vector graphics data of the global map; selecting a reference region from the global map, setting the color attribute value corresponding to the reference region to a first initial value, and setting the color attribute values corresponding to other regions in the global map other than the reference region to a second initial value; and extracting the location data, identifier, and color attribute values of each region to form a map array corresponding to each region.
[0007] Optionally, the 3D map visualization method further includes: traversing the map array, and reloading the scalable vector graphic data of the global map to render and display the global map based on the location attribute values, color attribute values, and identifier attribute values of the map array corresponding to each region; wherein, the identifiers of the regions are displayed in association with the regions.
[0008] Optionally, the step of determining the color attribute value of the map array for each region based on the maximum vulnerability value, the minimum vulnerability value, and the number of vulnerabilities corresponding to each region, and rendering the map based on the color attribute value, includes: determining the vulnerability severity of the corresponding region based on the relationship between the maximum and minimum values in the vulnerability information of each region; using different annotation information to distinguish and display different vulnerability severity levels of the region; updating the color attribute value of the map array for each region; and rendering the map according to the updated color attribute value.
[0009] Optionally, determining the vulnerability severity of a region based on the relationship between the maximum and minimum values in the vulnerability information of each region includes: if the maximum and minimum values in the vulnerability information of a region are equal and equal to zero, the vulnerability severity of each region is determined to be of the first category, and the color attribute value of the map array of each region is a first preset value; if the maximum and minimum values in the vulnerability information of a region are equal and not zero, the vulnerability severity of each region is determined to be of the second category, and the color attribute value of the map array of each region is a second preset value; if the maximum and minimum values in the vulnerability information of a region are not equal, the vulnerability severity of each region is determined to be of the third category, and the color attribute value of the region is calculated according to the first preset value, the second preset value, the maximum value, the minimum value, and the vulnerability information of each region.
[0010] Optionally, the step of traversing the map array, determining target regions sequentially based on the location attribute values in the map array, obtaining vulnerability information corresponding to each target region, and displaying the vulnerability information in a floating layer associated with the target region includes: traversing the map array by scanning in a loop, determining target regions sequentially based on the location attribute values in the map array; wherein the scanning loop is composed of registers connected end-to-end, each corresponding to a region, and each register includes a displacement attribute determined based on the location attribute values of the corresponding region and a dynamic rotation display attribute representing the rotation animation display effect; for each target region, obtaining vulnerability information corresponding to the target region, and displaying the vulnerability information in a floating layer associated with the target region.
[0011] Optionally, it further includes: constructing a first three-dimensional sphere model according to a preset three-dimensional drawing application; performing geographic overlay and map scan overlay on the first three-dimensional sphere model based on the updated scalable vector graphics data; constructing a second three-dimensional sphere model according to the three-dimensional drawing application; overlapping the second three-dimensional sphere model with the first three-dimensional sphere model and placing it behind the first three-dimensional sphere model, wherein the size of the second three-dimensional sphere model is larger than the size of the first three-dimensional sphere model; enabling an effects compositor to process the scene of the second three-dimensional sphere model accordingly; and displaying the first three-dimensional sphere model in the center of the second three-dimensional sphere model.
[0012] This invention also provides a three-dimensional map visualization device, comprising: an acquisition module, configured to acquire scalable vector graphic data of a global map, and form map arrays corresponding to various regions based on the scalable vector graphic data; wherein the map arrays include region-specific identifier attributes, color attribute values, and location attribute values; a determination module, configured to acquire vulnerability information for each region, determine a maximum and minimum vulnerability value based on the number of vulnerabilities in each region, and further configured to determine the color attribute value of the map array for each region based on the maximum vulnerability value, the minimum vulnerability value, and the number of vulnerabilities corresponding to each region, and render the map based on the color attribute value; and a display module, configured to traverse the map array, sequentially determine target regions based on the location attribute values in the map array, acquire vulnerability information corresponding to each target region, and display the vulnerability information in a floating layer associated with the target region.
[0013] This invention also provides an electronic device, including: a processor, a memory, and a communication bus, wherein the communication bus is used to realize a communication connection between the processor and the memory; the memory is used to store a program; and the processor is used to execute the program in the memory to implement the steps of the three-dimensional map visualization method as described in any of the above embodiments.
[0014] This invention also provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the steps of the three-dimensional map visualization method as described in any of the above embodiments.
[0015] The 3D map visualization method provided in the above embodiments of this application obtains scalable vector graphics data of a global map, and forms map arrays corresponding to various regions based on the scalable vector graphics data; obtains vulnerability information for each region, and determines the maximum and minimum vulnerability values based on the number of vulnerabilities in each region; determines the color attribute value of the map array for each region based on the maximum and minimum vulnerability values and the number of vulnerabilities corresponding to each region, and renders the map based on the color attribute value; traverses the map array, and sequentially determines target regions based on the location attribute values in the map array; for each target region, obtains the vulnerability information corresponding to the target region, and displays the vulnerability information in a floating layer associated with the target region. Thus, the 3D digital earth model created based on scalable vector graphics of a global map can solve the distortion problem caused by magnification of current 3D models based on bitmap rendering, clearly and intuitively presents the severity of risks in various regions, and sequentially displays the specific vulnerability information of each region, improving the user experience.
[0016] The three-dimensional map visualization device, electronic device, and computer-readable storage medium contain the same specific technical features as the three-dimensional map visualization method and have the same beneficial technical effects as the three-dimensional map visualization method, and will not be described in detail here. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating a three-dimensional map visualization method according to an embodiment of this application;
[0018] Figure 2 This is a flowchart illustrating a three-dimensional map visualization method according to another embodiment of this application;
[0019] Figure 3 This is a schematic diagram of the structure of a three-dimensional map visualization device according to an embodiment of this application;
[0020] Figure 4This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0021] The technical solution of this application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the specification of this application is for the purpose of describing particular embodiments only and is not intended to limit the ways in which this application may be implemented. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0023] Please see Figure 1 This application provides a method for visualizing a three-dimensional map, the method comprising:
[0024] S101: Obtain scalable vector graphics data of a global map, and form map arrays corresponding to each region based on the scalable vector graphics data; wherein, the map arrays include the region's corresponding identifier attribute, color attribute value, and location attribute value.
[0025] SVG (Scalable Vector Graphics) is an image file format used to describe two-dimensional vector and vector / raster graphics. The scalable vector graphics data of the global map can refer to standard SVG data based on a global map. The various regions refer to different sub-regions within a global area, such as countries or provinces. The map array can refer to a data storage list storing corresponding information for each region. The identifier attribute corresponding to a region can refer to a unique code for each region, such as the country code for each country or the province code for each province. Color attribute values can include the fill color for each region, mainly used for displaying heatmaps. The location attribute values can refer to the center coordinates of each region and the closed path of each region, such as the center coordinates and closed path of each province. The process of acquiring scalable vector graphics data of a global map and forming map arrays corresponding to each region based on this data can refer to an electronic device acquiring scalable vector graphics data of a global map and forming map arrays corresponding to each region based on this data.
[0026] S102: Obtain vulnerability information for each region, and determine the maximum and minimum vulnerability values based on the number of vulnerabilities in each region.
[0027] The vulnerability information for each region may include population density, temperature, and pandemic situation. The number of vulnerabilities in each region represents the severity of the vulnerability information. The maximum value of a vulnerability is 'max', and the minimum value is 'min'. Obtaining the vulnerability information for each region and determining the maximum and minimum values based on the number of vulnerabilities in each region can refer to: after the electronic device has rendered the global map, it calls the server-side data interface to obtain the vulnerability situation in each region, and uses JavaScript code to traverse the data in each region to find the maximum value (max) and minimum value (min).
[0028] S103: Based on the maximum value of the vulnerability, the minimum value of the vulnerability, and the number of vulnerabilities corresponding to each region, determine the color attribute value of the map array for each region, and render the map based on the color attribute value.
[0029] Here, color attributes are defined in RGB (Red, Green, Blue) format. Each color attribute contains two sets of color attribute values: rgb1 (r1, g, b) and rgb2 (r2, g, b). The G and B channels have the same value; the severity of the vulnerability is indicated by changing the r value. A larger r value indicates a greater number of vulnerabilities. Therefore, rgb1 and rgb2 represent different levels of vulnerability severity, and we assume rgb1 > rgb2. Rendering the map based on these color attribute values can refer to selecting the corresponding color attribute value based on the vulnerability information for each region and rendering the corresponding area of the map accordingly. The step of determining the color attribute value of the map array for each region based on the maximum vulnerability value, the minimum vulnerability value, and the number of vulnerabilities corresponding to each region, and rendering the map based on the color attribute value, can refer to: the electronic device determining the color attribute value of the map array for each region based on the maximum vulnerability value (max), the minimum vulnerability value (min), and the number of vulnerabilities corresponding to each region (num), and rendering the map based on the color attribute value.
[0030] S104: Traverse the map array, determine the target regions sequentially based on the location attribute values in the map array, obtain the vulnerability information corresponding to each target region for each target region, and display the vulnerability information in a floating layer associated with the target region.
[0031] Here, traversing the map array can refer to sequentially reading the map array. The target region can refer to the region on the global map corresponding to the location attribute value. The overlay mode refers to a temporary view that appears in a certain area on the global map page. Associating the vulnerability information with the target region in an overlay mode can refer to displaying the vulnerability information of the target region as an overlay directly above the target region on the global map. Traversing the map array, determining the target region sequentially based on the location attribute values in the map array, obtaining the vulnerability information corresponding to each target region for each target region, and displaying the vulnerability information as an overlay mode associated with the target region can refer to: the electronic device sequentially reading the map array, determining the target region sequentially based on the location attribute values corresponding to each region in the map array, obtaining the vulnerability information corresponding to each target region for each target region, and displaying the vulnerability information of the target region as an overlay directly above the target region on the global map.
[0032] The 3D map visualization method provided in the above embodiments of this application obtains scalable vector graphics data of a global map, and forms map arrays corresponding to various regions based on the scalable vector graphics data; obtains vulnerability information for each region, and determines the maximum and minimum vulnerability values based on the number of vulnerabilities in each region; determines the color attribute value of the map array for each region based on the maximum and minimum vulnerability values and the number of vulnerabilities corresponding to each region, and renders the map based on the color attribute value; traverses the map array, and sequentially determines target regions based on the location attribute values in the map array; for each target region, obtains the vulnerability information corresponding to the target region, and displays the vulnerability information in a floating layer associated with the target region. Thus, the 3D digital earth model created based on scalable vector graphics of a global map can solve the distortion problem caused by magnification of current 3D models based on bitmap rendering, clearly and intuitively presenting the severity of risks in various regions, and sequentially displaying the vulnerability information of corresponding regions in a floating layer, making it easier for users to intuitively obtain vulnerability information in various regions and improving the user experience.
[0033] In some embodiments, the step of acquiring scalable vector graphics data of a map and forming map arrays corresponding to different regions based on the scalable vector graphics data includes: acquiring a draft file of a global map and determining standard scalable vector graphics data of the global map; selecting a reference region from the global map, setting the color attribute value corresponding to the reference region to a first initial value, and setting the color attribute values corresponding to other regions in the global map other than the reference region to a second initial value; and extracting the location data, identifier, and color attribute value of each region to form a map array corresponding to each region.
[0034] Here, the global map draft file refers to a file that can be output in SVG format. The reference region can refer to a region on the global map used as a reference object; for example, selecting China as the reference region. Other regions outside the reference region can refer to regions on the global map other than the reference region, such as South Korea and Japan. Obtaining the global map draft file and determining the standard scalable vector graphics data of the global map can refer to an electronic device acquiring the SVG file of the global map and determining the standard scalable vector graphics data of the global map. The step of selecting a reference region from the global map, setting the color attribute value corresponding to the reference region as a first initial value, and setting the color attribute values corresponding to other regions in the global map other than the reference region as a second initial value can refer to the electronic device selecting a reference region from the global map, setting the color attribute value corresponding to the reference region as the first initial value, and setting the color attribute values corresponding to other regions in the global map other than the reference region as the second initial value. For example, by processing the SVG map file using the interpreted scripting language JavaScript, the electronic device sets the fill transparency of the map file for China to 1 (i.e., completely opaque) on the global map, and sets the fill transparency of the map file for regions outside of China to 0 (i.e., completely transparent). The step of extracting the location data, identifiers, and color attribute values of each region to form a map array corresponding to each region can refer to the electronic device extracting the location data, identifiers, and color attribute values of each region to form a map array corresponding to each region. For example, an electronic device extracts the closed path elements and center coordinates of each province, assigns a unique code to each province as its identifier, and defines an initial color. This information is then stored in the `mapData` array to form a map array corresponding to each region. The data elements of the map array can be divided by province, and each array element contains the center coordinates and region code as location data, the region code as a unique identifier, and the region's fill color as a color attribute value.
[0035] The three-dimensional map visualization method provided in the above embodiments of this application forms a map array corresponding to each of the regions based on the scalable vector graphic data, which can prepare for the clear display of subsequent heat maps and the automatic cyclic scanning and display of the vulnerability situation in each region.
[0036] In some embodiments, the three-dimensional map visualization method further includes: traversing the map array, and reloading the scalable vector graphic data of the global map to render and display the global map according to the location attribute value, color attribute value and identifier attribute of the map array corresponding to each region; wherein, the identifier of the region is displayed in association with the region.
[0037] Here, traversing the map array and reloading the scalable vector graphics data of the global map based on the location, color, and identifier values of the map array corresponding to each region to render and display the global map can refer to the electronic device traversing the map array and reloading the scalable vector graphics data of the global map based on the location, color, and identifier values of the map array corresponding to each region, so as to re-render and display each region in the global map. Associating the region's identifier with the region can refer to the electronic device associating the region's unique code with its name; for example, the electronic device displays the unique code and province name of the target province in a one-to-one correspondence.
[0038] The three-dimensional map visualization method provided in the above embodiments of this application associates and displays the region with the region, making it easier for users to intuitively obtain the current region when scanning the global map in a circular motion, thus improving the user experience.
[0039] In some embodiments, determining the color attribute value of the map array for each region based on the maximum vulnerability value, the minimum vulnerability value, and the number of vulnerabilities corresponding to each region, and rendering the map based on the color attribute value, includes: determining the vulnerability severity of the corresponding region based on the relationship between the maximum and minimum values in the vulnerability information of each region; using different annotation information to distinguish and display different vulnerability severity levels of the region; updating the color attribute value of the map array for each region; and rendering the map according to the updated color attribute value.
[0040] Here, determining the vulnerability severity of a region based on the relationship between the maximum and minimum values in the vulnerability information of each region can mean that the electronic device compares the maximum and minimum values in the vulnerability information of each region and determines the vulnerability severity of the corresponding region accordingly. For example, the electronic device compares the maximum and minimum values in the vulnerability information of each province in China and determines the vulnerability severity of China based on this relationship. The annotation information refers to data representing the color attribute values corresponding to a region. Differentiating the display of different vulnerability severities in a region using different annotation information, updating the color attribute values of the map array for each region, and rendering the map according to the updated color attribute values can mean that the electronic device uses different colors to differentiate the display of different vulnerability severities in a region, updates the color attribute values of the map array for each region accordingly, and re-renders each region based on the color attribute values of the map array.
[0041] The three-dimensional map visualization method provided in the above embodiments of this application describes the specific process of determining the color attribute value of the map array for each region based on the maximum vulnerability value, the minimum vulnerability value, and the number of vulnerabilities corresponding to each region, and rendering the map based on the color attribute value. This facilitates users to intuitively view the vulnerability severity of each region when viewing a global map, thus improving the user experience.
[0042] In some embodiments, determining the vulnerability severity of a corresponding region based on the relationship between the maximum and minimum values in the vulnerability information of each region includes: if the maximum and minimum values in the vulnerability information of a region are equal and equal to zero, determining that the vulnerability severity of each region is of the first category, and the color attribute value of the map array of each region is a first preset value; if the maximum and minimum values in the vulnerability information of a region are equal and not zero, determining that the vulnerability severity of each region is of the second category, and the color attribute value of the map array of each region is a second preset value; if the maximum and minimum values in the vulnerability information of a region are not equal, determining that the vulnerability severity of each region is of the third category, and calculating the color attribute value of the region according to the first preset value, the second preset value, the maximum value, the minimum value, and the vulnerability information of each region.
[0043] Here, if the maximum and minimum values in the vulnerability information of a region are equal and equal to zero, the vulnerability severity of each region is determined to be of the first category. The color attribute value of the map array for each region can be a first preset value: if max = min and both are 0 in the vulnerability information of each region, it means that the number of vulnerabilities in each region is 0, and the color attribute value of all regions is assigned to rgb2(r2, g, b). For example, if max = min and both are 0 in the vulnerability information of each province in China, it means that the number of vulnerabilities in each province is 0, and the color attribute value of all provinces is assigned to rgb2(r2, g, b). If the maximum and minimum values in the vulnerability information of a region are equal and not zero, the vulnerability severity of each region is determined to be of the second category. The color attribute value of the map array for each region can be a second preset value: if max = min and neither is 0 in the vulnerability information of each region, it means that vulnerabilities exist in each region and the number is the same, and the color attribute value of all regions is assigned to rgb1(r1, g, b). For example, if max = min and none of them are 0 in the vulnerability information of each province in China, it means that the number of vulnerabilities in each province is the same, and the color attribute value of all provinces is assigned to rgb1(r1, g, b). If the maximum and minimum values in the vulnerability information of a region are not equal, the vulnerability severity of each region is determined to be in the third category. The color attribute value of the region is calculated according to the first preset value, the second preset value, the maximum value, the minimum value, and the vulnerability information of each region. If max in the vulnerability information of each region is not equal to min, it indicates that the number of vulnerabilities in each region is not equal. The formula for calculating the r-channel color value of the region with a vulnerability count of num is as follows:
[0044]
[0045] Where max is the maximum value of vulnerabilities in each region, min is the minimum value of vulnerabilities in each region, r1 is the r channel color value when max = min and none of them are 0 in the vulnerability information of each region, r2 is the r channel color value when max = min and none of them are 0 in the vulnerability information of each region, and num is the number of vulnerabilities in the target region.
[0046] The three-dimensional map visualization method provided in the above embodiments of this application specifically describes the process of determining the color attribute value of the map array for each region based on the size relationship between the maximum and minimum vulnerability values in the vulnerability information. This facilitates users to intuitively view the vulnerability severity of each region when viewing a global map, thereby improving the user experience.
[0047] In some embodiments, the step of traversing the map array, sequentially determining target regions based on the location attribute values in the map array, obtaining vulnerability information corresponding to each target region, and displaying the vulnerability information in a floating layer associated with the target region includes: traversing the map array by rotating a scanning ring, and sequentially determining target regions based on the location attribute values in the map array; wherein the scanning ring is composed of registers connected end-to-end, each corresponding to a region, and each register includes a displacement attribute determined based on the location attribute values of the corresponding region and a dynamic rotation display attribute characterizing the rotation animation display effect; for each target region, obtaining vulnerability information corresponding to the target region, and displaying the vulnerability information in a floating layer associated with the target region.
[0048] Here, the step of traversing the map array using a scanning ring and determining the target regions sequentially based on the position attribute values in the map array can specifically be as follows: The electronic device traverses the map array, obtains the center coordinates (mark) of the current region based on the map array, locates the scanning ring according to the center coordinates, and determines the regions to be displayed sequentially within the scanning ring based on the region information in the global map. Determining the sequential display of regions within the scanning ring based on the region information in the global map can be achieved by using the `translate(x-value, y-value)` function under the `transform` property to determine the display order of regions in the global map within the scanning ring, where `x-value` is the x-axis offset length and `y-value` is the y-axis offset length. The scanning ring consists of registers connected end-to-end, each corresponding to a region. Each register includes a displacement attribute determined based on the position attribute value of the corresponding region and a dynamic rotation display attribute representing the rotation animation effect. The shape of the register can be a circular layer. The displacement attribute value can be a region path. The dynamic rotation display attribute refers to the `animate` property adding a looping rotation animation effect. The step of obtaining vulnerability information corresponding to each target region and displaying the vulnerability information as an overlay associated with the target region can refer to the following: the electronic device obtains vulnerability information corresponding to each target region and displays the vulnerability information as an overlay associated with the target region. For example, the electronic device obtains vulnerability information for the currently scanned province by calling a server data interface through a browser, constructs an overlay using the `rect` tag in SVG, obtains the center coordinates (`mark`) of the current region based on the map array, locates the overlay position based on the center coordinates, and uses the `text` tag to display the vulnerability information at the overlay position. Then, the electronic device uses `animateCount` to count the provinces that have been rotated, setting an initial value of 1. During the polling scan, the current province is the information of `mapData[animateCount-1]`. At this time, the vulnerability information of the current province is displayed as an overlay within the region path of the current province. Then, after scanning each province in a loop for 5 seconds, it jumps to the next province. Each time a province is switched, animateCount is incremented by 1. When animateCount is greater than the length of the array mapData, animateCount is reset to 1, thus starting a new round of vulnerability scanning.
[0049] The 3D map visualization method provided in the above embodiments of this application traverses the map array by scanning a loop, and determines the target regions sequentially based on the location attribute values in the map array. For each target region, it obtains the vulnerability information corresponding to the target region, and displays the vulnerability information as an association with the target region in a floating layer. This makes it convenient for users to intuitively view the vulnerability information of various regions when viewing the global map. Moreover, when there is no operation on the global map, it can automatically scan and display the vulnerability information of various regions, thereby improving the user experience.
[0050] In some embodiments, the 3D map visualization method further includes: constructing a first 3D sphere model according to a preset 3D drawing application; performing geographic overlay and map scan overlay on the first 3D sphere model based on the updated scalable vector graphics data; constructing a second 3D sphere model according to the 3D drawing application; overlapping the second 3D sphere model with the first 3D sphere model and placing it behind the first 3D sphere model, wherein the size of the second 3D sphere model is larger than the size of the first 3D sphere model; enabling an effects compositor to process the scene of the second 3D sphere model accordingly; and displaying the first 3D sphere model in the center of the second 3D sphere model.
[0051] Here, the construction of a first 3D sphere model based on a preset 3D drawing application, and the application of geotexturing and map scanning layering to the first 3D sphere model based on the updated scalable vector graphics data, refers to the electronic device constructing a first 3D sphere model based on a preset 3D drawing application, and applying geotexturing and map scanning layering to the first 3D sphere model based on the updated scalable vector graphics data. Specifically, the electronic device uses the open-source library three.javascript of the WebGL (Web Graphics Library) 3D engine to create a scene, selects a suitable camera and lighting environment, constructs the first 3D sphere model, selects MeshPhongMaterial to achieve a glossy surface material effect, and uses TextureLoader to load geotexturing images, including color map, normal map MeshPhongMaterial, and specular map. The normal map is used to simulate the mountains protruding on the Earth's surface, and the specular map simulates the reflection effect of sunlight on the ocean. The dimensions of the above three maps can be 4096 in length and 2048 in width, respectively. At the same time, the electronic device uses WebGL (Web Graphics Library) 3D engine open-source library three.javascript to create a scene, selects a suitable camera and lighting environment, constructs the first 3D sphere model, selects MeshPhongMaterial to achieve a glossy surface material effect, and uses TextureLoader to load geotexturing images, including color map, normal map MeshPhongMaterial, and specular map. The normal map is used to simulate the mountains protruding on the Earth's surface, and the specular map is used to simulate the reflection effect of sunlight on the ocean. The dimensions of the above three maps can be 4096 in length and 2048 in width, respectively. The open-source library three.javascript (GraphicsLibrary, Web Graphics Library) for a 3D engine creates a scene, selects a suitable camera and lighting environment, constructs a second first 3D sphere model, loads a geotextile image using TextureLoader, and applies it as a color map in MeshBasicMaterial to the Earth's surface. The transparent property of the sphere model's material is set to true, and the color map's dimensions are 4096 pixels long and 2048 pixels wide. The first and second first 3D sphere models are then overlapped to perform geotextile and map scanning on the first 3D sphere model.The construction of a second 3D sphere model based on the 3D drawing application, and the overlapping of the second 3D sphere model with the first 3D sphere model and its location on the back of the first 3D sphere model, can refer to the following: The electronic device constructs a second 3D sphere model based on the 3D drawing application, and the second 3D sphere model overlaps with the first 3D sphere model and is located on the back of the first 3D sphere model. Specifically, the electronic device uses three.javascript to create a second scene, constructs a second 3D sphere model corresponding to the second scene based on the Mesh constructor function and the shader material ShaderMaterial, adjusts the size of the second 3D sphere model so that the size of the second 3D sphere model is slightly larger than the size of the first 3D sphere model, and sets the position face property of the material to BackSide, so that the material is only applied to the back of the first 3D sphere model, making it appear slightly larger than the sphere of the first 3D sphere model. The phrase "enabling the effects compositor to process the scene of the second 3D sphere model and displaying the first 3D sphere model in the center of the second 3D sphere model" can mean that the electronic device enables the effects compositor to process the scene of the second 3D sphere model and displays the first 3D sphere model in the center of the second 3D sphere model. Specifically, the electronic device uses the EffectComposer, RenderPass, and ShaderPass channels in the three.javascript engine to perform post-processing on the second scene, so that the first 3D sphere model is rendered and displayed in the center of the aperture of the second 3D sphere model.
[0052] The three-dimensional map visualization method provided in the above embodiments of this application creates a first three-dimensional sphere model and a second three-dimensional sphere model based on the WebGL three-dimensional engine. It realizes the aperture effect and map scanning layering of the first three-dimensional sphere model, increases the cool effect of global map in terms of expressiveness, and enhances the visual impact on users.
[0053] In some embodiments, the three-dimensional map visualization method further includes: receiving an operation event that selects a region; determining a current target region based on the operation event; acquiring vulnerability information corresponding to the current target region for the current target region; displaying the vulnerability information in a floating layer associated with the current target region; and if no new operation event that selects a region is received within a preset time period, returning to traverse the map array, determining target regions sequentially based on the location attribute values in the map array, acquiring vulnerability information corresponding to each target region for each target region, and displaying the vulnerability information in a floating layer associated with the target region.
[0054] Here, the operation event of selecting a region can refer to a click operation within the path of the region. Receiving the operation event of selecting a region, determining the current target region based on the operation event, and obtaining the vulnerability information corresponding to the current target region and displaying the vulnerability information in an overlay associated with the current target region can mean that: the electronic device receives the operation event of selecting a region, determines the current target region based on the operation event, obtains the vulnerability information corresponding to the current target region, and displays the vulnerability information in an overlay associated with the current target region; specifically, the electronic device adds a listening event to the SVG map file of the global map mentioned above. When a mouse click on a region is detected, the current polling scan is turned off, the region name of the clicked current region is obtained by parsing map elements, and the vulnerability information corresponding to the current region is obtained, and the vulnerability information is displayed in an overlay associated with the current target region. The step of returning to traverse the map array and sequentially determining target regions based on the location attribute values in the map array when no new operation event for selecting a region is received within a preset time period, and obtaining the vulnerability information corresponding to the target region for each target region and displaying the vulnerability information in a floating layer associated with the target region, can be as follows: If the electronic device does not receive a new operation event for selecting a region within a preset time period, it returns to traverse the map array and sequentially determines target regions based on the location attribute values in the map array, obtaining the vulnerability information corresponding to each target region for each target region, and displaying the vulnerability information in a floating layer associated with the target region; specifically, if the electronic device does not receive any other click operation within a preset time period, such as 10 seconds, it automatically starts a new round of polling and displays the vulnerability information in a floating layer associated with the target region.
[0055] The three-dimensional map visualization method provided in the above embodiments of this application solves the problem that, in addition to zooming in, zooming out, and rotating the global map interactively, it also enables users to click on the global map, making it easier for users to view the vulnerability data of the desired province and improving the user experience.
[0056] Please see Figure 2 This is a flowchart of a three-dimensional map visualization method in another embodiment of this application. The method is executed by an electronic device such as a computer, and the definition of the electronic device is explained. The method includes:
[0057] S201: The electronic device acquires a draft file of a global map, determines the standard scalable vector graphics data of the global map, and forms a map array corresponding to each region based on the scalable vector graphics data;
[0058] S202: The electronic device acquires vulnerability information for each of the aforementioned regions and determines the maximum and minimum vulnerability values based on the number of vulnerabilities in each of the aforementioned regions;
[0059] S203: The electronic device determines the color attribute value of the map array for each region based on the maximum vulnerability value, the minimum vulnerability value, and the number of vulnerabilities corresponding to each region, and renders the map based on the color attribute value;
[0060] S204: The electronic device traverses the map array and, based on the location attribute values, color attribute values, and identifier attribute values of the map array corresponding to each region, reloads the scalable vector graphic data of the global map to render and display the global map;
[0061] S205: The electronic device traverses the map array by scanning the scanning ring in a loop, and determines the target regions sequentially based on the location attribute values in the map array; for each target region, it obtains the vulnerability information corresponding to the target region, and displays the vulnerability information in a floating layer associated with the target region;
[0062] S206: The electronic device receives an operation event that selects a region, determines the current target region based on the operation event, obtains vulnerability information corresponding to the current target region, and displays the vulnerability information in a floating layer associated with the current target region;
[0063] S207: The electronic device constructs a first three-dimensional sphere model according to a preset three-dimensional drawing application, and performs geographic mapping and map scanning mapping on the first three-dimensional sphere model based on the updated scalable vector graphics data;
[0064] S208: The electronic device constructs a second three-dimensional sphere model according to the three-dimensional drawing application, overlaps the second three-dimensional sphere model with the first three-dimensional sphere model and is located on the back of the first three-dimensional sphere model, and the size of the second three-dimensional sphere model is larger than the size of the first three-dimensional sphere model;
[0065] S209: Enable the effects compositor to process the scene of the second 3D sphere model accordingly, and display the first 3D sphere model in the center of the second 3D sphere model.
[0066] The 3D map visualization method provided in the above embodiments of this application obtains scalable vector graphics data of a global map, and forms map arrays corresponding to various regions based on the scalable vector graphics data; obtains vulnerability information for each region, and determines the maximum and minimum vulnerability values based on the number of vulnerabilities in each region; determines the color attribute value of the map array for each region based on the maximum and minimum vulnerability values and the number of vulnerabilities corresponding to each region, and renders the map based on the color attribute value; traverses the map array, and sequentially determines target regions based on the location attribute values in the map array; for each target region, obtains the vulnerability information corresponding to the target region, and displays the vulnerability information as an association with the target region in a floating layer. Thus, the 3D digital earth model created based on scalable vector graphics of a global map can solve the distortion problem caused by magnification of current 3D models based on bitmap rendering, clearly and intuitively presenting the severity of risks in various regions; it also enables users to click on the global map, facilitating users to view vulnerability data for desired provinces; and it realizes global map visualization. Figure 3 The aperture effect of the 3D sphere model and the map scanning overlay enhance the visual appeal of the global map, making it more visually stunning for users.
[0067] Please see Figure 3 This invention also provides a three-dimensional map visualization device, comprising:
[0068] The acquisition module 301 is used to acquire scalable vector graphic data of a global map and form a map array corresponding to each region based on the scalable vector graphic data; wherein, the map array includes the region's corresponding identifier attribute, color attribute value and location attribute value;
[0069] The determination module 302 is used to obtain vulnerability information for each region, determine the maximum and minimum vulnerability values based on the number of vulnerabilities in each region, and further to determine the color attribute values of the map array for each region based on the maximum vulnerability value, the minimum vulnerability value, and the number of vulnerabilities corresponding to each region, and render the map based on the color attribute values.
[0070] Display module 303 is used to traverse the map array, determine the target regions sequentially based on the location attribute values in the map array, obtain the vulnerability information corresponding to each target region for each target region, and display the vulnerability information in a floating layer associated with the target region.
[0071] The acquisition module 301 is further configured to acquire a draft file of a global map, determine the standard scalable vector graphic data of the global map; select a reference region from the global map, set the color attribute value corresponding to the reference region to a first initial value, and set the color attribute value corresponding to other regions in the global map other than the reference region to a second initial value; extract the location data, identifier, and color attribute value of each region to form a map array corresponding to each region.
[0072] The display module 303 is further configured to traverse the map array and reload the scalable vector graphic data of the global map to render and display the global map based on the location attribute value, color attribute value, and identifier attribute value of the map array corresponding to each region; wherein, the identifier of the region is associated with the region for display.
[0073] The determining module 302 is further configured to determine the severity of vulnerabilities in a corresponding region based on the relationship between the maximum and minimum values in the vulnerability information of each region; to differentiate the severity of vulnerabilities in each region using different annotation information; to update the color attribute values of the map array for each region; and to render the map according to the updated color attribute values.
[0074] The determining module 302 is further configured to: if the maximum and minimum values in the vulnerability information of the region are equal and equal to zero, determine that the vulnerability severity of each region is of the first category, and the color attribute value of the map array of each region is a first preset value; if the maximum and minimum values in the vulnerability information of the region are equal and not zero, determine that the vulnerability severity of each region is of the second category, and the color attribute value of the map array of each region is a second preset value; if the maximum and minimum values in the vulnerability information of the region are not equal, determine that the vulnerability severity of each region is of the third category, and calculate the color attribute value of the region according to the first preset value, the second preset value, the maximum value, the minimum value, and the vulnerability information of each region.
[0075] The display module 303 is further configured to traverse the map array by scanning in a loop, and sequentially determine target regions based on the position attribute values in the map array; wherein, the scanning loop is composed of registers connected end to end, each corresponding to a region, and each register includes a displacement attribute determined based on the position attribute value of the corresponding region and a dynamic rotation display attribute characterizing the rotation animation display effect; for each target region, the vulnerability information corresponding to the target region is obtained, and the vulnerability information is displayed in a floating layer associated with the target region.
[0076] The 3D map visualization device further includes a construction module 304, which is used to construct a first 3D sphere model according to a preset 3D drawing application, and perform geographic overlay and map scan overlay on the first 3D sphere model based on the updated scalable vector graphics data; construct a second 3D sphere model according to the 3D drawing application, overlap the second 3D sphere model with the first 3D sphere model and be located on the back of the first 3D sphere model, and the size of the second 3D sphere model is larger than the size of the first 3D sphere model; the display module 303 is also used to enable an effects compositor to process the scene of the second 3D sphere model accordingly, and display the first 3D sphere model in the center of the second 3D sphere model.
[0077] Figure 4 The diagram illustrates the structure of an electronic device according to an embodiment of this application. The specific embodiments of this invention do not limit the specific implementation of the electronic device. Figure 4 As shown, the electronic device may include a processor 401, a memory 402, and a communication bus 403. The processor 401 and the memory 402 communicate with each other via the communication bus 403. The processor 401 executes programs, specifically the steps described above in the embodiment of the 3D map visualization method.
[0078] Specifically, a program may include program code, which includes computer-executable instructions.
[0079] Processor 401 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The terminal device may include one or more processors of the same type, such as one or more CPUs; or it may include processors of different types, such as one or more CPUs and one or more ASICs.
[0080] Memory 402 is used to store programs. Memory 402 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0081] Specifically, the program can be invoked by the processor 401 to cause the electronic device to perform the following operations:
[0082] The system acquires scalable vector graphics data from a global map, and forms map arrays corresponding to various regions based on the scalable vector graphics data. Each map array includes a region-specific identifier, color attribute value, and location attribute value. It acquires vulnerability information for each region, and determines a maximum and minimum vulnerability value based on the number of vulnerabilities in each region. Based on the maximum and minimum vulnerability values and the number of vulnerabilities corresponding to each region, it determines the color attribute value of the map array for each region, and renders the map based on the color attribute value. The system iterates through the map array, sequentially determining target regions based on the location attribute values in the map array. For each target region, it acquires the corresponding vulnerability information and displays the vulnerability information as an associated overlay with the target region.
[0083] In one optional implementation, the program may be invoked by processor 401 to cause the electronic device to perform the following operations: acquiring scalable vector graphics data of a map and forming map arrays corresponding to various regions based on the scalable vector graphics data, including: acquiring a draft file of a global map and determining standard scalable vector graphics data of the global map; selecting reference regions from the global map, setting the color attribute value corresponding to the reference region to a first initial value, and setting the color attribute values corresponding to other regions in the global map other than the reference region to a second initial value; extracting the location data, identifier, and color attribute value of each region to form map arrays corresponding to each region.
[0084] In one optional implementation, the program may be invoked by the processor 401 to cause the electronic device to perform the following operations: traversing the map array, and reloading the scalable vector graphic data of the global map to render and display the global map according to the location attribute values, color attribute values, and identifier attribute values of the map array corresponding to each region; wherein, the identifier of the region is associated with the region for display.
[0085] In one optional implementation, the program may be invoked by the processor 401 to cause the electronic device to perform the following operations: determine the severity of vulnerabilities in the corresponding regions based on the relationship between the maximum and minimum values in the vulnerability information of each region; differentiate the display of different vulnerability severity in each region using different annotation information; update the color attribute values of the map array for each region; and render the map according to the updated color attribute values.
[0086] In one optional implementation, the program may be invoked by processor 401 to cause the electronic device to perform the following operations: if the maximum and minimum values in the vulnerability information of the region are equal and equal to zero, the vulnerability severity of each region is determined to be of the first category, and the color attribute value of the map array of each region is a first preset value; if the maximum and minimum values in the vulnerability information of the region are equal and not zero, the vulnerability severity of each region is determined to be of the second category, and the color attribute value of the map array of each region is a second preset value; if the maximum and minimum values in the vulnerability information of the region are not equal, the vulnerability severity of each region is determined to be of the third category, and the color attribute value of the region is calculated according to the first preset value, the second preset value, the maximum value, the minimum value, and the vulnerability information of each region.
[0087] In one optional implementation, the program may be invoked by processor 401 to cause the electronic device to perform the following operations: traversing the map array by scanning in a loop, and sequentially determining target regions based on the position attribute values in the map array; wherein the scanning loop is composed of registers connected end-to-end, each corresponding to a region, and each register includes a displacement attribute determined based on the position attribute value of the corresponding region and a dynamic rotation display attribute characterizing the rotation animation display effect; for each target region, obtaining vulnerability information corresponding to the target region, and displaying the vulnerability information in a floating layer associated with the target region.
[0088] In one optional implementation, the program may be invoked by processor 401 to cause the electronic device to perform the following operations: constructing a first three-dimensional sphere model according to a preset three-dimensional drawing application; performing geo-mapping and map scanning on the first three-dimensional sphere model based on the updated scalable vector graphics data; constructing a second three-dimensional sphere model according to the three-dimensional drawing application; overlapping the second three-dimensional sphere model with the first three-dimensional sphere model and placing it behind the first three-dimensional sphere model, wherein the size of the second three-dimensional sphere model is larger than the size of the first three-dimensional sphere model; enabling an effects compositor to process the scene of the second three-dimensional sphere model accordingly; and displaying the first three-dimensional sphere model in the center of the second three-dimensional sphere model.
[0089] This invention also provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the steps of the three-dimensional map visualization method as described in any of the above embodiments.
[0090] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, the embodiments of the present invention are not directed to any particular programming language. It should be understood that the content of the invention described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of the invention.
[0091] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0092] Similarly, it should be understood that, in order to streamline the invention and aid in understanding one or more of the various aspects of the invention, features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the above description of exemplary embodiments of the invention. However, this disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim.
[0093] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0094] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.
Claims
1. A method for visualizing three-dimensional maps, characterized in that, include: Obtain scalable vector graphics data of a global map, and form map arrays corresponding to each region based on the scalable vector graphics data; wherein, the map arrays include the region's corresponding identifier attribute, color attribute value, and location attribute value; Obtain vulnerability information for each of the aforementioned regions, and determine the maximum and minimum vulnerability values based on the number of vulnerabilities in each region; Based on the relationship between the maximum and minimum values in the vulnerability information of each region, the severity of the vulnerability in the corresponding region is determined; different labeling information is used to distinguish and display the different vulnerability severity in the region, the color attribute value of the map array of each region is updated, and the map is rendered according to the updated color attribute value; Specifically, if the maximum and minimum values in the vulnerability information of each region are equal and equal to zero, the vulnerability severity of each region is determined to be of the first category, and the color attribute value of the map array of each region is a first preset value; if the maximum and minimum values in the vulnerability information of each region are equal and not zero, the vulnerability severity of each region is determined to be of the second category, and the color attribute value of the map array of each region is a second preset value; if the maximum and minimum values in the vulnerability information of each region are not equal, the vulnerability severity of each region is determined to be of the third category, and the color attribute value of each region is calculated according to the first preset value, the second preset value, the maximum value, the minimum value, and the vulnerability information of each region. Traverse the map array, determine the target regions in sequence based on the location attribute values in the map array, obtain the vulnerability information corresponding to each target region, and display the vulnerability information in a floating layer associated with the target region; A first three-dimensional sphere model is constructed according to a preset three-dimensional drawing application, and geographic mapping and map scanning mapping are performed on the first three-dimensional sphere model based on the updated scalable vector graphics data. A second three-dimensional sphere model is constructed according to the three-dimensional drawing application. The second three-dimensional sphere model is overlapped with the first three-dimensional sphere model and located on the back of the first three-dimensional sphere model. The size of the second three-dimensional sphere model is larger than the size of the first three-dimensional sphere model. The effects compositor is enabled to process the scene of the second 3D sphere model accordingly, and the first 3D sphere model is displayed in the center of the second 3D sphere model.
2. The three-dimensional map visualization method as described in claim 1, characterized in that, The process of acquiring scalable vector graphics data and forming map arrays corresponding to different regions based on the scalable vector graphics data includes: Obtain a draft file of a global map and determine the standard scalable vector graphics data of the global map; Select a reference region from the global map, set the color attribute value corresponding to the reference region as a first initial value, and set the color attribute values corresponding to other regions in the global map other than the reference region as a second initial value. Extract the location data, identifiers, and color attribute values of each region to form a map array corresponding to each region.
3. The three-dimensional map visualization method as described in claim 1, characterized in that, Also includes: The map array is traversed, and the scalable vector graphics data of the global map is reloaded and rendered based on the location attribute value, color attribute value, and identifier attribute value of the map array corresponding to each region; wherein, the identifier of the region is associated with the region for display.
4. The three-dimensional map visualization method as described in claim 1, characterized in that, The process of traversing the map array, determining target regions sequentially based on location attribute values in the map array, obtaining vulnerability information corresponding to each target region, and displaying the vulnerability information as an overlay associated with the target region includes: The scanning ring iterates through the map array, and the target regions are determined sequentially based on the position attribute values in the map array. The scanning ring is composed of registers connected end to end, each corresponding to a region. Each register includes a displacement attribute determined based on the position attribute value of the corresponding region and a dynamic rotation display attribute that characterizes the rotation animation display effect. For each target region, obtain the vulnerability information corresponding to the target region, and display the vulnerability information in a floating layer associated with the target region.
5. A three-dimensional map visualization device, characterized in that, include: The acquisition module is used to acquire scalable vector graphics data of a global map, and form map arrays corresponding to each region based on the scalable vector graphics data; wherein, the map arrays include the region's corresponding identifier attribute, color attribute value and location attribute value; The determination module is used to obtain vulnerability information for each of the regions, determine the maximum and minimum vulnerability values based on the number of vulnerabilities in each region, and further determine the color attribute values of the map array for each region based on the maximum vulnerability value, the minimum vulnerability value, and the number of vulnerabilities corresponding to each region, and render the map based on the color attribute values. The determining module is further configured to determine the severity of vulnerabilities in a corresponding region based on the relationship between the maximum and minimum values in the vulnerability information of each region; to differentiate and display the different vulnerability severity levels of the region using different annotation information; to update the color attribute values of the map array for each region; and to render the map according to the updated color attribute values. The determining module is further configured to: if the maximum and minimum values in the vulnerability information of each region are equal and equal to zero, determine that the vulnerability severity of each region is of the first category, and the color attribute value of the map array of each region is a first preset value; if the maximum and minimum values in the vulnerability information of each region are equal and not zero, determine that the vulnerability severity of each region is of the second category, and the color attribute value of the map array of each region is a second preset value; if the maximum and minimum values in the vulnerability information of each region are not equal, determine that the vulnerability severity of each region is of the third category, and calculate the color attribute value of each region according to the first preset value, the second preset value, the maximum value, the minimum value, and the vulnerability information of each region. The display module is used to traverse the map array, determine the target regions in sequence based on the location attribute values in the map array, obtain the vulnerability information corresponding to each target region, and display the vulnerability information in a floating layer associated with the target region. A construction module is used to construct a first three-dimensional sphere model according to a preset three-dimensional drawing application, perform geographic overlay and map scan overlay on the first three-dimensional sphere model based on the updated scalable vector graphics data, construct a second three-dimensional sphere model according to the three-dimensional drawing application, overlap the second three-dimensional sphere model with the first three-dimensional sphere model and be located on the back of the first three-dimensional sphere model, and the size of the second three-dimensional sphere model is larger than the size of the first three-dimensional sphere model. The display module is also used to enable the effects compositor to process the scene of the second three-dimensional sphere model accordingly, and display the first three-dimensional sphere model in the center of the second three-dimensional sphere model.
6. An electronic device, characterized in that, include: Processor, memory, and communication bus The communication bus is used to realize the communication connection between the processor and the memory; The memory is used to store programs; The processor is used to execute the program in the memory to implement the steps of the three-dimensional map visualization method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs, which can be executed by one or more processors to implement the steps of the three-dimensional map visualization method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Data visualization method, data visualization device for power system, computer equipment and storage medium
CN109686225A