POI data query method and device based on vector database and electronic equipment

The POI data query method based on vector database solves the problems of low POI data query efficiency, poor scalability and multiple data source merging problems in the existing technology, and achieves efficient storage and rapid retrieval of POI data.

CN119336792APending Publication Date: 2025-01-21CHERY AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411482647.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

The existing POI data query methods are inefficient and poorly scalable, making it difficult to deal with complex query problems such as data merging in multiple data sources.

Method used

Using the POI data query method based on the vector database, by obtaining the query request, it is judged whether the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data. If it is greater than or equal to the data volume of the first target POI data, the second target POI data is traversed and generated Vector query request, and use the preset data logical structure to query the vector database to obtain the query results.

Benefits of technology

It achieves efficient storage, fast retrieval and intelligent analysis of POI data, and solves the problems of low efficiency, poor scalability and difficulty in merging data from multiple data sources in the existing technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336792A_ABST
    Figure CN119336792A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of vehicle map navigation, in particular to a POI data query method and device based on a vector database and electronic equipment. The method comprises the steps of obtaining first target POI data and second target POI data based on a query request; based on the first target POI data and the second target POI data, judging whether the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data; if the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data, traversing the second target POI data to obtain a vector query request; and based on the vector query request, querying a vector database by using a preset data logic structure to obtain a query result corresponding to the query request. Therefore, by optimizing the data structure and algorithm design, the problems of low efficiency, poor expansibility, difficulty in coping with complex queries such as multi-data-source data merging and the like in the existing POI position query technology are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of vehicle map navigation, and in particular to a POI data query method, device and electronic equipment based on a vector database. Background Art

[0002] With the widespread application of Geographic Information System (GIS) and Location Based Services (LBS), the demand for processing and serving Points of Interest (POI) data is growing. POI data usually includes information about various locations (such as stores, restaurants, hospitals, scenic spots, etc.) and is widely used in navigation, recommendation systems, marketing analysis and other fields.

[0003] In the related art, the POI data query method mainly finds relevant POI data by searching for specific attribute keywords, and is suitable for finding places or facilities with specific attributes in a database.

[0004] However, this method faces challenges such as low efficiency, poor scalability, and difficulty in coping with complex queries such as merging data from multiple data sources, which need to be addressed urgently. Summary of the invention

[0005] The present application provides a POI data query method, device and electronic device based on a vector database to solve the problems of low efficiency, poor scalability, difficulty in coping with complex queries such as merging data from multiple data sources, etc. in the existing POI location query technology, and realize efficient storage, fast retrieval and intelligent analysis of POI data.

[0006] To achieve the above-mentioned purpose, the first embodiment of the present application proposes a POI data query method based on a vector database, comprising the following steps:

[0007] Acquire a query request, and obtain first target POI data and second target POI data based on the query request;

[0008] Based on the first target POI data and the second target POI data, determining whether the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data;

[0009] If the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data, traversing the second target POI data to obtain a vector query request;

[0010] Based on the vector query request, a vector database is queried using a preset data logic structure to obtain a query result corresponding to the query request.

[0011] According to an embodiment of the present application, obtaining the first target POI data and the second target POI data based on the query request includes:

[0012] Based on the query request, query the local POI database to obtain first target POI data;

[0013] Request parameters are constructed according to the query request, and an external POI cloud service provider interface is called based on the request parameters to obtain second target POI data matching the request parameters.

[0014] According to an embodiment of the present application, traversing the second target POI data to obtain a vector query request includes:

[0015] Traversing the second target POI data, and dividing it into text data and picture data;

[0016] Using a preset word vector model to convert words or phrases in the text data into a first feature vector, and using a preset convolutional neural network and a preset residual network model to convert high-dimensional image data in the picture data into a second feature vector;

[0017] The vector query request is generated according to the first feature vector and the second feature vector.

[0018] According to an embodiment of the present application, after obtaining the query result corresponding to the query request, the method further includes:

[0019] Determine whether there are records in the query result that are less than or equal to a preset threshold;

