Hierarchical mapping data visualization coloring method and device based on extended adjacency matrix, equipment, medium and program product

By introducing hierarchical structure information and extending adjacency matrix constraints on the basis of existing adjacency matrices, and optimizing color allocation, the problem of insufficient visualization of complex data is solved, and the visual readability and hierarchical expression ability are improved.

CN122134848APending Publication Date: 2026-06-02WEBRAY TECH BEIJING CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WEBRAY TECH BEIJING CO LTD
Filing Date
2026-04-30
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing color assignment methods are insufficient for high-quality visualization when dealing with complex data that is multi-level and multi-clustered, especially in terms of hierarchical semantics, spatial similarity, and visual separation.

Method used

By introducing hierarchical structure information and extending the adjacency matrix constraints, an extended adjacency matrix is ​​constructed. Combined with the Laplace matrix and the greedy exchange algorithm, the color allocation effect is optimized, thereby improving the visualization hierarchy and visual readability of complex data.

Benefits of technology

It achieves efficient visualization of hierarchical semantics, improves the visual recognition and overall readability of complex data, and enhances users' understanding and analysis capabilities of data structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122134848A_ABST
    Figure CN122134848A_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, device, medium, and program product for hierarchical mapping data visualization coloring based on an extended adjacency matrix, relating to the fields of information processing and visualization technology. The method includes: acquiring hierarchical structure data and boundary information of the smallest coloring unit; parsing the hierarchical structure data to determine the mapping relationship between each upper-level region and its corresponding sub-region; constructing an extended adjacency matrix based on the mapping relationship and the boundary information of the smallest coloring unit; performing color assignment processing on each upper-level region to determine a region coloring table; and performing color rendering processing on all sub-regions in the hierarchical structure data based on the region coloring table and the mapping relationship to obtain a region coloring map. The embodiments provided by this invention can optimize color assignment effects and improve the hierarchical expression capability and visual readability of complex data visualization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information processing and visualization technology, and in particular to a method, apparatus, device, medium and program product for visualization coloring of hierarchical mapping data based on an extended adjacency matrix. Background Technology

[0002] With the rapid development of information technology, complex hierarchical data (such as geospatial data, network topology, organizational structure, etc.) are increasingly widely used in data analysis and visualization. Visually presenting the structural characteristics and hierarchical relationships of data through graphical means helps users quickly understand the overall framework and internal connections of the data. Color allocation (shading), as an important component of visualization, plays a crucial role in improving data readability and user cognitive efficiency.

[0003] Existing color assignment methods typically use adjacency matrices to describe the adjacency relationships between regions or nodes, and perform sorting and coloring based on algorithms such as spectral ordering and greedy swapping. These methods can reduce color conflicts between adjacent nodes to some extent and improve visual recognition. However, for complex data with multiple levels and clusters, these methods still have shortcomings in handling hierarchical semantics, spatial proximity, and visual separation, making it difficult to fully meet the needs of high-quality visualization.

[0004] Therefore, how to color multi-level structured data is a technical problem that urgently needs to be solved. Summary of the Invention

[0005] This invention provides a hierarchical mapping data visualization coloring method, apparatus, device, medium, and program product based on an extended adjacency matrix. By introducing hierarchical structure information and extending adjacency matrix constraints, the color allocation effect is further optimized while maintaining the existing sorting and coloring algorithm framework, thereby improving the hierarchical expression capability and visual readability of complex data visualization.

[0006] In a first aspect, the present invention provides a hierarchical mapping data visualization coloring method based on an extended adjacency matrix, comprising the following steps: Obtain the hierarchical structure data and the boundary information of the smallest coloring unit; The hierarchical data is parsed to determine the mapping relationship between each upper-level region and its corresponding sub-region; wherein, the upper-level region includes at least a plurality of the sub-regions; Based on the mapping relationship and the boundary information of the minimum coloring unit, an extended adjacency matrix is ​​constructed; Based on the extended adjacency matrix, color assignment is performed on each upper-layer region to determine a region coloring table; wherein, the region coloring table represents the color assigned to each upper-layer region. Based on the region coloring table and the mapping relationship, coloring and rendering processes are performed on all sub-regions in the hierarchical data to obtain a region coloring map.

[0007] Preferably, in the hierarchical mapping data visualization coloring method based on the extended adjacency matrix provided by the present invention, the step of constructing the extended adjacency matrix based on the mapping relationship and the boundary information of the smallest coloring unit includes: Based on the mapping relationship and the boundary information of the smallest coloring unit, the boundary information of the upper region is determined; Based on the boundary information of the upper region, an extended adjacency matrix is ​​constructed.

[0008] Preferably, in the hierarchical mapping data visualization coloring method based on the extended adjacency matrix provided by the present invention, the boundary information of each minimum coloring unit includes at least: the name of the minimum coloring unit and the boundary coordinates of the minimum coloring unit; Determining the boundary information of the upper-layer region based on the mapping relationship and the boundary information of the smallest coloring unit includes: Based on the minimum coloring unit name and minimum coloring unit boundary coordinates, traverse all sub-regions indicated by the mapping relationship, determine the minimum coloring unit names with the same minimum coloring unit boundary coordinates, and merge the minimum coloring unit names with the same minimum coloring unit boundary coordinates to obtain the boundary information of the upper region.

[0009] Preferably, in the hierarchical mapping data visualization coloring method based on the extended adjacency matrix provided by the present invention, the step of constructing the extended adjacency matrix based on the boundary information of the upper-layer region includes: Determine the number of upper-layer regions indicated by the boundary information of the upper-layer regions; Construct an initial adjacency matrix with empty elements based on the number of upper-level regions; The first and second regions are determined by traversing the boundary information of all the upper-layer regions. Determine in turn whether the upper regions of the first region and the upper regions of the second region are adjacent; If so, mark it as a region adjacency in the initial adjacency matrix; If not, expand the first region boundary coordinates of the upper region of the first region and the second region boundary coordinates of the upper region of the second region according to the preset expansion distance; and when the upper regions of the first region and the second region intersect after expansion, mark them as spatial adjacency in the initial adjacency matrix according to the first region boundary coordinates and the second region boundary coordinates; until all the upper regions of the first region and the upper regions of the second region are traversed in a loop, the expanded adjacency matrix is ​​obtained.

