A method for drawing a religious sea chart based on RPA and LLM multi-agent cooperation

The method of creating territorial territorial charts through multi-agent collaboration of RPA and LLM solves the problem of low efficiency in manual territorial chart compilation, realizes automated and standardized territorial chart compilation, and improves compilation efficiency and output quality.

CN122134966APending Publication Date: 2026-06-02ZHEJIANG INST OF HYDRAULICS & ESTUARY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG INST OF HYDRAULICS & ESTUARY
Filing Date
2026-05-07
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

The compilation of existing nautical charts relies on manual operation, which results in a large workload, low efficiency, and is prone to errors in coordinate transformation, omission of boundary points, overlapping annotations, and non-standard map layout, making it difficult to meet the complex needs of marine resource management.

Method used

A territorial map drawing method based on RPA and LLM multi-agent collaboration is adopted. The LLM master agent schedules multiple functional sub-agents, including data import, topology processing, map sheet arrangement, annotation placement, text generation and quality inspection. The RPA robot interacts with the mapping software to achieve full-process automation and integration.

Benefits of technology

It has enabled the efficient and automated compilation of nautical charts, reduced manual intervention, ensured geometric accuracy, aesthetic layout and content standardization, met industry standards, improved compilation efficiency and output quality, and reduced rework rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122134966A_ABST
    Figure CN122134966A_ABST
Patent Text Reader

Abstract

This invention discloses a method for mapping territorial waters based on RPA and LLM multi-agent collaboration, relating to the fields of automatic mapmaking and maritime rights consultation and management. The method includes the following steps: S01, an LLM master agent schedules a data import sub-agent, which drives an RPA robot to obtain the basic data required for territorial waters mapping from an external data source and performs a unified coordinate system and unit conversion on the basic data; S02, the master agent schedules a topology processing sub-agent to perform topology checks on the unified converted data, identifying and correcting issues such as unclosed boundaries, missing nodes, or line segment intersections in the territorial waters boundary lines, forming closed territorial waters boundaries; S03, the master agent schedules a map sheet arrangement sub-agent, based on the location and scale of the territorial waters boundary. This invention achieves intelligent automation of the entire territorial waters mapping process, improving work efficiency and accuracy, while meeting industry standards and management requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of automatic map making and maritime rights consultation and management, and in particular to a method for creating nautical charts based on RPA and LLM multi-agent collaboration. Background Technology

[0002] A nautical parcel chart is a series of maps that record the location, boundary points, boundary lines, and relationship with adjacent nautical parcels. It is a core component of the marine area use assessment report, and its quality directly affects the confirmation and management of marine area use rights. Currently, the compilation of nautical parcel charts mainly relies on manual labor. In the traditional process, cartographers need to use multiple software platforms such as AutoCAD, ArcGIS, Excel, and coordinate transformation tools, and complete the task through a series of tedious manual operations.

[0003] This process is not only labor-intensive and inefficient, but also highly dependent on the professional skills and meticulousness of the cartographers, making it prone to human errors such as coordinate transformation errors, missing boundary points, overlapping annotations, and non-standard map layouts. With increasingly stringent requirements for marine resource management, the information that nautical charts need to convey is becoming more complex and precise. Traditional manual cartography methods can no longer meet the urgent needs of industry development and regulatory review in terms of efficiency, consistency, and standardization.

[0004] Although some tools exist for partial automation in existing technologies, such as batch import of coordinates or extraction of specific features, there is still a lack of a comprehensive, intelligent, and integrated solution that can cover the entire process of data import, topology processing, map layout, annotation arrangement, text generation, output export, and quality inspection. Summary of the Invention

[0005] To address the aforementioned technical problems, the present invention adopts a method for creating a zonal map based on RPA and LLM multi-agent collaboration, comprising an LLM-based master agent and multiple functional sub-agents oriented towards specific tasks. The method includes the following steps: S01. An LLM master agent schedules a data import sub-agent, which drives the RPA robot to obtain the basic data required for Zonghai's drawing from an external data source, and performs a unified conversion of the coordinate system and units on the basic data. S02. The main control agent schedules a topology processing sub-agent to perform topology checks on the unified converted data, identify and repair problems such as unclosed boundaries, missing nodes, or line segment intersections in the boundary lines of the sea and territories, and form closed sea and territories boundaries. S03. The main control agent schedules a map layout sub-agent to calculate and determine the mapping scale and map layout based on the location and scale of the Zonghai boundary, and creates the map frame in the mapping software through an RPA robot. S04. The main control agent schedules an annotation deployment sub-agent to generate boundary points based on the boundary of the sea and assign them numbers. The RPA robot draws boundary point symbols and adds numbered labels in the mapping software and generates a list of boundary point coordinates to insert into the map. S05. The main control agent schedules a legend generation sub-agent to scan the symbols used in the map, generate legend items, and insert the legend frame and corresponding legend description at the specified position of the map using an RPA robot. S06. The main control agent schedules a text generation sub-agent to collect key information from the territorial map as a prompt, and calls a large language model combined with a standardized knowledge base to automatically generate spatial description text that conforms to industry standards. S07. The main control agent schedules an export sub-agent to drive the RPA robot to execute the export command of the mapping software, and export all maps and generated text descriptions as output files in the specified format. S08. The master control agent schedules a quality inspection sub-agent to perform automated quality checks on the exported result files. If a problem is found, it is fed back to the master control agent, which then schedules the corresponding functional sub-agent to make corrections until all inspection items are qualified, forming a closed-loop process.