[0020] If there are records less than or equal to the preset threshold in the query result, the second target POI data is stored in the local POI database, and the first feature vector and the second feature vector are stored in the vector database; otherwise, the traversal of the second target POI data is terminated.

[0021] According to an embodiment of the present application, before obtaining the query request, the method further includes:

[0022] Get the current location coordinates of the vehicle, the preset query radius and the type of POI to be queried;

[0023] A request parameter is obtained based on the current position coordinates and the preset query radius, and the query request is generated according to the request parameter and the type of POI to be queried.

[0024] According to an embodiment of the present application, after determining whether the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data, the method further includes:

[0025] If the data volume of the second target POI data is less than the data volume of the first target POI data, a query result corresponding to the query request is returned.

[0026] According to the POI data query method based on the vector database proposed in the embodiment of the present application, by obtaining the query request, the first target POI data and the second target POI data can be obtained based on the query request, and it is determined whether the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data. If the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data, the second target POI data is traversed to obtain the vector query request; based on the vector query request, the vector database is queried using the preset data logic structure to obtain the query result corresponding to the query request. Therefore, by optimizing the data structure and algorithm design, the problems of low efficiency, poor scalability, difficulty in coping with complex queries such as merging data from multiple data sources, etc. in the existing POI location query technology are solved, and efficient storage, fast retrieval and intelligent analysis of POI data are achieved.

[0027] To achieve the above-mentioned purpose, a second embodiment of the present application proposes a POI data query device based on a vector database, comprising:

[0028] A first obtaining module, configured to obtain a query request, and obtain first target POI data and second target POI data based on the query request;

[0029] a judging module, configured to judge, based on the first target POI data and the second target POI data, whether the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data;

[0030] A second obtaining module, configured to traverse the second target POI data to obtain a vector query request when the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data;

[0031] The query module is used to query the vector database based on the vector query request using a preset data logic structure to obtain a query result corresponding to the query request.

[0032] According to an embodiment of the present application, the first obtaining module is specifically used to:

[0033] Based on the query request, query the local POI database to obtain first target POI data;

[0034] Request parameters are constructed according to the query request, and an external POI cloud service provider interface is called based on the request parameters to obtain second target POI data matching the request parameters.

[0035] According to an embodiment of the present application, the second obtaining module is specifically used to:

[0036] Traversing the second target POI data, and dividing it into text data and picture data;

[0037] Using a preset word vector model to convert words or phrases in the text data into a first feature vector, and using a preset convolutional neural network and a preset residual network model to convert high-dimensional image data in the picture data into a second feature vector;

[0038] The vector query request is generated according to the first feature vector and the second feature vector.

[0039] According to an embodiment of the present application, after obtaining the query result corresponding to the query request, the query module is further used to:

[0040] Determine whether there are records in the query result that are less than or equal to a preset threshold;

[0041] If there are records less than or equal to the preset threshold in the query result, the second target POI data is stored in the local POI database, and the first feature vector and the second feature vector are stored in the vector database; otherwise, the traversal of the second target POI data is terminated.

[0042] According to an embodiment of the present application, before obtaining the query request, the first obtaining module is further used to:

[0043] Get the current location coordinates of the vehicle, the preset query radius and the type of POI to be queried;

[0044] A request parameter is obtained based on the current position coordinates and the preset query radius, and the query request is generated according to the request parameter and the type of POI to be queried.

[0045] According to an embodiment of the present application, after determining whether the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data, the determination module is further configured to:

[0046] When the data volume of the second target POI data is less than the data volume of the first target POI data, a query result corresponding to the query request is returned.

[0047] According to the POI data query device based on the vector database proposed in the embodiment of the present application, by obtaining the query request, the first target POI data and the second target POI data can be obtained based on the query request, and it is determined whether the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data. If the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data, the second target POI data is traversed to obtain the vector query request; based on the vector query request, the vector database is queried using the preset data logic structure to obtain the query result corresponding to the query request. Therefore, by optimizing the data structure and algorithm design, the problems of low efficiency, poor scalability, difficulty in coping with complex queries such as merging data from multiple data sources, etc. in the existing POI location query technology are solved, and efficient storage, fast retrieval and intelligent analysis of POI data are achieved.

