Spatial data processing method and system based on large language model

By combining large language model and geographic information system technology, a spatial data processing method based on large language model was constructed, which solved the problems of high technical threshold, limited visualization and insufficient interactivity in the existing technology, and achieved efficient and intelligent spatial data deal with.

CN119441378AInactive Publication Date: 2025-02-14广东省土地调查规划院

Patent Information

Application Number
CN202510046261.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2025-02-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing spatial data processing methods have problems such as high technical barriers, limited visual expression and insufficient interactivity, which are difficult to meet the diverse needs of users.

Method used

The spatial data processing method based on the large language model is adopted to input the target spatial data into the large language model for pre-processing, and the data is analyzed and stored through the spatial database and vector database, and the large language model is used to interact with the user to generate spatial data processing results.

Benefits of technology

It lowers the technical threshold for spatial data processing, improves processing efficiency and user experience, and realizes the intelligent and automated processing of spatial data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441378A_ABST
    Figure CN119441378A_ABST
Patent Text Reader

Abstract

The invention provides a spatial data processing method and system based on a large language model. The method comprises the steps of obtaining to-be-processed target spatial data and storing the to-be-processed target spatial data into a preset spatial database; inputting the target spatial data into a preset large language model to enable the large language model to perform data preprocessing on the target spatial data to generate corresponding processed data; performing data analysis on the target spatial data and the processed data by using a preset data analysis tool to obtain metadata information; storing the metadata information into a preset vector database by using a preset metadata information classification model; and obtaining text information input by a user, performing spatial data processing on the target spatial data by using the large language model according to the text information, the spatial database and the vector database, and outputting a corresponding spatial data processing result, thereby improving the processing efficiency of the spatial data and the use experience of the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of artificial intelligence and geographic information system, and in particular to a spatial data processing method and system based on a large language model. Background Art

[0002] Spatial data, as the core of geographic information systems (GIS) and related fields, is crucial for many applications such as national land space planning, environmental monitoring, and resource management. Traditional spatial data processing methods rely on professional data processing engines and software tools, which usually have high technical barriers and require users to have corresponding professional knowledge and operational skills. In addition, existing technologies have the following deficiencies in processing speed, visual expression, and user interaction: High technical threshold: Currently, most spatial data processing methods require professional spatial data engines and tools. These engines and tools are often costly, which limits the convenience of using spatial data. In addition, professional spatial data processing software is usually complex to operate and requires users to undergo long-term training and practice to master it, which limits the popularization and application of spatial data processing technology.

[0003] Limited visual expression: When converting spatial data into intuitive graphics or maps, existing technologies often require customized visualization function development. The functions are single and the flexibility is low, making it difficult to meet users' needs for diversified visual expressions.

[0004] Insufficient interactivity: When users use traditional spatial data processing tools, the interaction method is relatively rigid, lacking flexibility and intelligence, and it is difficult to adapt to changing data processing needs.

[0005] On the other hand, since the birth of the big language model technology, it has been rapidly applied in various industries with its powerful data analysis and processing capabilities and simple and convenient usage. Therefore, it is possible to consider combining the big language model technology with GIS (geographic information system) technology, and using natural language processing technology to understand and generate descriptive language about these data, so that non-professionals can easily handle complex GIS data. For example, it is possible to automatically generate a description of the geographical features of a certain area, or explain the geographical distribution pattern of a certain phenomenon, parse the relevant information of spatial data, and combine with cultural map technology to realize the automation and intelligence of spatial data analysis and application. It can promote the analysis and application of geographic data at multiple levels and open up a new way of intelligent geographic spatial data. Summary of the invention

[0006] In response to the above technical problems, the present application provides a spatial data processing method and system based on a large language model, which improves the processing efficiency of spatial data and the user experience.

[0007] In a first aspect, an embodiment of the present application provides a spatial data processing method based on a large language model, comprising: Obtain the target spatial data to be processed and store it in a preset spatial database; Inputting the target space data into a preset large language model so that the large language model performs data preprocessing on the target space data to generate corresponding processed data; Using a preset data analysis tool to analyze the target spatial data and the processed data to obtain metadata information; Using a preset metadata information classification model to store the metadata information into a preset vector database; The text information input by the user is obtained, and according to the text information, the spatial database and the vector database, the large language model is used to perform spatial data processing on the target spatial data, and a corresponding spatial data processing result is output.

[0008] The embodiment of the present application provides a spatial data processing method based on a large language model, which uses the large language model technology to process and analyze the target spatial data, and at the same time constructs a spatial database related to spatial data processing and a vector database related to the large model technology, combining the large language model technology with the geographic information system (GIS) technology, and through interactive dialogue and the ability of the large language model, non-professionals can easily understand and process complex GIS data, thereby lowering the technical threshold for spatial data processing, improving the processing efficiency of spatial data and the user experience. On the other hand, the embodiment of the present application continuously supplements the vector database during the spatial data processing process, effectively improving the understanding ability and data processing ability of the large language model in the GIS professional field, and improving the efficiency and accuracy of data processing.

