Intelligent Map Reading Method and Device for Hierarchical Statistical Maps

By segmenting cartographic units and extracting legend information from hierarchical statistical maps, a four-tuple input large language model is formed, which solves the problem of inaccurate interpretation in existing technologies, realizes a full understanding of map details and spatial features, and improves the accuracy of interpretation.

CN120766307BActive Publication Date: 2025-11-14INST OF GEOGRAPHICAL SCI & NATURAL RESOURCE RES CAS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511277444.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-09
Publication Date
2025-11-14
Estimated Expiration
2045-09-09

AI Technical Summary

Technical Problem

Existing large language models are insufficient in capturing map details and expressing spatial features in hierarchical statistical map interpretation, resulting in inaccurate interpretation.

Method used

By segmenting cartographic units and extracting legend information from hierarchical statistical maps, the place names and colors of cartographic units are identified and matched with the colors of legend color blocks to form a quadruple that is input into a large language model for interpretation. Combined with a professional knowledge base and structured prompts, a full understanding of map details and spatial features is achieved.

Benefits of technology

It improves the accuracy of hierarchical statistical map reading tasks, enabling large language models to better understand the deep spatial semantic features of maps and improve the accuracy of interpretation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120766307B_ABST
    Figure CN120766307B_ABST
Patent Text Reader

Abstract

This invention discloses an intelligent map reading method and apparatus for hierarchical statistical maps, belonging to the technical field of cartography and geographic information systems. The method includes: segmenting the hierarchical statistical map into cartographic units and extracting legend information; the legend information includes the color of the legend color block and the corresponding hierarchical explanatory text; for each of the segmented cartographic units, the following steps are performed: identifying the place name and color of the cartographic unit; matching the color of the cartographic unit with the color of the legend color block to determine the hierarchical explanatory text of the matched color; forming a quadruple of the cartographic unit, place name, color, and hierarchical explanatory text; and supplementing the multiple quadruples corresponding to the hierarchical statistical map into a large language model to obtain the map interpretation text output by the large language model. This invention enables the large language model to fully understand deep spatial semantic features using map details, thereby improving the accuracy of reading hierarchical statistical maps.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cartography and geographic information systems, and in particular to a method and apparatus for intelligent reading of hierarchical statistical maps. Background Technology

[0002] A hierarchical statistical map is a thematic map that uses different colors to correspond to the numerical values ​​of data within spatial units. Key elements of a hierarchical statistical map generally include: map title, legend, main map, and auxiliary elements. The map title indicates the theme, spatial extent, and other information the map represents; the legend typically includes a legend color block and its corresponding hierarchical description; the main map... Figure 1 Generally, it includes a base layer and a thematic layer; map annotations, scale bars, minimaps, compasses, etc. are all auxiliary elements used to aid in map understanding.

[0003] In the fields of Geographic Information Systems (GIS) and cartography, map interpretation is a crucial step in realizing intelligent map applications. Map interpretation involves not only recognizing symbols, labels, and visual elements on a map, but also requires a comprehensive deconstruction and analysis of the spatial structure, statistical units, and semantic connotations expressed by the map. Against this backdrop, how to leverage intelligent methods to achieve rapid and accurate interpretation of map content has become a key aspect of technological development.

[0004] In related technologies, hierarchical statistical maps are input into a large language model, combined with a professional knowledge base and structured prompts, to enable the large language model to intelligently interpret the input hierarchical statistical map and output map interpretation text. However, current large language models have shortcomings in capturing map details and representing spatial features when performing map interpretation tasks.

[0005] Therefore, there is an urgent need to provide a new intelligent map reading method for hierarchical statistical maps. Summary of the Invention

[0006] This invention provides a method and apparatus for intelligent reading of hierarchical statistical maps. The technical solution is as follows:

[0007] On the one hand, a method for intelligent reading of hierarchical statistical maps is provided, the method comprising:

[0008] The map is segmented into cartographic units and the legend information is extracted from the hierarchical statistical map; the legend information includes the color of the legend color block and the corresponding hierarchical description text;