[0048] To achieve the above-mentioned objectives, the third aspect embodiment of the present application proposes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the POI data query method based on the vector database as described in the above embodiment.

[0049] To achieve the above objectives, the fourth aspect of the present application proposes a computer-readable storage medium on which a computer program is stored. The program is executed by a processor to implement the POI data query method based on the vector database as described in the above embodiment.

[0050] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0052] Figure 1 A flowchart of a POI data query method based on a vector database provided according to an embodiment of the present application;

[0053] Figure 2 is a schematic diagram of a POI data query system based on a vector database according to an embodiment of the present application;

[0054] Figure 3 A flowchart of another POI data query method based on a vector database provided according to an embodiment of the present application;

[0055] Figure 4 A block diagram of a POI data query device based on a vector database provided according to an embodiment of the present application;

[0056] Figure 5 It is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0057] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0058] The following describes a POI data query method, device and electronic device based on a vector database according to an embodiment of the present application with reference to the accompanying drawings.

[0059] Figure 1 It is a flowchart of a POI data query method based on a vector database according to an embodiment of the present application.

[0060] Before introducing the POI data query method based on a vector database proposed in the embodiment of the present application, a POI data query system based on a vector database involved in the method is briefly introduced.

[0061] like Figure 2As shown, the POI data query system based on the vector database is mainly composed of an LBS server, a POI database, a vector database, a POI cloud service (supplier), and a service gateway, wherein the LBS server is used to provide the actual program and logic implementation of the POI query service interface, and to provide the initialization implementation of local POI data; the POI database is used to store POI data records including POI record ID, GPS (Global Positioning System) coordinates, name, description, type, city, region, and other picture lists, etc.; the vector database is used to store vector values ​​converted from names, descriptions, and pictures, and to construct corresponding vector indexes and store IDs; the external POI cloud service refers to the POI query service interface provided by the map supplier, etc.; the service gateway is a server that directly exposes the service interface to the outside. The vector database provides superior performance than traditional relational databases by efficiently storing and retrieving multi-dimensional vector data, especially in processing high-dimensional data and complex queries. Using vector databases for POI data processing can not only improve the speed and accuracy of data retrieval, but also support more complex query requirements, such as geospatial search, similarity query, etc. At the same time, vector databases can play a greater role in large-scale POI data processing and provide intelligent service functions. In addition, the system can provide local (internal) and remote (external service provider) POI merge query services; local POI data storage, data disassembly and vectorized index management; external and internal POI data source management; and vector similarity threshold configuration services to meet the needs of various application scenarios.

[0062] The following is a detailed description of the POI data query method based on the vector database proposed in the embodiment of the present application.

[0063] For example, Figure 1 As shown, the POI data query method based on the vector database includes the following steps:

[0064] In step S101, a query request is acquired, and first target POI data and second target POI data are obtained based on the query request.

[0065] Among them, the query request refers to the search requirement entered by the user, which is used to guide the system to retrieve information. For example, the user can enter "the five most popular restaurants nearby" as a query request. POI data refers to the information of places with certain specific meanings or attractions (such as tourist attractions, restaurants, hotels, etc.). The data usually includes geographic location information, name, classification, and other relevant information that may be useful to users.

[0066] That is to say, the user can select the POI type to be queried through the car screen or mobile phone app, and send a query request to the system by entering the search keyword. For example, if the user wants to know all the restaurants or tourist attractions in a certain area, after receiving the query request, the system can retrieve the location information that meets the requirements from the database or other data sources based on the query request, that is, the first target POI data and the second target POI data.

[0067] As a possible implementation method, in some embodiments, obtaining the first target POI data and the second target POI data based on the query request includes: querying the local POI database based on the query request to obtain the first target POI data; constructing request parameters according to the query request, and calling the external POI cloud service provider interface based on the request parameters to obtain the second target POI data that matches the request parameters.