[0010] Preferably, in the hierarchical mapping data visualization coloring method based on the extended adjacency matrix provided by the present invention, the step of performing color assignment processing on each upper-level region based on the extended adjacency matrix to determine the region coloring table includes: A Laplacian matrix is ​​constructed based on the extended adjacency matrix, and the Laplacian matrix is ​​decomposed to obtain eigenvectors; Based on the feature vector, the region numbers of all upper-layer regions are initially sorted to obtain an initial sorting sequence; A greedy swapping strategy is used to perform local optimization on the initial sorted sequence to obtain the optimized region numbering order. Obtain a preset color palette, and assign colors to each upper-level region sequentially according to the optimized region numbering order based on the color palette to obtain the region coloring table.

[0011] Preferably, according to the hierarchical mapping data visualization coloring method based on the extended adjacency matrix provided by the present invention, after the step of performing coloring and rendering processing on all sub-regions of the hierarchical structure data based on the region coloring table and the mapping relationship to obtain a region coloring map, the method includes: Calculate the minimum color difference and perceptual separability index of the region staining map; The current shading is evaluated based on the minimum color difference and the perceptual separability index, and a shading evaluation result is obtained.

[0012] Secondly, the present invention also provides a hierarchical mapping data visualization coloring device based on an extended adjacency matrix, comprising the following modules: The acquisition module is used to acquire hierarchical data and boundary information of the smallest coloring unit; A hierarchical data parsing module is used to parse and process the hierarchical data to determine the mapping relationship between each upper-level region and its corresponding sub-region; wherein, the upper-level region includes at least a plurality of the sub-regions; An extended adjacency matrix construction module is used to construct an extended adjacency matrix based on the mapping relationship and the boundary information of the minimum coloring unit; The region coloring table determination module is used to perform color allocation processing on each upper-layer region based on the extended adjacency matrix to determine the region coloring table; wherein, the region coloring table represents the color to be assigned to each upper-layer region; The coloring and rendering module is used to perform coloring and rendering processing on all sub-regions in the hierarchical data based on the region coloring table and the mapping relationship, so as to obtain a region coloring map.

[0013] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the hierarchical mapping data visualization coloring method based on the extended adjacency matrix as described above.

[0014] Fourthly, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the hierarchical mapping data visualization coloring method based on an extended adjacency matrix as described above.

[0015] Fifthly, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the hierarchical mapping data visualization coloring method based on the extended adjacency matrix as described above.

[0016] This invention provides a hierarchical mapping data visualization coloring method, apparatus, device, medium, and program product based on an extended adjacency matrix. It involves acquiring hierarchical structure data and boundary information of the smallest coloring unit; parsing the hierarchical structure data to determine the mapping relationship between each upper-level region and its corresponding sub-region; wherein each upper-level region includes at least multiple sub-regions; constructing an extended adjacency matrix based on the mapping relationship and the boundary information of the smallest coloring unit; performing color assignment processing on each upper-level region based on the extended adjacency matrix to determine a region coloring table; wherein the region coloring table represents the color assigned to each upper-level region; and performing color rendering processing on all sub-regions in the hierarchical structure data based on the region coloring table and the mapping relationship to obtain a region coloring map. By introducing hierarchical structure information and extending adjacency matrix constraints, the color assignment effect is further optimized while maintaining the existing sorting and coloring algorithm framework, thereby improving the hierarchical expression capability and visual readability of complex data visualization. Attached Figure Description

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

[0018] Figure 1 This is a flowchart illustrating the hierarchical mapping data visualization coloring method based on an extended adjacency matrix provided by the present invention.

[0019] Figure 2 This is a schematic diagram of the visualization effect provided by the present invention without considering hierarchical structure information.

[0020] Figure 3 This is a schematic diagram illustrating the visualization effect of considering hierarchical structure information provided by the present invention.

[0021] Figure 4 This is a schematic diagram of the local visualization effect provided by the present invention without considering hierarchical structure information.

[0022] Figure 5 This is a schematic diagram illustrating the visualization effect of the extended adjacency matrix provided by the present invention.

[0023] Figure 6 This is a schematic diagram illustrating the local visualization effect of the extended adjacency matrix provided by the present invention.

[0024] Figure 7 This is a schematic diagram of a color difference matrix considering hierarchical structure information provided by the present invention.

[0025] Figure 8 This is a schematic diagram of the color difference matrix based on the extended adjacency matrix provided by the present invention.

[0026] Figure 9 This is a schematic diagram of the structure of the hierarchical mapping data visualization coloring device based on the extended adjacency matrix provided by the present invention.

[0027] Figure 10 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0029] In the relevant technologies, at least the following technical problems exist: While existing coloring methods can achieve basic color conflict avoidance based on adjacency matrices, they still have significant shortcomings when dealing with complex hierarchical structures and spatial distribution features. First, existing methods typically treat the smallest region as the smallest coloring unit, ignoring the semantic mapping relationship between the smallest region of hierarchical data and its upper-level regions. This results in the final color assignment failing to accurately reflect the hierarchical features and semantic differences of the data. Second, traditional adjacency matrices only reflect direct adjacency relationships, failing to characterize regions that are geometrically close but not directly adjacent. This may lead to local color assignment conflicts or reduce visual separation, thus affecting overall readability. Finally, existing coloring processes focus on conflict avoidance based on adjacency relationships, lacking a comprehensive optimization strategy that combines hierarchical semantics and spatial proximity, making it difficult to fully meet users' perceptual needs in visualizing complex hierarchical data.

[0030] The following is combined Figures 1-10 This invention describes a hierarchical mapping data visualization coloring method, apparatus, device, medium, and program product based on an extended adjacency matrix. By introducing hierarchical structure information and extending adjacency matrix constraints, the color allocation effect is further optimized while maintaining the existing sorting and coloring algorithm framework, thereby improving the hierarchical expression capability and visual readability of complex data visualization.