[0009] Furthermore, the obtaining of the target space data to be processed includes: The user end determines the spatial data file to be uploaded through the file selector; By means of a file parser, the spatial data file is parsed and verified based on a preset verification rule; If the parsing verification passes, the spatial data file is segmented or compressed to generate a corresponding file to be uploaded; The to-be-uploaded file is uploaded to the server in a queue manner, so that the server converts the to-be-uploaded file into the to-be-processed target spatial data, and stores the target spatial data into a preset spatial database.

[0010] The embodiment of the present application provides a method for parsing and uploading a spatial data file, which converts the spatial data file into target spatial data through file selection, parsing verification, segmentation or compression, uploading and conversion through an automated processing flow, thereby improving the efficiency of file uploading while ensuring the accuracy and integrity of the data, and providing a data basis for subsequent spatial data processing. Furthermore, the embodiment of the present application adopts a queue mode to upload files, further improving the efficiency and stability of data uploading.

[0011] In a possible implementation, the large language model performs data preprocessing on the target space data to generate corresponding processed data, including: Performing data analysis on the target spatial data, extracting spatial information and attribute information, and generating corresponding analysis result information in combination with the spatial information and attribute information; Performing format conversion and data cleaning on the analysis result information to generate processed data supported by a spatial database; Based on the processed data, generate corresponding SQL statements using the large language model; The SQL statement is used to execute a database insert operation, and the processed data is stored in corresponding tables and fields in a spatial database.

[0012] The embodiment of the present application provides a data preprocessing method. Since the data preprocessing object is spatial data, it is necessary to extract spatial information and attribute information from the target spatial data according to the characteristics of the spatial data, and combine the generated analysis result information to store the analysis result information in the spatial database to provide a data basis for subsequent spatial data processing. In addition, in the process of data storage, in order to realize automatic data storage, the embodiment of the present application uses a large language model to generate corresponding SQL statements, without the need to manually write SQL statements for storage, which further reduces the data processing threshold and improves the processing efficiency of spatial data and the user experience.

[0013] In a possible implementation, using a preset metadata information classification model to store the metadata information into a preset vector database includes: Use content type, category and source as the basis for data classification and build a meta-information classification model; Using the metadata classification model to sort and classify the metadata information, and construct a corresponding metadata index; According to the classification rules of the metadata classification model, the metadata information is converted into vector data corresponding to the vector database, and a corresponding vector index is constructed; The metadata index, vector index and vector data are stored in the vector database.

[0014] In the embodiment of the present application, metadata index and vector index are constructed in the process of vector data storage. The purpose of index construction is to quickly query and retrieve. In actual business scenarios, it is often not necessary to perform similarity search in the entire vector database, but to filter by some business fields and then query. By maintaining metadata index and vector index, the vector database optimizes the storage structure and query performance of the database, and improves the accuracy and speed of data retrieval.

[0015] In a possible implementation, performing spatial data processing on the target spatial data using the large language model according to the text information, the spatial database, and the vector database, and outputting corresponding spatial data processing results, includes: Extracting each prompt word from the text information; Perform prompt word analysis on each prompt word to determine the spatial data processing operation scope of the large language model, where the spatial data processing operation scope is a data query operation, a thematic map output operation, a POI positioning operation or a graphic drawing operation; Outputting a plurality of preset spatial data processing instructions to the user according to the determined spatial data processing operation range, and waiting to obtain the instruction selected by the user; According to the text information, the prompt words and the instruction selected by the user, searching from the vector database to infer the specific needs of the user; According to the specific needs, call the corresponding spatial data processing tool; The target spatial data is processed spatially according to the specific requirements, the spatial data processing tool and the spatial database, and a corresponding spatial data processing result is generated and output.

[0016] The embodiment of the present application provides a method for processing target spatial data through a large language model, determines the scope of spatial data processing operations through prompt word analysis, and provides feedback confirmation with the user, thereby improving the accuracy and efficiency of spatial data processing by the large language model. By searching in a vector database, inferring the specific needs of the user, and then determining and calling the relevant spatial data processing tools, an effective combination of large language model technology and GIS technology is achieved, so that the large language model truly has the ability to process spatial data, and can simultaneously process multimodal data such as text data and graphic data, meeting the diverse needs of users, and realizing the intelligence and automation of spatial data processing.

[0017] Furthermore, searching from the vector database according to the text information, the various prompt words and the instruction selected by the user to infer the specific needs of the user includes: According to the text information, the prompt words and the instruction selected by the user, using the search enhancement generation technology to perform relevance search from the vector database to generate corresponding enhancement information; According to the text information, the various prompt words, the instructions selected by the user and the enhanced information, semantic analysis and understanding are performed to infer the specific needs of the user.

[0018] The embodiment of the present application introduces RAG search enhancement generation technology in the search process, and uses RAG search enhancement technology to retrieve relevant information from the vector database, enhance the context of user input, and improve the understanding of user needs by the large language model. Through semantic analysis and understanding, the specific needs of users are further inferred, providing more accurate guidance for subsequent spatial data processing, and improving the efficiency and accuracy of spatial data processing.