[0009] For each of the multiple cartographic units obtained from the segmentation, the following steps are performed: identify the place name and color of the cartographic unit, match the color of the cartographic unit with the color of the legend color block to determine the hierarchical description text of the matched color, and form a quadruple of the cartographic unit, place name, color and hierarchical description text.

[0010] The multiple quadruplets corresponding to the hierarchical statistical map are supplemented into the large language model to obtain the map interpretation text output by the large language model.

[0011] On the other hand, a hierarchical statistical map intelligent reading device is provided, the device comprising:

[0012] The segmentation and extraction unit is used to segment cartographic units and extract legend information from a hierarchical statistical map; the legend information includes the color of the legend color block and the corresponding hierarchical description text;

[0013] The quadruple generation unit is used to perform the following for each of the multiple cartographic units obtained from the segmentation: identify the place name and color of the cartographic unit, match the color of the cartographic unit with the color of the legend color block to determine the hierarchical description text of the matched color, and form a quadruple of the cartographic unit, place name, color and hierarchical description text.

[0014] The map reading unit is used to supplement the input of multiple quadruplets corresponding to the hierarchical statistical map into the large language model in order to obtain the map interpretation text output by the large language model.

[0015] On the other hand, a computer device is provided, the computer device including a memory and a processor, the memory for storing computer programs, and the processor for executing the computer programs stored in the memory to implement the steps of the hierarchical statistical map intelligent reading method described above.

[0016] On the other hand, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, it implements the steps of the above-described hierarchical statistical map intelligent reading method.

[0017] On the other hand, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the above-described hierarchical statistical map intelligent reading method.

[0018] The technical solution provided by this invention can bring at least the following beneficial effects:

[0019] Before using a large language model to intelligently read hierarchical statistical maps, the map is first segmented into cartographic units and legend information is extracted. Then, for each cartographic unit, the place name and color of the unit are identified, and the color of the unit is matched with the color of the legend block to determine the hierarchical description text of the matched color. The cartographic unit, place name, color, and hierarchical description text are combined into a quadruple. This quadruple realizes the mapping relationship between the cartographic unit and the content expressed within the unit. By inputting multiple quadruples of the hierarchical statistical map as supplementary parameters into the large language model, the large language model can fully understand the deep spatial semantic features by utilizing map details, thereby improving the accuracy of reading hierarchical statistical maps. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present 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 the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a flowchart of a hierarchical statistical map intelligent reading method provided by an embodiment of the present invention;

[0022] Figure 2 This is a flowchart of another hierarchical statistical map intelligent reading method provided by an embodiment of the present invention;

[0023] Figure 3 This is a structural diagram of a hierarchical statistical map intelligent reading device provided in an embodiment of the present invention;

[0024] Figure 4 This is a hardware architecture diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation

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

[0026] Please refer to Figure 1 The present invention provides a hierarchical statistical map intelligent reading method, the method comprising:

[0027] Step 100: Segment the map into cartographic units and extract legend information from the hierarchical statistical map; the legend information includes the color of the legend color block and the corresponding hierarchical description text;

[0028] Step 102: For each of the multiple cartographic units obtained from the segmentation, perform the following: identify the place name and color of the cartographic unit, match the color of the cartographic unit with the color of the legend color block to determine the hierarchical description text of the matched color, and form a quadruple of the cartographic unit, place name, color and hierarchical description text.

[0029] Step 104: Input the multiple quadruplets corresponding to the hierarchical statistical map into the large language model to obtain the map interpretation text output by the large language model.

[0030] In this embodiment of the invention, before using a large language model to intelligently read hierarchical statistical maps, the map is first segmented into cartographic units and legend information is extracted. Then, for each cartographic unit, the place name and color of the cartographic unit are identified, and the color of the cartographic unit is matched with the color of the legend color block to determine the hierarchical description text of the matched color. The cartographic unit, place name, color, and hierarchical description text are combined into a quadruple. This quadruple realizes the mapping relationship between the cartographic unit and the content expressed within the unit. By inputting multiple quadruples of the hierarchical statistical map as supplementary parameters into the large language model, the large language model can fully understand the deep spatial semantic features using map details, thereby improving the accuracy of reading hierarchical statistical maps.