[0031] Figure 1 This is a flowchart illustrating a hierarchical mapping data visualization coloring method based on an extended adjacency matrix provided by the present invention, as shown below. Figure 1 As shown, the method may include, but is not limited to, steps S100 to S500: S100, obtain hierarchical data and boundary information of the smallest coloring unit; S200, the hierarchical data is parsed to determine the mapping relationship between each upper-level region and its corresponding sub-region; wherein, the upper-level region includes at least a plurality of the sub-regions; S300, Based on the mapping relationship and the boundary information of the smallest coloring unit, construct an extended adjacency matrix; S400, based on the extended adjacency matrix, perform color allocation processing on each upper-layer region to determine a region coloring table; wherein, the region coloring table represents the color to be allocated to each upper-layer region; S500, based on the region coloring table and the mapping relationship, perform coloring and rendering processing on all sub-regions in the hierarchical data to obtain a region coloring map.

[0032] In step S100 of some embodiments, hierarchical data and boundary information of the smallest coloring unit are obtained.

[0033] It is understandable that hierarchical data describes the mapping relationship between upper-level regions and sub-regions, and is used to characterize the organizational structure of hierarchical data. The smallest region is the smallest coloring unit. The boundary information of the smallest coloring unit, denoted as boundaries, describes the direct adjacency relationship between the smallest coloring units and is used to construct the adjacency matrix.

[0034] For example, if only the upper region information is available, the smallest coloring unit is the upper region; if both upper region information and subregion information are available, the smallest coloring unit is the subregion.

[0035] The boundary information (boundaries) of the smallest coloring unit is structured as JSON, where the key is the name of the smallest coloring unit and the value is the boundary coordinates of the smallest coloring unit.

[0036] In step S200 of some embodiments, the hierarchical data is parsed to determine the mapping relationship between each upper region and its corresponding sub-region; wherein, the upper region includes at least a plurality of the sub-regions.

[0037] Understandably, parsing hierarchical data first involves obtaining the correspondence between upper-level regions and sub-regions, forming a JSON-formatted mapping. This mapping is denoted as `mappings`, defining the set of all sub-regions under the same upper-level region. This is used for subsequent color allocation to establish semantic associations between upper-level and sub-regions. For example, in the structure {'Sub-region 3': 'Upper-level Region 1', "Sub-region 2": 'Upper-level Region 1', "Sub-region 1": 'Upper-level Region 1', "Sub-region 4": 'Upper-level Region 1', "Sub-region 5": 'Upper-level Region 2', "Region 3": 'Upper-level Region 3'}, we can see that upper-level region 1 consists of sub-regions 1, 2, and 3; upper-level region 2 consists of sub-regions 4 and 5; and upper-level region 3 is a single entity without hierarchical information.

[0038] In step S300 of some embodiments, an extended adjacency matrix is ​​constructed based on the mapping relationship and the boundary information of the smallest coloring unit.

[0039] It is understandable that the boundary information of the upper region is determined based on the mapping relationship and the boundary information of the smallest coloring unit; Based on the boundary information of the upper region, an extended adjacency matrix is ​​constructed.

[0040] It is understandable that the boundary information of the upper-level region in the hierarchical data can be obtained based on the parsed mapping relationship and the boundary information of the smallest coloring unit.

[0041] Furthermore, the boundary information of each minimum coloring unit includes at least: the name of the minimum coloring unit and the boundary coordinates of the minimum coloring unit; Determining the boundary information of the upper-layer region based on the mapping relationship and the boundary information of the smallest coloring unit includes: Based on the minimum coloring unit name and minimum coloring unit boundary coordinates, traverse all sub-regions indicated by the mapping relationship, determine the minimum coloring unit names with the same minimum coloring unit boundary coordinates, and merge the minimum coloring unit names with the same minimum coloring unit boundary coordinates to obtain the boundary information of the upper region.

[0042] The key in the boundary information of the smallest shading unit is the name of the smallest shading unit, which is the same as the key in the mapping relationship. Therefore, when different smallest shading unit names (keys) in the mapping relationship correspond to the same smallest shading unit boundary coordinate (value), it indicates that there is a hierarchical relationship between them. In this case, the boundary coordinates of the smallest shading unit corresponding to the different smallest shading unit names (keys) in the boundary information will be merged to obtain the boundary information of the upper-level region. The mapping relationship (mappings) and the boundary information (boundaries) of the smallest shading unit are traversed until the boundary information of all upper-level regions is obtained, denoted as up_boundaries. For example: {'Region 1': [[132, 12], [ ]....], "Region 2": [[156, 21], [ ]....]}.

[0043] The process of merging different boundary information into the boundary information of the upper region involves first converting the boundary coordinates into polygon objects, and then using the union function to merge the information of multiple boundaries into the boundary information of the upper region.

[0044] It's important to note that the `union` function means to merge or take the union of multiple geometric shapes. It's used to combine multiple geometric shapes (such as multiple polygons) into a single, complete shape, and the result includes the total area of ​​all the input shapes. It's like gluing several puzzle pieces together to form a larger, complete shape.

[0045] Furthermore, based on the boundary information of the upper-layer region, an extended adjacency matrix is ​​constructed, including: Determine the number of upper-layer regions indicated by the boundary information of the upper-layer regions; Construct an initial adjacency matrix with empty elements based on the number of upper-level regions; The first and second regions are determined by traversing the boundary information of all the upper-layer regions. Determine in turn whether the upper regions of the first region and the upper regions of the second region are adjacent; If so, mark it as a region adjacency in the initial adjacency matrix; If not, expand the first region boundary coordinates of the upper region of the first region and the second region boundary coordinates of the upper region of the second region in sequence according to the preset expansion distance; and when the upper regions of the first region and the second region intersect after expansion, mark them as spatial adjacency in the initial adjacency matrix according to the first region boundary coordinates and the second region boundary coordinates, until all the upper regions of the first region and the upper regions of the second region are traversed in a loop, to obtain the expanded adjacency matrix.

[0046] That is, further, it is determined whether the upper regions of the expanded first region and the upper regions of the second region intersect; If so, mark it as a spatial adjacency in the initial adjacency matrix; If not, iterate through all the upper regions of the first region and the upper regions of the second region until the traversal ends, and obtain the extended adjacency matrix.

[0047] Understandably, based on the basic adjacency matrix, and combined with the similarity of geometric space or business logic, additional region edges that are not directly topologically connected but spatially or semantically adjacent are added to obtain an extended adjacency matrix. This enhances the matrix's ability to characterize spatial proximity and ensures that the color differences between adjacent (or similar) regions are fully reflected during subsequent color allocation.