[0019] Furthermore, the spatial data processing method further includes: According to the type of the spatial data processing result, calling a corresponding visualization rendering tool; Perform visual rendering on the spatial data processing result using the visual rendering tool, and convert the spatial data processing result into a preset file type, wherein the preset file type is text, graphics, thematic map or chart; The spatial data processing result after the visual rendering is returned to the user end for display.

[0020] After obtaining the spatial data processing results, the embodiment of the present application further performs visualization processing on the spatial data processing results, and calls the corresponding visualization rendering tool according to the type of the spatial data processing results to achieve the visualization expression of the data processing results. The visualized spatial data processing results are returned to the user end for display, thereby improving the user experience.

[0021] In a second aspect, accordingly, an embodiment of the present application provides a spatial data processing system based on a large language model, including an acquisition module, a preprocessing module, a data parsing module, a vector storage module, and a spatial data processing module; Wherein, the acquisition module is used to acquire the target spatial data to be processed and store it in a preset spatial database; The preprocessing module is used to input the target space data into a preset large language model, so that the large language model performs data preprocessing on the target space data to generate corresponding processed data; The data analysis module is used to use a preset data analysis tool to perform data analysis on the target spatial data and the processed data to obtain metadata information; The vector storage module is used to store the metadata information into a preset vector database using a preset metadata information classification model; The spatial data processing module is used to obtain text information input by a user, and perform spatial data processing on the target spatial data using the large language model according to the text information, the spatial database and the vector database, and output a corresponding spatial data processing result.

[0022] In a possible implementation, the spatial data processing module includes a prompt word extraction unit, a prompt word analysis unit, an instruction determination unit, a retrieval unit, a tool calling unit, and a spatial data processing unit; Wherein, the prompt word extraction unit is used to extract each prompt word from the text information; The prompt word analysis unit is used to perform prompt word analysis on each prompt word to determine the spatial data processing operation range of the large language model, and the spatial data processing operation range is a data query operation, a thematic map output operation, a POI positioning operation or a graphic drawing operation; The instruction determination unit is used to output a plurality of preset spatial data processing instructions to the user according to the determined spatial data processing operation range, and wait to obtain the instruction selected by the user; The retrieval unit is used to search from the vector database according to the text information, the various prompt words and the instruction selected by the user, and infer the specific needs of the user; The tool calling unit is used to call the corresponding spatial data processing tool according to the specific needs; The spatial data processing unit is used to perform spatial data processing on the target spatial data according to the specific requirements, the spatial data processing tool and the spatial database, and generate and output corresponding spatial data processing results.

[0023] Furthermore, the retrieval unit searches the vector database according to the text information, the prompt words and the instruction selected by the user to infer the specific needs of the user, including: According to the text information, the prompt words and the instruction selected by the user, using the search enhancement generation technology to perform relevance search from the vector database to generate corresponding enhancement information; According to the text information, the various prompt words, the instructions selected by the user and the enhanced information, semantic analysis and understanding are performed to infer the specific needs of the user. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 : A flow chart of a spatial data processing method based on a large language model provided in an embodiment of the present application.

[0025] Figure 2 : A schematic diagram of the uploading process of spatial data files in a spatial data processing method based on a large language model provided in an embodiment of the present application.

[0026] Figure 3 : A schematic diagram of the process of preprocessing and storing target spatial data in a spatial data processing method based on a large language model provided in an embodiment of the present application.

[0027] Figure 4 : A schematic diagram of the flow chart of using a large language model to perform spatial data processing on target spatial data in a spatial data processing method based on a large language model provided in an embodiment of the present application.

[0028] Figure 5 : A detailed flow chart of a spatial data processing method based on a large language model provided in an embodiment of the present application.

[0029] Figure 6 : A structural diagram of a spatial data processing system based on a large language model provided in an embodiment of the present application.

[0030] Figure 7 : A structural diagram of a spatial data processing module of a spatial data processing system based on a large language model provided in an embodiment of the present application. DETAILED DESCRIPTION

[0031] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0032] It should be noted that the step numbers in the text are only for the convenience of explanation of the specific embodiments and do not serve to limit the order in which the steps are executed. In the description of this application, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.

[0033] Embodiment 1: like Figure 1 As shown, embodiment 1 provides a spatial data processing method based on a large language model, including steps S1-S5: Step S1, obtaining the target spatial data to be processed and storing it in a preset spatial database; Step S2: inputting the target space data into a preset large language model, so that the large language model performs data preprocessing on the target space data to generate corresponding processed data; Step S3: using a preset data analysis tool to perform data analysis on the target spatial data and the processed data to obtain metadata information; Step S4: using a preset metadata information classification model to store the metadata information into a preset vector database; Step S5: Acquire text information input by the user, and perform spatial data processing on the target spatial data using the large language model according to the text information, the spatial database and the vector database, and output a corresponding spatial data processing result.