[0031] The following description Figure 1 The execution method of each step is shown.

[0032] First, for step 100, the cartographic units are segmented and the legend information is extracted from the hierarchical statistical map.

[0033] In this embodiment of the invention, before segmenting the cartographic units and extracting the legend information, the main map region can be identified and segmented from the hierarchical statistical map, and the segmentation of cartographic units and extraction of legend information can be performed based on the segmented main map region.

[0034] The identification and segmentation of the main map region can be achieved using the SAM model (Segment Anything Model). Specifically, by injecting text vectors with clear semantic cues into the SAM model, it can achieve bimodal alignment with the graphic, thereby accurately identifying and segmenting the main map region. After binarization, the segmentation result preserves the spatial topology of the main map region while removing interfering elements, providing a foundation for subsequent segmentation of cartographic units and extraction of legend elements.

[0035] The following sections will explain the segmentation of cartographic units and the extraction of legend information.

[0036] First, divide the cartographic unit.

[0037] In one embodiment of the present invention, the segmentation method of the mapping unit includes:

[0038] S11: Use the trained fine-tuned SAM model to identify the mapping units in the main map region to obtain the mapping unit mask;

[0039] S12: Use an edge detection algorithm to correct the mapping unit mask, and use the correction results to extract several independent mapping units.

[0040] The visual characteristics of different cartographic units are quite complex, such as unclear boundaries and diverse colors. Therefore, embodiments of the present invention can use a fine-tuned SAM model to identify cartographic units.

[0041] Before training the fine-tuned SAM model, fine-tuning training data is first acquired. The data source for the fine-tuning training data can be determined based on the administrative level of the cartographic units to be segmented. For example, if the required hierarchical statistical map for intelligent map reading is a map of China, then maps of China's provincial-level administrative units can be used as the data source for the cartographic units. Cue boxes are manually selected to annotate the cartographic units in the map using point or rectangular boxes, creating labeled data for the cartographic units. Then, using shape files of different geographic units, a batch of fine-tuning training data is automatically generated using data augmentation strategies such as multi-scale representation, noise injection, color selection, and cartographic generalization, thereby establishing the pairing relationship between map images and cartographic units. The fine-tuned SAM model is then trained using the fine-tuning training data, enabling the trained model to recognize cartographic units in hierarchical statistical maps.

[0042] The fine-tuned SAM model outputs a mapping unit mask. Considering potential errors during recognition, such as merging multiple mapping units into a single mask, an edge detection algorithm can be used to further refine the mask and extract individual mapping units. The Canny edge detection algorithm can be used. This ensures accurate boundary segmentation of each mapping unit while preserving the spatial relationships of the original map.

[0043] Second, extract the legend information.

[0044] In this embodiment of the invention, the SAM model can be used to automatically segment the legend image to achieve the segmentation and extraction of legend color blocks and their corresponding hierarchical explanatory text.

[0045] In order to accurately extract legend color blocks and hierarchical explanatory text for different styles of hierarchical statistical maps, in one embodiment of the present invention, the legend information is extracted through the following steps S21-S24:

[0046] S21. Based on the segmentation results of the main map region, perform a binarization masking operation on the main map region in the hierarchical statistical map to obtain the working domain of the non-main map region.

[0047] Since the legend elements are located on one side of the main map area, this step can remove the main map area and retain only the working area outside the main map area, which facilitates the subsequent extraction of legend information.

[0048] S22. Using a density-based clustering algorithm, according to the spatial distribution of legend elements in the hierarchical statistical map, the pixels in the working domain are clustered twice to gradually filter out the pixels belonging to the legend elements and identify the target legend.

[0049] In this embodiment of the invention, this step may include:

[0050] S221: Perform binarization processing on the working domain to achieve foreground and background segmentation;

[0051] S222: The pixels in the foreground within the working domain are sampled for the first time using the first minimum number of sampled pixels, and the pixels obtained in this sampling are clustered using the first clustering radius to obtain several primary clusters;