[0048] Firstly, the extended adjacency matrix for hierarchical data is constructed using the boundary information (up_boundarys) of the upper-level regions. Statistics are then performed on the region data within the boundary information of the upper-level regions. For example, if there are N regions, a matrix A=N is constructed. The initial adjacency matrix of N has all elements equal to 0.

[0049] The boundary information (up_boundarys) of the upper region is traversed by two for loops to obtain the first region and the second region.

[0050] The upper regions of the first region and the upper regions of the second region are randomly combined, excluding identical combinations of upper regions. For example, the first region includes id1, id2, and id3, while the second region includes id11, id21, and id31.

[0051] Therefore, the region pairs that can be formed by the first region and the second region can include at least (id1, id21), (id1, id31), (id2, id11), (id2, id31), (id3, id11), (id3, id21).

[0052] Exclude (id1, id11), (id2, id21), and (id3, id31).

[0053] The algorithm iterates through all region pairs. For example, if region id1 and region id11 are the same, it skips them. If region id1 and region id21 are different, it checks if there is a region adjacency relationship between the boundary boundary1 of region id1 and the boundary boundary2 of another region id21. If there is, it sets [id1-1, id21-1] to 1 in the initial adjacency matrix. If there is no region adjacency relationship, it expands boundary1 and boundary2 by a custom distance, generating new_boundary1 and new_boundary2. It checks if new_boundary1 and new_boundary2 intersect. If they intersect, it means that the two regions are very close although they are not directly adjacent, and are considered spatially adjacent. Therefore, it also sets [id1-1, id21-1] to 1 in the initial adjacency matrix. Otherwise, it skips them. This process continues until all the upper regions of the first region and the upper regions of the second region are traversed, finally resulting in the construction of the extended adjacency matrix A.

[0054] The steps for determining whether the boundaries of two regions are adjacent are as follows: the boundary information of the upper region is converted into a Polygon object (Polygon represents a polygon), and the touches function (touches means adjacent judgment) is used to make a judgment. The touches function can determine whether the two regions have a common edge. If there is a common edge, they are adjacent. The boundary expansion of the two regions is carried out by the buffer(dist) function in the boundary information of the upper region. dist is the expansion distance, which can be customized and is not specifically limited here.

[0055] It should be noted that the boundary expansion (buffer) is as follows: When two regions are not adjacent (have no common edge), the buffer(dist) function is used to expand their boundaries outward. dist is the expansion distance (which can be customized, such as 10 meters, 100 meters, etc.).

[0056] After expansion, if the polygons of two regions intersect (have overlapping parts), they are determined to be spatially adjacent (i.e., they are very close and are considered to be adjacent).

[0057] The determination of whether the boundaries of two regions intersect also involves converting the boundary information of the upper region into a Polygon object and using the intersects function to determine whether there is partial intersection between the two regions.

[0058] It should be noted that the `intersects` function is used to determine whether two geometric shapes (such as polygons, line segments, circles, etc.) have a common part (i.e., whether their boundaries or interiors overlap or intersect).

[0059] In step S400 of some embodiments, a color assignment process is performed on each upper-layer region based on the extended adjacency matrix to determine a region coloring table; wherein the region coloring table represents the color assigned to each upper-layer region.

[0060] It is understood that, in some embodiments of the present invention, the step of performing color assignment processing on each upper-layer region based on the extended adjacency matrix to determine the region coloring table includes: A Laplacian matrix is ​​constructed based on the extended adjacency matrix, and the Laplacian matrix is ​​decomposed to obtain eigenvectors; Based on the feature vector, the region numbers of all upper-layer regions are initially sorted to obtain an initial sorting sequence; A greedy swapping strategy is used to perform local optimization on the initial sorted sequence to obtain the optimized region numbering order. Obtain a preset color palette, and assign colors to each upper-level region sequentially according to the optimized region numbering order based on the color palette to obtain the region coloring table.

[0061] It should be noted that the preset color palette, denoted as palette, is used to calculate colors according to the final optimized region numbering order, assign colors to each upper-level region, and obtain the region coloring table.

[0062] It is understood that in the embodiments of the present invention, spectral ordering and greedy swapping algorithms are used for node sorting and color assignment.

[0063] A Laplacian matrix L is constructed based on the extended adjacency matrix A. Eigenvalue decomposition is used to obtain eigenvectors, which are then used to initially sort the region numbers to reduce overall color conflicts. A greedy exchange algorithm is applied to locally optimize the initial sorting sequence of region numbers, resulting in an optimized region numbering order to further reduce color conflicts between adjacent region numbers in the graph. Following the optimized region numbering order, colors are assigned to the upper-level region numbers sequentially from the color palette, ultimately outputting a region number color scheme table, i.e., a region coloring table.

[0064] The Laplacian matrix L is constructed as L=DA, where the degree matrix D is a diagonal matrix, and its elements are defined as follows: , where represents the total number of adjacencies between each region and other regions. N represents the number of upper-level regions, A represents the extended adjacency matrix, and i and j represent the first region and the second region, respectively.

[0065] Eigenvalue decomposition of the Laplacian matrix L yields a set of eigenvectors and their corresponding eigenvalues. These eigenvectors (Fiedler vectors) characterize the optimal projection of the graph structure onto one-dimensional space, ensuring that regions with similar values ​​on these vectors often exhibit strong adjacency or semantic associations in the original graph. Sort the eigenvector values ​​in ascending (or descending) order to obtain the initial one-dimensional arrangement of the region nodes. This sorting preserves the graph's topological properties, providing a reasonable initial sequence for subsequent color assignment and reducing the risk of color conflicts between adjacent regions.

[0066] The greedy swap algorithm starts from the beginning of the initial sorted sequence and checks the connectivity and numbering differences of adjacent regions pair by pair. When adjacent regions are found to be strongly connected in the graph but have small numbering differences (which can easily cause visual confusion), their order is swapped, and the conflict situation is recalculated. If the average numbering difference after the swap is greater than the average numbering difference before the swap, it means that the conflict has been reduced, and the adjustment is retained. This process is continuously executed in a loop until there are no more adjacent region pairs that can further reduce the conflict, thus obtaining the optimized region numbering sorted sequence.