[0034] The embodiment of the present application provides a spatial data processing method based on a large language model, which uses the large language model technology to process and analyze the target spatial data, and at the same time constructs a spatial database related to spatial data processing and a vector database related to the large model technology, combining the large language model technology with the geographic information system (GIS) technology, and through interactive dialogue and the ability of the large language model, non-professionals can easily understand and process complex GIS data, thereby lowering the technical threshold for spatial data processing, improving the processing efficiency of spatial data and the user experience. On the other hand, the embodiment of the present application continuously supplements the vector database during the spatial data processing process, effectively improving the understanding ability and data processing ability of the large language model in the GIS professional field, and improving the efficiency and accuracy of data processing.

[0035] Furthermore, in step S1, obtaining the target space data to be processed includes: The user end determines the spatial data file to be uploaded through the file selector; By means of a file parser, the spatial data file is parsed and verified based on a preset verification rule; If the parsing verification passes, the spatial data file is segmented or compressed to generate a corresponding file to be uploaded; The to-be-uploaded file is uploaded to the server in a queue manner, so that the server converts the to-be-uploaded file into the to-be-processed target spatial data, and stores the target spatial data into a preset spatial database.

[0036] The embodiment of the present application provides a method for parsing and uploading a spatial data file, which converts the spatial data file into target spatial data through file selection, parsing verification, segmentation or compression, uploading and conversion through an automated processing flow, thereby improving the efficiency of file uploading while ensuring the accuracy and integrity of the data, and providing a data basis for subsequent spatial data processing. Furthermore, the embodiment of the present application adopts a queue mode to upload files, further improving the efficiency and stability of data uploading.

[0037] In a preferred embodiment, the user completes uploading the space data file through a preset front-end page at the user end, such as Figure 2 As shown, the specific steps are as follows: 1) The user navigates to the spatial data file upload area on the front-end page; 2) Users select spatial data files in GDB, SHP, MDB, Geojson, EXCLE, TXT and other formats stored locally through the file selector.

[0038] 3) The file parser performs preliminary analysis on the file and combines internal verification rules to determine and verify the file compliance. For example, the system verifies whether the format and size of the selected file meet the upload requirements to ensure the compliance of the file.

[0039] 4) Perform data processing before uploading large files, split or compress the files to meet network transmission requirements and ensure complete, fast and efficient data transmission.

[0040] 5) Execute file upload. After the user confirms that the selected file is correct, the upload operation is triggered. In order to avoid network transmission congestion, a queue method is used to sort and upload the data objects divided or compressed in 4). The system displays the upload progress through the front-end page, including the uploaded file size and the estimated completion time.

[0041] 6) File reception: The system receives the spatial data file uploaded in step 5) and stores it in the specified spatial database. The file object in the spatial database serves as a knowledge base and is the source of knowledge for subsequent automatic parsing and reasoning.

[0042] In a possible implementation, in step S2, the large language model performs data preprocessing on the target space data to generate corresponding processed data, including: Performing data analysis on the target spatial data, extracting spatial information and attribute information, and generating corresponding analysis result information in combination with the spatial information and attribute information; Performing format conversion and data cleaning on the analysis result information to generate processed data supported by a spatial database; Based on the processed data, generate corresponding SQL statements using the large language model; The SQL statement is used to execute a database insert operation, and the processed data is stored in corresponding tables and fields in a spatial database.

[0043] The embodiment of the present application provides a data preprocessing method. Since the data preprocessing object is spatial data, it is necessary to extract spatial information and attribute information from the target spatial data according to the characteristics of the spatial data, and combine the generated analysis result information to store the analysis result information in the spatial database to provide a data basis for subsequent spatial data processing. In addition, in the process of data storage, in order to realize automatic data storage, the embodiment of the present application uses a large language model to generate corresponding SQL statements, without the need to manually write SQL statements for storage, which further reduces the data processing threshold and improves the processing efficiency of spatial data and the user experience.

[0044] In a possible implementation, in step S4, using a preset metadata information classification model to store the metadata information into a preset vector database includes: Use content type, category and source as the basis for data classification and build a meta-information classification model; Using the metadata classification model to sort and classify the metadata information, and construct a corresponding metadata index; According to the classification rules of the metadata classification model, the metadata information is converted into vector data corresponding to the vector database, and a corresponding vector index is constructed; The metadata index, vector index and vector data are stored in the vector database.

[0045] In the embodiment of the present application, metadata index and vector index are constructed in the process of vector data storage. The purpose of index construction is to quickly query and retrieve. In actual business scenarios, it is often not necessary to perform similarity search in the entire vector database, but to filter by some business fields and then query. By maintaining metadata index and vector index, the vector database optimizes the storage structure and query performance of the database, and improves the accuracy and speed of data retrieval.