[0068] Specifically, after receiving the query request, the LBS server in the system can query the local POI database based on the POI type to be queried specified in the query request to obtain the first target POI data; at the same time, in order to further enrich and expand the query results, the LBS server assembles request parameters according to the query request, and the request parameters call the external POI cloud service provider interface. In this way, external resources can be used to obtain the second target POI data that matches the user's request parameters. The data usually comes from a wider geographical range or a more comprehensive POI information library, thereby providing users with more comprehensive and diverse results.

[0069] It can be seen that by combining the local POI database and the data provided by the external POI cloud service provider, it can ensure that users obtain the most comprehensive and accurate POI information, thereby improving the user experience and meeting the query needs.

[0070] Furthermore, in some embodiments, before obtaining the query request, it also includes: obtaining the current position coordinates of the vehicle, a preset query radius and the type of POI to be queried; obtaining request parameters based on the current position coordinates and the preset query radius, and generating a query request according to the request parameters and the type of POI to be queried.

[0071] Specifically, the client can obtain the current location coordinates (longitude and latitude) of the vehicle through the vehicle GPS system or other positioning devices, and then set a search range (i.e., preset query radius) and the specific location type to be searched (i.e., POI type, such as gas stations, restaurants, parking lots, etc.). Using the current location coordinates and the preset query radius and other information, the request parameters can be assembled, and these request parameters are combined with the POI type to be queried to generate a complete query request. This query request will be sent to the LBS service interface to obtain location information that meets the specific POI type around the current location of the vehicle.

[0072] Therefore, in this way, various service facilities around the vehicle can be effectively obtained, thereby providing convenience and assistance to users.

[0073] In step S102 , based on the first target POI data and the second target POI data, it is determined whether the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data.

[0074] That is to say, when performing data analysis, by comparing the first target POI data with the second target POI data, it can be determined whether the total amount of the second target POI data is greater than or equal to the total amount of the first target POI data, thereby providing a basis for further data analysis and decision-making.

[0075] In step S103 , if the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data, the second target POI data is traversed to obtain a vector query request.

[0076] Specifically, if the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data, the second target POI data can be traversed to generate a vector query request based on the detailed information such as the record type, name, description, and image record of the POI point of interest. The vector query request will contain all these key elements for accurate matching and retrieval in the database or search engine.

[0077] Thus, in this way, the relevance and accuracy of query results can be ensured, thereby improving user experience and satisfaction.

[0078] For ease of understanding, the following describes in detail how to obtain a vector query request.

[0079] As a possible implementation method, in some embodiments, traversing the second target POI data to obtain a vector query request includes: traversing the second target POI data to divide it into text data and image data; using a preset word vector model to convert words or phrases in the text data into a first feature vector, and using a preset convolutional neural network and a preset residual network model to convert high-dimensional image data in the image data into a second feature vector; generating a vector query request based on the first feature vector and the second feature vector.

[0080] Specifically, when traversing the second target POI data, in order to extract text data and image data from it, it can be divided in detail. This process involves classifying the information in the original data set to ensure that the text and image information are accurately separated. Next, the words or phrases in the text data can be processed by using the pre-set word vector model Word2Vec to convert these text information into a first feature vector. The Word2Vec model can capture the semantic relationship between words through training, thereby generating a numerical vector that can represent the text information. At the same time, for image data, preset convolutional neural networks (CNN) and residual networks (ResNet) models can be used to process high-dimensional image data. Convolutional neural networks are good at extracting features from images, while residual networks solve the gradient vanishing problem in deep networks by introducing residual connections, so that the network can be deeper, thereby extracting more complex and abstract features. Through these deep learning models, high-dimensional image data can be converted into a second feature vector, that is, a low-dimensional feature vector, for subsequent processing. Finally, by combining the first feature vector and the second feature vector, a comprehensive vector query request can be generated. The query request will contain feature information of text and images, enabling users to understand and retrieve target POI data more comprehensively, thus improving the accuracy and efficiency of data retrieval.

[0081] Furthermore, in some embodiments, after determining whether the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data, it also includes: if the data volume of the second target POI data is less than the data volume of the first target POI data, returning the query result corresponding to the query request.