[0006] Preferably, the method for unifying the coordinate system and units of the basic data in step S01 includes: When the coordinate system of the source data is detected to be inconsistent with the target coordinate system, the algorithm is automatically invoked to perform the conversion; If the source data is in degrees, minutes, and seconds format, it is converted to decimal degrees using a formula, and then converted to target plane coordinates. The formula is as follows: ; Where d is the number of minutes, m is the number of seconds, and s is the number of minutes.

[0007] Preferably, in step S02, identifying and repairing issues such as unclosed boundaries, missing nodes, or intersecting segments in the marine boundary line to form a closed marine boundary is done by determining the closure status and performing repairs based on an endpoint distance threshold ε. If the distance between the first and last points is within the threshold ε, the system will automatically merge the two into the same coordinate position; If there is a gap between the endpoints that exceeds the threshold, the gap is bridged by drawing a connecting line segment between the two endpoints. When a missing node is detected, the distance between the endpoint and the target line segment and the position of the perpendicular are calculated, and the endpoint is connected and merged with the adjacent line segment.

[0008] Preferably, in step S03, the map layout agent calculates the spatial envelope width L of the sea area. x and height L y Combined with the effective mapping window Weff×Heff of the map sheet template, the denominator of the candidate scale is calculated as s0=max(1000·Lx / Weff,1000·Ly / Heff)×(1+α), where α is the white space safety factor, and s0 is matched to the closest standard scale value. When a single map cannot cover the Zonghai area, the system will intelligently divide the area into multiple adjacent maps according to the preset slicing logic, and automatically generate an index map on the page indicating the relative positional relationship between each map segment.

[0009] Preferably, the annotation placement agent in step S04 integrates an AI typesetting algorithm and a geometric collision detection mechanism. By abstracting text annotations into bounded rectangles, it detects overlapping conflicts between annotations based on the rectangle intersection judgment formula. When a conflict is detected, the annotation position is adjusted by an RPA robot until there is no conflict.

[0010] Preferably, the legend generation sub-Agent in step S05 is also used to arrange relevant appendices according to the nautical chart type: For the boundary map of the sea area, insert a list of internal units of the sea area below the coordinate table of the boundary points, and automatically add information on the internal units of the sea area, the sea use method, and the boundary line. For the Zonghai location map, add a brief description of the project's geographical location and mark nearby important locations; For a project that includes multiple marine units, the name or number of each marine unit should be marked on the integrated marine layout plan, and the relative relationships between the units should be indicated by guide lines or schematic symbols.

[0011] Preferably, in step S06, the text generation sub-Agent performs consistency verification on key fields such as place names, directions, and area values ​​in the generated spatial description text based on a standardized terminology dictionary and standard sentence templates. If discrepancies are found with the actual data, regeneration is triggered until all key information is accurate.

[0012] Preferably, in step S08, the quality inspection sub-Agent uses a combination of rule verification and AI recognition for verification. When overlapping annotations are found, the main control agent schedules the annotation placement sub-Agent to adjust the font size or layout. When the descriptive text is found to be inconsistent with the map, the text generation sub-Agent is scheduled to regenerate the text with reference to the correct data. When the list of boundary points does not correspond to the points on the map, the data processing agent is scheduled to check the coordinate data and update the list.

[0013] The present invention has at least the following beneficial effects: 1. By using an LLM master agent to uniformly schedule multiple dedicated functional sub-agents, and driven by RPA robots to interact with CAD and other cartographic software at the underlying level, a complete automated cartographic pipeline is built, seamlessly connecting the traditionally tedious manual processes of data import, topology processing, map sheet arrangement, annotation placement, text generation, output export, and quality inspection. This significantly reduces manual intervention, freeing cartographers from repetitive and mechanical labor, enabling continuous and uninterrupted operation, and significantly improving the efficiency and output of nautical chart compilation.

[0014] 2. The topology processing agent automatically corrects geometric errors in spatial data, ensuring the closure of boundary lines; the annotation placement agent uses collision detection algorithms to avoid text overlap, guaranteeing clear and readable maps; the text generation agent, based on a standardized knowledge base and a finely tuned LLM model, automatically generates spatial descriptions that conform to industry terminology and formatting requirements. This effectively avoids human error and ensures that the final product meets industry standards such as the "Technical Specifications for Compiling and Drawing Nautical Maps" in terms of geometric accuracy, layout aesthetics, and content standardization, satisfying the stringent review requirements of regulatory authorities.

[0015] 3. The quality inspection sub-agent can simulate manual review, performing comprehensive and detailed rule verification and AI recognition on the final results. Once a problem is detected, the main control agent immediately dispatches the relevant sub-agents to carry out targeted repairs until all problems are resolved. This ensures that every output nautical chart undergoes rigorous quality control, significantly reducing the rework rate and improving the first-pass yield of nautical chart compilation results, providing reliable and high-quality data support for marine area use management and decision-making. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a functional architecture diagram provided for Embodiment 1 of the present invention; Figure 2 This is a flowchart provided for Embodiment 1 of the present invention. Detailed Implementation