[0067] In some embodiments, the current optimal sequence is obtained, and the current total conflict metric (such as the sum of the absolute values ​​of the differences between adjacent region numbers) is recorded.

[0068] Repeat the following sub-steps until there is no improvement or the maximum number of iterations is reached: 1. Check each pair of adjacent regions (i, j) in the current sequence order.

[0069] 2. Evaluate the exchange benefits: Calculate the conflict contribution before the exchange: diff_before = |current_order[i] - current_order[j]|.

[0070] Simulate the temporary sequence after the exchange and calculate the contribution of the new conflict: diff_after = |temp_order[i] -temp_order[j]|.

[0071] 3. Decision on whether to swap: If diff_after > diff_before (that is, swapping reduces conflict, meaning that the difference in the numbering of the two regions after the swap is greater than the difference in the numbering before the swap), then permanently swap the positions of this pair of regions and update the current total conflict metric.

[0072] It should be noted that in the coloring algorithm, the greater the difference in the numbering, the greater the difference in the assigned color, the easier it is to distinguish adjacent areas, and the less visual conflict there is.

[0073] diff_before: Represents the conflict contribution before the swap, the absolute value of the difference between the position numbers of adjacent regions i and j in the sorted sequence (for example, if region i is in position 3 and region j is in position 5, the difference is 2).

[0074] diff_after: represents the collision contribution after simulating the swapping of their positions, and calculates the absolute value of the new numbering difference (for example, after the swap, region i becomes the 5th position and region j becomes the 3rd position, the difference is still 2, but if the relationship with other regions changes, this value may change).

[0075] 4. Termination condition: No valid swaps occur in a single iteration, or the preset iteration limit is reached.

[0076] 5. Output the optimized sequence, and finally obtain the optimized region number sorting sequence order_optimized.

[0077] This step eliminates visual interference caused by abrupt changes in numbering through local adjustments, thereby improving color smoothness.

[0078] In some embodiments, colors are sequentially retrieved from the palette and assigned to the corresponding regions according to the optimized region numbering sequence order_optimized: The region order_optimized[0] → palette[0]; The region order_optimized[1] → palette[1]; ... Region order_optimized[N-1]→palette[N-1].

[0079] Generate the final color scheme table, i.e., the region coloring table, and construct the mapping table color_assignment, where the key is the region number and the value is the assigned color.

[0080] In step S500 of some embodiments, based on the region coloring table and the mapping relationship, all sub-regions in the hierarchical data are colored and rendered to obtain a region coloring map.

[0081] Understandably, since the visualization output is drawn using the smallest coloring unit, the color mapping table of the sub-region is calculated based on the region coloring table of the upper region and the mapping relationship between the upper region and the sub-region. The visualization engine is then used to render and output the graphic based on the color mapping table of the sub-region to obtain the region coloring map.

[0082] In this case, if there are sub-regions, the sub-region is the smallest unit; if there are no sub-regions, the upper-level region is the smallest unit.

[0083] The above steps can fully utilize hierarchical information, ensuring semantic consistency in color allocation among sub-regions within the same area, while also guaranteeing color differentiation between adjacent areas.

[0084] The embodiments provided by this invention achieve efficient and intuitive visualization of hierarchical semantics through hierarchical mapping data; and improve the recognizability of visualizations by extending the adjacency matrix to ensure reasonable color allocation. This not only enhances users' understanding and analysis of complex data structures but also significantly improves the overall user experience and practical value of the visualization results.

[0085] In some embodiments of the present invention, the mapping relationship between the upper region and the sub-region is exemplified as follows: mappings:{ "Subregion 1": "Region 3", "Sub-region 2": "Region 3", "Subregion 3": "Region 3", "Sub-region 4": "Region 3", Subregion 5: Subregion 3 "Sub-region 6": "Region 3", Subregion 7: Subregion 9 Subregion 8: Subregion 9 "Subregion 9": "Region 9", Subregion 10: Subregion 9 Subregion 11: Region 17 Subregion 12: Region 17 Subregion 13: Region 17 Subregion 14: Region 17 "Area 1": "Area 1", "Area 2": "Area 2", "Area 4": "Area 4", "Area 5": "Area 5", "Area 6": "Area 6", "Area 7": "Area 7", "Area 8": "Area 8", "Area 10": "Area 10", "Region 11": "Region 11", "Area 12": "Area 12", "Area 13": "Area 13", "Area 14": "Area 14", "Area 15": "Area 15", "Area 16": "Area 16", "Area 18": "Area 18", "Area 19": "Area 19", "Area 20": "Area 20", "Area 21": "Area 21", "Area 22": "Area 22" } Understandable, Figure 2 This is a schematic diagram of the visualization effect provided by the present invention without considering hierarchical structure information. Figure 3 This is a schematic diagram illustrating the visualization effect of considering hierarchical structure information provided by the present invention. Figure 4 This is a schematic diagram of the local visualization effect provided by the present invention without considering hierarchical structure information. Figure 5 This is a schematic diagram illustrating the visualization effect of the extended adjacency matrix provided by the present invention. Figure 6 This is a schematic diagram illustrating the local visualization effect of the extended adjacency matrix provided by the present invention. Figure 7 This is a schematic diagram of a color difference matrix considering hierarchical structure information provided by the present invention. Figure 8 This is a schematic diagram of the color difference matrix based on the extended adjacency matrix provided by the present invention. Combined with... Figures 2 to 8 The coloring effect of the hierarchical mapping data visualization coloring method based on the extended adjacency matrix provided by this invention can be intuitively observed at different stages. It should be noted that... Figures 2 to 6 The diagram shown is not a map, but a diagram illustrating the grouping of color-coded areas.

[0086] From the mappings between the upper and sub-regions, we can see that regions 3, 9, and 17 exhibit hierarchical information. When we disregard this hierarchical information, the image, after coloring, looks like... Figure 2 As shown.

[0087] from Figure 2As we can see, without considering the hierarchical structure information, the sub-regions within the same region are all different colors, which does not conform to common perception and is not easy to observe. For example, region 9 is composed of sub-regions 7, 8, 9, and 10, but all four sub-regions are different colors. Region 17 is composed of sub-regions 11, 12, 13, and 14, but similarly, all four sub-regions are different colors.