[0046] In a preferred embodiment, Figure 3 As shown, the specific process of steps S2-S4 is as follows: 1) Call the large language model to analyze the uploaded target spatial data, extract spatial information and attribute information, and store the analysis result information; 2) Perform data conversion on the analysis result information and convert it into a format supported by the spatial database, i.e. processed data, to ensure that the spatial data support component can be used to perform spatial data processing on the processed data later; 3) Clean and format the processed data to ensure data consistency and accuracy; 4) Import the cleaned data into the preset spatial database, use the SQL statement constructed by the large language model to perform database insertion operations, and store the data in appropriate tables and fields; 5) For the target spatial data and the cleaned data, call the data analysis tool to generate metadata information; 6) Organize and construct a metadata classification model according to the content type, category, source and other information of the metadata information, and use the classification model to organize and classify the extracted metadata information; 7) Convert the metadata information into the format and structure required by the knowledge base (vector database), i.e., vector data, according to the rules of the classification model; 8) Based on the metadata, the corresponding metadata index and vector index are constructed for the vector data to improve the retrieval efficiency. The storage structure and query performance of the knowledge base are optimized through indexing to support fast data access and analysis.

[0047] In a possible implementation, in step S5, performing spatial data processing on the target spatial data using the large language model according to the text information, the spatial database and the vector database, and outputting a corresponding spatial data processing result, includes: Extracting each prompt word from the text information; Perform prompt word analysis on each prompt word to determine the spatial data processing operation scope of the large language model, where the spatial data processing operation scope is a data query operation, a thematic map output operation, a POI positioning operation or a graphic drawing operation; Outputting a plurality of preset spatial data processing instructions to the user according to the determined spatial data processing operation range, and waiting to obtain the instruction selected by the user; According to the text information, the prompt words and the instruction selected by the user, searching from the vector database to infer the specific needs of the user; According to the specific needs, call the corresponding spatial data processing tool; The target spatial data is processed spatially according to the specific requirements, the spatial data processing tool and the spatial database, and a corresponding spatial data processing result is generated and output.

[0048] The embodiment of the present application provides a method for processing target spatial data through a large language model, determines the scope of spatial data processing operations through prompt word analysis, and provides feedback confirmation with the user, thereby improving the accuracy and efficiency of spatial data processing by the large language model. By searching in a vector database, inferring the specific needs of the user, and then determining and calling the relevant spatial data processing tools, an effective combination of large language model technology and GIS technology is achieved, so that the large language model truly has the ability to process spatial data, and can simultaneously process multimodal data such as text data and graphic data, meeting the diverse needs of users, and realizing the intelligence and automation of spatial data processing.

[0049] Furthermore, searching from the vector database according to the text information, the various prompt words and the instruction selected by the user to infer the specific needs of the user includes: According to the text information, the prompt words and the instruction selected by the user, using the search enhancement generation technology to perform relevance search from the vector database to generate corresponding enhancement information; According to the text information, the various prompt words, the instructions selected by the user and the enhanced information, semantic analysis and understanding are performed to infer the specific needs of the user.

[0050] The embodiment of the present application introduces RAG search enhancement generation technology in the search process, and uses RAG search enhancement technology to retrieve relevant information from the vector database, enhance the context of user input, and improve the understanding of user needs by the large language model. Through semantic analysis and understanding, the specific needs of users are further inferred, providing more accurate guidance for subsequent spatial data processing, and improving the efficiency and accuracy of spatial data processing.

[0051] Furthermore, the spatial data processing method further includes: According to the type of the spatial data processing result, calling a corresponding visualization rendering tool; Perform visual rendering on the spatial data processing result using the visual rendering tool, and convert the spatial data processing result into a preset file type, wherein the preset file type is text, graphics, thematic map or chart; The spatial data processing result after the visual rendering is returned to the user end for display.

[0052] After obtaining the spatial data processing results, the embodiment of the present application further performs visualization processing on the spatial data processing results, and calls the corresponding visualization rendering tool according to the type of the spatial data processing results to achieve the visualization expression of the data processing results. The visualized spatial data processing results are returned to the user end for display, thereby improving the user experience.

[0053] In a preferred embodiment, the specific process of step S5 is as follows: Figure 4 As shown, including: 1) Enter the conversation question or content in the dialog box, and the program will automatically establish a connection with the knowledge base (vector database).

[0054] 2) The large language model extracts relevant prompt words from the input question description, and defines the responsibilities of the large language model based on the prompt word analysis, limiting the scope of analysis, such as which data in the data object, what operations to perform, and which operations to perform on spatial data query, graphic drawing and rendering, thematic map output, and POI positioning; step by step, it continuously focuses on and decomposes the problem target to make the answer feedback results more accurate.

[0055] 3) According to the determined scope of responsibilities, provide necessary tools and interfaces for the large language model, such as SQL query tools, thematic map rendering tools, POI positioning tools and graphics drawing tools.

[0056] 4) According to the determined scope of responsibility, the large language model outputs several preset spatial data processing instructions in the dialog box and waits to obtain the instructions selected by the user.

[0057] 5) Based on the user's input content, relevant prompt words and the instructions selected by the user, use RAG (Retrieval-Augmented Generation) retrieval enhancement generation technology to perform relevance retrieval from the knowledge base (vector database), make context associations, and generate enhanced context information. Feedback the enhanced context information to the large language model to improve its understanding of the user's input content.

[0058] 6) The large language model analyzes the user's input and enhanced context information, performs semantic analysis and understanding, and infers the user's specific needs. Based on the reasoning results, the large language model decides to call the corresponding tools to meet the user's needs.