[0018] 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 only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0020] Example 1

[0021] This embodiment provides a method for territorial map drawing based on RPA and LLM multi-agent collaboration. This method is implemented using a territorial map drawing system based on RPA and LLM multi-agent collaboration. This system includes an LLM-based master agent and multiple functional sub-agents for specific tasks. Since the RPA robot performs specific operations on the mapping software, the LLM master agent acts as the process scheduling center, coordinating the work of various sub-agents such as data processing, map drawing, text generation, and quality verification. Based on the drawing task requirements provided by the user, the master agent intelligently breaks down the various sub-tasks required for the drawing process and determines the calling order and parameter configuration of each sub-agent according to predetermined logical analysis results. Each functional sub-agent interacts with the master agent through a predefined interface, automatically executes the corresponding step upon receiving instructions, and feeds the results back to the master agent.

[0022] Furthermore, the above-mentioned method for constructing zoning maps based on RPA and LLM multi-agent collaboration includes the following steps, such as... Figure 1 and Figure 2 As shown: S01. An LLM master agent schedules a data import sub-agent. The data import sub-agent drives the RPA robot to obtain the basic data required for Zonghai's drawing from external data sources, and performs a unified transformation of the coordinate system and units on the basic data.

[0023] The aforementioned methods for unifying the coordinate system and units of basic data include: When the coordinate system of the source data is detected to be inconsistent with the target coordinate system, the algorithm is automatically invoked to perform the conversion; If the source data is in degrees, minutes, and seconds format, convert it to decimal degrees using a formula, and then convert it to the target plane coordinates. The formula is: ; Where d is the number of minutes, m is the number of seconds, and s is the number of minutes.

[0024] In actual operation, when a user uploads a CAD file, the RPA robot will automatically open the file and parse and extract the polygonal outline and layer classification information of the Zonghai boundary. When the user provides a coordinate table, the system reads the coordinate values ​​and generates the corresponding spatial polygon features; if the drawing requires overlaying a base map image, the system connects to an online map service or GIS database to extract the latest coastline and surrounding land feature data of the location of Zonghai as the background base map.

[0025] Throughout the import process, the data import agent can intelligently identify the coordinate reference and units used in the input data. If it finds that the coordinate systems used by different source data are inconsistent, the master agent will instruct it to call the built-in coordinate transformation module to transform all spatial data to a unified target coordinate system.

[0026] The data import sub-Agent acquires the basic data required for marine land use charting. Under the command of the master agent, the RPA module simulates manual operation, importing user-provided marine land use data into the mapping environment. This includes automatically opening CAD files provided by the design institute or retrieving vector coordinates of the marine land use area from the database. The import process supports base map images, vector boundary lines, and boundary point coordinate tables.

[0027] The data import agent has built-in coordinate system transformation and unit conversion functions, which can automatically identify the coordinate reference used by the imported data. When it detects that the coordinate system of the imported data is inconsistent with the target mapping coordinate system, the data import sub-agent will automatically call the coordinate transformation algorithm to convert all data to the specified coordinate system and units. Specifically, if the source coordinate system is the CGCS2000 geographic coordinate system and the target mapping coordinate system is the commonly used Cartesian coordinate system, the sub-agent uses the parameters of the CGCS2000 reference ellipsoid and formulas such as Gauss-Kruger projection to convert the latitude φ and longitude λ of each data point into target plane coordinates (X, Y). If the input latitude and longitude are expressed in degrees, minutes, and seconds, the sub-agent will first convert them into decimal angle values ​​before projection calculation. , Where: d is the number of minutes, m is the number of seconds.

[0028] In addition, the data import sub-agent also performs unified processing on different units of measurement. For example, when necessary, it converts length values ​​from meters to kilometers and converts angle units to their corresponding ground distances. , Where R is the Earth's average radius, approximately 6371 km, and θ is the angle.

[0029] S02. The main control agent schedules a topology processing sub-agent to perform topology checks on the unified transformed data, identify and repair problems such as unclosed boundaries, missing nodes, or line segment intersections in the boundary lines of the sea and territorial waters, and form closed sea and territorial waters boundaries.

[0030] The above-mentioned identification and repair of issues such as unclosed boundaries, missing nodes, or intersecting segments in the marine boundary lines, forming closed marine boundaries, is based on determining the closure status and performing repairs according to the endpoint distance threshold ε. If the distance between the first and last points is within the threshold ε, the system will automatically merge the two into the same coordinate position; If there is a gap between the endpoints that exceeds the threshold, the gap is bridged by drawing a connecting line segment between the two endpoints. When a missing node is detected, the distance between the endpoint and the target line segment and the position of the perpendicular are calculated, and the endpoint is connected and merged with the adjacent line segment.

[0031] Specifically, the topology processing agent performs topological relationship checks and repairs on the imported spatial data. This agent uses a built-in algorithm to automatically identify the topological structure of polylines at the boundary of the sea area, detecting issues such as unclosed polylines, missing nodes, and overlapping or repetitive segments. For unclosed boundary segments, the system automatically connects adjacent endpoints or adds necessary vertices to form a complete closed loop. For boundaries containing curved segments, discrete sampling is used to increase vertex density, approximating the curve as a polygon composed of short, thin line segments, ensuring that the boundary line is tightly closed and conforms to the original curve shape.