[0082] It is understandable that by comparing the data volume of the first target POI data and the second target POI data, if the data volume of the second target POI data is less than the data volume of the first target POI data, this indicates that the local database has provided sufficient information to meet the user's query needs. In this case, the query result corresponding to the query request can be directly returned without waiting for the response of the external cloud service provider.

[0083] It can be seen that this method not only ensures the comprehensiveness of the query results, but also improves the query efficiency, ensuring that users can quickly obtain the required information.

[0084] In step S104, based on the vector query request, the vector database is queried using a preset data logic structure to obtain a query result corresponding to the query request.

[0085] The preset data logical structure refers to the schema. In the database, the schema is a pattern or structure that specifies how to organize and store data, including data types, fields, relationships, etc. Each POI record type corresponds to a different schema.

[0086] Specifically, when a query request is initiated, the system can identify the corresponding POI record type based on the information contained in the query request, and then select a schema that matches the POI record type from multiple preset data logical structure schemas. Next, the system will use this selected schema to query the vector database and finally obtain the result corresponding to the query request. This result not only contains data related to the query request, but also ensures the accuracy and relevance of the data, thereby meeting the needs of users.

[0087] Furthermore, in some embodiments, after obtaining the query results corresponding to the query request, it also includes: determining whether there are records in the query results that are less than or equal to a preset threshold; if there are records in the query results that are less than or equal to the preset threshold, storing the second target POI data in the local POI database, and storing the first feature vector and the second feature vector in the vector database, otherwise, ending the traversal of the second target POI data.

[0088] The preset threshold is a pre-set standard for evaluating the importance or relevance of a record. Users can flexibly set this threshold in the LBS management interface to adapt to different application scenarios and requirements.

[0089] Specifically, after receiving the user's query request and obtaining the corresponding query results, the system will perform a series of judgment and processing steps. First, the system will check each record in the query results to determine whether it is less than or equal to a preset threshold. If records less than or equal to the preset threshold are found in the query results, the system will perform further operations. First, the system will store the second target POI data in the local POI database to facilitate subsequent queries and accesses, and enrich the content of the local POI database; then, the system will also store the first feature vector and the second feature vector in the vector database to expand the vector database. On the contrary, if there are no records less than or equal to the preset threshold in the query results, the system will no longer continue to traverse the second target POI data.

[0090] In addition, after the local POI database is expanded through the above operations, the system can re-query the local POI database based on the query request generated by the request parameters, and return the obtained query result as the final result.

[0091] To facilitate those skilled in the art to further understand the POI data query method based on the vector database proposed in the embodiment of the present application, the following is a detailed description of the POI data query method based on the vector database proposed in the embodiment of the present application. Figure 3 For further elaboration.

[0092] like Figure 3 As shown, the POI data query method based on the vector database includes the following steps:

[0093] In step S301, the user selects the POI type to be queried through the vehicle screen or the mobile app, and enters the search keyword. The client obtains the GPS coordinates (longitude, latitude), query radius and other assembly request parameters, and requests the LBS service interface.

[0094] Step S302: The LBS server receives a request message requesting to query a local POI database.

[0095] Step S303: The LBS server calls the external POI cloud service provider interface according to the request parameters to query POI data of the specified POI type and range.

[0096] Step S304 , comparing the number of records found in the local POI database with that found in the external POI cloud service provider.

[0097] Step S305, determining whether the number of records found in the local POI database is greater than the number of records found in the external POI cloud service provider. If so, executing step S314, otherwise executing step S306.

[0098] Step S306, traverse the record list found by the external POI cloud service provider.

[0099] Step S307: Generate a vector query request according to the POI record type, name, description and picture record.

[0100] Step S308: Based on the vector query request, call the vector data of the specified schema to query the vector database.

[0101] Step S309, determine whether there are records exceeding the set threshold in the query result. If yes, execute step S311, otherwise execute step S310.

[0102] Step S310, the records found by the external POI cloud service provider processed in this loop are stored in the local POI database, and the POI vector features processed in this loop are stored in the vector database.

[0103] Step S311, determining whether there are any records to be processed in the record list found by the external POI cloud service provider. If yes, executing step S306, otherwise executing step S312.