[0088] When considering hierarchical information, with the upper-level region information as the primary focus, after constructing the adjacency matrix and performing color mapping, the result is as follows: Figure 3 As shown. From Figure 3 As we can see, regions 3, 9, and 17, which contain sub-regions, are colored the same color. This coloring effect takes into account hierarchical information and is clearly more in line with human perception—that upper-level regions and sub-regions share the same color. However, a problem still exists: from the overall effect, the color difference between most adjacent regions is quite obvious. Figure 3 The two non-adjacent but close areas in the bottom right corner have similar colors.

[0089] Will Figure 3 The bottom right corner is enlarged as shown Figure 4 As shown: From Figure 4 As you can see, regions 7 and 8 are indeed not adjacent, but because they are very close, the color difference is not clear. Even though region 3 is adjacent to region 16, the color difference is not very clear.

[0090] Based on this, considering hierarchical structure information, and after constructing an extended adjacency matrix and coloring mapping, the result is as follows: Figure 5 As shown, Figure 5 The enlarged view in the lower right corner is as follows Figure 6 As shown: From Figure 5 As you can see, the color differences between adjacent areas are still visible in the overall image. Figure 6 The color difference between region 7 and region 8 is clearly visible, and the color difference between region 3 and region 16 becomes clear.

[0091] However, if we Figure 3 and Figure 5 In comparison, considering the overall color difference... Figure 5 Although it can be seen clearly, it is not as good as... Figure 3 The differences are so significant. Therefore, this embodiment of the invention uses quantitative indicators to evaluate the effect. Common color difference formulas are used to calculate the minimum color difference across the entire image and the perceptual separability index (PSI).

[0092] In some embodiments of the present invention, after the step of performing color rendering processing on all sub-regions of the hierarchical data based on the region coloring table and the mapping relationship to obtain a region coloring map, the method includes: Calculate the minimum color difference and perceptual separability index of the region staining map; The current shading is evaluated based on the minimum color difference and the perceptual separability index, and a shading evaluation result is obtained.

[0093] First, it should be noted that in the field of color science, CIE 2000 (or...) E2000 E00 is one of the most advanced, widely used, and visually consistent color difference calculation formulas currently available. The core of this formula is that it does not create a new color space. Instead, it introduces three weighted coefficients (SL, SC, SH) related to lightness, saturation, and hue, based on the CIELAB uniform color space. These coefficients are dynamically adjusted according to the color region; for example, the weight of saturation differences is reduced in high-saturation regions, thus ensuring that the calculation results closely match human visual perception across all color regions.

[0094] at present E2000 is a commonly used color difference calculation method. The minimum difference is calculated as shown in formula (1), and the perceptible separability index formula is shown in formula (2). (1) in, It is an extended adjacency matrix. It is the value with the smallest color difference in the entire extended adjacency matrix. This indicates the boundary information of the first upper-level region. This indicates the boundary information of the second upper-level region.

[0095] (2) in, PSI To perceive the separability index, The value represents the average color difference in the color difference matrix, indicating the overall visual separability. A larger value means that each pair of adjacent regions is easy to distinguish on average, while a smaller value means that the overall difference is not obvious and is easily confused.

[0096] The standard deviation of the color difference matrix represents the uniformity of the differences. The smaller the value, the more uniform the regional differences are, and there is no local confusion. The larger the value, the more uneven the distribution of differences, with some differences being very large and others very small, indicating a risk of local confusion.

[0097] The PSI is a holistic measure. A higher value indicates higher overall discrimination and more balanced differences, with a lower or no risk of local confusion. A lower value indicates larger differences in some areas, and some areas are prone to confusion.

[0098] In some embodiments, first use E2000 calculates the adjacency relationship based on the extended adjacency matrix. Figure 3 and Figure 5 Color difference adjacency matrix such as Figure 7 and Figure 8 As shown: You can see Figure 3 The minimum color difference is 2.8. Figure 5 The minimum color difference is 4.7. From this minimum difference, we can see... Figure 3 Local confusion exists.

[0099] Figure 7 and Figure 8 The color difference matrix in the formula is calculated according to formula 2, which yields the following result. Figure 3 The PSI is 2.12. Figure 5 The PSI value is 2.25. A higher PSI value indicates higher overall discrimination and more balanced differences, while a lower value indicates the presence of local differences, such as large and small differences. The determination of local confusion can be based on the PSI value and the minimum color difference to determine the color evaluation result.

[0100] Experimental results demonstrate that the embodiments of this invention introduce hierarchical semantic relationships, combine geometric direct adjacency and geometric spatial proximity information to construct an extended adjacency matrix, achieve more reasonable color allocation, improve the visual distinguishability of the clustering structure and the readability of the data, and effectively enhance users' perception and analysis capabilities of complex hierarchical data.

[0101] This invention provides a hierarchical mapping data visualization coloring method, apparatus, device, medium, and program product based on an extended adjacency matrix. It involves acquiring hierarchical structure data and boundary information of the smallest coloring unit; parsing the hierarchical structure data to determine the mapping relationship between each upper-level region and its corresponding sub-region; wherein each upper-level region includes at least multiple sub-regions; constructing an extended adjacency matrix based on the mapping relationship and the boundary information of the smallest coloring unit; performing color assignment processing on each upper-level region based on the extended adjacency matrix to determine a region coloring table; wherein the region coloring table represents the color assigned to each upper-level region; and performing color rendering processing on all sub-regions in the hierarchical structure data based on the region coloring table and the mapping relationship to obtain a region coloring map. By introducing hierarchical structure information and extending adjacency matrix constraints, the color assignment effect is further optimized while maintaining the existing sorting and coloring algorithm framework, thereby improving the hierarchical expression capability and visual readability of complex data visualization.

[0102] The following describes the hierarchical mapping data visualization coloring device based on the extended adjacency matrix provided by the present invention. The hierarchical mapping data visualization coloring device based on the extended adjacency matrix described below can be referred to in correspondence with the hierarchical mapping data visualization coloring method based on the extended adjacency matrix described above.

