Spatial search method and apparatus
Patent Information
- Application Number
- CN202611096467.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-22
- Publication Date
- 2026-10-13
AI Technical Summary
然而,在空间检索场景中,简单RAG框架面临显著挑战,无法保障检索结果的准确度和全面性
[0023]本申请实施例提供的空间检索方法及装置,通过解析空间检索请求,确定空间检索请求所属的检索范式;确定检索范式对应的检索方式和检索方式对应的数据源;采用检索方式在数据源中进行空间检索,确定空间检索结果,从而对于不同检索范式的空间检索请求,采用对应的检索方式进行针对性的空间检索,有机融合各种检索方式的优势,覆盖空间检索全场景,提高了空间检索结果的准确度和全面性。
Smart Images

Figure CN122903519A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to spatial retrieval, artificial intelligence, large models, intelligent navigation and other technical fields, and particularly to a spatial retrieval method, device, computer-readable medium, electronic device and computer program product. Background Technology
[0002] Traditional spatial retrieval primarily relies on structured query languages and spatial databases, requiring users to possess specialized geographic information knowledge, thus limiting its use by ordinary users. For example, users need to accurately input latitude, longitude, or address information to search for "restaurants within 1 kilometer," making direct interaction using natural language impossible. In recent years, Retrieval-augmented Generation (RAG) technology has improved the accuracy of question-answering systems by combining large models and external knowledge bases. However, in spatial retrieval scenarios, simple RAG frameworks face significant challenges, failing to guarantee the accuracy and comprehensiveness of search results. Summary of the Invention
[0003] This application provides a spatial retrieval method, apparatus, computer-readable medium, electronic device, and computer program product.
[0004] In a first aspect, embodiments of this application provide a spatial retrieval method, comprising: parsing a spatial retrieval request and determining the retrieval paradigm to which the spatial retrieval request belongs; determining the retrieval method corresponding to the retrieval paradigm and the data source corresponding to the retrieval method; performing spatial retrieval in the data source using the retrieval method and determining the spatial retrieval result.
[0005] In some examples, the above-mentioned parsing of spatial retrieval requests and determination of the retrieval paradigm to which the spatial retrieval request belongs includes: in response to parsing only the spatial retrieval primitives that hit the topic data source from the spatial retrieval request, determining the retrieval paradigm as a topic retrieval paradigm, wherein the topic data source is a data set of exclusive structured spatial attributes including target type points of interest; and the above-mentioned determination of the retrieval method corresponding to the retrieval paradigm and the data source corresponding to the retrieval method includes: determining the topic retrieval method corresponding to the topic retrieval paradigm and the topic data source corresponding to the topic retrieval method, wherein the topic retrieval method represents performing spatial retrieval in the topic data source.
[0006] In some examples, the above-mentioned spatial retrieval method is used to perform spatial retrieval in the data source and determine the spatial retrieval results, including: constructing a query statement based on spatial retrieval primitives; using the query statement to determine spatial retrieval items in the thematic data source; filtering and sorting multiple spatial retrieval items based on the semantic matching degree between the retrieval item description text and the spatial retrieval request, and generating spatial retrieval results, wherein the retrieval item description text is the natural language description text of the structured spatial attributes of the spatial retrieval item.
[0007] In some examples, the above-mentioned parsing of spatial retrieval requests and determination of the retrieval paradigm to which the spatial retrieval request belongs includes: in response to parsing only spatial retrieval primitives that do not match the topic data source from the spatial retrieval request, determining that the retrieval paradigm is a general retrieval paradigm, wherein the topic data source is a data set including the specific structured spatial attributes of target type points of interest; and the above-mentioned determination of the retrieval method corresponding to the retrieval paradigm and the data source corresponding to the retrieval method includes: determining the general retrieval method corresponding to the general retrieval paradigm and the general data source corresponding to the general retrieval method, wherein the general retrieval method represents performing spatial retrieval in the general data source, and the general data source is a data set including the general structured spatial attributes of various types of points of interest.
[0008] In some examples, the above-mentioned spatial retrieval method is used to perform spatial retrieval in the data source and determine the spatial retrieval results, including: constructing a query statement based on spatial retrieval primitives; using the query statement to determine spatial retrieval items in a general data source; filtering and sorting multiple spatial retrieval items based on the semantic matching degree between the retrieval item description text and the spatial retrieval request, and generating spatial retrieval results, wherein the retrieval item description text is a natural language description text of the structured spatial attributes of the spatial retrieval item.
[0009] In some examples, the above-mentioned parsing of spatial retrieval requests and determination of the retrieval paradigm to which the spatial retrieval request belongs includes: in response to parsing spatial retrieval primitives and unstructured semantic descriptions from the spatial retrieval request, determining the retrieval paradigm as a hybrid retrieval paradigm; and the above-mentioned determination of the retrieval method corresponding to the retrieval paradigm and the data source corresponding to the retrieval method includes: determining the hybrid retrieval method corresponding to the hybrid retrieval paradigm and the hybrid data source corresponding to the hybrid retrieval method, wherein the hybrid retrieval method represents spatial retrieval performed in the hybrid data source, and the hybrid data source is associated with and stores the structured spatial attributes and unstructured semantic descriptions of candidate points of interest.
[0010] In some examples, the above-mentioned spatial retrieval method is used to perform spatial retrieval in the data source and determine the spatial retrieval results, including: constructing a query statement based on the spatial retrieval primitives and determining the semantic vector of the semantic description in the spatial retrieval request; using the query statement to determine the first retrieval item from the mixed data source; determining the second retrieval item from the mixed data source based on the similarity between the semantic vector of the semantic description in the spatial retrieval request and the semantic vector of the candidate points of interest; and filtering and sorting multiple first retrieval items and multiple second retrieval items according to the semantic matching degree between the retrieval item description text and the spatial retrieval request to generate spatial retrieval results, wherein the retrieval item description text is the natural language description text of the structured spatial attributes and semantic description of the first retrieval item or the second retrieval item.
[0011] In some examples, the above hybrid data source is constructed as follows: collect descriptive data of candidate points of interest; extract structured spatial attributes and unstructured semantic descriptions from the descriptive data; and associate and store the semantic vectors of candidate points of interest, structured spatial attributes, and semantic descriptions in the hybrid data source.
[0012] Secondly, embodiments of this application provide a spatial retrieval device, including: a request parsing unit configured to parse a spatial retrieval request and determine the retrieval paradigm to which the spatial retrieval request belongs; a method determination unit configured to determine the retrieval method corresponding to the retrieval paradigm and the data source corresponding to the retrieval method; and a spatial retrieval unit configured to perform spatial retrieval in the data source using the retrieval method and determine the spatial retrieval result.
[0013] In some examples, the above request parsing unit is further configured to: in response to parsing only the spatial retrieval primitives that hit the topic data source from the spatial retrieval request, determine the retrieval paradigm as a topic retrieval paradigm, wherein the topic data source is a data set of exclusive structured spatial attributes including target type points of interest; and the above method determination unit is further configured to: determine the topic retrieval method corresponding to the topic retrieval paradigm and the topic data source corresponding to the topic retrieval method, wherein the topic retrieval method represents spatial retrieval performed in the topic data source.
[0014] In some examples, the aforementioned spatial retrieval unit is further configured to: construct a query statement based on spatial retrieval primitives; use the query statement to determine spatial retrieval items in the thematic data source; filter and sort multiple spatial retrieval items based on the semantic matching degree between the retrieval item description text and the spatial retrieval request, and generate spatial retrieval results, wherein the retrieval item description text is a natural language description text of the structured spatial attributes of the spatial retrieval item.
[0015] In some examples, the request parsing unit is further configured to: in response to parsing only the spatial retrieval primitives that did not hit the topic data source from the spatial retrieval request, determine the retrieval paradigm as a general retrieval paradigm, wherein the topic data source is a data set including the specific structured spatial attributes of the target type interest points; and the method determination unit is further configured to: determine the general retrieval method corresponding to the general retrieval paradigm and the general data source corresponding to the general retrieval method, wherein the general retrieval method represents spatial retrieval in the general data source, and the general data source is a data set including the general structured spatial attributes of various types of interest points.
[0016] In some examples, the aforementioned spatial retrieval unit is further configured to: construct a query statement based on spatial retrieval primitives; use the query statement to determine spatial retrieval items in a general data source; filter and sort multiple spatial retrieval items based on the semantic matching degree between the retrieval item description text and the spatial retrieval request, and generate spatial retrieval results, wherein the retrieval item description text is a natural language description text of the structured spatial attributes of the spatial retrieval item.
[0017] In some examples, the above-mentioned request parsing unit is further configured to: in response to parsing spatial retrieval primitives and unstructured semantic descriptions from spatial retrieval requests, determine that the retrieval paradigm is a hybrid retrieval paradigm; and the above-mentioned method determination unit is further configured to: determine the hybrid retrieval method corresponding to the hybrid retrieval paradigm and the hybrid data source corresponding to the hybrid retrieval method, wherein the hybrid retrieval method represents spatial retrieval performed in the hybrid data source, and the hybrid data source is associated with a semantic vector containing structured spatial attributes and unstructured semantic descriptions of candidate points of interest.
[0018] In some examples, the aforementioned spatial retrieval unit is further configured to: construct a query statement based on spatial retrieval primitives and determine the semantic vector of the semantic description in the spatial retrieval request; use the query statement to determine a first retrieval term from the mixed data source; determine a second retrieval term from the mixed data source based on the similarity between the semantic vector of the semantic description in the spatial retrieval request and the semantic vector of the candidate points of interest; and filter and sort multiple first retrieval terms and multiple second retrieval terms according to the semantic matching degree between the retrieval term description text and the spatial retrieval request to generate spatial retrieval results, wherein the retrieval term description text is a natural language description text of the structured spatial attributes and semantic description of the first retrieval term or the second retrieval term.
[0019] In some examples, the above hybrid data source is constructed as follows: collect descriptive data of candidate points of interest; extract structured spatial attributes and unstructured semantic descriptions from the descriptive data; and associate and store the semantic vectors of candidate points of interest, structured spatial attributes, and semantic descriptions in the hybrid data source.
[0020] Thirdly, embodiments of this application provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, it implements the method as described in any implementation of the first aspect.
[0021] Fourthly, embodiments of this application provide an electronic device, including: one or more processors; and a storage device storing one or more programs thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation of the first aspect.
[0022] Fifthly, embodiments of this application provide a computer program product, including: a computer program that, when executed by a processor, implements the method described in any implementation of the first aspect.
[0023] The spatial retrieval method and apparatus provided in this application analyze spatial retrieval requests to determine the retrieval paradigm to which the spatial retrieval request belongs; determine the retrieval method corresponding to the retrieval paradigm and the data source corresponding to the retrieval method; perform spatial retrieval in the data source using the retrieval method to determine the spatial retrieval results; thereby, for spatial retrieval requests of different retrieval paradigms, the corresponding retrieval method is used for targeted spatial retrieval, organically integrating the advantages of various retrieval methods, covering the entire spatial retrieval scenario, and improving the accuracy and comprehensiveness of spatial retrieval results. Attached Figure Description
[0024] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is an exemplary system architecture diagram in which one embodiment of this application can be applied; Figure 2 This is a flowchart of an embodiment of the spatial retrieval method according to this application; Figure 3 This is a schematic diagram illustrating an application scenario of the spatial retrieval method according to this embodiment; Figure 4 This is a schematic diagram of the search process under the topic search method in this embodiment; Figure 5 This is a schematic diagram of the retrieval process under the hybrid retrieval method according to this embodiment; Figure 6 This is a flowchart of yet another embodiment of the spatial retrieval method according to this application; Figure 7 This is a flowchart of yet another embodiment of the spatial retrieval method according to this application; Figure 8 This is a flowchart of yet another embodiment of the spatial retrieval method according to this application; Figure 9 This is a structural diagram of one embodiment of the spatial retrieval device according to this application; Figure 10 This is a schematic diagram of the structure of a computer system suitable for implementing the embodiments of this application. Detailed Implementation
[0025] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0026] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0027] It should be noted that the technical solutions disclosed herein, including the collection, updating, analysis, processing, use, transmission, and storage of various types of information such as user personal information, all comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken to prevent unauthorized access to user personal information data and to safeguard user personal information security, network security, and national security.
[0028] Figure 1 An exemplary architecture 100 is shown that can be applied to the spatial retrieval method and apparatus of this application.
[0029] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. The communication connections between terminal devices 101, 102, and 103 form a network topology. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0030] Terminal devices 101, 102, and 103 can interact with server 105 via network 104 to receive or send data, etc. Terminal devices 101, 102, and 103 can be hardware or software that supports network connectivity for data interaction and processing. When terminal devices 101, 102, and 103 are hardware, they can be various electronic devices that support network connectivity, information acquisition, interaction, display, and processing functions, including but not limited to smartphones, tablets, e-book readers, laptops, and desktop computers. When terminal devices 101, 102, and 103 are software, they can be installed in the aforementioned electronic devices. They can be implemented as multiple software programs or software modules, for example, to provide distributed services, or as a single software program or software module. No specific limitations are made here.
[0031] Server 105 can be a server that provides various services, such as a backend processing server that performs targeted spatial searches using corresponding search methods for spatial search requests of different search paradigms sent by users through terminal devices 101, 102, and 103. As an example, server 105 can be a cloud server.
[0032] It should be noted that a server can be either hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software programs or software modules (such as software programs or software modules used to provide distributed services), or as a single software program or software module. No specific limitations are made here.
[0033] It should also be noted that the spatial retrieval method provided in the embodiments of this application is generally executed by a server, but the possibility of it being executed by a terminal device, or by a server and a terminal device cooperating with each other, is not excluded. Accordingly, all parts (e.g., units) of the spatial retrieval device can be set entirely in the server, all in the terminal device, or separately in the server and the terminal device.
[0034] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Any number of terminal devices, networks, and servers can be included depending on implementation needs. When the electronic devices on which the spatial retrieval method runs do not require data transmission with other electronic devices, the system architecture may consist only of the electronic devices on which the spatial retrieval method runs (e.g., servers or terminal devices).
[0035] Continue to refer to Figure 2 The diagram illustrates a flow 200 of an embodiment of a spatial retrieval method. Flow 200 includes the following steps: Step 201: parse the spatial retrieval request and determine the retrieval paradigm to which the spatial retrieval request belongs.
[0036] In this embodiment, the aforementioned execution entity can parse the spatial retrieval request and determine the retrieval paradigm to which the spatial retrieval request belongs.
[0037] A spatial retrieval request is a user-initiated query command directed to a geospatial context. It is used to query spatial objects, spatial relationships, or spatial distribution information within a geographical area. Commands can be expressed in natural language, short instructions, etc., and internally carry query intent information such as the spatial scope, query target, and query conditions. It serves as the raw input to the spatial retrieval system. Examples include querying the distribution of all public facilities in the eastern part of the city, finding spatial objects that meet certain conditions around a specified coordinate point, and counting the number of relevant geographic entities along a specified road.
[0038] A retrieval paradigm is a standardized retrieval processing model that is divided according to the type of query intent, query complexity, and information organization form after parsing a spatial retrieval request. Different retrieval paradigms correspond to different retrieval execution logic, data retrieval rules, and processing flows. By classifying retrieval paradigms, query tasks can be processed in a distributed manner.
[0039] For example, for queries involving a batch of spatial objects, a batch census-type retrieval paradigm is defined; for queries involving the proximity relationships of a single point, a neighborhood query-type retrieval paradigm is defined; and for complex spatial statistical queries involving multiple conditions, a composite statistical retrieval paradigm is defined.
[0040] As an example, firstly, the system receives the spatial retrieval request input by the user and performs basic text and instruction preprocessing operations: filtering invalid symbols and redundant content, and standardizing the instruction expression format; if it is a segmented request, it completes the sentence merging, removes interference information that has no actual query meaning, and outputs the standardized retrieval request text to provide clean input data for subsequent feature extraction.
[0041] Then, for the standardized retrieval request, features are decomposed and labeled from four independent dimensions to form the feature set of the request: (1) Spatial range characteristics: Identify the geographic spatial scale limited by the request, distinguish between three range types: large-scale query of the whole area, local area query, and small-scale query of a single point, and mark them accordingly; (2) Query target characteristics: Identify the form of the object to be queried in the request, and distinguish four types of target types: batch object collection, single spatial entity, spatial relationship, and statistical result; (3) Query action characteristics: Identify the user's core query behavior and distinguish four basic actions: traversal search, proximity search, quantity statistics, and attribute filtering; (4) Query complexity characteristics: Determine the number of limiting conditions contained in the request and distinguish between two complexity levels: simple single-condition query and multi-condition combination query.
[0042] Then, a pre-configured paradigm matching rule base is created. This rule base is based on the four types of parsing features mentioned above. Each rule corresponds to a unique combination of features, and each rule is uniquely bound to a retrieval paradigm. The rule base is grouped and sorted according to the query scenario, with clearly defined matching priorities to avoid conflicts between multiple rules.
[0043] Then, for the obtained set of request features, each feature is compared with the matching rules in the rule base according to the preset priority order: if the combination of request features completely matches a certain rule, the retrieval paradigm bound to that rule is directly determined as the retrieval paradigm to which the current spatial retrieval request belongs; if multiple rules partially match, the retrieval paradigm corresponding to the rule with the highest priority is selected according to the preset priority of the rules; if all rules do not match, the system default basic retrieval paradigm is used.
[0044] As another example, firstly, the original spatial retrieval request is obtained, and preprocessing operations such as typo correction, sentence structure regularization, and invalid content removal are completed; then, a spatial domain-specific semantic coding model is called to encode the complete request content, converting the natural language form of the retrieval request into a fixed-dimensional semantic vector, and using vector values to represent the overall query intent, scenario, and content characteristics of the request.
[0045] Then, a pre-trained spatial query semantic parsing model is used to perform deep parsing of the semantic vectors and the original request text: (1) Identify the business query scenario to which the request belongs, and distinguish scenario tags such as census, adjacency, statistics, and filtering; (2) Identify the core intent of the request and mark whether the query is biased towards data listing, relationship judgment or numerical calculation; (3) Based on the comprehensive analysis results, generate complete model input data containing scene labels, intent labels, and semantic vectors.
[0046] Then, a retrieval paradigm classification model specifically trained for spatial query scenarios is deployed. This model uses massive amounts of real spatial retrieval requests and manually labeled retrieval paradigms as training samples to learn the mapping relationship between different query semantics, scenarios and retrieval paradigms, and can complete automatic classification based on the parsing results.
[0047] Finally, the input data is imported into the classification model. The classification model performs inference calculations based on the mapping relationships learned during training, and outputs the confidence score corresponding to each retrieval paradigm. The paradigms are sorted from high to low confidence, and the paradigm with the highest confidence score that exceeds the preset confidence threshold is selected as the target retrieval paradigm for the current request; if the confidence scores of all paradigms are below the threshold, the system's general fallback paradigm is selected.
[0048] Step 202: Determine the retrieval method corresponding to the retrieval paradigm and the data source corresponding to the retrieval method.
[0049] In this embodiment, the aforementioned execution entity can determine the retrieval method corresponding to the retrieval paradigm and the data source corresponding to the retrieval method.
[0050] A retrieval method is a general term for the data retrieval logic, spatial operation rules, and query execution process set by a predetermined retrieval paradigm. Different retrieval paradigms are matched with specific retrieval methods to standardize the execution logic of data reading, operation, and preliminary screening.
[0051] For example, it adapts to the whole-area census paradigm by using a partitioned traversal retrieval method to retrieve and summarize data sequentially by geographical partition; it adapts to the location neighborhood paradigm by using a fixed-point adjacency retrieval method to retrieve surrounding data with the target location as the center; and it adapts to the composite statistics paradigm by using a combined operation retrieval method to link multiple types of operators to complete joint queries and calculations.
[0052] The data source is a collection of geospatial data divided according to storage architecture, index type, and data organization mode. Storage and indexing are optimized for different retrieval methods to provide a matching data carrier for retrieval execution.
[0053] For example, Example 1: A partitioned summary data source that stores data by geographic partition and has a corresponding partition index, which is adapted to partition traversal retrieval methods; a point-related data source with optimized point adjacency index, which is adapted to fixed-point adjacency retrieval methods; and a multidimensional statistical data source that integrates multidimensional spatial indicators and supports compound operations, which is adapted to combination operation retrieval methods.
[0054] As an example, firstly, a global static mapping table is pre-built and stored. The table uses the retrieval paradigm as the primary key, pre-binds a unique corresponding retrieval method for each paradigm, and binds a dedicated data source for each retrieval method. All correspondences are configured during the system initialization phase and remain unchanged during runtime.
[0055] Then, using the retrieval paradigm identifier output in step 201, the mapping table is queried to determine the corresponding retrieval method: If it is a full-area census paradigm, the matching partition traversal retrieval method is used to retrieve data block by block according to the preset geographical partitions to complete the full-area data traversal and summary; If it is a point-neighborhood paradigm, the matching fixed-point adjacency retrieval method is used to retrieve the adjacency space data within a set range based on the requested specified location; If it is a composite statistical paradigm, the matching and combination operation retrieval method calls multiple spatial operation operators to perform multi-condition joint queries and numerical calculations.
[0056] Then, based on the binding relationship between the retrieval method and the data source in the mapping table, the data carrier is allocated: The partitioned traversal retrieval method uses a partitioned summary data source, relying on partitioned storage and partitioned indexes to support large-scale block queries; The fixed-point adjacency retrieval method uses a point-related data source and relies on an optimized adjacency index to quickly locate surrounding data. The combined operation retrieval method selects a multi-dimensional statistical data source and relies on a multi-indicator integration structure to meet the data requirements of complex calculations.
[0057] As another example, firstly, the built-in dynamic retrieval strategy library is loaded, and the strategy library designs adaptation rules based on the model output results.
[0058] Then, based on the retrieval paradigm directly output by the semantic classification model in step 201, the corresponding retrieval method is matched in the dynamic strategy library: for the whole-domain census type paradigm, the partition traversal retrieval method is adopted; for the point neighborhood type paradigm, the fixed point adjacency retrieval method is adopted; for the composite statistical type paradigm, the combined operation retrieval method is adopted.
[0059] Then, based on the data retrieval and index usage requirements of the retrieval method, the corresponding data source is adaptively matched: for the partition traversal retrieval method, a partition summary data source is used; for the fixed-point adjacency retrieval method, a point-location association data source is used; and for the combined operation retrieval method, a multidimensional statistical data source is used.
[0060] In addition, a fallback mechanism is set up so that in abnormal scenarios, the partition traversal retrieval method and the partition summary data source are selected by default, and the results are output after verification.
[0061] Step 203: Perform a spatial search in the data source using a retrieval method to determine the spatial search results.
[0062] In this embodiment, the aforementioned execution entity can perform spatial retrieval in the data source using a retrieval method to determine the spatial retrieval results.
[0063] As an example, firstly, determine the retrieval method and corresponding data source determined in step 202 based on the global static mapping table, and at the same time read the execution parameters such as spatial range, location coordinates, and query limiting conditions contained in the original spatial retrieval request.
[0064] Then, connect to the specified data source and enable the corresponding index according to the retrieval method; according to the preset sharding rules, divide the entire query range into several fixed data batches and generate a task queue for serial execution.
[0065] Then, data is read from the data source in batches according to the queue order: for partition traversal retrieval, partition data is read sequentially according to the preset geographic segments; for fixed-point adjacency retrieval, data around the points is read layer by layer according to fixed ring batches; for combined operation retrieval, statistical dimension data is read in batches according to indicator groups.
[0066] Then, using the system's preset unified thresholds and judgment rules, data filtering and spatial calculations are performed, retaining only data that fully meets the hard conditions without dynamic adjustments. Finally, the valid data from each batch are aggregated and merged, arranged according to a preset global fixed order, and the data format and display fields are standardized.
[0067] As another example, after determining the retrieval method and corresponding data source, and reading the execution parameters such as spatial range, location coordinates, and query constraints contained in the original spatial retrieval request, the system connects to the specified data source and enables the corresponding index; based on the concurrency capability of the data source, it splits into multiple independent subtasks, starts multi-threaded parallel execution, and has no fixed sharding rules.
[0068] Then, multiple subtasks simultaneously pull data from the data source, synchronously covering the entire query range: for partition traversal retrieval, multiple partitions are read in parallel; for fixed-point adjacency retrieval, surrounding data is pulled in parallel from multiple directions; for combined operation retrieval, data is loaded in parallel from multiple indicator dimensions.
[0069] Then, the decision boundary is dynamically adapted based on the query conditions to complete data filtering and spatial calculation; the decision criteria can be fine-tuned within a reasonable range to improve the adaptability of the results.
[0070] Finally, the effective data of all parallel subtasks are merged, and a fixed order is no longer used; the comprehensive weight is calculated based on dimensions such as spatial distance and coverage, and the data is dynamically sorted according to the weight.
[0071] See also Figure 3 , Figure 3 This is a schematic diagram of application scenario 300 of the spatial retrieval method according to this embodiment. Figure 3 In the spatial retrieval scenario shown, user 301 sends a spatial retrieval request, "Parks suitable for family outings within 1KM," to server 303 via terminal device 302. The server parses the spatial retrieval request, determines information such as "1KM," "family outings," and "parks," and identifies the retrieval paradigm to which the spatial retrieval request belongs. It then determines the retrieval method corresponding to the retrieval paradigm and the data source corresponding to the retrieval method. Finally, it performs a spatial retrieval within the data source using the retrieval method to determine the spatial retrieval results.
[0072] In some implementations of this embodiment, the execution entity performs step 201 as follows to determine the retrieval paradigm: in response to parsing only the spatial retrieval primitives that hit the topic data source from the spatial retrieval request, the retrieval paradigm is determined to be a topic retrieval paradigm, wherein the topic data source is a data set including exclusive structured spatial attributes of target type interest points.
[0073] Spatial retrieval primitives are standardized query slot units parsed and extracted from users' natural language retrieval requests. They contain core query elements that can be mapped to structured fields, such as baseline location, spatial distance, point of interest type, and specific business attributes. They are the basic units for building structured queries.
[0074] For example, pharmacies, 24-hour operation, within 1 kilometer radius, parking available, and hospitals are all typical spatial retrieval primitives.
[0075] Thematic data sources are dedicated structured data tables created independently for a single specific point of interest type. They rely on a dynamically configured architecture to define exclusive fields and attributes. In addition to basic structured spatial attributes such as general spatial location, name, and address, they also have pre-set business attribute fields unique to that category, along with independent data tables and query logic. They are specifically designed to serve targeted retrieval for the corresponding category, which is different from general data sources that store POIs for all categories.
[0076] For example, the pharmacy-specific data source consists of an independent data table t_pharmacy, which stores the pharmacy's spatial coordinates, name, and address, and is configured with dedicated structured fields such as is_24h (whether it is open 24 hours a day).
[0077] Hospital-specific data source: Independent data table t_hospital, which stores the hospital's basic spatial attributes, and additionally configured with thematic attribute fields such as whether there are parking spaces, departments, and levels.
[0078] The data source for the convenience store topic is an independent data table t_convenience, which contains basic spatial information and dedicated structured fields such as business hours and main product categories.
[0079] In this implementation, the above-mentioned execution entity performs step 202 in the following manner to determine the retrieval method and data source: determine the topic retrieval method corresponding to the topic retrieval paradigm and the topic data source corresponding to the topic retrieval method, wherein the topic retrieval method represents spatial retrieval in the topic data source.
[0080] Continue to refer to Figure 4 The diagram illustrates the search process under the topic-based search method.
[0081] As an example, the system receives a natural language spatial retrieval request from the user, calls a large model (such as a large language model) to perform slot parsing, splits and extracts all spatial retrieval primitives from the spatial retrieval request one by one, and performs standardization and normalization processing on the primitive content.
[0082] Then, the topic metadata of the dynamic configuration layer is retrieved, and the interest point types, exclusive fields and data table mapping relationships corresponding to all registered topic data sources are loaded to build a topic type matching library.
[0083] Then, all the spatial retrieval primitives obtained from the parsing are compared and verified one by one with the topic type matching library to determine whether the query objects and attributes pointed to by all primitives belong to the same topic category.
[0084] If all spatial retrieval primitives only hit the category and specific attributes corresponding to a certain type of thematic data source, then the current retrieval request is determined to belong to the thematic retrieval paradigm.
[0085] Finally, based on the preset mapping relationship between the topic search paradigm, search method, and data source, a specific topic search method is matched, and the target topic data source corresponding to that paradigm is bound.
[0086] In this implementation, two dynamic models, PoiModelSchema and PoiModelField, are used to achieve configurable management of thematic locations, search fields, and physical data tables, allowing thematic expansion to be completed without modifying the core code.
[0087] The PoiModelSchema model is used to bind point-of-interest (POI) topic types to corresponding physical data tables, recording metadata such as topic name and data table name. Upon system startup, all topic configurations are automatically loaded, allowing the routing engine to quickly match and query the corresponding topic data tables.
[0088] The PoiModelField model is used for refined management of searchable fields under specific topics, defining field names, semantic descriptions, enumeration values, etc. For example, configuring dedicated attribute fields such as is_24h for pharmacies and has_parking for hospitals.
[0089] When adding new topics or expanding fields, only the configuration information of two models needs to be maintained. After parsing the spatial retrieval request, the semantics are mapped to standard fields based on the model metadata, and query statements are automatically generated. At the same time, it can assist in generating large model parsing prompts.
[0090] In this implementation, thematic queries are accurately identified and routed to thematic data sources. Customized structured fields are used to directly match business attributes, simplifying the query logic and improving the retrieval efficiency and accuracy of results in thematic scenarios.
[0091] In some implementations of this embodiment, the execution entity performs step 203 as follows to determine the spatial retrieval results: First, it constructs a query statement based on spatial retrieval primitives; then, it uses the query statement to determine spatial retrieval items in the topic data source; finally, it filters and sorts multiple spatial retrieval items based on the semantic matching degree between the retrieval item description text and the spatial retrieval request to generate spatial retrieval results, wherein the retrieval item description text is a natural language description text of the structured spatial attributes of the spatial retrieval item.
[0092] Spatial retrieval items are single points of interest data retrieved from thematic data sources. They contain complete structured spatial attributes, business thematic attributes, and basic information of the point and serve as the basic data unit for subsequent filtering and sorting.
[0093] As an example, firstly, by combining the parsed spatial retrieval primitives, the table structure, field names, and query syntax of the current topic data source are matched, and conditions such as location range, point type, and topic attributes are concatenated one by one to generate a structured query statement that can be executed directly, such as an SQL (Structured Query Language) statement.
[0094] Then, the generated query statement is submitted to the specified topic data source for execution, and multiple data entries that meet the basic conditions are read in batches to obtain the initial spatial retrieval item set.
[0095] Then, each spatial retrieval item is traversed, and all its structured spatial attributes and thematic attributes are extracted. These are then converted into fluent natural language description text according to a unified template or by using a large language model, thus fully restoring the information of each candidate point of interest.
[0096] Then, the descriptive text of each spatial search item is semantically compared with the spatial search request, and the matching score between the two is quantitatively calculated to reflect the degree of content fit.
[0097] Then, a reasonable matching threshold is set to eliminate invalid search terms with scores that do not meet the standard; the remaining valid search terms are sorted in descending order of semantic matching degree to obtain the final spatial search results.
[0098] In this implementation, structured queries based on thematic data sources are used to quickly retrieve data, and semantic matching is used to filter and sort the search items. This ensures retrieval speed while making the results more closely match the user's actual query intent.
[0099] In some implementations of this embodiment, the execution entity performs step 201 as follows to determine the retrieval paradigm: in response to parsing only the spatial retrieval primitives that do not match the topic data source from the spatial retrieval request, the retrieval paradigm is determined to be a general retrieval paradigm, wherein the topic data source is a data set including the exclusive structured spatial attributes of target type interest points.
[0100] In some implementations of this embodiment, the execution entity performs step 202 as follows to determine the retrieval method and data source: determining the general retrieval method corresponding to the general retrieval paradigm and the general data source corresponding to the general retrieval method, wherein the general retrieval method represents spatial retrieval in the general data source, and the general data source is a data set including general structured spatial attributes of various types of points of interest.
[0101] The general data source is a public structured spatial database that stores all categories of points of interest. It adopts a unified basic table structure and only retains all common fields of POIs, including basic spatial attributes such as point ID, name, address, type, and spatial geometric coordinates. It does not configure exclusive business fields for various types of points of interest and is designed for full-domain search scenarios without subdivided topic attributes.
[0102] Thematic data sources create independent tables for a single product category, equipped with dedicated business attribute fields, to serve targeted thematic queries; general data sources integrate all types of data points, with a unified table structure and concise fields, adaptable to general queries across categories and without special attribute requirements.
[0103] As an example, the system obtains the natural language spatial retrieval request submitted by the user, performs slot parsing through a large model, extracts all spatial retrieval primitives such as location, distance, and interest point type, and standardizes and organizes the primitive content.
[0104] Then, retrieve the category list, field identifiers and data table mapping relationships of all thematic data sources in the system, and compare and verify each parsed spatial retrieval primitive to determine whether the object and attribute pointed to by the primitive can hit any thematic data source.
[0105] After a full comparison, if none of the spatial search primitives match any category or specific attribute corresponding to any thematic data source, then the current search request is determined to belong to the general search paradigm.
[0106] Finally, based on the system's preset paradigms, retrieval methods, and data source mapping rules, the corresponding general retrieval methods are matched for the general retrieval paradigms, and a unified general data source is bound across the entire domain.
[0107] In this implementation, non-topic queries are automatically switched to general data source retrieval, adapting to basic query scenarios across all categories. The architecture is clearly divided, effectively broadening the applicability of spatial retrieval.
[0108] In some implementations of this embodiment, the execution entity performs step 203 as follows to determine the spatial retrieval results: constructing a query statement based on spatial retrieval primitives; using the query statement to determine spatial retrieval items in a general data source; filtering and sorting multiple spatial retrieval items based on the semantic matching degree between the retrieval item description text and the spatial retrieval request, and generating spatial retrieval results, wherein the retrieval item description text is a natural language description text of the structured spatial attributes of the spatial retrieval item.
[0109] This implementation method is similar to the retrieval process based on thematic data sources. First, it combines the parsed spatial retrieval primitives with the table structure, field names, and query syntax of the current general data source. It then concatenates conditions such as location range, point type, and thematic attributes one by one to generate a structured query statement that can be executed directly, such as an SQL (Structured Query Language) statement.
[0110] Then, the generated query statement is submitted to a general data source for execution, and multiple data entries that meet the basic conditions are read in batches to obtain the initial spatial retrieval item set.
[0111] Then, each spatial retrieval item is traversed, all its structured spatial attributes are extracted, and converted into fluent natural language description text according to a unified template or by using a large language model, so as to fully restore the information of each candidate point of interest.
[0112] Then, the descriptive text of each spatial search item is semantically compared with the spatial search request, and the matching score between the two is quantitatively calculated to reflect the degree of content fit.
[0113] Then, a reasonable matching threshold is set to eliminate invalid search terms with scores that do not meet the standard; the remaining valid search terms are sorted in descending order of semantic matching degree to obtain the final spatial search results.
[0114] In this implementation, structured queries based on general data sources are used to quickly retrieve data, and semantic matching is used to filter and sort the search items. This ensures retrieval speed while making the results more closely match the user's actual query intent.
[0115] In some implementations of this embodiment, the execution entity performs step 201 as follows to determine the retrieval paradigm: in response to parsing spatial retrieval primitives and unstructured semantic descriptions from the spatial retrieval request, the retrieval paradigm is determined to be a hybrid retrieval paradigm.
[0116] In this implementation, the above-mentioned execution entity performs step 202 in the following manner to determine the retrieval method and data source: determine the hybrid retrieval method corresponding to the hybrid retrieval paradigm and the hybrid data source corresponding to the hybrid retrieval method, wherein the hybrid retrieval method represents spatial retrieval in the hybrid data source, and the hybrid data source is associated with and stores the structured spatial attributes and unstructured semantic descriptions of candidate points of interest.
[0117] The hybrid data source employs a converged storage architecture, simultaneously hosting structured spatial attributes of points of interest, unstructured semantic description text, and corresponding semantic vectors. It integrates spatial and vector retrieval capabilities, retaining structured query fields such as point coordinates, addresses, and types, while also storing free text such as scene impressions, featured services, and subjective evaluations. It generates vector indexes for unstructured content and simultaneously supports spatial condition filtering and semantic similarity matching, distinguishing it from single-structured general-purpose data sources and thematic data sources.
[0118] Unstructured semantic descriptions in mixed data sources are semantic descriptions that cannot be structured. They refer to natural language content that cannot be organized into fixed database fields, enumeration values, or standard query conditions. They lack a unified data format and cannot be directly matched using conventional structured statements.
[0119] For example, descriptions such as "suitable for family outings", "comfortable dining atmosphere", "authentic taste of dishes", and "suitable for small gatherings with friends" are subjective feelings and scene preferences.
[0120] Continue to refer to Figure 5 The diagram illustrates the retrieval process under a hybrid retrieval method.
[0121] As an example, the system obtains users' natural language spatial retrieval requests, performs full content parsing based on a large model, and identifies two types of content: one is spatial retrieval primitives that can be mapped to fixed fields, and the other is free semantic descriptions that cannot be converted into structured conditions.
[0122] Then, when the parsing result contains both spatial retrieval primitives and unstructured semantic descriptions, the current request is determined to belong to a hybrid retrieval paradigm. Then, based on the system's preset mapping relationship, the corresponding hybrid retrieval method is matched for the hybrid retrieval paradigm, and the corresponding hybrid data source is located.
[0123] Finally, the hybrid data source is retrieved to confirm that the structured attributes of the points of interest, the original semantic description text, and the corresponding semantic vectors have been fully stored, thus completing the pre-retrieval preparation and moving on to the next execution stage.
[0124] In this implementation, spatial retrieval requests containing free semantics are identified and a hybrid data source is enabled. This approach takes into account both spatial conditions and semantic understanding, making up for the shortcomings of pure structured retrieval and adapting to diverse free query scenarios.
[0125] In some implementations of this embodiment, the execution entity performs step 203 as follows to determine the spatial retrieval results: constructing a query statement based on spatial retrieval primitives and determining the semantic vector of the semantic description in the spatial retrieval request; using the query statement to determine the first retrieval item from the mixed data source; determining the second retrieval item from the mixed data source based on the similarity between the semantic vector of the semantic description in the spatial retrieval request and the semantic vector of the candidate interest point; filtering and sorting multiple first retrieval items and multiple second retrieval items according to the semantic matching degree between the retrieval item description text and the spatial retrieval request to generate spatial retrieval results, wherein the retrieval item description text is the natural language description text of the structured spatial attributes and semantic description of the first retrieval item or the second retrieval item.
[0126] As an example, for spatial retrieval requests identified as belonging to a hybrid retrieval paradigm, we separate the structured spatial retrieval primitives from the unstructured semantic descriptions. Based on the spatial retrieval primitives, combined with the field rules of the hybrid data source and spatial index syntax, we write standard structured query statements; simultaneously, we invoke a vector embedding model to convert the semantic descriptions in the spatial retrieval request into corresponding request semantic vectors.
[0127] Then, the completed query statement is submitted to the hybrid data source for execution. Relying on the spatial index and structured field filtering capabilities of the data source, candidate data that meets hard conditions such as location, type, and range are selected. This part of the data set is the first search item.
[0128] Simultaneously, the semantic vectors of all candidate points of interest within the mixed data source are traversed, and their similarity to the requested semantic vector is calculated one by one. Data with highly consistent semantic content are selected according to the similarity value to form the second search item.
[0129] Then, the structured spatial attributes and unstructured semantic descriptions of the first and second search terms are extracted respectively, and integrated and converted into natural language search term description text according to a unified format. Next, a semantic matching verification is performed between the description text of all search terms and the original search request, and a matching threshold is set to remove low-relevance data; finally, the remaining search terms are uniformly sorted according to the comprehensive semantic matching degree.
[0130] Finally, the sorted search terms are formatted and integrated to generate the final spatial search results, which are then output externally.
[0131] In this implementation, data is retrieved through a dual-path approach combining structured query and vector similarity retrieval, and then semantic filtering and sorting are performed uniformly to balance spatial constraints and semantic requirements, thereby improving the overall matching effect of complex queries.
[0132] In some implementations of this embodiment, the hybrid data source is constructed as follows: collecting descriptive data of candidate interest points; extracting structured spatial attributes and unstructured semantic descriptions from the descriptive data; and associating and storing the semantic vectors of candidate interest points, structured spatial attributes, and semantic descriptions in the hybrid data source.
[0133] As an example, relying on diverse public channels such as online news, web page information, and article excerpts, raw descriptive data of various candidate points of interest are collected in batches. The content includes free text content such as location name, address, special features, supporting services, and business information, thus completing the aggregation of raw data sources.
[0134] Then, the information extraction and transformation module is invoked to split and extract effective content from the original text, initially forming semi-structured data, separating content such as point of interest names, detailed addresses, and textual descriptions. For address information, a geocoding service is invoked to accurately convert the text address into standard latitude and longitude coordinates, serving as the core structured spatial attribute.
[0135] Then, the extracted content is classified: fixed information such as location ID, name, address, latitude and longitude are defined as structured spatial attributes; content that cannot be mapped to fixed data table fields, such as venue features, experience evaluation, scene adaptation, and service characteristics, is defined as unstructured semantic descriptions.
[0136] Then, a unified vector embedding model is selected to vectorize all unstructured semantic description texts, generating one-to-one corresponding semantic vectors for subsequent semantic similarity retrieval.
[0137] Finally, a pre-defined storage engine, such as ElasticSearch, is used as the storage engine for the hybrid data source. Its ability to simultaneously support spatial, text, and vector storage is utilized to complete the data import. Basic attributes such as name and address are stored as text types, latitude and longitude as spatial types, and unstructured semantic descriptions and corresponding semantic vectors are stored together. This ensures that all data for a single point of interest is bound together, ultimately completing the construction of the hybrid data source.
[0138] In this implementation, data is collected from multiple sources and processed and stored in layers, integrating spatial, textual and vector data to provide a complete data source for hybrid retrieval. This supports the simultaneous implementation of spatial constraints and semantic retrieval, and provides comprehensive and accurate candidate data for hybrid retrieval methods.
[0139] The method provided in the above embodiments of this application determines the retrieval paradigm to which the spatial retrieval request belongs by parsing the spatial retrieval request; determines the retrieval method corresponding to the retrieval paradigm and the data source corresponding to the retrieval method; performs spatial retrieval in the data source using the retrieval method, and determines the spatial retrieval results. Thus, for spatial retrieval requests of different retrieval paradigms, the corresponding retrieval method is used for targeted spatial retrieval, organically integrating the advantages of various retrieval methods, covering the entire spatial retrieval scenario, and improving the accuracy and comprehensiveness of spatial retrieval results.
[0140] Continue to refer to Figure 6 The illustration shows a schematic flow 600 of another embodiment of the spatial retrieval method according to this application, including the following steps: Step 601: In response to parsing only the spatial retrieval primitives that hit the topic data source from the spatial retrieval request, the retrieval paradigm is determined to be the topic retrieval paradigm.
[0141] The thematic data source is a collection of data containing exclusive structured spatial attributes of target type points of interest.
[0142] Step 602: Determine the topic retrieval method corresponding to the topic retrieval paradigm and the topic data source corresponding to the topic retrieval method.
[0143] Thematic retrieval methods represent spatial retrieval within thematic data sources.
[0144] Step 603: Construct a query statement based on spatial retrieval primitives.
[0145] Step 604: Use a query statement to determine the spatial retrieval items in the topic data source.
[0146] Step 605: Based on the semantic matching degree between the search term description text and the spatial search request, filter and sort multiple spatial search terms to generate spatial search results.
[0147] The search term description text is a natural language description text of the structured spatial attributes of the spatial search term.
[0148] As can be seen from this embodiment, with Figure 2 Compared with the corresponding embodiments, the spatial retrieval method in this embodiment specifically illustrates the retrieval process based on topic retrieval methods, topic retrieval methods, and topic data sources, covering topic retrieval scenarios in the entire spatial retrieval scenario, and improving the accuracy and comprehensiveness of spatial retrieval results.
[0149] Continue to refer to Figure 7 The illustration shows a schematic flow 700 of another embodiment of the spatial retrieval method according to this application, including the following steps: Step 701: In response to parsing only the spatial retrieval primitives that did not hit the topic data source from the spatial retrieval request, the retrieval paradigm is determined to be a general retrieval paradigm.
[0150] The thematic data source is a collection of data containing exclusive structured spatial attributes of target type points of interest.
[0151] Step 702: Determine the general retrieval method corresponding to the general retrieval paradigm and the general data source corresponding to the general retrieval method.
[0152] The general retrieval method represents spatial retrieval performed on a general data source, which is a data set containing general structured spatial attributes of various types of points of interest.
[0153] Step 703: Construct a query statement based on spatial retrieval primitives.
[0154] Step 704: Use a query statement to determine the spatial retrieval items in the general data source.
[0155] Step 705: Based on the semantic matching degree between the search term description text and the spatial search request, filter and sort multiple spatial search terms to generate spatial search results.
[0156] The search term description text is a natural language description text of the structured spatial attributes of the spatial search term.
[0157] As can be seen from this embodiment, with Figure 2 Compared with the corresponding embodiments, the spatial retrieval method flow 700 in this embodiment specifically illustrates the retrieval process based on general retrieval methods, general retrieval methods, and general data sources, covering general retrieval scenarios in the entire spatial retrieval scenario, and improving the accuracy and comprehensiveness of spatial retrieval results.
[0158] Continue to refer to Figure 8 The illustration shows a schematic flow 800 of another embodiment of the spatial retrieval method according to this application, including the following steps: Step 801: In response to parsing spatial retrieval primitives and unstructured semantic descriptions from the spatial retrieval request, the retrieval paradigm is determined to be a hybrid retrieval paradigm.
[0159] The thematic data source is a collection of data containing exclusive structured spatial attributes of target type points of interest.
[0160] Step 802: Determine the hybrid retrieval method corresponding to the hybrid retrieval paradigm and the hybrid data source corresponding to the hybrid retrieval method.
[0161] Hybrid retrieval represents spatial retrieval performed in a hybrid data source, which contains structured spatial attributes and unstructured semantic descriptions of candidate points of interest.
[0162] Step 803: Construct a query statement based on the spatial retrieval primitives and determine the semantic vector of the semantic description in the spatial retrieval request.
[0163] Step 804: Use a query statement to determine the first search term from the mixed data source.
[0164] Step 805: Based on the similarity between the semantic vector of the semantic description in the spatial retrieval request and the semantic vector of the candidate interest point, determine the second retrieval item from the hybrid data source.
[0165] Step 806: Based on the semantic matching degree between the search term description text and the spatial search request, filter and sort multiple first search terms and multiple second search terms to generate spatial search results.
[0166] The search term description text is a natural language description text that provides a structured spatial attribute and semantic description of the first or second search term.
[0167] As can be seen from this embodiment, with Figure 2 Compared with the corresponding embodiments, the spatial retrieval method flowchart 800 in this embodiment specifically illustrates the retrieval process based on hybrid retrieval methods, hybrid retrieval methods, and hybrid data sources, covering hybrid retrieval scenarios in the entire spatial retrieval scenario, and improving the accuracy and comprehensiveness of spatial retrieval results.
[0168] Continue to refer to Figure 9 As an implementation of the methods shown in the above figures, this application provides an embodiment of a spatial retrieval device, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0169] like Figure 9 As shown, the spatial retrieval device 900 includes: a request parsing unit 901, configured to parse a spatial retrieval request and determine the retrieval paradigm to which the spatial retrieval request belongs; a mode determination unit 902, configured to determine the retrieval mode corresponding to the retrieval paradigm and the data source corresponding to the retrieval mode; and a spatial retrieval unit 903, configured to perform spatial retrieval in the data source using the retrieval mode and determine the spatial retrieval result.
[0170] In some implementations of this embodiment, the request parsing unit 901 is further configured to: in response to parsing only the spatial retrieval primitives that hit the topic data source from the spatial retrieval request, determine the retrieval paradigm as a topic retrieval paradigm, wherein the topic data source is a data set of exclusive structured spatial attributes including target type points of interest; and the method determination unit 902 is further configured to: determine the topic retrieval method corresponding to the topic retrieval paradigm and the topic data source corresponding to the topic retrieval method, wherein the topic retrieval method represents spatial retrieval performed in the topic data source.
[0171] In some implementations of this embodiment, the spatial retrieval unit 903 is further configured to: construct a query statement based on spatial retrieval primitives; use the query statement to determine spatial retrieval items in the topic data source; filter and sort multiple spatial retrieval items based on the semantic matching degree between the retrieval item description text and the spatial retrieval request, and generate spatial retrieval results, wherein the retrieval item description text is a natural language description text of the structured spatial attributes of the spatial retrieval item.
[0172] In some implementations of this embodiment, the request parsing unit 901 is further configured to: in response to parsing only the spatial retrieval primitives that did not hit the topic data source from the spatial retrieval request, determine the retrieval paradigm as a general retrieval paradigm, wherein the topic data source is a data set including the exclusive structured spatial attributes of target type points of interest; and the method determination unit 902 is further configured to: determine the general retrieval method corresponding to the general retrieval paradigm and the general data source corresponding to the general retrieval method, wherein the general retrieval method represents spatial retrieval in the general data source, and the general data source is a data set including the general structured spatial attributes of various types of points of interest.
[0173] In some implementations of this embodiment, the spatial retrieval unit 903 is further configured to: construct a query statement based on spatial retrieval primitives; determine spatial retrieval items in a general data source using the query statement; filter and sort multiple spatial retrieval items based on the semantic matching degree between the retrieval item description text and the spatial retrieval request, and generate spatial retrieval results, wherein the retrieval item description text is a natural language description text of the structured spatial attributes of the spatial retrieval item.
[0174] In some implementations of this embodiment, the request parsing unit 901 is further configured to: in response to parsing spatial retrieval primitives and unstructured semantic descriptions from a spatial retrieval request, determine that the retrieval paradigm is a hybrid retrieval paradigm; and the method determination unit 902 is further configured to: determine the hybrid retrieval method corresponding to the hybrid retrieval paradigm and the hybrid data source corresponding to the hybrid retrieval method, wherein the hybrid retrieval method represents spatial retrieval performed in the hybrid data source, and the hybrid data source is associated with and stores structured spatial attributes and unstructured semantic descriptions of candidate points of interest.
[0175] In some implementations of this embodiment, the spatial retrieval unit 903 is further configured to: construct a query statement based on spatial retrieval primitives and determine the semantic vector of the semantic description in the spatial retrieval request; use the query statement to determine a first retrieval item from the mixed data source; determine a second retrieval item from the mixed data source based on the similarity between the semantic vector of the semantic description in the spatial retrieval request and the semantic vector of the candidate interest point; and filter and sort multiple first retrieval items and multiple second retrieval items according to the semantic matching degree between the retrieval item description text and the spatial retrieval request to generate spatial retrieval results, wherein the retrieval item description text is a natural language description text of the structured spatial attributes and semantic description of the first retrieval item or the second retrieval item.
[0176] In some implementations of this embodiment, the hybrid data source is constructed as follows: collecting descriptive data of candidate interest points; extracting structured spatial attributes and unstructured semantic descriptions from the descriptive data; and associating and storing the semantic vectors of candidate interest points, structured spatial attributes, and semantic descriptions in the hybrid data source.
[0177] In this embodiment, the request parsing unit in the spatial retrieval device parses the spatial retrieval request and determines the retrieval paradigm to which the spatial retrieval request belongs. The method determination unit determines the retrieval method corresponding to the retrieval paradigm and the data source corresponding to the retrieval method. The spatial retrieval unit performs spatial retrieval in the data source using the retrieval method and determines the spatial retrieval results. Thus, for spatial retrieval requests of different retrieval paradigms, the corresponding retrieval method is used for targeted spatial retrieval, organically integrating the advantages of various retrieval methods, covering the entire spatial retrieval scenario, and improving the accuracy and comprehensiveness of the spatial retrieval results.
[0178] The following is for reference. Figure 10 It illustrates a device suitable for implementing embodiments of this application (e.g., Figure 1 The diagram shows the structure of the computer system 1000 of the devices 101, 102, 103, and 105. Figure 10 The device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0179] like Figure 10 As shown, the computer system 1000 includes a processor (e.g., CPU, Central Processing Unit) 1001, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1002 or a program loaded from storage portion 1008 into random access memory (RAM) 1003. The RAM 1003 also stores various programs and data required for the operation of the system 1000. The processor 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0180] The following components are connected to I / O interface 1005: an input section 1006 including a keyboard, mouse, etc.; an output section 1007 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to I / O interface 1005 as needed. A removable medium 1011, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 1010 as needed so that computer programs read from it can be installed into storage section 1008 as needed.
[0181] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1009, and / or installed from removable medium 1011. When the computer program is executed by processor 1001, it performs the functions defined in the methods of this application.
[0182] It should be noted that the computer-readable medium of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0183] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages—such as Java, Smalltalk, and C++—as well as conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the client computer, partially on the client computer, as a standalone software package, partially on the client computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the client computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0184] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0185] The units described in the embodiments of this application can be implemented in software or hardware. The described units can also be housed in a processor; for example, it can be described as: a processor including a request parsing unit, a mode determination unit, and a spatial retrieval unit. The names of these units do not necessarily limit the specific unit; for example, a spatial retrieval unit can also be described as "a unit of a spatial retrieval unit."
[0186] In another aspect, this application also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the computer device to: parse a spatial retrieval request, determine the retrieval paradigm to which the spatial retrieval request belongs; determine the retrieval method corresponding to the retrieval paradigm and the data source corresponding to the retrieval method; perform a spatial retrieval in the data source using the retrieval method, and determine the spatial retrieval result.
[0187] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. A spatial retrieval method, comprising: Parse the spatial retrieval request and determine the retrieval paradigm to which the spatial retrieval request belongs; Determine the retrieval method corresponding to the retrieval paradigm and the data source corresponding to the retrieval method; Spatial retrieval is performed in the data source using the aforementioned retrieval method to determine the spatial retrieval results.
2. The method according to claim 1, wherein, The parsing of the spatial retrieval request, determining the retrieval paradigm to which the spatial retrieval request belongs, includes: In response to parsing only spatial retrieval primitives that hit the topic data source from the spatial retrieval request, the retrieval paradigm is determined to be a topic retrieval paradigm, wherein the topic data source is a data set containing specific structured spatial attributes of target type interest points; and The step of determining the retrieval method corresponding to the retrieval paradigm and the data source corresponding to the retrieval method includes: Determine the topic retrieval method corresponding to the topic retrieval paradigm and the topic data source corresponding to the topic retrieval method, wherein the topic retrieval method represents spatial retrieval performed in the topic data source.
3. The method according to claim 2, wherein, The step of performing spatial retrieval in the data source using the aforementioned retrieval method and determining the spatial retrieval results includes: Construct a query statement based on the spatial retrieval primitives; Using the query statement, spatial retrieval items are determined in the thematic data source; Based on the semantic matching degree between the search term description text and the spatial search request, multiple spatial search terms are filtered and sorted to generate the spatial search results, wherein the search term description text is the natural language description text of the structured spatial attributes of the spatial search terms.
4. The method according to claim 1, wherein, The parsing of the spatial retrieval request, determining the retrieval paradigm to which the spatial retrieval request belongs, includes: In response to parsing only spatial retrieval primitives that did not match the topic data source from the spatial retrieval request, the retrieval paradigm is determined to be a general retrieval paradigm, wherein the topic data source is a data set containing specific structured spatial attributes of target type interest points; and The step of determining the retrieval method corresponding to the retrieval paradigm and the data source corresponding to the retrieval method includes: Determine the general retrieval method corresponding to the general retrieval paradigm and the general data source corresponding to the general retrieval method, wherein the general retrieval method represents spatial retrieval performed in the general data source, and the general data source is a data set including general structured spatial attributes of various types of points of interest.
5. The method according to claim 4, wherein, The step of performing spatial retrieval in the data source using the aforementioned retrieval method and determining the spatial retrieval results includes: Construct a query statement based on the spatial retrieval primitives; Using the query statement, spatial retrieval items are determined in the general data source; Based on the semantic matching degree between the search term description text and the spatial search request, multiple spatial search terms are filtered and sorted to generate the spatial search results, wherein the search term description text is the natural language description text of the structured spatial attributes of the spatial search terms.
6. The method according to claim 1, wherein, The parsing of the spatial retrieval request, determining the retrieval paradigm to which the spatial retrieval request belongs, includes: In response to parsing spatial retrieval primitives and unstructured semantic descriptions from the spatial retrieval request, the retrieval paradigm is determined to be a hybrid retrieval paradigm; and The step of determining the retrieval method corresponding to the retrieval paradigm and the data source corresponding to the retrieval method includes: Determine the hybrid retrieval method corresponding to the hybrid retrieval paradigm and the hybrid data source corresponding to the hybrid retrieval method, wherein the hybrid retrieval method represents spatial retrieval performed in the hybrid data source, and the hybrid data source stores a semantic vector containing structured spatial attributes and unstructured semantic descriptions of candidate points of interest.
7. The method according to claim 6, wherein, The step of performing spatial retrieval in the data source using the aforementioned retrieval method and determining the spatial retrieval results includes: A query statement is constructed based on the spatial retrieval primitives, and the semantic vector of the semantic description in the spatial retrieval request is determined; Using the query statement, the first search term is determined from the mixed data source; Based on the similarity between the semantic vector of the semantic description in the spatial retrieval request and the semantic vector of the candidate interest point, a second retrieval item is determined from the hybrid data source; Based on the semantic matching degree between the search term description text and the spatial search request, multiple first search terms and multiple second search terms are filtered and sorted to generate the spatial search results, wherein the search term description text is a natural language description text of the structured spatial attributes and semantic descriptions of the first search term or the second search term.
8. The method according to claim 6, wherein, The hybrid data source is constructed in the following manner: Collect descriptive data of candidate points of interest; Extract structured spatial attributes and unstructured semantic descriptions from the description data; The candidate interest points, the structured spatial attributes, and the semantic vector of the semantic description are associated and stored in the hybrid data source.
9. A spatial retrieval device, comprising: The request parsing unit is configured to parse spatial retrieval requests and determine the retrieval paradigm to which the spatial retrieval request belongs; The method determination unit is configured to determine the retrieval method corresponding to the retrieval paradigm and the data source corresponding to the retrieval method; A spatial retrieval unit is configured to perform a spatial retrieval in the data source using the retrieval method and determine the spatial retrieval results.
10. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed by the processor, it implements the method as described in any one of claims 1-8.
11. An electronic device, comprising: One or more processors; Storage device, on which one or more programs are stored, When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-8.
12. A computer program product, comprising: A computer program that, when executed by a processor, implements the method according to any one of claims 1-8.