[0059] 7) Call related tools and generate response results. For example, in a spatial data query case, the large language model infers the query SQL statement based on the context, calls the SQL query tool to execute the query operation, and returns the query results to the front end for visual rendering and display.

[0060] 8) The large language model analysis and inference results are visualized using different tools in combination with different business demand scenarios to complete the data adaptive parsing process. The visualization output results mainly include dialogue text, graphics, thematic map output, and tables.

[0061] For different responsibilities, the spatial data processing process of the large language model is: 1. Data query (1) The large language model infers the query SQL based on the context.

[0062] (2) Call the SQL query tool to execute the query.

[0063] (3) Return the query results to the front-end table for rendering and display.

[0064] 2. Thematic map output (1) The large language model infers the query SQL.

[0065] (2) Use SQL query tools to obtain data.

[0066] (3) Call the thematic map rendering tool to generate charts.

[0067] (4) Return the rendered results to the front-end chart for display.

[0068] 3. POI positioning (1) Large language model inference requires the name of the POI to be located.

[0069] (2) Call the POI positioning tool to query coordinate information.

[0070] (3) Return the positioning results to the front end for POI marking.

[0071] 4. Graphics drawing (1) The name of the graphic that needs to be drawn for large language model inference.

[0072] (2) Call the graphics drawing tool to draw.

[0073] (3) Return the drawing results to the front-end map for display.

[0074] Figure 5 The following is a detailed flow chart of the steps of an embodiment of the present application. Compared with the prior art, the advantages of the embodiment of the present application are as follows: 1. Data processing efficiency is significantly improved Through the automated file parsing and storage mechanism, the embodiments of the present application significantly reduce the time for spatial data preprocessing and improve the overall efficiency of data processing.

[0075] 2. Lower user threshold Since the embodiments of the present application adopt natural language interaction and a visual operation interface, non-professional users can easily upload and process spatial data without complicated training or learning process.

[0076] 3. Enhanced interactive experience The embodiment of the present application uses a multi-round dialogue reasoning mechanism to enable the system to more accurately understand user needs, provide more personalized services, and enhance the user's interactive experience.

[0077] 4. Faster response to demand The fast reasoning and tool calling mechanism of the large language model ensures that user needs can be responded to and processed quickly, shortening waiting time.

[0078] 5. Diversification of data visualization Users can choose different visual expressions according to their needs, including text, charts, maps, etc., making data presentation more intuitive and flexible.

[0079] 6. Improved system intelligence The introduction of RAG retrieval enhancement technology enhances the system's semantic understanding ability, enables the large language model to infer user needs more accurately, and improves the intelligence of the system.

[0080] 7. Enhanced operational convenience The intuitive design of the front-end page and modular tool calls simplify the user operation process, allowing users to quickly get started and complete complex data processing tasks.

[0081] 8. Promote technology popularization The embodiments of the present application help promote the popularization of spatial data processing technology, enabling more industries and fields to use spatial data to support decision-making and innovation.

[0082] Embodiment 2: like Figure 6 As shown, accordingly, embodiment 2 provides a spatial data processing system based on a large language model, including an acquisition module 10, a preprocessing module 20, a data parsing module 30, a vector storage module 40 and a spatial data processing module 50; The acquisition module 10 is used to acquire the target spatial data to be processed and store it in a preset spatial database; The preprocessing module 20 is used to input the target space data into a preset large language model, so that the large language model performs data preprocessing on the target space data to generate corresponding processed data; The data analysis module 30 is used to use a preset data analysis tool to perform data analysis on the target spatial data and the processed data to obtain metadata information; The vector storage module 40 is used to store the metadata information into a preset vector database using a preset metadata information classification model; The spatial data processing module 50 is used to obtain text information input by the user, and perform spatial data processing on the target spatial data using the large language model according to the text information, the spatial database and the vector database, and output a corresponding spatial data processing result.

[0083] Furthermore, the acquisition module 10 acquires the target space data to be processed, including: The user end determines the spatial data file to be uploaded through the file selector; By means of a file parser, the spatial data file is parsed and verified based on a preset verification rule; If the parsing verification passes, the spatial data file is segmented or compressed to generate a corresponding file to be uploaded; The to-be-uploaded file is uploaded to the server in a queue manner, so that the server converts the to-be-uploaded file into the to-be-processed target spatial data, and stores the target spatial data into a preset spatial database.

[0084] In a possible implementation, the preprocessing module 20 performs data preprocessing on the target space data to generate corresponding processed data, including: Performing data analysis on the target spatial data, extracting spatial information and attribute information, and generating corresponding analysis result information in combination with the spatial information and attribute information; Performing format conversion and data cleaning on the analysis result information to generate processed data supported by a spatial database; Based on the processed data, generate corresponding SQL statements using the large language model; The SQL statement is used to execute a database insert operation, and the processed data is stored in corresponding tables and fields in a spatial database.

