A Standardized Batch Cartography Task Scheduling and Rule Control Method for Scientific Research Maps
By using a task list-driven batch processing workflow and a multi-level matching mechanism for administrative region names, the problem of repetitive operations in large-scale map drawing is solved, enabling efficient and standardized automatic generation of multiple maps and improving map drawing efficiency and consistency.
Patent Information
- Application Number
- CN202611294091.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-25
- Publication Date
- 2026-11-17
AI Technical Summary
Existing technologies are inefficient in large-scale map production, involve a lot of repetitive manual operations, and make it difficult to ensure the consistency and standardization of maps. Especially when processing a large number of thematic maps, existing methods require repeated operations such as data reading, field selection, spatial association, color setting, and file export for each indicator, which is difficult to meet the needs of high-throughput mapping.
The system employs a task-list driven batch processing workflow, combined with a multi-level matching and batch mapping reuse mechanism for administrative region names, a unified map rendering workflow, and automatic quality checks. Through a column-based task-driven batch processing workflow, multiple columns of indicators in external data tables are automatically converted into continuous mapping tasks, reducing repetitive manual operations.
It significantly improves the efficiency of batch drawing of standardized maps, reduces manual operation costs, enhances the consistency and repeatability of map output, reduces the risk of problematic maps, and improves the standardization of a large number of map products in terms of territorial representation, administrative boundaries, and map format.
Smart Images