[0103] like Figure 9 The diagram shown is a structural schematic of a hierarchical mapping data visualization coloring device based on an extended adjacency matrix provided by the present invention. The hierarchical mapping data visualization coloring device based on an extended adjacency matrix includes the following modules: The acquisition module 710 is used to acquire hierarchical data and boundary information of the smallest coloring unit; The hierarchical data parsing module 720 is used to parse the hierarchical data and determine the mapping relationship between each upper-level region and its corresponding sub-region; wherein, the upper-level region includes at least a plurality of the sub-regions; An extended adjacency matrix construction module 730 is used to construct an extended adjacency matrix based on the mapping relationship and the boundary information of the minimum coloring unit; The region coloring table determination module 740 is used to perform color allocation processing on each upper-layer region based on the extended adjacency matrix to determine the region coloring table; wherein, the region coloring table represents the color to be assigned to each upper-layer region; The coloring and rendering module 750 is used to perform coloring and rendering processing on all sub-regions in the hierarchical structure data based on the region coloring table and the mapping relationship to obtain a region coloring map.

[0104] Preferably, the hierarchical mapping data visualization coloring device based on the extended adjacency matrix provided by the present invention is specifically used to determine the boundary information of the upper layer region based on the mapping relationship and the boundary information of the smallest coloring unit; Based on the boundary information of the upper region, an extended adjacency matrix is ​​constructed.

[0105] Preferably, the hierarchical mapping data visualization coloring device based on the extended adjacency matrix provided by the present invention specifically includes at least the following boundary information for each of the minimum coloring units: minimum coloring unit name and minimum coloring unit boundary coordinates; Determining the boundary information of the upper-layer region based on the mapping relationship and the boundary information of the smallest coloring unit includes: Based on the minimum coloring unit name and minimum coloring unit boundary coordinates, traverse all sub-regions indicated by the mapping relationship, determine the minimum coloring unit names with the same minimum coloring unit boundary coordinates, and merge the minimum coloring unit names with the same minimum coloring unit boundary coordinates to obtain the boundary information of the upper region.

[0106] Preferably, the hierarchical mapping data visualization coloring device based on the extended adjacency matrix provided by the present invention is specifically used to determine the number of upper-layer regions indicated by the boundary information of the upper-layer regions; Construct an initial adjacency matrix with empty elements based on the number of upper-level regions; The first and second regions are determined by traversing the boundary information of all the upper-layer regions. Determine in turn whether the upper regions of the first region and the upper regions of the second region are adjacent; If so, mark it as a region adjacency in the initial adjacency matrix; If not, expand the first region boundary coordinates of the upper region of the first region and the second region boundary coordinates of the upper region of the second region in sequence according to the preset expansion distance; and when the upper regions of the first region and the second region intersect after expansion, mark them as spatial adjacency in the initial adjacency matrix according to the first region boundary coordinates and the second region boundary coordinates, until all the upper regions of the first region and the upper regions of the second region are traversed in a loop, to obtain the expanded adjacency matrix.

[0107] Preferably, the hierarchical mapping data visualization coloring device based on the extended adjacency matrix provided by the present invention is specifically used to construct a Laplacian matrix based on the extended adjacency matrix and decompose the Laplacian matrix to obtain eigenvectors; Based on the feature vector, the region numbers of all upper-layer regions are initially sorted to obtain an initial sorting sequence; A greedy swapping strategy is used to perform local optimization on the initial sorted sequence to obtain the optimized region numbering order. Obtain a preset color palette, and assign colors to each upper-level region sequentially according to the optimized region numbering order based on the color palette to obtain the region coloring table.

[0108] Preferably, the hierarchical mapping data visualization coloring device based on the extended adjacency matrix provided by the present invention is specifically used to calculate the minimum color difference and perceptual separability index of the region coloring map; The current shading is evaluated based on the minimum color difference and the perceptual separability index, and a shading evaluation result is obtained.

[0109] This invention provides a hierarchical mapping data visualization coloring method, apparatus, device, medium, and program product based on an extended adjacency matrix. It involves acquiring hierarchical structure data and boundary information of the smallest coloring unit; parsing the hierarchical structure data to determine the mapping relationship between each upper-level region and its corresponding sub-region; wherein each upper-level region includes at least multiple sub-regions; constructing an extended adjacency matrix based on the mapping relationship and the boundary information of the smallest coloring unit; performing color assignment processing on each upper-level region based on the extended adjacency matrix to determine a region coloring table; wherein the region coloring table represents the color assigned to each upper-level region; and performing color rendering processing on all sub-regions in the hierarchical structure data based on the region coloring table and the mapping relationship to obtain a region coloring map. By introducing hierarchical structure information and extending adjacency matrix constraints, the color assignment effect is further optimized while maintaining the existing sorting and coloring algorithm framework, thereby improving the hierarchical expression capability and visual readability of complex data visualization.

[0110] Figure 10 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 10As shown, the electronic device may include a processor 810, a communications interface 820, a memory 830, and a communication bus 840, wherein the processor 810, communications interface 820, and memory 830 communicate with each other via the communication bus 840. The processor 810 can call logical instructions in the memory 830 to execute a hierarchical mapping data visualization coloring method based on an extended adjacency matrix. This method includes: acquiring hierarchical structure data and boundary information of the smallest coloring unit; parsing the hierarchical structure data to determine the mapping relationship between each upper-level region and its corresponding sub-region; wherein the upper-level region includes at least a plurality of the sub-regions; constructing an extended adjacency matrix based on the mapping relationship and the boundary information of the smallest coloring unit; performing color assignment processing on each upper-level region based on the extended adjacency matrix to determine a region coloring table; wherein the region coloring table represents the color assigned to each upper-level region; and performing color rendering processing on all sub-regions in the hierarchical structure data based on the region coloring table and the mapping relationship to obtain a region coloring map.

[0111] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0112] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the hierarchical mapping data visualization coloring method based on the extended adjacency matrix provided by the above methods. The method includes: acquiring hierarchical structure data and boundary information of the smallest coloring unit; parsing the hierarchical structure data to determine the mapping relationship between each upper-level region and its corresponding sub-region; wherein the upper-level region includes at least a plurality of the sub-regions; constructing an extended adjacency matrix based on the mapping relationship and the boundary information of the smallest coloring unit; performing color allocation processing on each upper-level region based on the extended adjacency matrix to determine a region coloring table; wherein the region coloring table represents the color to be assigned to each upper-level region; and performing color rendering processing on all sub-regions in the hierarchical structure data based on the region coloring table and the mapping relationship to obtain a region coloring map.