[0032] For various topology issues detected, the RPA system automatically performs repair operations: 1) For unclosed boundary polylines, the Agent determines the closure status based on the endpoint distance threshold ε. If the distance between the first and last endpoints is within the threshold ε, the system automatically merges them into the same coordinate position. 2) If there is a gap between the endpoints that exceeds the threshold, the gap is bridged by drawing a connecting line segment between the two endpoints, so that the boundary line forms a complete closed loop. 3) When a node is detected to be missing, calculate the distance between the endpoint and the target line segment and the position of the perpendicular, and connect the endpoint with the adjacent line segment to merge the originally independent line segment into a continuous line segment at the node.

[0033] In detail, after data import is complete, the system automatically checks and processes the raw data to ensure the integrity and accuracy of the spatial data within the sea area. First, the topology processing agent performs a topology check on the sea boundary data: traversing the endpoint coordinates of each boundary segment to determine if the polylines are connected end-to-end. If it detects that the start and end points of a sea boundary are not closed into a closed interval, or that there are dangling nodes, the system automatically connects the unclosed end nodes or merges isolated nodes with their nearest neighbor boundary lines. The system also automatically calculates the area and perimeter attributes of each sea polygon and records them in the spatial feature attribute table for later reference.

[0034] While processing spatial boundaries, the master agent coordinates the system to prepare the background and related data required for mapping. For example, the RPA system automatically crops the base map imagery or topographic map data based on the geographical location of the sea area, making its extent slightly larger than the sea area itself. If the project contains multiple sea area units, the data processing agent will process the data of each unit sequentially according to the sea area number, and internally establish a topological relationship index between them. For example, when two adjacent sea area units share a boundary line, the system will identify this common boundary to correctly represent the relative positions of each unit in the sea area location map.

[0035] S03. The master agent schedules a map layout sub-agent to calculate and determine the map scale and map layout based on the location and scale of the sea boundary, and creates the map framework in the mapping software through an RPA robot.

[0036] Furthermore, the map layout agent calculates the width L of the spatial envelope box of the Zonghai area. x and height L y Combined with the effective mapping window Weff×Heff of the map sheet template, the denominator of the candidate scale is calculated as s0=max(1000·Lx / Weff,1000·Ly / Heff)×(1+α), where α is the white space safety factor, and s0 is matched to the closest standard scale value. When a single map cannot cover the Zonghai area, the system will intelligently divide the area into multiple adjacent maps according to the preset slicing logic, and automatically generate an index map on the page indicating the relative positional relationship between each map segment.

[0037] Specifically, during the layout design phase, the layout agent, under the command of the master agent, automatically creates the cartographic layout and content according to the drawing requirements. First, the system determines the type and quantity of marine maps to be generated. The master agent plans a list of maps based on the area size, geographical distribution, and user-specified output requirements of the marine areas. Then, the layout agent automatically selects an appropriate map scale for each map. The system calculates the optimal scale denominator based on the previously calculated marine area dimensions and matches it to the nearest commonly used scale value (e.g., 1:5000). After determining the scale, the RPA robot controls the drawing software to create a new drawing space and set the corresponding layout format: drawing the map frame lines, noting the map name, cartographic unit, drawing date, scale, coordinate reference, etc., in the title bar, drawing a latitude and longitude grid according to specifications and marking latitude and longitude values ​​on the edge of the map frame, and inserting a north arrow and scale graphic at designated locations.

[0038] The system loads the background map and the area data of Zonghai according to the map type: 1) For the location map of Zonghai, load the previously prepared regional base map image or electronic nautical chart as the base, and overlay the outline of Zonghai's range. 2) For marine boundary maps, a digital topographic map or coastline map is used as the base map, overlaid with the marine boundary line and the dividing lines of marine use units within the marine area. The RPA system strictly follows the map hierarchy order to add each element to the map, ensuring that the base map, boundaries, annotations, and other content are correctly overlaid and do not obscure each other. When the marine area is too large to be contained on a single map sheet, the layout agent will intelligently divide the area into multiple adjacent map sheets.

[0039] In this embodiment, the map scale is determined using a spatial envelope box size calculation method, and the most matching scale value is selected from a set of standard scales. When the area of ​​the sea is too large for a single map sheet to completely cover, the system will divide it into multiple map sheets.

[0040] The map sheet layout agent automatically selects an appropriate cartographic template and scale based on the location and size of the sea area to complete the map sheet layout design. The main control agent comprehensively analyzes the maximum span, shape characteristics, and user requirements of the sea area to determine the type and number of map sheets to be drawn. Subsequently, the map sheet agent uses an RPA robot to call the layout setting function of the cartographic software to create a map sheet framework that meets the specifications. The system automatically calculates the recommended optimal scale denominator based on the coordinate extreme values ​​of the sea area, matches it with the closest standard scale value, and then selects an appropriate map sheet size. When a single map cannot cover the entire sea area, the map sheet agent intelligently splits it according to the regional distribution and automatically inserts a small-scale index diagram on the page to indicate the relative positional relationship between each map sheet.