Figure CN123115289A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of spatial data science and technology and geographic information technology, and more specifically relates to a standardized batch mapping task arrangement and rule control method for scientific research maps. Background Technology
[0002] With the rapid development of spatial data science and the widespread application of Geographic Information Systems (GIS) in social sciences, public health, environmental monitoring, and economic geography, the visualization of spatial data has become a core element in the presentation of scientific research results and decision support. High-quality, standardized thematic maps not only intuitively reveal the spatial differentiation patterns and clustering characteristics of data, but are also a rigid requirement for academic journal publications and official reports. Especially in the mapping of national territories, it is essential to strictly adhere to the standard map base maps issued by the national surveying and mapping administrative department to ensure national boundaries and comply with the map review requirements for standardized map use.
[0003] Currently, existing technologies for processing geographic information and creating thematic maps mainly fall into two categories: The first category is professional GIS software drawing techniques based on graphical user interfaces (GUIs). This type of technique relies on desktop software such as ArcGIS, QGIS, or MapInfo, allowing users to manually load vector base maps and attribute data, and manually perform layer associations, symbolization settings, and layout adjustments. Its advantage lies in its strong interactivity, making it suitable for simple and complex map designs. However, this approach suffers from a significant "low throughput defect." When faced with batch drawing needs involving dozens or even hundreds of variables, users must repeatedly perform hundreds of mechanical operations such as connecting tables, setting colors, adjusting layouts, and exporting. This is inefficient and makes it difficult to ensure strict consistency in scale, color scheme, and annotation positions across multiple maps.
[0004] The second category is scripted plotting techniques based on basic plotting libraries. These techniques utilize general-purpose plotting libraries such as Python's Matplotlib and Basemap, or R's ggplot2. While achieving a degree of automation, most existing solutions fall into a "single-task hard-coding" pattern, meaning that data values are often directly embedded in the code logic as lists or dictionaries, lacking the ability to universally read and pipeline-process external structured data.
[0005] Furthermore, most existing scripts lack built-in support for map standards and specifications, often requiring developers to manually calculate the projection transformation and positioning of illustrations, and they lack fuzzy matching mechanisms for administrative division names. When processing non-standard place name mappings, data loss is easily caused by matching failures. In addition, when handling high-order spatial analyses such as kernel density estimation (KDE) that takes into account the curvature of the Earth, existing scripts often rely on simple pixel interpolation, lacking the ability to calculate accurate density based on geographic coordinates, making it difficult to meet the dual standards of aesthetics and scientific rigor required by top journals.
[0006] Existing map-making technologies are relatively mature for producing single maps or small batches of maps, capable of handling basic tasks such as base map loading, attribute association, symbolization settings, legend configuration, and output export. Their main drawback lies in their low efficiency for large-scale map production. When users need to continuously create dozens, hundreds, or even more thematic maps based on the same base map, existing methods typically require repeatedly performing operations such as data reading, field selection, spatial association, color setting, layout adjustment, and file export for each indicator. This results in a long overall processing time, making it difficult to meet the demands of high-throughput mapping.
[0007] Therefore, the core issue that existing technologies need to improve is how to reduce repetitive manual operations and code modifications when generating a large number of standardized maps at once, and how to automatically identify multiple columns of indicators in external data tables as multiple cartographic tasks, and continuously complete data association, map rendering, and output in the same processing flow. This problem directly affects the speed and workload of large-scale thematic map production, and is also the key technical problem that this invention aims to solve. Summary of the Invention
[0008] The technical problems solved by this invention include: in scenarios involving the creation of numerous thematic maps, how to achieve efficient batch processing through task-driven workflows, reusable administrative region name mapping mechanisms, unified map rendering processes, and seamless integration of main and sub-maps. Figure 1 The standardization processing mechanism transforms the repetitive manual drawing process of multiple maps into a continuous automatic generation process after a single configuration, thereby improving the batch drawing efficiency of standardized maps.
[0009] To achieve the above objectives, the present invention employs the following technical solution: the method comprising: (1) Task list driven, including: After reading the external table, the system identifies each mapping task and generates a task list, which serves as a unified entry point for subsequent processes, enabling the system to call the partitioned fill map, kernel density map, and scalable mapping module according to the unified task structure. (2) Standardized matching of place names / regional identifiers, including: A multi-level matching and batch mapping reuse mechanism for administrative region names is adopted to match the administrative region names in the external data of Excel with the administrative region names in the base map attribute table. The system pre-stores candidate sequences for the base map name field. The candidate sequences include name, NAME, name_zh, NAME_ZH, name_cn, NAME_CN, NAME_CHN, name_chn, City, CITY, and city. The system searches the base map attribute table according to the order of the candidate sequences and determines the first candidate field found as the base map name field. If no candidate field is found, select the first text-type field as the base map name field according to the field order in the base map attribute table. If no text field exists, terminate the current batch and output a message indicating that the name field recognition failed. The candidate sequence is a set of field names pre-set in the program, not generated temporarily during the batch drawing process.
[0010] (3) Co-rendering of drawing rules and templates, including: Using user-preset partitioned fill maps and KDE kernel density map templates, and adopting a unified base map standard, color scheme, normalization method, color scale, latitude and longitude grid, compass, and scale rendering method, the map results are automatically loaded and rendered for each task according to the rules in its task metadata, ensuring that the main map and the attached map are consistent in terms of data columns, normalization rules, color bands, and numerical range elements. (4) Automated quality inspection and full-process traceability, including: In the map making process, automatic detection and recording are performed on the following: base map name field recognition, output file name legalization, rendering error detection, data format error detection, place name multi-level matching results, conflicting names, unmatched names and all abnormal situations. When encountering a single column data format error or rendering error, record the error and skip that column, continue with subsequent tasks, and continuously generate operation logs and problem lists throughout the entire batch process; If only one unique candidate result is returned during the name mapping process, the match is confirmed directly; if multiple candidate results are returned, the system records the name as a conflicting name and outputs a candidate list, waiting for user verification or manual mapping table supplementation. If no standard field is found or the name cannot be legally matched, the system will automatically terminate the current process and output a prompt.
[0011] In one approach, the task list-driven approach is as follows: when the system identifies an external Excel spreadsheet, it sequentially checks the data type and content of each column, taking the first column as the administrative region name column and the remaining columns as indicators to be mapped. Each task clearly includes a task number, task type, data field, matching field, mapping template, numerical processing rules, output format, and output path. The output filenames are validated by removing characters that are not suitable for use in the filenames, generating a unique output path, and saving the map to the user-specified directory, thus realizing the automatic distribution and organization of batch tasks.
[0012] In one scheme, the standardized matching of place names / regional identifiers is specifically as follows: 3. The system sequentially retrieves the base map attribute table according to the pre-stored field sequence of name, NAME, name_zh, NAME_ZH, name_cn, NAME_CN, NAME_CHN, name_chn, City, CITY, city, and determines the first retrieved field as the base map name field; If the field is not found, select the first text field according to the field order of the base map attribute table. If the text field is still not found, terminate the current batch.
[0013] The system converts the base map name field to a string and removes leading and trailing spaces, then writes the complete base map name into the name index; When the base map name ends with "City", the name obtained by removing the "City" at the end is also written into the name index; when it ends with "Region", the name obtained by removing the "Region" at the end is also written into the name index. When the name contains the character combination "autonomous prefecture", the name obtained by deleting the character combination will also be written into the name index.
[0014] For the names to be matched in Excel, the system performs matching in the following order: directly searching for the name to be matched, searching for the concatenation result of the name to be matched with "city", searching for the concatenation result of the name to be matched with "region", and searching for the result after deleting the characters "city", "county", and "district" from the name to be matched. If any step is successful, the complete name of the base map corresponding to the index is written into the city name mapping dictionary of the current batch. If none of the steps are successful, the name to be matched is recorded as an unmatched name.
[0015] In one approach, the aforementioned map rules and templates are rendered collaboratively, specifically as follows: during the rendering of the partitioned fill map and the KDE kernel density map, the system ensures that the rendering results are standardized and consistent according to the same normalization, color band, and numerical range requirements for the main map range, partition color scheme, normalization scheme, color scale, latitude and longitude grid, scale, compass rose, and South China Sea sub-map. The system performs data cleaning, numerical normalization, spatial projection, and output resolution operations column by column according to the task list. The map results are automatically output to the specified directory using a predefined template and standard rules to avoid differences in expression and omissions in rules.
[0016] In one solution, the automatic quality check and full-process traceability are specifically as follows: During batch operation, the system records the identification status of the base map name field, the data cleaning status, the mapping table generation status, the validity of the output file name, data format and rendering errors, the list of conflicting names to be verified, the list of unmatched names, and detailed logs for each failed, skipped, and terminated step of the process for each column of data, each place name mapping, each map rendering, and each file output. This ensures that each task and process step is traceable, and that a single column of cartographic errors does not affect the overall batch process and supports subsequent review and manual intervention.
[0017] In one approach, the system employs a mapping caching mechanism during the name mapping process. It establishes a task batch mapping cache table for all administrative region names that have been successfully standardized and matched. All subsequent tasks within the same batch of mapping tasks reuse the cached results. Only newly added or mismatched names are subject to rule matching and conflict detection. This significantly reduces repetitive place name parsing operations, improves the overall processing efficiency of multiple tasks, and automatically supplements the trace records when the mapping cache is updated.
[0018] In one scheme, the system adopts a hierarchical priority processing and conflict detection mechanism for the multi-level matching process of administrative region names. When any name to be matched has two or more standard names in the candidate set generated by full name exact matching, alias dictionary matching, administrative region suffix completion, and root word matching, the entry is automatically recorded as a conflict name, a conflict candidate list is output, and automatic merging of errors is prevented. The process continues after manual verification or supplementary mapping by the user.
[0019] In one approach, when executing each batch of map tasks, the system automatically detects and records in detail any issues such as unmatched names, field recognition failures, data format errors, rendering errors, and abnormal output directories at each stage of the task. If the system encounters a base map name field that cannot be recognized, it immediately terminates the current process and provides a prompt. If an error occurs in a task, it is recorded and skipped. All errors, skips, and manual interventions in the task process are recorded in a structured log and a problem list to facilitate subsequent anomaly review or task rerun, achieving transparent traceability throughout the entire process.
[0020] Beneficial effects of this invention: This invention utilizes a task-driven batch mapping workflow to automatically convert multiple indicator columns from an external data table into continuous mapping tasks. This allows the system to continuously generate multiple maps after loading data, loading the base map, and setting the main mapping rules all at once. This method significantly reduces the workload of manual operation and script modification for each map, thereby improving the processing speed of large-scale thematic map production.
[0021] This invention transforms repetitive, time-consuming, and human-dependent operations in large-scale standardized map creation into a continuous, automated generation process after a single configuration. This method improves batch mapping efficiency, reduces manual operation costs, enhances the consistency and repeatability of map output, and reduces the risk of problematic maps by incorporating a standard base map with a built-in map approval number and unified layout rules. It also improves the standardization of map outputs in terms of map representation, administrative boundaries, appendix layout, and map format. Attached Figure Description
[0022] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a flowchart of the batch drawing process driven by column tasks in this invention; Figure 3 This is the overall conceptual idea of the present invention. Detailed Implementation
[0023] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Typical embodiments of the invention are shown in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
[0024] Unless otherwise defined, all technical and scientific terms used in this invention have the same meaning as understood by one of ordinary skill in the art to which this invention pertains. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. To facilitate understanding, the invention will now be described more fully with reference to the accompanying drawings. Typical embodiments of the invention are shown in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to make the disclosure of the invention more thorough and complete.
[0025] This invention proposes a standardized map-making method for the continuous generation of large numbers of thematic maps. Addressing the problems of inconsistent data structures, complex place name matching, and difficulty in ensuring rendering standards in batch scientific map creation, this invention proposes a method that uses a task list as a driving force, combines standardized matching of place names / regional identifiers, collaborative rendering of map rules and templates, automatic quality checks, and full-process tracking to achieve structured processing of batch cartography.
[0026] This method takes external table data, administrative region vector base maps, map boundary auxiliary files, and an output directory as input. It first loads the base map, identifies name fields, maps administrative region names, and initializes drawing parameters. Then, based on the user-selected map type, it automatically converts multiple data columns in the table into multiple cartographic tasks. During the same run, it continuously completes data association, map rendering, submap generation, and result file saving. The core of this method lies in transforming a data table read at once into a sequence of tasks executed column-by-column, reusing the same base map and the same name mapping results for multiple cartographic tasks. This reduces repetitive operations in map-by-map drawing and improves the efficiency of generating a large number of maps.
[0027] like Figure 1 As shown, a method for mass-producing standardized scientific research maps includes the following steps: (1) Task list driven: After reading the external table, the system identifies each mapping task and generates a task list, which serves as the unified entry point for subsequent processes. This allows the system to call the partitioned fill map, kernel density map, and extensible mapping module according to the unified task structure. The task list driven approach includes detailed implementation processes such as steps one and two: Step 1: System Input and Initialization The system receives four basic inputs. The first type of input is the Excel data table to be drawn. For administrative division fill maps, the first column of the table contains the city or administrative division name, and the remaining columns contain the indicators to be drawn. For kernel density maps, each column in the table can serve as an independent set of city names to generate a corresponding spatial density map. The second type of input is an administrative division vector base map, which contains the administrative division geometric objects and the administrative division name field. The third type of input is an optional boundary auxiliary file, including boundary lines, coastlines, and other layers. The fourth type of input is the output directory and drawing parameters, including base map style, normalization method, color scheme template, output resolution, whether to display points, and transparency.
[0028] After system startup, it first reads the administrative region vector base map and identifies the name fields in the base map. Name field identification uses a candidate field priority rule. The system first searches the base map attribute table for commonly used name fields, such as name, NAME, name_zh, NAME_ZH, name_cn, NAME_CN, City, CITY, city, etc. If no such field is found, the first text field in the base map attribute table is selected as a candidate name field. If the name field still cannot be identified, the current process is terminated and the user is prompted to supplement the base map name field. This process is used to reduce the impact of naming differences between base map fields from different sources on the batch mapping process. The above lays the foundation for subsequent automatic quality checks and full-process auditing.
[0029] In one embodiment: the system then reads the Excel data table, recording the number of rows, columns, and column names. Let the Excel data table be E, containing a total of... m Columns, the set of columns is In partitioned fill map mode, the system commands... For the administrative region name column, construct a set of indicator columns to be drawn. In KDE kernel density map mode, the system commands... Each column is treated as an independent set of points for mapping tasks. The system manages these task sets. Establish a column-based task sequence, so that the first... j Each task is determined by the current column name, column number, output file name, and plotting parameters.
[0030] Step 2: Batch drawing process driven by column tasks In one embodiment: the present invention employs a batch drawing process driven by column-based tasks. Let the set of tasks to be drawn be... ,in n This represents the number of maps to be drawn. The system retrieves each task sequentially during a single run. It automatically completes data extraction for the current column, data cleaning, administrative region name mapping, map rendering, and file saving. This process can be represented as follows: in, Indicates the first j Output map, G Represents a vector base map of administrative regions. M This represents a mapping table of administrative district names. R Represents a set of drawing rules. F This represents the function for generating a single map. Because... G , M and RMaintaining reusability during batch processing, the system does not need to repeatedly read the base map, repeatedly identify the name field, and repeatedly set the main layout parameters before each map is generated.
[0031] like Figure 2 As shown, the process includes the following steps: S201. Read external Excel data table and identify the set of columns to be drawn. T .
[0032] S202, Read the vector base map of administrative regions G Identify the base map name field and establish a standard set of administrative region names. D .
[0033] S203. Match the administrative region names or city names in Excel to create a mapping table from the table names to the standard names on the map. M .
[0034] S204. Enter the partition fill plot process or KDE kernel density plot process according to the plotting mode selected by the user.
[0035] S205, Regarding the task set T Perform a loop. For the first... j For each task, the system extracts the data in the current column, generates a temporary data table for the current task, and calls the same rendering process to output the map file.
[0036] S206. Validate the output file name, remove characters that are not suitable for the file name, generate a unique output path, and save the map to the user-specified directory.
[0037] S207. If a data format error or rendering error occurs in a certain column, the system records the error and skips that column, continuing to process subsequent column tasks, so that a single column error does not affect the entire batch drawing process.
[0038] The content in steps S206-S207 also serves as a technical foundation for subsequent automated quality inspection and full-process traceability.
[0039] (2) Standardized matching of place names / regional identifiers, including: A multi-level matching and batch mapping reuse mechanism for administrative region names is adopted to match the administrative region names in external Excel data with those in the base map attribute table. The system pre-stores a candidate sequence for the base map name field, which includes, in order: name, NAME, name_zh, NAME_ZH, name_cn, NAME_CN, NAME_CHN, name_chn, City, CITY, and city. The system searches the base map attribute table according to the order of the candidate sequence and determines the first candidate field found as the base map name field. If no candidate field is found, the system selects the first text-type field as the base map name field according to the field order in the base map attribute table. If no text-type field exists, the current batch is terminated and a name field recognition failure message is output. The candidate sequence is a pre-set set of field names in the program, not generated temporarily during batch mapping. The detailed implementation process is shown in step three below.
[0040] The system converts each name value in the base map name field into a string and removes leading and trailing spaces to form a set of standard base map names. For each name in the set, the system writes its full name into the name index; if the name ends with "city", the name obtained by removing the trailing "city" is written into the name index; if the name ends with "region", the name obtained by removing the trailing "region" is written into the name index; if the name contains "autonomous prefecture", the name obtained by removing the "autonomous prefecture" characters is written into the name index. Each index entry in the name index points to the corresponding full base map name.
[0041] In partitioned fill chart mode, the system reads all non-empty names from the first column of the Excel file; in kernel density chart mode, the system reads all non-empty names from all columns of the Excel file and removes duplicates. The system converts each name to be matched into a string and removes leading and trailing spaces, then performs the following matching operations in sequence: First, it checks if the name to be matched exists directly in the name index; second, it adds "city" to the end of the name to be matched and checks if the name with the added part exists in the name index; third, it adds "region" to the end of the name to be matched and checks if the name with the added part exists in the name index; fourth, it removes the characters "city," "county," and "district" from the name to be matched and checks if the simplified name obtained is in the name index.
[0042] When any matching method is successful, the system writes the correspondence between the name to be matched and the complete name on the base map into the city name mapping dictionary for the current batch; when no matching method is successful, the name is added to the list of unmatched names. After completing the name matching, the system outputs the number of successful matches, the number of failed matches, and the number of unmatched names, and determines whether to continue mapping based on user input.
[0043] The city name mapping dictionary is established only once before the cyclic processing of each data column. In the partitioned filling map mode, each indicator column calls the same city name mapping dictionary to complete the association between attribute data and the base map geometric objects; in the kernel density map mode, each name set column calls the same city name mapping dictionary to obtain the corresponding base map name and its geometric center coordinates, thereby avoiding repeated establishment of name correspondence for each data column.
[0044] After determining the base map name field, the system converts the names in this field into character strings and deletes leading and trailing spaces. The name normalization function is defined as Let the base map standard name set be wherein, represents the th complete base map name. The system establishes a name index based on the complete base map names . For any complete base map name , the system first writes itself into as an index key ; when ends with "Shi" (city), the character string obtained by deleting the trailing "Shi" is also used as an index key; when ends with "Diqu" (prefecture), the character string obtained by deleting the trailing "Diqu" is also used as an index key; when contains the character combination "Zizhizhou" (autonomous prefecture), the character string obtained by deleting this character combination is also used as an index key. Each index key points to the corresponding complete base map name , that is In the partitioned filling map mode, the system reads all non-empty administrative region names in the first column of the Excel file and deduplicates them; in the kernel density map mode, the system reads the non-empty administrative region names in all data columns of the Excel file and deduplicates them. For each name to be matched , the system first calculates the normalized name , and then constructs four retrieval keys in a fixed order: wherein, the symbol represents character string concatenation, represents deleting a specified character. The system sequentially uses , , and Search Name Index The first search level to be hit is defined as... When the first search level that is matched exists, the system writes the name to be matched and the corresponding full name of the base map into the city name mapping dictionary for the current batch. The mapping relationship is as follows: If none of the four search steps are successful, Write to the set of unmatched names : For example, if the map name field contains "Beijing", the system creates two index keys, "Beijing" and "Beijing", both pointing to the full map name "Beijing". If the name to be matched in Excel is "Beijing", the system can retrieve "Beijing" through a first-level search. Similarly, if the map name field contains "Ali Region", the system creates two index keys, "Ali Region" and "Ali". If the name to be matched in Excel is "Ali", the system can retrieve the full map name "Ali Region".
[0045] City Name Mapping Dictionary This is done once before iterating through each data column. In partitioned fill chart mode, all indicator columns call the same city name mapping dictionary. Complete the association between attribute data and base map geometry; in kernel density map mode, each name set column calls the same city name mapping dictionary. Obtain the corresponding base map name and then read the center coordinates of the corresponding geometric object. The name mapping result is not calculated repeatedly for each data column in the same batch mapping process.
[0046] Step 3: Multi-level matching and batch mapping reuse mechanism for administrative region names.
[0047] Before entering the cartographic loop for each data column, the system performs an administrative region name matching operation and saves the matching results in the city name mapping dictionary for the current batch. Subsequent data columns can be directly accessed. This reduces the need to repeatedly perform string processing and name retrieval for the same administrative region name.
[0048] Let the set of complete names in the base map name field be... The system will name each base map. Convert to a string and remove leading and trailing spaces to obtain the standardized name. Then a name index is built. For any , the system writes the index according to the following rules: first write itself; when the name ends with "city", add an index key obtained by deleting the trailing "city"; when the name ends with "prefecture", add an index key obtained by deleting the trailing "prefecture"; when the character combination "autonomous prefecture" is included, add an index key obtained by deleting this character combination. Each index key points to the corresponding full base map name .
[0049] In the partitioned filled map mode, the to-be-matched name set is formed by standardizing and deduplicating non-null values in the first column of Excel; in the kernel density map mode, the to-be-matched name set is formed by merging, standardizing and deduplicating non-null values from all data columns of Excel. For any , the system performs retrieval in a fixed four-level order, and the retrieval keys are respectively , , and : The system starts from to perform retrieval in sequence . When a hit is made at any step, subsequent retrieval is stopped, and the mapping dictionary is written according to the following formula: When none of the four retrieval keys belongs to the key set of , is written into the unmatched name set . After all names are processed, the system outputs the number of successful matches, the number of failed matches and the unmatched names, and determines whether to continue executing subsequent mapping according to user input.
[0050] For example, when the full base map name is "Beijing Municipality", the name index contains both "Beijing Municipality" and "Beijing", both of which point to "Beijing Municipality"; when "Beijing" is input, "Beijing Municipality" can be obtained directly. When the full base map name is "Ngari Prefecture", the name index contains both "Ngari Prefecture" and "Ngari"; when "Ngari" is input, "Ngari Prefecture" can be obtained.
[0051] City name mapping dictionary Generates before the current batch charting task enters the data column loop. In partitioned fill chart mode, all indicator columns from the first to the last use [the specified format]. Complete the association between attribute table names and base map names; in kernel density map mode, each data column uses... The corresponding base map name is determined, and the center coordinates of the geometric object corresponding to that base map name are read. Therefore, for objects with the same name in the same batch, the name mapping only needs to be established once.
[0052] After mapping is complete, the system generates a mapping cache table. M={x→d} In the partitioned fill chart mode, each subsequent indicator column is... M Convert the administrative region names in Excel to the base map standard names. In the KDE kernel density map mode, each subsequent set of city names is then converted using... M Obtain the corresponding administrative region from the base map, and then further extract the geometric center coordinates. Because... M In batch operations, the mapping only needs to be built once, and subsequent column tasks can directly call the mapping results, thereby reducing the time spent on repeated matching.
[0053] (3) Co-rendering of drawing rules and templates, including: Using user-preset zonal fill maps and KDE kernel density map templates, and employing unified base map standards, color schemes, normalization methods, color scales, latitude and longitude grids, north arrows, and scale rendering methods, the map results are automatically loaded and rendered for each task according to the rules in its task metadata, ensuring consistency between the main map and supplementary maps in terms of data columns, normalization rules, color bands, and numerical range elements. This is described in steps four and five below.
[0054] The system performs map rendering column by column based on the user-selected mapping mode and the drawing parameters determined before the batch begins. In the zone fill map mode, the first column of Excel is used as the administrative region name column, and the remaining columns form an indicator mapping task according to their original column order; in the kernel density map mode, all data columns of Excel form a city name set mapping task according to their original column order.
[0055] Let the first The data column corresponding to each cartographic task is: Batch task set is in, At least by the current column number Data columns The current batch drawing parameters and output path are jointly determined. The system follows the column sequence number. Execute sequentially .
[0056] For the partitioned fill chart task, the system first sets the current indicator column. Convert the data to numerical data and, based on the numerical range processing method selected by the user before the batch begins, create a normalized object for the current task. The system also creates a color band object for the current task based on the user's color scheme settings and whether the current column uses a divergent data representation. .
[0057] The color mapping function for the current task is defined as follows: in, The valid values in the current indicator column. The display color corresponding to this value. The system first uses the current indicator column. , and After the main chart is rendered, the same indicator column, the same normalized object, and the same color band object are passed to the attached chart rendering process. The attached chart only extracts the base map and data association results used by the main chart based on the preset spatial range, without recalculating the minimum value, maximum value, normalized object, or color band object of the current column.
[0058] Therefore, for any given index value The color mapping between the main image and the attached image satisfies For kernel density map tasks, the system targets the current data column. Perform a kernel density calculation to obtain the latitude and longitude grid matrix. , Density value matrix and equivalent sequence Main image based on , , and Rendering is then performed. When generating the appendix, the system extracts a sub-matrix corresponding to the spatial range of the appendix from the grid matrix and density value matrix used in the main image, and reuses the same color band object from the main image. and the same equivalent sequence The kernel density calculation or isotope determination will not be performed again for the attached figures.
[0059] Step 4: Batch rendering process of partitioned fill maps In the partitioned fill chart mode, the system uses the first column of the Excel file as the administrative region name column, and then uses the remaining columns one by one as the indicators to be charted. For the current indicator column... The system extracts two columns of data from Excel: the administrative region name column. and indicator column , constitute a temporary table The system first performs numerical conversion on the indicator columns, removing English commas, Chinese commas, and leading and trailing spaces, and recording values that cannot be converted as null values. This process can be represented as follows: in, For the first i Line number j List the original cells, Q This is a numerical cleaning function. This is the converted value.
[0060] The system then processed the temporary table. Application mapping table for administrative region names M Obtain the base map standard name, and use the base map standard name as the connection key to merge the current indicator column into the administrative region vector base map. G For administrative regions with available data, the system fills in the color according to the indicator value; for administrative regions without data, the system displays them in a uniform color to indicate no data, so that users can check the data coverage area.
[0061] The system offers four numerical range processing methods: 0 to 1 normalization, -1 to 1 symmetric normalization, non-normalization, and custom range mapping. Users select a processing method before starting batch plotting, and the system performs the corresponding processing based on the data characteristics of each index column.
[0062] Let the first The set of valid values for each indicator column is in, Indicates the first The first indicator in the column One valid value, This indicates the number of valid values in the column. The minimum and maximum values of the current column are defined as follows: When normalization is applied from 0 to 1, the converted value is denoted as .when When linear normalization is used: when In this case, it should be handled according to the constant column: The processed valid values are limited to the interval Within, the normalized object of the current task is denoted as Its display range is set to 0 to 1.
[0063] When using symmetric normalization from -1 to 1, the system first determines whether the current index column contains negative values. If the current column contains negative values, the maximum absolute value is calculated. when When converting, follow the formula below: when At that time, all valid values are set to 0. The converted value is limited to the range. Inside, the normalized object of the current task is set to When a user selects a normalization of -1 to 1 but the current indicator column does not contain negative values, the system will change the current column to a normalization of 0 to 1.
[0064] When using the non-normalization method, the system retains the original valid values of the current column and uses them as... and These serve as the lower and upper limits of the color mapping, respectively: When using a custom range, let the minimum and maximum values input by the user be respectively... and Then the normalized object of the current task is Values outside the custom range are displayed according to the color-mapped boundaries.
[0065] The system determines the color ribbon object to be used in the current task based on the user's color scheme settings. When a user selects a uniform color scheme, all indicator columns use the same color band specified by the user; when a user selects automatic color matching, the system uses the column number of the current indicator column. Select a color band from a pre-stored set of color bands. If the current column is normalized to -1 and contains negative values, select from the divergent color band set; otherwise, select from the continuous color band set.
[0066] The system determines the color scheme template based on whether the current column contains negative values and the normalization method selected by the user. If the current column uses symmetrical normalization from -1 to 1 and contains negative values, a divergent color scheme template is selected; otherwise, a continuous color scheme template is selected. If the user specifies a uniform color scheme, all columns use the same color scheme template. If the user selects automatic color matching, the system determines the color scheme based on the column number. j Select a color scheme from a set of preset color templates so that different column tasks can automatically obtain the corresponding color mapping parameters.
[0067] During map rendering, the system draws a base map of administrative regions within a unified projection and display area, overlays the current indicator coloring results, and generates color bars, latitude and longitude grids, a north arrow, and a scale bar. For outputs involving specific regions, the system sets the main map range to a fixed latitude and longitude range and generates sub-maps at designated locations on the canvas.
[0068] In one embodiment, the main map display range is set to 70°E to 140°E and 15°N to 55°N, while the attached map display range is set to 105°E to 125°E and 0°N to 25°N. The system completes the first... After data association and numerical processing for each indicator column, a normalized object for the current task is created only once. and ribbon object And use both to complete the main image rendering.
[0069] When generating the attached chart, the system will use the base map data that has already undergone data association and numerical processing, and the current indicator column. Same normalized object and the same color band object The attached image rendering process is passed in. The attached image extracts corresponding geometric objects from the base map data according to a preset attached image space range, and continues to use the passed-in data. , and Complete the coloring. The minimum value of the current indicator column will not be recalculated during the attached chart process. Maximum value Nor will it recreate the normalized object.
[0070] For any identical value in the main chart and the attached chart Using the same color function Therefore, it satisfies The above processing enables the main chart and the supplementary chart to share numerical ranges, normalization parameters, and color band parameters within the same indicator task.
[0071] Step 5: Batch Rendering Process of KDE Kernel Density Map In KDE kernel density map mode, the system treats each column in the Excel spreadsheet as an independent task. Current column Each non-empty cell in the table represents the name of a city or administrative region. The system uses a name mapping table. M Convert the name to a base map standard name and extract the corresponding administrative region's geometric center coordinates from the base map's geometric objects. Assume the current column has a total of... n There are 1 valid points, and the set of points is: .
[0072] To reduce the impact of duplicate points on computational efficiency, the system first compresses identical coordinate points. Let the set of unique coordinate points after compression be denoted as . Each unique point corresponds to a weight. , This indicates the number of times the coordinate point appears in the original set of points. This process converts duplicate coordinates into point weights, reducing the number of subsequent grid density calculations.
[0073] The system then projects the latitude and longitude coordinates to a metric projection coordinate system suitable for the region and calculates the kernel density in plane coordinates. Let the unique point after projection be... The weight is The system generates a regular grid based on the drawing area. If the user does not specify the grid size, the system uses the length of the shorter side of the projected drawing area. As the default grid size. Let the grid nodes be... (x,y) The search radius is h The system uses a weighted default bandwidth calculation method, first calculating the weighted mean center. The system then calculates the distance from each point to the center of the weighted mean. i The distance from each point to the center of the weighted mean is denoted as . The formula for its calculation is: After getting all Then, the system calculates the weighted median distance. And calculate the weighted standard distance. SD The formula for calculating the weighted standard distance is: Let the sum of all weights be... N ,Right now: Then the search radius is calculated. when h If a valid positive value cannot be obtained, the system sets a spare radius based on the larger of the horizontal and vertical spans of the point to ensure that subsequent density calculations can continue.
[0074] In obtaining the search radius h Then, the system processes each grid node. (x, y) Calculate the kernel density. For the... i For each point, the system first calculates the standardized squared distance. The formula for its calculation is: when <1 hour, the first i Each point contributes to the density of the grid node. Therefore, the grid node... Total density at the location for: in, I For indicator functions. When When <1, the function takes the value of 1; when When the value is ≥1, the function takes the value of 0. This expression indicates that only when the value is within the search radius... h Points within the search radius will contribute to the density value of the current grid node, while points outside the search radius will not participate in the density accumulation of that grid node.
[0075] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0076] It should be understood that the above detailed description of the technical solutions of the present invention with reference to preferred embodiments is illustrative and not restrictive. Those skilled in the art can modify the technical solutions described in the embodiments or make equivalent substitutions for some of the technical features based on reading this specification; however, these modifications or substitutions do not cause the essence of the corresponding technical solutions to depart from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for standardized batch mapping task scheduling and rule control oriented to scientific research maps, characterized in that: The method includes: (1) Task list driven; After reading the external table, the system identifies each mapping task and generates a task list, which serves as a unified entry point for subsequent processes, enabling the system to call the partitioned fill map, kernel density map, and scalable mapping module according to the unified task structure. (2) Standardized matching of place names / regional identifiers; A multi-level matching and batch mapping reuse mechanism for administrative region names is adopted to match the administrative region names in the external data of Excel with the administrative region names in the base map attribute table. The system pre-stores candidate sequences for the base map name field. The candidate sequences include name, NAME, name_zh, NAME_ZH, name_cn, NAME_CN, NAME_CHN, name_chn, City, CITY, and city. The system searches the base map attribute table according to the order of the candidate sequences and determines the first candidate field found as the base map name field. If no candidate field is found, select the first text-type field as the base map name field according to the field order in the base map attribute table. If no text field exists, terminate the current batch and output a message indicating that the name field recognition failed. The candidate sequence is a set of field names pre-set in the program, not generated temporarily during the batch drawing process. (3) Co-rendering of drawing rules and templates; Using user-preset partitioned fill maps and KDE kernel density map templates, and adopting a unified base map standard, color scheme, normalization method, color scale, latitude and longitude grid, compass, and scale rendering method, the map results are automatically loaded and rendered for each task according to the rules in its task metadata, ensuring that the main map and the attached map are consistent in terms of data columns, normalization rules, color bands, and numerical range elements. (4) Automated quality inspection and full-process record keeping; In the map making process, automatic detection and recording are performed on the following: base map name field recognition, output file name legalization, rendering error detection, data format error detection, place name multi-level matching results, conflicting names, unmatched names and all abnormal situations. When encountering a single column data format error or rendering error, record the error and skip that column, continue with subsequent tasks, and continuously generate operation logs and problem lists throughout the entire batch process; If only one unique candidate result is returned during the name mapping process, the match is confirmed directly; if multiple candidate results are returned, the system records the name as a conflicting name and outputs a candidate list, waiting for user verification or manual mapping table supplementation. If no standard field is found or the name cannot be legally matched, the system will automatically terminate the current process and output a prompt.
2. The standardized batch mapping task arrangement and rule control method for scientific research maps according to claim 1, characterized in that: The task list-driven approach is as follows: when the system identifies an external Excel spreadsheet, it sequentially checks the data type and content of each column, taking the first column as the administrative region name column and the remaining columns as the indicators to be mapped. Each task clearly includes the task number, task type, data fields, matching fields, mapping template, numerical processing rules, output format, and output path. The output filenames are validated by removing characters that are not suitable for use in the filenames, generating a unique output path, and saving the map to the user-specified directory, thus realizing the automatic distribution and organization of batch tasks.
3. The standardized batch mapping task arrangement and rule control method for scientific research maps according to claim 1, characterized in that: The aforementioned place name / region identifier standardization matching specifically involves the system sequentially searching the base map attribute table according to the pre-stored field sequence of name, NAME, name_zh, NAME_ZH, name_cn, NAME_CN, NAME_CHN, name_chn, City, CITY, and city, and determining the first retrieved field as the base map name field. If the field is not found, select the first text field according to the field order of the base map attribute table. If the text field is still not found, terminate the current batch. The system converts the base map name field to a string and removes leading and trailing spaces, then writes the complete base map name into the name index; When the base map name ends with "City", the name obtained by removing the "City" at the end is also written into the name index; when it ends with "Region", the name obtained by removing the "Region" at the end is also written into the name index. When the name contains the character combination "autonomous prefecture", the name obtained by deleting the character combination will also be written into the name index. For the names to be matched in Excel, the system performs matching in the following order: directly searching for the name to be matched, searching for the concatenation result of the name to be matched with "city", searching for the concatenation result of the name to be matched with "region", and searching for the result after deleting the characters "city", "county", and "district" from the name to be matched. If any step is successful, the complete name of the base map corresponding to the index is written into the city name mapping dictionary of the current batch. If none of the steps are successful, the name to be matched is recorded as an unmatched name.
4. The standardized batch mapping task arrangement and rule control method for scientific research maps according to claim 1, characterized in that: The aforementioned map rules and template collaborative rendering specifically means that during the rendering of the partitioned fill map and KDE kernel density map, the system ensures that the rendering results are standardized and consistent according to the same normalization, color band and numerical range requirements of the main map range, partition color matching, normalization scheme, color scale, latitude and longitude grid, scale, compass, and South China Sea sub-map. The system performs data cleaning, numerical normalization, spatial projection, and output resolution operations column by column according to the task list. The map results are automatically output to the specified directory using a predefined template and standard rules to avoid differences in expression and omissions in rules.
5. The standardized batch mapping task arrangement and rule control method for scientific research maps according to claim 1, characterized in that: The aforementioned automatic quality inspection and full-process traceability are as follows: During batch operation, the system records the identification status of the base map name field, data cleaning status, mapping table generation status, output file name validity, data format and rendering errors, conflict name verification list, unmatched name list, and detailed logs for each failed, skipped, and terminated step of the process for each column of data, each place name mapping, each map rendering, and each file output. This ensures that every task and process step is traceable, and that single-column mapping errors do not affect the overall batch process and support subsequent review and manual intervention.
6. The standardized batch mapping task arrangement and rule control method for scientific research maps according to claim 1, characterized in that: During the name mapping process, the system adopts a mapping caching mechanism to establish a task batch mapping cache table for all administrative region names that have been successfully standardized and matched. All subsequent tasks within the same batch mapping task reuse the cached results. Only newly added or mismatched names are subject to rule matching and conflict detection, which significantly reduces repeated place name parsing operations, improves the overall processing efficiency of multiple tasks, and automatically supplements the trace records when the mapping cache is updated.
7. The standardized batch mapping task arrangement and rule control method for scientific research maps according to claim 1, characterized in that: The system employs a hierarchical priority processing and conflict detection mechanism for the multi-level matching process of administrative region names. When any name to be matched has two or more standard names in the candidate set generated by full name exact matching, alias dictionary matching, administrative region suffix completion, and root word matching, it automatically records the name as a conflict name, outputs a conflict candidate list, and prevents the automatic merging of errors. The process continues after manual verification or supplementary mapping by the user.
8. The standardized batch mapping task arrangement and rule control method for scientific research maps according to claim 1, characterized in that: When executing each batch of map tasks, the system automatically detects and records in detail any issues such as unmatched names, field recognition failures, data format errors, rendering errors, and abnormal output directories at each stage of the task. If the system encounters a base map name field that cannot be recognized, it immediately terminates the current process and provides a prompt. If an error occurs in a task, it is recorded and skipped. All errors, skips, and manual interventions in the task process are recorded in a structured log and a problem list to facilitate subsequent anomaly review or task rerun, achieving transparent traceability throughout the entire process.