[0104] Step S312, ending the traversal of the record list found by the external POI cloud service provider.

[0105] Step S313: re-request the local POI database according to the request parameters.

[0106] Step S314, assemble the POI query results and return.

[0107] According to the POI data query method based on the vector database proposed in the embodiment of the present application, by obtaining the query request, the first target POI data and the second target POI data can be obtained based on the query request, and it is determined whether the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data. If the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data, the second target POI data is traversed to obtain the vector query request; based on the vector query request, the vector database is queried using the preset data logic structure to obtain the query result corresponding to the query request. Therefore, by optimizing the data structure and algorithm design, the problems of low efficiency, poor scalability, difficulty in coping with complex queries such as merging data from multiple data sources, etc. in the existing POI location query technology are solved, and efficient storage, fast retrieval and intelligent analysis of POI data are achieved.

[0108] Next, a POI data query device based on a vector database proposed in accordance with an embodiment of the present application will be described with reference to the accompanying drawings.

[0109] Figure 4 It is a block diagram of a POI data query device based on a vector database according to an embodiment of the present application.

[0110] like Figure 4 As shown, the POI data query device 10 based on the vector database includes: a first obtaining module 100 , a judging module 200 , a second obtaining module 300 and a query module 400 .

[0111] The first obtaining module 100 is used to obtain a query request, and obtain the first target POI data and the second target POI data based on the query request;

[0112] A determination module 200, configured to determine whether the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data based on the first target POI data and the second target POI data;

[0113] The second obtaining module 300 is used to traverse the second target POI data to obtain a vector query request when the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data;

[0114] The query module 400 is used to query the vector database based on the vector query request using a preset data logic structure to obtain a query result corresponding to the query request.

[0115] Furthermore, in some embodiments, the first obtaining module 100 is specifically configured to:

[0116] Based on the query request, a local POI database is queried to obtain first target POI data;

[0117] Request parameters are constructed according to the query request, and an external POI cloud service provider interface is called based on the request parameters to obtain second target POI data matching the request parameters.

[0118] Further, in some embodiments, the second obtaining module 300 is specifically configured to:

[0119] Traversing the second target POI data, dividing it into text data and image data;

[0120] Using a preset word vector model to convert words or phrases in the text data into a first feature vector, and using a preset convolutional neural network and a preset residual network model to convert high-dimensional image data in the picture data into a second feature vector;

[0121] A vector query request is generated according to the first feature vector and the second feature vector.

[0122] Further, in some embodiments, after obtaining the query result corresponding to the query request, the query module 400 is further used to:

[0123] Determine whether there are records in the query results that are less than or equal to the preset threshold;

[0124] If there are records less than or equal to the preset threshold in the query result, the second target POI data is stored in the local POI database, and the first feature vector and the second feature vector are stored in the vector database; otherwise, the traversal of the second target POI data is terminated.

[0125] Furthermore, in some embodiments, before obtaining the query request, the first obtaining module 100 is further configured to:

[0126] Get the current location coordinates of the vehicle, the preset query radius and the type of POI to be queried;

[0127] The request parameters are obtained based on the current location coordinates and the preset query radius, and a query request is generated according to the request parameters and the type of POI to be queried.

[0128] Further, in some embodiments, after determining whether the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data, the determination module 200 is further configured to:

[0129] When the data volume of the second target POI data is less than the data volume of the first target POI data, a query result corresponding to the query request is returned.

[0130] It should be noted that the above explanation of the embodiment of the POI data query method based on a vector database is also applicable to the POI data query device based on a vector database of this embodiment, which will not be repeated here.

[0131] According to the POI data query device based on the vector database proposed in the embodiment of the present application, by obtaining the query request, the first target POI data and the second target POI data can be obtained based on the query request, and it is determined whether the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data. If the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data, the second target POI data is traversed to obtain the vector query request; based on the vector query request, the vector database is queried using the preset data logic structure to obtain the query result corresponding to the query request. Therefore, by optimizing the data structure and algorithm design, the problems of low efficiency, poor scalability, difficulty in coping with complex queries such as merging data from multiple data sources, etc. in the existing POI location query technology are solved, and efficient storage, fast retrieval and intelligent analysis of POI data are achieved.