[0041] The map scale is selected using the spatial envelope box scaling method. First, the spatial envelope box of the Zonghai area is calculated in the target plane coordinate system: ; Among them, L x and L y The range represents the width and height of the envelope box of the Zonghai area in the planar coordinate system, where xmax, xmin, ymax, and ymin are the maximum and minimum coordinate values ​​of the boundary points of this range, respectively.

[0042] Let the effective map window of the map sheet template be Weff × Heff, then the denominator of the candidate scale is taken as... ; Where α is the white space safety factor, which is recommended to be 0.05, max means take the maximum value; 1000 is the conversion factor, used to convert millimeters (mm) to meters (m).

[0043] Meanwhile, when a single map sheet cannot cover the entire Zonghai area, the system will divide the area into multiple adjacent map sheets according to a certain overlap rate and predefined slicing logic, and automatically generate an index map to illustrate the spatial relationship between each sheet.

[0044] S04. The master agent schedules a sub-agent for annotation deployment, generates boundary points based on the boundary of the sea and assigns them numbers. The RPA robot then draws the boundary point symbols, adds numbered labels, and generates a list of boundary point coordinates to insert into the map.

[0045] Furthermore, the aforementioned annotation placement agent integrates AI typesetting algorithms and geometric collision detection mechanisms. By abstracting text annotations into bounded rectangles, it detects overlapping conflicts between annotations based on the rectangle intersection judgment formula. When a conflict is detected, the annotation position is adjusted by an RPA robot until there is no conflict.

[0046] Specifically, the annotation placement agent automatically adds and optimizes various text and symbol annotations. First, the system generates all boundary points based on the topology-processed sea boundary data and numbers them sequentially according to specifications (1, 2, 3, 4, 5...). Then, the annotation agent uses RPA to control the mapping software to draw standard small dot symbols (●) at each boundary point and attach corresponding serial numbers. The system extracts the planar coordinates of each boundary point, retains decimal places according to the specified precision, and then compiles the point numbers and coordinates into a "Boundary Point Coordinate List" table. The RPA then inserts this table on the right side of the map area, ensuring a one-to-one correspondence between the marked points on the map and the table data, and that they are neatly arranged. In addition to boundary point information, the annotation agent is also responsible for adding other explanatory text: for the marine boundary map, it adds the text "Project Name + Marine Boundary Map" above the map area; for the marine location map, it adds the text "Project Name + Marine Location Map" above the map area, and also adds annotations of the names of important surrounding features in appropriate locations on the map, and adds descriptive text about the geographical location of the project in the lower left corner of the map.

[0047] During the annotation placement process, the system integrates AI typesetting algorithms and a geometric collision detection mechanism to determine whether newly placed text annotations overlap or conflict with other graphic elements. The system abstracts each text annotation as its bounding rectangle, denoted by its center coordinates (x, y), width W, and height H. For any two annotations i and j, their bounding rectangles are respectively... and A inequality is satisfied if and only if all four inequalities are met simultaneously: ; A conflict is detected. If a conflict is detected, the annotation agent will control the RPA robot to adjust its position, thereby ensuring that all annotations are clearly readable and do not obscure each other.

[0048] S05. The master agent schedules a legend generation sub-agent to scan the symbols used in the map, generate legend items, and insert the legend frame and corresponding legend description at the specified position on the map using an RPA robot.

[0049] The aforementioned legend generation sub-agent is also used to arrange relevant appendices based on the nautical chart type: For the boundary map of the sea area, insert a list of internal units of the sea area below the coordinate table of the boundary points, and automatically add information on the internal units of the sea area, the sea use method, and the boundary line. For the Zonghai location map, add a brief description of the project's geographical location and mark nearby important locations; For a project that includes multiple marine units, the name or number of each marine unit should be marked on the integrated marine layout plan, and the relative relationships between the units should be indicated by guide lines or schematic symbols.

[0050] Specifically, after annotations are added, the system automatically generates the necessary map legend based on requirements, explaining the meaning of symbols and project data on the map. The legend generation sub-agent first scans all symbols and special markings used in the current map and compiles a list of legend items. Subsequently, the RPA robot calls cartographic software to insert a predefined standard legend template framework, filling in the aforementioned legend items and their corresponding name explanations. The generated legend lists explanations of various symbols used in the map, facilitating reader understanding of the map content.

[0051] After adding the legend, the system continues to display the relevant supplementary tables: 1) For the marine boundary map, the system will insert a list of marine internal units below the "Boundary Point Coordinate Table" table, and automatically add text information such as marine internal units, marine use method, and boundary line to the table; 2) For the sea area location map, the system adds a brief description of the project's geographical location and annotations of nearby important landmarks, such as ports and waterways, in appropriate locations. If a project contains multiple sea area units, the system will label the name or number of each sea area unit on the integrated sea area layout plan, and use guide lines or schematic symbols to indicate the relative relationships between the units.

[0052] At the same time, based on the information provided by the user and the results of calculations in the previous steps, the system adds a project mapping information table to the page and automatically fills in mapping information data such as coordinate system, elevation datum, depth datum, and drawing date.