[0085] In a possible implementation, the vector storage module 40 uses a preset metadata information classification model to store the metadata information into a preset vector database, including: Use content type, category and source as the basis for data classification and build a meta-information classification model; Using the metadata classification model to sort and classify the metadata information, and construct a corresponding metadata index; According to the classification rules of the metadata classification model, the metadata information is converted into vector data corresponding to the vector database, and a corresponding vector index is constructed; The metadata index, vector index and vector data are stored in the vector database.

[0086] In one possible implementation, Figure 7As shown, the spatial data processing module 50 includes a prompt word extraction unit 501, a prompt word analysis unit 502, an instruction determination unit 503, a retrieval unit 504, a tool calling unit 505 and a spatial data processing unit 506; The prompt word extraction unit 501 is used to extract each prompt word from the text information; The prompt word analysis unit 502 is used to perform prompt word analysis on each prompt word to determine the spatial data processing operation range of the large language model, and the spatial data processing operation range is a data query operation, a thematic map output operation, a POI positioning operation or a graphic drawing operation; The instruction determination unit 503 is used to output a plurality of preset spatial data processing instructions to the user according to the determined spatial data processing operation range, and wait to obtain the instruction selected by the user; The retrieval unit 504 is used to search from the vector database according to the text information, the various prompt words and the instruction selected by the user, and infer the specific needs of the user; The tool calling unit 505 is used to call the corresponding spatial data processing tool according to the specific needs; The spatial data processing unit 506 is used to perform spatial data processing on the target spatial data according to the specific requirements, the spatial data processing tool and the spatial database, and generate and output corresponding spatial data processing results.

[0087] Furthermore, the retrieval unit 504 searches the vector database according to the text information, the prompt words and the instruction selected by the user to infer the specific needs of the user, including: According to the text information, the prompt words and the instruction selected by the user, using the search enhancement generation technology to perform relevance search from the vector database to generate corresponding enhancement information; According to the text information, the various prompt words, the instructions selected by the user and the enhanced information, semantic analysis and understanding are performed to infer the specific needs of the user.

[0088] Furthermore, the spatial data processing method further comprises a visualization module, and the visualization module comprises a tool calling unit, a rendering unit and an output unit: The tool calling unit is used to call the corresponding visualization rendering tool according to the type of the spatial data processing result; The rendering unit is used to use the visual rendering tool to perform visual rendering on the spatial data processing result, and convert the spatial data processing result into a preset file type, where the preset file type is text, graphics, thematic map or chart; The output unit is used to return the spatial data processing result after the visual rendering to the user end for display.

[0089] The embodiment of the present application provides a spatial data processing system based on a large language model, which uses the large language model technology to process and analyze the target spatial data, and at the same time constructs a spatial database related to spatial data processing and a vector database related to the large model technology, combining the large language model technology with the geographic information system (GIS) technology, and through interactive dialogue and the ability of the large language model, non-professionals can also easily understand and process complex GIS data, thereby lowering the technical threshold for spatial data processing, improving the processing efficiency of spatial data and the user experience. On the other hand, the embodiment of the present application continuously supplements the vector database during the spatial data processing process, effectively improving the understanding ability and data processing ability of the large language model in the GIS professional field, and improving the efficiency and accuracy of data processing.

[0090] The more detailed working principle and step flow of this embodiment can refer to, but are not limited to, the relevant records of Embodiment 1.

[0091] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims

1. A spatial data processing method based on a large language model, characterized in that: include: Obtain the target spatial data to be processed and store it in a preset spatial database; Inputting the target space data into a preset large language model so that the large language model performs data preprocessing on the target space data to generate corresponding processed data; Using a preset data analysis tool to perform data analysis on the target spatial data and the processed data to obtain metadata information; Using a preset metadata information classification model to store the metadata information into a preset vector database; The text information input by the user is obtained, and according to the text information, the spatial database and the vector database, the large language model is used to perform spatial data processing on the target spatial data, and a corresponding spatial data processing result is output.

2. A spatial data processing method based on a large language model as claimed in claim 1, characterized in that: The step of obtaining the target space data to be processed includes: The user end determines the spatial data file to be uploaded through the file selector; By means of a file parser, the spatial data file is parsed and verified based on a preset verification rule; If the parsing verification passes, the spatial data file is segmented or compressed to generate a corresponding file to be uploaded; The to-be-uploaded file is uploaded to the server in a queue manner, so that the server converts the to-be-uploaded file into the to-be-processed target spatial data, and stores the target spatial data into a preset spatial database.

3. A spatial data processing method based on a large language model as claimed in claim 1, characterized in that: The large language model performs data preprocessing on the target space data to generate corresponding processed data, including: Performing data analysis on the target spatial data, extracting spatial information and attribute information, and generating corresponding analysis result information in combination with the spatial information and attribute information; Performing format conversion and data cleaning on the analysis result information to generate processed data supported by a spatial database; Based on the processed data, generate corresponding SQL statements using the large language model; The SQL statement is used to execute a database insert operation, and the processed data is stored in corresponding tables and fields in a spatial database.