[0052] S223: For each primary cluster, perform the following: use the set conditions to identify whether the primary cluster is a potential legend region; if not, remove the primary cluster.

[0053] During the first clustering, a smaller initial minimum sampling pixel count and initial cluster radius can be selected. This helps to avoid clustering pixels that do not belong to the same category into the same category when faced with a large number of pixels, and also results in a larger number of clusters after the first clustering. Therefore, certain conditions can be set to remove some of the first clusters that do not belong to the potential legend region, thereby reducing the number of pixels in the second clustering.

[0054] In one embodiment of the present invention, the setting condition may include at least one of the following two conditions:

[0055] Condition 1: Determine whether the area of ​​the bounding rectangle of the first cluster is within the set area threshold range. If so, the first cluster is a potential legend region.

[0056] Since the legend region in a hierarchical statistical map is generally rectangular, and its area accounts for a certain proportion of the entire map, the presence or absence of a bounding rectangle within a set area threshold can be used to determine whether a primary cluster is a potential legend region. One implementation uses the number of pixels in the legend region; for example, this threshold could be set to a minimum of 100 pixels and a maximum of 500 pixels. Another implementation uses the proportion of the legend region within the entire hierarchical statistical map; for example, this threshold could be set to a ratio of the legend region to the total area of ​​the hierarchical statistical map of at least 1 / 4 and a maximum of 1 / 3. Therefore, it can be determined whether the bounding rectangle of a primary cluster falls within the set area threshold. If it does, the primary cluster is considered a potential legend region; otherwise, it is discarded.

[0057] Condition 2: Determine whether the cluster center of this primary cluster is located within the specified region. If so, this primary cluster is a potential legend region.

[0058] Since the legend region in a hierarchical statistical map is generally located at a specified position, such as the lower left or upper left of the entire map, the location of the legend region can be predetermined by inputting a set region. For example, if the set region is a rectangular area, the four pixels of the rectangular area can be used to represent its four vertices. This allows us to determine whether the cluster center of a primary cluster is located within this set region. If so, the primary cluster is considered a potential legend region; otherwise, the primary cluster is discarded.

[0059] Furthermore, to ensure that the retained area has sufficient spatial information, in the first clustering after filtering by the above two setting conditions, a specified number of the largest number of pixels in the first clustering can be selected for subsequent secondary clustering analysis.

[0060] S224: Use the second minimum sampled pixel to perform a second sampling on the pixels remaining in the first cluster after removal, and use the second cluster radius to cluster the pixels obtained in this sampling, and use the bounding rectangle region corresponding to the second cluster with the most pixels as the target image.

[0061] In this embodiment of the invention, the second minimum sampled pixel count is greater than the first minimum sampled pixel count, and the second clustering radius is greater than the first clustering radius. This is because during the secondary clustering, since the primary clustering that does not belong to the potential legend region has been eliminated, the number of remaining pixels is relatively small, and the clustering parameters can be more lenient than those of the first clustering, but it is still necessary to ensure that no information is lost during the clustering process.

[0062] In one implementation, the first minimum sampling pixel is 10, the first cluster radius is 10 pixels, the second minimum sampling pixel is 20, and the second cluster radius is 60 pixels.

[0063] S23. Extract legend color blocks and hierarchical explanatory text from the identified target legend to obtain legend information.

[0064] In this embodiment of the invention, the target legend includes legend color blocks and hierarchical explanatory text, and the legend color blocks and hierarchical explanatory text are related. In one embodiment of the invention, the legend color blocks and hierarchical explanatory text can be extracted through the following steps:

[0065] S231: Obtain the legend image after segmenting the target legend;

[0066] S232: The illustration image is automatically segmented using an image semantic segmentation model to obtain multiple segmentation objects;

[0067] S233: For the multiple segmented objects, a mask method is used to filter them to obtain several legend color blocks;