[0053] S06. The master agent schedules a text generation sub-agent to collect key information from the territorial map as clues, and calls a large language model combined with a standardized knowledge base to automatically generate spatial description text that conforms to industry standards.

[0054] Furthermore, the aforementioned text generation agent performs consistency checks on key fields such as place names, directions, and area values ​​in the generated spatial description text based on a standardized terminology dictionary and standard sentence templates. If discrepancies are found with the actual data, regeneration is triggered until all key information is accurate.

[0055] Specifically, an AI text generation sub-agent is configured to automatically generate descriptive text for marine areas. This sub-agent combines the language generation capabilities of an LLM model with a pre-built normative knowledge base to automatically produce clear and easy-to-understand descriptive statements that conform to industry standards. The process is as follows: First, the text generation agent collects key information corresponding to the marine area map as generation prompts, including the marine area's geographical location, boundaries, area, sea use type, and adjacent important geographical entities. Then, it queries the internal normative knowledge base to retrieve standard expressions or terminology requirements related to this key information, such as regulatory wording regarding sea use type definitions and standard sentence structures for boundary descriptions. After embedding the search results as reference knowledge into the prompts, the text generation agent calls a domain-specifically tuned LLM model to generate the content. The LLM model, after integrating the input data and reference knowledge, outputs a descriptive text for the marine area that conforms to formal writing standards.

[0056] For example, the system might generate a description like this: "This project's sea area is located in Sea Area X, bordered by Channel Y to the east and Coastline Z to the west, with a sea area of ​​approximately M hectares. Its purpose is the construction of Project U." This description covers elements such as the sea area's geographical location, adjacency relationships, area, and purpose, using industry-standard terminology and references formally recognized terms. Leveraging standard expressions provided by the knowledge base, the generated text rivals human-written text in terms of professionalism and accuracy. Simultaneously, the text generation agent automatically inserts the generated description into the sea area map's captions or relevant report text, ensuring a correspondence between the map and the text description.

[0057] Furthermore, this invention introduces a structured field-driven approach and a mechanism for controlling industry-standard terminology and sentence structure during the generation of spatial description text. The text generation agent rigorously checks key fields such as the name of the sea area, its geographical location, and its area value based on a standardized terminology dictionary and standard sentence templates to ensure that the generated descriptions match the actual data. If any inconsistencies are found, the relevant text is automatically regenerated until all key information is accurate.

[0058] S07. The master agent schedules an export sub-agent to drive the RPA robot to execute the export command of the mapping software, exporting all maps and generated text descriptions as output files in the specified format.

[0059] Specifically, under the control of the exporting agent, the system exports all the generated maps and text descriptions in the specified format. The RPA robot sequentially executes the "export" or "print" command of the mapping software, exporting various resulting maps such as the marine location map and marine boundary map into electronic file formats such as PDF and JPEG according to the specified scale and resolution. At the same time, the generated text descriptions are also exported as a separate report text file.

[0060] The Export Agent uniformly processes the naming rules and formats of the output files according to the requirements of the regulatory authorities to ensure that file naming, metadata, resolution, etc. comply with the submission specifications. If necessary, the system can also export the original editable engineering file format (such as DWG, etc.), which contains the vector data and attribute information of the sea area boundary, for further editing and use by users on other platforms.

[0061] S08. The Master Agent schedules a quality inspection sub-Agent to perform automated quality inspection on the exported result files. If any problems are found, they will be fed back to the Master Agent, and the Master Agent will schedule the corresponding functional sub-Agents to make corrections until all inspection items are qualified, forming a closed-loop process.

[0062] Furthermore, the quality inspection sub-Agent uses a method combining rule verification and AI recognition for verification. When it finds that the annotations overlap, the Master Agent schedules the annotation layout sub-Agent to adjust the font size or page layout; when it finds that the descriptive text is inconsistent with the drawing, it schedules the text generation sub-Agent to regenerate it based on the correct data; when it finds that the list of boundary points does not correspond to the points on the drawing, it schedules the relevant data processing Agent to check the coordinate data and update the list.

[0063] Specifically, the quality inspection sub-Agent performs automated quality inspection on the exported sea area map results to ensure that they comply with industry specifications and output standards. The quality inspection Agent uses a method combining rule verification and AI recognition to check each item of the drawing and its attached tables one by one: whether the layout elements are complete and in the correct positions, whether the coordinate grid and its longitude and latitude numerical annotations are correct, whether the list of boundary point coordinates corresponds to the point numbers on the drawing, whether there are spelling or omission errors in the text annotations, whether the legend and table content exceed the boundaries or overlap, etc.

[0064] Once it is found that a certain item does not meet the specification requirements or there are errors, the quality inspection Agent will record the problems and feedback them to the Master Agent. The Master Agent will judge the links that need to be rectified based on this and automatically trace the tasks back to the corresponding functional Agents for repair: 1). When it is detected that some annotation labels in the exported image overlap, the Master Agent instructs the annotation layout Agent to adjust the font size or page layout and re-export the map; 2). When it is found that the place names or data in the text description are inconsistent with the drawing, the Master Agent will require the text generation Agent to regenerate the description based on the correct data; 3). When it is found that, for example, the list of boundary points does not correspond to the points on the drawing, the Master Agent schedules the relevant data processing Agent to check the coordinate data and update the list.