4. The spatial data processing method based on a large language model according to claim 1, characterized in that: The using a preset metadata information classification model to store the metadata information into a preset vector database includes: Use content type, category and source as the basis for data classification and build a meta-information classification model; Using the metadata classification model to sort and classify the metadata information, and construct a corresponding metadata index; According to the classification rules of the metadata classification model, the metadata information is converted into vector data corresponding to the vector database, and a corresponding vector index is constructed; The metadata index, vector index and vector data are stored in the vector database.

5. The spatial data processing method based on a large language model as claimed in claim 1, characterized in that: The step of performing spatial data processing on the target spatial data using the large language model according to the text information, the spatial database and the vector database, and outputting corresponding spatial data processing results includes: Extracting each prompt word from the text information; Perform prompt word analysis on each prompt word to determine the spatial data processing operation scope of the large language model, where the spatial data processing operation scope is a data query operation, a thematic map output operation, a POI positioning operation or a graphic drawing operation; Outputting a plurality of preset spatial data processing instructions to the user according to the determined spatial data processing operation range, and waiting to obtain the instruction selected by the user; According to the text information, the prompt words and the instruction selected by the user, searching from the vector database to infer the specific needs of the user; According to the specific needs, call the corresponding spatial data processing tool; The target spatial data is processed spatially according to the specific requirements, the spatial data processing tool and the spatial database, and a corresponding spatial data processing result is generated and output.

6. A spatial data processing method based on a large language model as claimed in claim 5, characterized in that: The searching from the vector database according to the text information, the various prompt words and the instruction selected by the user to infer the specific needs of the user includes: According to the text information, the prompt words and the instruction selected by the user, using the search enhancement generation technology to perform relevance search from the vector database to generate corresponding enhancement information; According to the text information, the various prompt words, the instructions selected by the user and the enhanced information, semantic analysis and understanding are performed to infer the specific needs of the user.

7. A spatial data processing method based on a large language model as described in any one of claims 1 to 6, characterized in that: The spatial data processing method further comprises: According to the type of the spatial data processing result, calling a corresponding visualization rendering tool; Perform visual rendering on the spatial data processing result using the visual rendering tool, and convert the spatial data processing result into a preset file type, wherein the preset file type is text, graphics, thematic map or chart; The spatial data processing result after the visual rendering is returned to the user end for display.

8. A spatial data processing system based on a large language model, characterized in that: It includes an acquisition module, a preprocessing module, a data analysis module, a vector storage module and a spatial data processing module; Wherein, the acquisition module is used to acquire the target spatial data to be processed and store it in a preset spatial database; The preprocessing module is used to input the target space data into a preset large language model, so that the large language model performs data preprocessing on the target space data to generate corresponding processed data; The data analysis module is used to use a preset data analysis tool to perform data analysis on the target spatial data and the processed data to obtain metadata information; The vector storage module is used to store the metadata information into a preset vector database using a preset metadata information classification model; The spatial data processing module is used to obtain text information input by a user, and perform spatial data processing on the target spatial data using the large language model according to the text information, the spatial database and the vector database, and output a corresponding spatial data processing result.

9. A spatial data processing system based on a large language model as claimed in claim 8, characterized in that: The spatial data processing module includes a prompt word extraction unit, a prompt word analysis unit, an instruction determination unit, a retrieval unit, a tool calling unit and a spatial data processing unit; Wherein, the prompt word extraction unit is used to extract each prompt word from the text information; The prompt word analysis unit is used to perform prompt word analysis on each prompt word to determine the spatial data processing operation range of the large language model, and the spatial data processing operation range is a data query operation, a thematic map output operation, a POI positioning operation or a graphic drawing operation; The instruction determination unit is used to output a plurality of preset spatial data processing instructions to the user according to the determined spatial data processing operation range, and wait to obtain the instruction selected by the user; The retrieval unit is used to search from the vector database according to the text information, the various prompt words and the instruction selected by the user, and infer the specific needs of the user; The tool calling unit is used to call the corresponding spatial data processing tool according to the specific needs; The spatial data processing unit is used to perform spatial data processing on the target spatial data according to the specific requirements, the spatial data processing tool and the spatial database, and generate and output corresponding spatial data processing results.

10. A spatial data processing system based on a large language model as claimed in claim 9, characterized in that: The retrieval unit searches the vector database according to the text information, the prompt words and the instruction selected by the user to infer the specific needs of the user, including: According to the text information, the prompt words and the instruction selected by the user, using the search enhancement generation technology to perform relevance search from the vector database to generate corresponding enhancement information; According to the text information, the various prompt words, the instructions selected by the user and the enhanced information, semantic analysis and understanding are performed to infer the specific needs of the user.

Citation Information

Patent Citations

  • Geographic information knowledge extraction enhancement method based on self-fusion subgraph

    CN117454983A

  • Distributed intelligent retrieval method and system for spatio-temporal data

    CN118838937A

  • Land space planning index calculation method and system based on large language model

    CN119294771A

Cited By

  • GIS data processing method and device based on artificial intelligence

    CN120196696A

  • GIS data analysis device and method

    CN120448422A