[0068] S234: Sort the legend color blocks according to their coordinates, calculate the bounding rectangle of the corresponding hierarchical explanatory text for each legend color block in order of sorting, and cut the entire hierarchical explanatory text according to the bounding rectangle of each hierarchical explanatory text. Then, perform text recognition on the cut hierarchical explanatory text to obtain the legend color block and its corresponding hierarchical explanatory text.

[0069] In this embodiment of the invention, the step of calculating the bounding rectangle of the corresponding hierarchical explanatory text for each legend color block in sequence according to the order, and cutting the entire hierarchical explanatory text according to the bounding rectangle of each hierarchical explanatory text, includes:

[0070] For the i-th legend color block, calculate the bounding rectangle of the corresponding hierarchical explanatory text using the following formula:

[0071]

[0072]

[0073]

[0074] Where a and b are the length and width of the bounding rectangle of the hierarchical description text corresponding to the i-th color block. For the first The center coordinates of each color block For the first The maximum and minimum values ​​of the x-coordinate of each color block For the first Each color block corresponds to the coordinates of the four vertices of the outer rectangle of the hierarchical explanatory text. The length and width of the illustration image; Used to characterize columns, Used to represent rows;

[0075] Given the coordinates of the four vertices of the bounding rectangle of multiple color blocks, according to Arrange them sequentially to obtain the bounding rectangle of the entire hierarchical description text, and then use the bounding rectangle of the entire hierarchical description text to cut the entire hierarchical description text.

[0076] In other words, for the coordinates of the first vertex Select the minimum vertex coordinate from the bounding rectangles of the multiple color blocks as the first vertex coordinate of the bounding rectangle of the entire hierarchical description text. For the coordinates of the second vertex Choose the minimum vertex coordinate from the bounding rectangles of the multiple color blocks as the second vertex coordinate of the bounding rectangle of the entire hierarchical description text. Regarding the coordinates of the third vertex Choose the maximum value from the vertex coordinates of the bounding rectangles of the multiple color blocks as the third vertex coordinate of the entire hierarchical description text. Regarding the coordinates of the fourth vertex Choose the maximum value from the vertex coordinates of the bounding rectangle of the multiple color blocks as the fourth vertex coordinate of the bounding rectangle of the entire hierarchical description text. .

[0077] Then, for step 102, "For each of the multiple cartographic units obtained by segmentation, perform the following: identify the place name and color of the cartographic unit, match the color of the cartographic unit with the color of the legend color block to determine the hierarchical description text of the matched color, and form a quadruple of the cartographic unit, place name, color and hierarchical description text" and step 104, "Supplement the multiple quadruples corresponding to the hierarchical statistical map into the large language model to obtain the map explanation text output by the large language model".

[0078] In this embodiment of the invention, the hierarchical statistical map can be segmented into multiple cartographic units, each with its own place name and color. To identify the place name of a cartographic unit, it is necessary to accurately map the cartographic unit to the place name information on the map. In this embodiment of the invention, the text-image semantic alignment model (CLIP model) can be fine-tuned to identify the geographic entity corresponding to each cartographic unit.

[0079] Specifically, the methods for identifying the place name of this cartographic unit may include:

[0080] Step 1020: Train a text-image semantic alignment model based on the text-image training pair; the text-image training pair includes a cartographic unit image as input and a place name as output.

[0081] Before training the image-text semantic alignment model, image-text training pairs are first obtained. The data source for the image-text training pairs can be determined based on the administrative level of the hierarchical statistical map to be identified. For example, if the hierarchical statistical map required for intelligent map reading is a map of China, then maps of Chinese provincial-level administrative units can be used as the data source for the image-text training pairs. The cartographic unit is used as the image, and the place name of the cartographic unit is used as the text, thus forming image-text training pairs. In order to generate a sufficient number of high-quality, high-precision, robust, and representative image-text pairs, a multi-dimensional data augmentation strategy is used to process the images in the image-text training pairs obtained from the data source to obtain multiple image-text training pairs.

[0082] This multi-dimensional data augmentation strategy can include at least one of the following strategies: projection transformation strategy, multi-scale representation strategy, noise injection strategy, and cartographic generalization strategy. These four strategies are explained below.