[0065] Specifically, these automatic correction operations are completed sequentially by connecting each module via RPA. This feedback and repair mechanism closely links quality checks with the aforementioned mapping agents, forming a closed-loop process until all check items meet the specification requirements.

[0066] In summary, under the unified scheduling of the LLM master agent, each module works collaboratively in a logical order, and data between modules is shared through predefined interfaces. Specifically, AI-related sub-agents perform tasks such as image recognition and rule judgment; AI-related sub-agents rely on large-scale language models (LLMs) and their prompting learning capabilities to complete complex content generation tasks, and enhance the standardization of output through a knowledge base. Compared with existing technologies, this invention improves the automation of the territorial map drawing process by introducing a master intelligent agent and a multi-agent collaborative architecture. Many tedious manual cartographic steps are replaced by RPA robots, which can operate efficiently 24 / 7, avoiding human error and waiting, and reducing the burden on human labor.

[0067] Example 2

[0068] This invention provides a non-transitory computer-readable storage medium storing at least one instruction or at least one program segment, which is loaded and executed by a processor to implement the following steps: An LLM master agent schedules a data import sub-agent, which drives the RPA robot to obtain the basic data required for Zonghai's drawing from external data sources and performs a unified transformation of the coordinate system and units on the basic data. The master agent schedules a topology processing sub-agent to perform topology checks on the unified transformed data, identify and repair problems such as unclosed boundaries, missing nodes, or line segment intersections in the marine boundary lines, and form closed marine boundaries. The master agent schedules a map layout sub-agent to calculate and determine the map scale and map layout based on the location and scale of the sea boundary, and creates the map framework in the mapping software through an RPA robot; The master agent schedules a sub-agent for annotation deployment, which generates boundary points based on the boundary of the sea and assigns them numbers. The RPA robot then draws the boundary point symbols, adds numbered labels, and generates a list of boundary point coordinates to insert into the map using mapping software. The master agent schedules a legend generation sub-agent to scan the symbols used in the map, generate legend items, and insert the legend frame and corresponding legend description at the specified position on the map using an RPA robot. The master agent schedules a text generation sub-agent to collect key information from the territorial map as clues, and calls a large language model combined with a standardized knowledge base to automatically generate spatial description text that conforms to industry standards. The master agent schedules an export sub-agent to drive the RPA robot to execute the export command of the mapping software, exporting all maps and generated text descriptions as output files in the specified format; The master agent schedules a quality control sub-agent to perform automated quality checks on the exported output files. If any problems are found, they are reported back to the master agent, which then schedules the corresponding functional sub-agents to make corrections until all check items pass, forming a closed-loop process.

[0069] 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 computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0070] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0071] Example 3

[0072] This invention provides an electronic device, including a processor and a memory, wherein the memory stores at least one instruction or at least one program segment, and the at least one instruction or the at least one program segment is loaded and executed by the processor to implement the following steps: An LLM master agent schedules a data import sub-agent, which drives the RPA robot to obtain the basic data required for Zonghai's drawing from external data sources and performs a unified transformation of the coordinate system and units on the basic data. The master agent schedules a topology processing sub-agent to perform topology checks on the unified transformed data, identify and repair problems such as unclosed boundaries, missing nodes, or line segment intersections in the marine boundary lines, and form closed marine boundaries. The master agent schedules a map layout sub-agent to calculate and determine the map scale and map layout based on the location and scale of the sea boundary, and creates the map framework in the mapping software through an RPA robot; The master agent schedules a sub-agent for annotation deployment, which generates boundary points based on the boundary of the sea and assigns them numbers. The RPA robot then draws the boundary point symbols, adds numbered labels, and generates a list of boundary point coordinates to insert into the map using mapping software. The master agent schedules a legend generation sub-agent to scan the symbols used in the map, generate legend items, and insert the legend frame and corresponding legend description at the specified position on the map using an RPA robot. The master agent schedules a text generation sub-agent to collect key information from the territorial map as clues, and calls a large language model combined with a standardized knowledge base to automatically generate spatial description text that conforms to industry standards. The master agent schedules an export sub-agent to drive the RPA robot to execute the export command of the mapping software, exporting all maps and generated text descriptions as output files in the specified format; The master agent schedules a quality control sub-agent to perform automated quality checks on the exported output files. If any problems are found, they are reported back to the master agent, which then schedules the corresponding functional sub-agents to make corrections until all check items pass, forming a closed-loop process.

