Querying system for spatial data based on natural language and querying method for the same
Patent Information
- Authority / Receiving Office
- TW · TW
- Patent Type
- Patents
- Current Assignee / Owner
- GEOSENSE TECH CO LTD
- Filing Date
- 2025-08-11
- Publication Date
- 2026-08-01
Smart Images

Figure TWG2TB001904087_001 
Figure TWG2TB001904087_002 
Figure TWG2TB001904087_003
Abstract
Claims
1. A spatial data query system based on natural language, comprising: The front end of the map service connects to a user terminal via the network and is configured to display a map and receive a query input in natural language from the user terminal. The back end of the map service provides multiple AI agents, which are configured to process the query and generate a response that is displayed on the front end of the map service. A spatial database is configured to store spatial data for the map. The map platform backend includes: a first AI agent configured to parse the query and generate a spatial query intent; a second AI agent configured to query the spatial database based on the spatial query intent to obtain relevant spatial data associated with the query; a third AI agent configured to identify multiple functions available for the spatial data query system from a function library and select a target function matching the spatial query intent; a fourth AI agent configured to combine the target function with the relevant spatial data to generate executable code; and a fifth AI agent configured to execute the code in a sandbox environment, debug and repair the code to generate final code. The map platform backend is configured to execute the final code and present the execution result to the map platform frontend as a response to the query. The target function is a JavaScript function, and the fourth AI agent is configured to combine the target function with the relevant spatial data into executable JavaScript code.
2. The natural language-based spatial data query system as described in claim 1, wherein the first AI agent is configured to perform semantic parsing of the query question using a Geographic Information System (GIS)-specific semantic model to obtain the spatial query intent related to spatial geography.
3. The natural language-based spatial data query system as described in claim 1, wherein the second AI agent is configured to generate and optimize an SQL query statement containing a spatial index based on the spatial query intent, and to query the spatial database using the SQL query statement, wherein the spatial database is a GIS database in SQL format.
4. The natural language-based spatial data query system as described in claim 1, wherein the target function includes a location function for locating the spatial data on the map and a coloring function for coloring the spatial data.
5. The spatial data query system based on natural language as described in claim 1, wherein the map platform backend further includes a sixth AI agent configured to periodically detect a remote map platform service to obtain an up-to-date list of functions and update the functions with the up-to-date list of functions.
6. A spatial data query method based on natural language, applied to a spatial data query system, comprising: Step a) The map platform front-end displays a map and receives a query question input by the user in natural language; Step b) The map platform back-end parses the query question and generates a spatial query intent; Step c) The map platform back-end queries a spatial database based on the spatial query intent to obtain relevant spatial data associated with the query question, wherein the spatial database stores the spatial data of the map; Step d) The map platform back-end identifies multiple functions available for the spatial data query system from a function library and selects a target function that matches the spatial query intent; Step e) The map platform back-end combines the target function with the relevant spatial data to generate executable code; Step f) The map platform back-end executes the code in a sandbox environment, debugs and repairs the code to generate final code; and Step g) The map platform back-end executes the final code and presents the execution result to the map platform front-end as a response to the query question; The target function is a JavaScript function, and step e) includes combining the target function with the relevant spatial data into executable JavaScript code.
7. The spatial data query method based on natural language as described in claim 6, wherein step b) includes using a GIS-specific semantic model to perform semantic parsing of the query question to obtain the spatial query intent related to spatial geography, and step c) includes generating and optimizing an SQL query statement containing a spatial index based on the spatial query intent, and querying the spatial database with the SQL query statement, wherein the spatial database is a GIS database in SQL format.
8. The spatial data query method based on natural language as described in claim 6, further comprising a step h): periodically checking a remote map service by the map station backend to obtain an up-to-date list of functions, and updating the functions with the up-to-date list of functions.