[0113] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the hierarchical mapping data visualization coloring method based on an extended adjacency matrix provided by the methods described above. This method includes: acquiring hierarchical structure data and boundary information of the smallest coloring unit; parsing the hierarchical structure data to determine the mapping relationship between each upper-level region and its corresponding sub-region; wherein the upper-level region includes at least a plurality of the sub-regions; constructing an extended adjacency matrix based on the mapping relationship and the boundary information of the smallest coloring unit; performing color assignment processing on each upper-level region based on the extended adjacency matrix to determine a region coloring table; wherein the region coloring table represents the color assignment for each upper-level region; and performing color rendering processing on all sub-regions in the hierarchical structure data based on the region coloring table and the mapping relationship to obtain a region coloring map.

[0114] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0115] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention 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; and these 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 the present invention.

Claims

1. A hierarchical mapping data visualization coloring method based on an extended adjacency matrix, characterized in that, include: Obtain the hierarchical structure data and the boundary information of the smallest coloring unit; The hierarchical data is parsed to determine the mapping relationship between each upper-level region and its corresponding sub-region; wherein, the upper-level region includes at least a plurality of the sub-regions; Based on the mapping relationship and the boundary information of the minimum coloring unit, an extended adjacency matrix is ​​constructed; Based on the extended adjacency matrix, color assignment is performed on each upper-layer region to determine a region coloring table; wherein, the region coloring table represents the color assigned to each upper-layer region. Based on the region coloring table and the mapping relationship, coloring and rendering processes are performed on all sub-regions in the hierarchical data to obtain a region coloring map.

2. The hierarchical mapping data visualization coloring method based on an extended adjacency matrix according to claim 1, characterized in that, The construction of the extended adjacency matrix based on the mapping relationship and the boundary information of the minimum coloring unit includes: Based on the mapping relationship and the boundary information of the smallest coloring unit, the boundary information of the upper region is determined; Based on the boundary information of the upper region, an extended adjacency matrix is ​​constructed.

3. The hierarchical mapping data visualization coloring method based on an extended adjacency matrix according to claim 2, characterized in that, The boundary information for each of the minimum coloring units includes at least: the name of the minimum coloring unit and the boundary coordinates of the minimum coloring unit; Determining the boundary information of the upper-layer region based on the mapping relationship and the boundary information of the smallest coloring unit includes: Based on the minimum coloring unit name and minimum coloring unit boundary coordinates, traverse all sub-regions indicated by the mapping relationship, determine the minimum coloring unit names with the same minimum coloring unit boundary coordinates, and merge the minimum coloring unit names with the same minimum coloring unit boundary coordinates to obtain the boundary information of the upper region.

4. The hierarchical mapping data visualization coloring method based on an extended adjacency matrix according to claim 2, characterized in that, The construction of the extended adjacency matrix based on the boundary information of the upper-layer region includes: Determine the number of upper-layer regions indicated by the boundary information of the upper-layer regions; Construct an initial adjacency matrix with empty elements based on the number of upper-level regions; The first and second regions are determined by traversing the boundary information of all the upper-layer regions. Determine in turn whether the upper regions of the first region and the upper regions of the second region are adjacent; If so, mark it as a region adjacency in the initial adjacency matrix; If not, expand the first region boundary coordinates of the upper region of the first region and the second region boundary coordinates of the upper region of the second region according to the preset expansion distance; and when the upper regions of the first region and the second region intersect after expansion, mark them as spatial adjacency in the initial adjacency matrix according to the first region boundary coordinates and the second region boundary coordinates; until all the upper regions of the first region and the upper regions of the second region are traversed in a loop, the expanded adjacency matrix is ​​obtained.

5. The hierarchical mapping data visualization coloring method based on an extended adjacency matrix according to claim 1, characterized in that, The step of performing color assignment processing on each upper-layer region based on the extended adjacency matrix to determine the region coloring table includes: A Laplacian matrix is ​​constructed based on the extended adjacency matrix, and the Laplacian matrix is ​​decomposed to obtain eigenvectors; Based on the feature vector, the region numbers of all upper-layer regions are initially sorted to obtain an initial sorting sequence; A greedy swapping strategy is used to perform local optimization on the initial sorted sequence to obtain the optimized region numbering order. Obtain a preset color palette, and assign colors to each upper-level region sequentially according to the optimized region numbering order based on the color palette to obtain the region coloring table.

6. The hierarchical mapping data visualization coloring method based on an extended adjacency matrix according to claim 1, characterized in that, After the step of performing color rendering processing on all sub-regions in the hierarchical data based on the region coloring table and the mapping relationship to obtain a region coloring map, the method includes: Calculate the minimum color difference and perceptual separability index of the region staining map; The current shading is evaluated based on the minimum color difference and the perceptual separability index, and a shading evaluation result is obtained.

7. A hierarchical mapping data visualization coloring device based on an extended adjacency matrix, characterized in that, include: The acquisition module is used to acquire hierarchical data and boundary information of the smallest coloring unit; A hierarchical data parsing module is used to parse and process the hierarchical data to determine the mapping relationship between each upper-level region and its corresponding sub-region; wherein, the upper-level region includes at least a plurality of the sub-regions; An extended adjacency matrix construction module is used to construct an extended adjacency matrix based on the mapping relationship and the boundary information of the minimum coloring unit; The region coloring table determination module is used to perform color allocation processing on each upper-layer region based on the extended adjacency matrix to determine the region coloring table; wherein, the region coloring table represents the color to be assigned to each upper-layer region; The coloring and rendering module is used to perform coloring and rendering processing on all sub-regions in the hierarchical data based on the region coloring table and the mapping relationship, so as to obtain a region coloring map.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the program, it implements the hierarchical mapping data visualization coloring method based on the extended adjacency matrix as described in any one of claims 1 to 6.

9. A non-transitory 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 hierarchical mapping data visualization coloring method based on an extended adjacency matrix as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the hierarchical mapping data visualization coloring method based on an extended adjacency matrix as described in any one of claims 1 to 6.