[0073] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A method for drawing territorial sea maps based on multi-agent collaboration of RPA and LLM, characterized in that, The method includes a master agent based on LLM and multiple functional sub-agents for specific tasks, and comprises the following steps: S01. An LLM master agent schedules a data import sub-agent, which drives the RPA robot to obtain the basic data required for Zonghai's drawing from an external data source, and performs a unified conversion of the coordinate system and units on the basic data. S02. The main control agent schedules a topology processing sub-agent to perform topology checks on the unified converted data, identify and repair problems such as unclosed boundaries, missing nodes, or line segment intersections in the boundary lines of the sea and territories, and form closed sea and territories boundaries. S03. The main control agent schedules a map layout sub-agent to calculate and determine the mapping scale and map layout based on the location and scale of the Zonghai boundary, and creates the map frame in the mapping software through an RPA robot. S04. The main control agent schedules an annotation deployment sub-agent to generate boundary points based on the boundary of the sea and assign them numbers. The RPA robot draws boundary point symbols and adds numbered labels in the mapping software and generates a list of boundary point coordinates to insert into the map. S05. The main control agent schedules a legend generation sub-agent to scan the symbols used in the map, generate legend items, and insert the legend frame and corresponding legend description at the specified position of the map using an RPA robot. S06. The main control agent schedules a text generation sub-agent to collect key information from the territorial map as a prompt, and calls a large language model combined with a standardized knowledge base to automatically generate spatial description text that conforms to industry standards. S07. The main control agent schedules an export sub-agent to drive the RPA robot to execute the export command of the mapping software, and export all maps and generated text descriptions as output files in the specified format. S08. The master control agent schedules a quality inspection sub-agent to perform automated quality checks on the exported result files. If a problem is found, it is fed back to the master control agent, which then schedules the corresponding functional sub-agent to make corrections until all inspection items are qualified, forming a closed-loop process.

2. The method for drawing zonal maps based on RPA and LLM multi-agent collaboration as described in claim 1, characterized in that, The method for unifying the coordinate system and units of the basic data in step S01 includes: When the coordinate system of the source data is detected to be inconsistent with the target coordinate system, the algorithm is automatically invoked to perform the conversion; If the source data is in degrees, minutes, and seconds format, it is converted to decimal degrees using a formula, and then converted to target plane coordinates. The formula is as follows: ; Where d is the number of minutes, m is the number of seconds, and s is the number of minutes.

3. The method for drawing nautical charts based on RPA and LLM multi-agent collaboration as described in claim 1, characterized in that, In step S02, identifying and repairing issues such as unclosed boundaries, missing nodes, or intersecting line segments in the marine boundary line to form a closed marine boundary is done by determining the closure status and performing repairs based on the endpoint distance threshold ε. If the distance between the first and last points is within the threshold ε, the system will automatically merge the two into the same coordinate position; If there is a gap between the endpoints that exceeds the threshold, the gap is bridged by drawing a connecting line segment between the two endpoints. When a missing node is detected, the distance between the endpoint and the target line segment and the position of the perpendicular are calculated, and the endpoint is connected and merged with the adjacent line segment.

4. The method for drawing nautical charts based on RPA and LLM multi-agent collaboration as described in claim 1, characterized in that, In step S03, the map layout agent calculates the spatial envelope width L of the sea area. x and height L y Combined with the effective mapping window Weff×Heff of the map sheet template, the denominator of the candidate scale is calculated as s0=max(1000·Lx / Weff,1000·Ly / Heff)×(1+α), where α is the white space safety factor, and s0 is matched to the closest standard scale value. When a single map cannot cover the Zonghai area, the system will intelligently divide the area into multiple adjacent maps according to the preset slicing logic, and automatically generate an index map on the page indicating the relative positional relationship between each map segment.

5. The method for drawing nautical charts based on RPA and LLM multi-agent collaboration according to claim 1, characterized in that, In step S04, the annotation placement agent integrates an AI typesetting algorithm and a geometric collision detection mechanism. By abstracting text annotations into bounded rectangles, it detects overlapping conflicts between annotations based on the rectangle intersection judgment formula. When a conflict is detected, the RPA robot adjusts the annotation position until there is no conflict.

6. The method for drawing nautical charts based on RPA and LLM multi-agent collaboration according to claim 1, characterized in that, The legend generation sub-Agent in step S05 is also used to arrange relevant appendices according to the nautical chart type: For the boundary map of the sea area, insert a list of internal units of the sea area below the coordinate table of the boundary points, and automatically add information on the internal units of the sea area, the sea use method, and the boundary line. For the Zonghai location map, add a brief description of the project's geographical location and mark nearby important locations; For a project that includes multiple marine units, the name or number of each marine unit should be marked on the integrated marine layout plan, and the relative relationships between the units should be indicated by guide lines or schematic symbols.

7. The method for drawing nautical charts based on RPA and LLM multi-agent collaboration according to claim 1, characterized in that, In step S06, the text generation sub-Agent performs consistency checks on key fields such as place names, directions, and area values ​​in the generated spatial description text based on a standardized terminology dictionary and standard sentence templates. If discrepancies are found with the actual data, regeneration is triggered until all key information is accurate.

8. The method for drawing nautical charts based on RPA and LLM multi-agent collaboration as described in claim 1, characterized in that, In step S08, the quality inspection sub-Agent uses a combination of rule verification and AI recognition for verification. When overlapping annotations are found, the main control agent schedules the annotation placement sub-Agent to adjust the font size or layout. When the descriptive text is found to be inconsistent with the map, the text generation sub-Agent is scheduled to regenerate the text with reference to the correct data. When the list of boundary points does not correspond to the points on the map, the data processing agent is scheduled to check the coordinate data and update the list.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the nautical chart drawing method based on RPA and LLM multi-agent collaboration as described in any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the nautical chart drawing method based on RPA and LLM multi-agent collaboration as described in any one of claims 1 to 8.