[0083] First, the projection transformation strategy. This strategy can include the following projection methods:

[0084] 1. Equidistant cylindrical projection: Preserves the orthogonality of the latitude and longitude grid;

[0085] 2. Albers equal-area projection: to ensure the accuracy of provincial unit area calculation;

[0086] 3. Web Mercator projection: Simulates a common scenario for internet map services.

[0087] Next, a multi-scale representation strategy is employed. Considering the scale dependence of map usage scenarios, outward scaling technology is used to generate multi-scale samples. In actual map use, the same geographical area may be drawn at different scales. To simulate this change, the map can be scaled outward by 0%, 10%, and 20% respectively. The scaling operation maintains the integrity of the geographical area, and the display range is changed by adjusting the canvas size.

[0088] Next, the noise injection strategy. To simulate image degradation problems in real-world scenarios, structural noise injection can be performed as follows:

[0089] 1. Salt and pepper noise: The pixel-level noise ratio is a set value, for example, the set value is 0.01;

[0090] 2. Annotation Occlusion: Randomly insert rectangular occlusion blocks of a set ratio to simulate the drawing being covered, for example, the set ratio is 5%.

[0091] Finally, cartographic generalization strategies. In actual map use, cartographers perform varying degrees of cartographic generalization on feature boundaries based on different scales. Furthermore, inaccurate edge extraction can occur during the extraction of cartographic units. To address the multi-scale characteristics of vector data's geometric precision, a hierarchical simplification scheme can be constructed:

[0092] 1. The Douglas-Peucker algorithm is used for boundary simplification, and the tolerance threshold can be set to 0.5km, 1km, 2km, or 3km.

[0093] 2. Use vectors under different cartographic generalization intensities.

[0094] In this way, multiple image-text training pairs can be used to train the fine-tuned CLIP model.

[0095] Step 1022: Input the mapping unit into the text-image semantic alignment model to obtain the place names output by the text-image semantic alignment model.

[0096] The color of the segmented mapping unit also needs to be identified. The identification method can be to directly calculate the color value of the mapping unit at each pixel.

[0097] After identifying the color of the plotting unit, it is also necessary to match the color of the plotting unit with the color of the legend block. The matching methods may include:

[0098] Calculate the color mean of this plotting unit;

[0099] For the average color and the color of each legend color block, calculate the CIEDE2000 color difference, and take the color of the legend color block with the smallest CIEDE2000 color difference as the matched color.

[0100] In this way, the colors of the drawing units can be associated with the hierarchical explanatory text of the legend color blocks.

[0101] After obtaining the cartographic unit, place name, color, and hierarchical description text, the cartographic unit, place name, color, and hierarchical description text are combined into a quadruple. Since the hierarchical statistical map is divided into multiple cartographic units, multiple quadruples corresponding to multiple cartographic units can be obtained.

[0102] When using a large language model to perform intelligent map reading tasks on hierarchical statistical maps, the hierarchical statistical map and its corresponding multiple quadruplets can be input into the large language model. At the same time, the professional knowledge base and structured prompt words can be used to interpret the hierarchical statistical map.

[0103] In this embodiment of the invention, since the quadruple combines the color of the cartographic unit with the place name and hierarchical explanatory text, it realizes the mapping between visual variables and semantic information, providing detailed and spatial features for the large language model. This enables the large language model to make full use of the detailed and spatial features brought by the quadruple to interpret the map text when interpreting the hierarchical statistical map input, thereby improving the accuracy of intelligent map reading tasks.

[0104] Please refer to Figure 2 This is a schematic diagram of a hierarchical statistical map intelligent reading process provided by an embodiment of the present invention. The intelligent map reading process specifically includes:

[0105] Step 1: Obtain the hierarchical statistical map;

[0106] Step 2: Segment the map regions from the hierarchical statistical map;

[0107] Step 3: Identify and segment cartographic units from the map region;

[0108] Step 4: Identify the place names of the cartographic units;

[0109] Step 5: Mask the hierarchical statistical map based on the map area to extract legend elements;