[0132] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:

[0133] A memory 501 , a processor 502 , and a computer program stored in the memory 501 and executable on the processor 502 .

[0134] When the processor 502 executes the program, the POI data query method based on the vector database provided in the above embodiment is implemented.

[0135] Furthermore, the electronic device further comprises:

[0136] The communication interface 503 is used for communication between the memory 501 and the processor 502 .

[0137] The memory 501 is used to store computer programs that can be executed on the processor 502 .

[0138] The memory 501 may include a high-speed RAM (Random Access Memory) memory, and may also include a non-volatile memory, such as at least one disk memory.

[0139] If the memory 501, the processor 502 and the communication interface 503 are implemented independently, the communication interface 503, the memory 501 and the processor 502 can be connected to each other through a bus and communicate with each other. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0140] Optionally, in a specific implementation, if the memory 501, the processor 502 and the communication interface 503 are integrated on a chip, the memory 501, the processor 502 and the communication interface 503 can communicate with each other through an internal interface.

[0141] The processor 502 may be a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.

[0142] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned POI data query method based on a vector database.

[0143] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0144] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0145] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A POI data query method based on a vector database, characterized in that: The following steps are involved: Acquire a query request, and obtain first target POI data and second target POI data based on the query request; Based on the first target POI data and the second target POI data, determining whether the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data; If the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data, traversing the second target POI data to obtain a vector query request; Based on the vector query request, a vector database is queried using a preset data logic structure to obtain a query result corresponding to the query request.

2. The method according to claim 1, characterized in that: The obtaining the first target POI data and the second target POI data based on the query request includes: Based on the query request, query the local POI database to obtain first target POI data; Request parameters are constructed according to the query request, and an external POI cloud service provider interface is called based on the request parameters to obtain second target POI data matching the request parameters.

3. The method according to claim 1, characterized in that The traversing the second target POI data to obtain a vector query request includes: Traversing the second target POI data, and dividing it into text data and picture data; Using a preset word vector model to convert words or phrases in the text data into a first feature vector, and using a preset convolutional neural network and a preset residual network model to convert high-dimensional image data in the picture data into a second feature vector; The vector query request is generated according to the first feature vector and the second feature vector.

4. The method according to claim 3, characterized in that After obtaining the query result corresponding to the query request, the method further includes: Determine whether there are records in the query result that are less than or equal to a preset threshold; If there are records less than or equal to the preset threshold in the query result, the second target POI data is stored in the local POI database, and the first feature vector and the second feature vector are stored in the vector database; otherwise, the traversal of the second target POI data is terminated.

5. The method according to claim 1, characterized in that Before obtaining the query request, the method further includes: Get the current location coordinates of the vehicle, the preset query radius and the type of POI to be queried; A request parameter is obtained based on the current position coordinates and the preset query radius, and the query request is generated according to the request parameter and the type of POI to be queried.

6. The method according to claim 1, characterized in that After determining whether the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data, the method further includes: If the data volume of the second target POI data is less than the data volume of the first target POI data, a query result corresponding to the query request is returned.

7. A POI data query device based on a vector database, characterized in that: include: A first obtaining module, configured to obtain a query request, and obtain first target POI data and second target POI data based on the query request; a judging module, configured to judge, based on the first target POI data and the second target POI data, whether the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data; A second obtaining module, configured to traverse the second target POI data to obtain a vector query request when the data volume of the second target POI data is greater than or equal to the data volume of the first target POI data; The query module is used to query the vector database based on the vector query request using a preset data logic structure to obtain a query result corresponding to the query request.

8. The device according to claim 7, characterized in that The first obtaining module is specifically used for: Based on the query request, query the local POI database to obtain first target POI data; Request parameters are constructed according to the query request, and an external POI cloud service provider interface is called based on the request parameters to obtain second target POI data matching the request parameters.

9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the POI data query method based on a vector database as described in any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the POI data query method based on a vector database as described in any one of claims 1 to 6.