[0110] Step 6: Extract legend color blocks and hierarchical explanatory text for the legend elements;

[0111] Step 7: Perform color matching of the legend color blocks for the drawing units to obtain the color and hierarchical explanatory text;

[0112] Step 8: Combine the cartographic unit, place name, color, and hierarchical description text into a quadruple, input it into the large language model, and the large language model will output the map interpretation text.

[0113] The third and fourth steps are the process of dividing the cartographic units and identifying place names, while the fifth and sixth steps are the process of extracting legend information. These two processes can be carried out simultaneously.

[0114] Please refer to Figure 3 This invention provides a hierarchical statistical map intelligent reading device, which includes:

[0115] The segmentation and extraction unit 300 is used to segment cartographic units and extract legend information from a hierarchical statistical map; the legend information includes the color of the legend color block and the corresponding hierarchical description text;

[0116] Quadruple generation unit 302 is used to perform the following for each of the multiple cartographic units obtained by segmentation: identify the place name and color of the cartographic unit, match the color of the cartographic unit with the color of the legend color block to determine the hierarchical description text of the matched color, and form a quadruple of the cartographic unit, place name, color and hierarchical description text.

[0117] The map reading unit 304 is used to supplement the input of multiple quadruplets corresponding to the hierarchical statistical map into the large language model in order to obtain the map interpretation text output by the large language model.

[0118] In one embodiment of the present invention, the segmentation and extraction unit is further configured to identify and segment the main map region from the hierarchical statistical map before the segmentation mapping unit and the extraction of legend information are performed, so as to perform the segmentation mapping unit and the extraction of legend information based on the segmented main map region.

[0119] In one embodiment of the present invention, the segmentation method of the mapping unit includes: using a trained fine-tuned general artificial intelligence model to identify the mapping units in the main map region to obtain a mapping unit mask; using an edge detection algorithm to correct the mapping unit mask, and using the correction result to extract several independent mapping units.

[0120] In one embodiment of the present invention, the method for extracting the legend information includes: based on the segmentation result of the main map region, performing a binarization mask operation on the main map region in the hierarchical statistical map to obtain the working domain of the non-main map region; using a density-based clustering algorithm, according to the spatial distribution of legend elements in the hierarchical statistical map, performing two clustering operations on the pixels in the working domain to gradually filter out pixels belonging to legend elements and identify the target legend; and extracting legend color blocks and hierarchical explanatory text from the identified target legend to obtain the legend information.

[0121] In one embodiment of the present invention, the method of identifying the place name of the cartographic unit includes: training a map-text semantic alignment model based on a map-text training pair; the map-text training pair includes a map unit image as input and a place name as output; inputting the map unit into the map-text semantic alignment model to obtain the place name output by the map-text semantic alignment model.

[0122] In one embodiment of the present invention, matching the color of the drawing unit with the color of the legend color block includes: calculating the color mean of the drawing unit; calculating the CIEDE2000 color difference between the color mean and the color of each legend color block, and taking the color of the legend color block with the smallest CIEDE2000 color difference as the matched color.

[0123] It should be noted that the hierarchical statistical map intelligent reading device provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the hierarchical statistical map intelligent reading device and the hierarchical statistical map intelligent reading method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0124] Embodiments of this application also provide a computer device, please refer to... Figure 4 The computer device includes a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the at least one instruction, at least one program, code set or instruction set being loaded and executed by the processor to implement the hierarchical statistical map intelligent reading method provided in the above method embodiments.

[0125] The embodiments of this application also provide a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the hierarchical statistical map intelligent reading method provided in the above-described method embodiments.

[0126] Embodiments of this application also provide a computer program product, which includes a computer program. A processor of a computer device reads the computer program from a computer-readable storage medium and executes the computer program, causing the computer device to perform any of the hierarchical statistical map intelligent reading methods described in the above embodiments.

[0127] For ease of description, the above systems or devices are described separately as various modules or units based on their functions. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware components.

[0128] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, 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 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 various embodiments or some parts of the embodiments of this application.

[0129] Finally, it should be noted that in this document, relational terms such as first, second, third, and fourth are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0130] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for intelligent reading of hierarchical statistical maps, characterized in that, The method includes: The main map region is identified and segmented from the hierarchical statistical map. Based on the segmented main map region, cartographic units are segmented and legend information is extracted. The legend information includes the color of the legend color block and the corresponding hierarchical description text. For each of the multiple cartographic units obtained from the segmentation, the following steps are performed: identify the place name and color of the cartographic unit, match the color of the cartographic unit with the color of the legend color block to determine the hierarchical description text of the matched color, and form a quadruple of the cartographic unit, place name, color and hierarchical description text. The multiple quadruplets corresponding to the hierarchical statistical map are supplemented and input into the large language model to obtain the map interpretation text output by the large language model; The method for extracting the legend information includes: based on the segmentation results of the main map region, performing a binarization mask operation on the main map region in the hierarchical statistical map to obtain the working domain of the non-main map region; using a density-based clustering algorithm, according to the spatial distribution of legend elements in the hierarchical statistical map, performing two clustering operations on the pixels in the working domain to gradually filter pixels belonging to legend elements and identify the target legend; obtaining the legend image obtained after segmenting the target legend; using an image semantic segmentation model to automatically segment the legend image to obtain multiple segmentation objects; filtering the multiple segmentation objects using a mask method to obtain several legend color blocks; sorting the legend color blocks according to their coordinates, calculating the bounding rectangle of the corresponding hierarchical explanatory text for each legend color block in sequence according to the sorting, and cutting the entire hierarchical explanatory text according to the bounding rectangle of each hierarchical explanatory text, and performing text recognition on the cut hierarchical explanatory text to obtain the legend color block and its corresponding hierarchical explanatory text.

2. The method according to claim 1, characterized in that, The methods for dividing the cartographic unit include: The mapping units of the main image region are identified using a trained, fine-tuned general artificial intelligence model to obtain a mapping unit mask; An edge detection algorithm is used to correct the mapping unit mask, and the correction results are used to extract several independent mapping units.

3. The method according to any one of claims 1-2, characterized in that, The methods for identifying the place name of the mapping unit include: A semantic alignment model for images and texts is obtained by training an image-text training pair; the image-text training pair includes cartographic unit images as input and place names as output. The mapping unit is input into the text-image semantic alignment model to obtain the place names output by the text-image semantic alignment model.

4. The method according to any one of claims 1-2, characterized in that, The step of matching the color of the drawing unit with the color of the legend color block includes: Calculate the color mean of this plotting unit; For the average color and the color of each legend color block, calculate the CIEDE2000 color difference, and take the color of the legend color block with the smallest CIEDE2000 color difference as the matched color.

5. A hierarchical statistical map intelligent reading device, characterized in that, Based on any of the hierarchical statistical map intelligent reading methods in claims 1-4 above, the device includes: The segmentation and extraction unit is used to segment cartographic units and extract legend information from a hierarchical statistical map; the legend information includes the color of the legend color block and the corresponding hierarchical description text; The quadruple generation unit is used to perform the following for each of the multiple cartographic units obtained from the segmentation: identify the place name and color of the cartographic unit, match the color of the cartographic unit with the color of the legend color block to determine the hierarchical description text of the matched color, and form a quadruple of the cartographic unit, place name, color and hierarchical description text. The map reading unit is used to supplement the input of multiple quadruplets corresponding to the hierarchical statistical map into the large language model in order to obtain the map interpretation text output by the large language model.

6. A computer device, characterized in that, The computer device includes a memory and a processor. The memory is used to store computer programs, and the processor is used to execute the computer programs stored in the memory to implement the steps of the method according to any one of claims 1-4.

7. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the steps of the method described in any one of claims 1-4.

8. A computer program product, characterized in that, Includes a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Method for making high-quality map multi-modal data set based on POI (Point of Interest) data

    CN120277166A

  • Thematic map preparation method and apparatus, storage medium and electronic device

    US12182907B1