Map search method, device, server, terminal, and storage medium

The user's natural language search content is converted into search demand information through a generative language model, which solves the problem of difficulty in understanding user needs in map applications and achieves more accurate and efficient search result recommendations.

WO2024222198A1PCT designated stage expired Publication Date: 2024-10-31TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Application Number
PCT/CN2024/079657
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-28
Filing Date
2024-03-01
Publication Date
2024-10-31

AI Technical Summary

Technical Problem

It is difficult for existing map applications to accurately understand user needs when users enter queries, resulting in search results that do not meet user intentions and require users to adjust the input text to obtain satisfactory results.

Method used

A generative language model is used to convert the user's natural language search content into search demand information, and the matching results are queried from the preset map database and the search results are fed back to the terminal to improve the accuracy and efficiency of the search results.

Benefits of technology

By deeply understanding the user's search intentions, we provide real and reliable search results, improve the efficiency of map search, and reduce the need for users to adjust input text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024079657_31102024_PF_FP_ABST
    Figure CN2024079657_31102024_PF_FP_ABST
Patent Text Reader

Abstract

A map search method, executed by a server, the method comprising: acquiring a map search request sent by a terminal, wherein the map search request comprises map search content, and the map search content is natural language content (401); in response to the map search request, inputting the map search content into a generative language model to obtain search demand information generated by the generative language model, the search demand information being used for representing a search requirement of the map search content (402); querying, from a preset map database, a search result matching the search demand information (403); and feeding back the search result to the terminal, so that the terminal displays the search result in a map interface (404).
Need to check novelty before this filing date? Find Prior Art

Description

Map search method, device, server, terminal and storage medium

[0001] Related applications

[0002] This application claims priority to Chinese patent application number 2023104829732, filed on April 28, 2023, entitled “Map Search Method, Device, Server, Terminal and Storage Medium,” the entire text of which is incorporated herein by reference. Technical Field

[0003] The embodiments of the present application relate to the field of computer technology, and in particular to a map search method, device, server, terminal, and storage medium. Background Art

[0004] Map applications are widely used in life scenarios, providing people with services such as location search and route navigation.

[0005] In related technologies, a user enters a query text or voice in the search bar of a map application, and the map application returns multiple candidate locations for the user to select and view; or the user selects a location and queries for a navigation route, and the map application returns multiple feasible route plans based on the travel method specified by the user.

[0006] However, using the above methods for location search or route navigation is inefficient. For example, the map application may not fully understand the user's needs, requiring the user to manually adjust the query keywords to return search results that meet the user's needs.

[0007] Summary of the Invention

[0008] The present invention provides a map search method, device, server, terminal, and storage medium. The technical solution is as follows:

[0009] In one aspect, an embodiment of the present application provides a map search method, which is executed by a server, and the method includes:

[0010] Acquire a map search request sent by a terminal, wherein the map search request includes map search content, and the map search content is natural language content;

[0011] In response to the map search request, inputting the map search content into a generative language model to obtain search requirement information generated by the generative language model, wherein the search requirement information is used to represent the search requirement of the map search content;

[0012] Querying a preset map database for search results that match the search requirement information; and

[0013] Feedback the search results to the terminal so that the terminal displays the search results in the map interface.

[0014] In one aspect, an embodiment of the present application provides another map search method, which is executed by a terminal, and the method includes:

[0015] The obtained map search content is natural language content;

[0016] sending a map search request containing the map search content to a server, wherein the map search request is used to instruct the server to input the map search content into a generative language model, obtain search requirement information generated by the generative language model, and query a preset map database for search results matching the search requirement information, wherein the search requirement information is used to represent the search requirement for the map search content; and

[0017] The search results fed back by the server are displayed in a map interface.

[0018] On the other hand, an embodiment of the present application provides a map search device, the device comprising:

[0019] An acquisition module, configured to acquire a map search request sent by a terminal, wherein the map search request includes map search content, and the map search text is natural language content;

[0020] a generating module configured to, in response to the map search request, input the map search content into a generative language model to obtain search requirement information generated by the generative language model, wherein the search requirement information is used to represent the search requirement of the map search content;

[0021] A matching module, configured to search a preset map database for search results that match the search requirement information; and

[0022] The feedback module is used to feed back the search results to the terminal so that the terminal displays the search results in the map interface.

[0023] On the other hand, an embodiment of the present application provides another map search device, the device comprising:

[0024] An acquisition module, configured to acquire map search content, wherein the map search content is natural language content;

[0025] a sending module, configured to send a map search request containing the map search content to a server, wherein the map search request is used to instruct the server to input the map search content into a generative language model, obtain search requirement information generated by the generative language model, and query a preset map database for search results matching the search requirement information, wherein the search requirement information is used to represent the search requirement for the map search content;

[0026] A display module is used to display the search results fed back by the server in a map interface.

[0027] On the other hand, an embodiment of the present application provides a server, which includes a processor and a memory, wherein the memory stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the map search method described in any of the above embodiments.

[0028] On the other hand, an embodiment of the present application provides a terminal, which includes a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the map search method as described in the above aspect.

[0029] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one instruction, and the instruction is loaded and executed by a processor to implement the map search method as described in the above aspects.

[0030] In another aspect, an embodiment of the present application provides a computer program product, comprising computer instructions stored in a computer-readable storage medium. A processor of a terminal reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the terminal to perform the methods provided in various optional implementations of the above aspects.

[0031] The details of one or more embodiments of the present application are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the present application will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0033] FIG1 is a schematic diagram of a map search process based on input text in the related art;

[0034] FIG2 is a schematic diagram of a map search process based on adjusted input text in the related art;

[0035] FIG3 is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;

[0036] FIG4 is a flowchart of a map search method provided by an exemplary embodiment of the present application;

[0037] FIG5 is a flowchart of determining search results provided by an exemplary embodiment of the present application;

[0038] FIG6 is a schematic diagram of determining search results provided by an exemplary embodiment of the present application;

[0039] FIG7 is a schematic diagram of fine-tuning a pre-trained generative language model using a training sample containing first prompt information provided by an exemplary embodiment of the present application;

[0040] FIG8 is a schematic diagram of determining classification label information based on real-time location prompt information provided by an exemplary embodiment of the present application;

[0041] FIG9 is a schematic diagram of determining demand description information based on real-time location prompt information provided by an exemplary embodiment of the present application;

[0042] FIG10 is a schematic diagram of displaying interactive information provided by an exemplary embodiment of the present application;

[0043] FIG11 is a schematic diagram of fine-tuning a pre-trained generative language model using training samples containing third prompt information provided by an exemplary embodiment of the present application;

[0044] FIG12 is a structural block diagram of a map search device provided by an exemplary embodiment of the present application;

[0045] FIG13 is a flowchart of a map search method provided by another exemplary embodiment of the present application;

[0046] FIG14 is a structural block diagram of a map search device provided by another exemplary embodiment of the present application;

[0047] FIG15 is a schematic structural diagram of a computer device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

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

[0049] In the related art, when a user enters a query text or voice in a search bar of a map application and the map application returns results for the user to select and view, the results may not meet the user's needs.

[0050] See FIG1 , which is a schematic diagram of a map search process based on input text in the related art.

[0051] When a user enters the text "delicious pigeon restaurant in area A" in the search bar 110, the map application returns a prompt box 120 saying "No results found. We found results related to "delicious" for you:". It then recommends three restaurants 131, 132, and 133 whose names contain the word "delicious" to the user. None of them is the pigeon restaurant in area A that the user needs.

[0052] As shown in Figure 1, the map application misunderstood the user's intention and focused the search on the adjective "delicious" instead of the "Area A" and "pigeon shop" that the user needed. Therefore, the user needs to adjust the input text to obtain more accurate search results.

[0053] See FIG. 2 , which is a schematic diagram of a map search process based on adjusted input text in the related art.

[0054] As shown in Figure 2, when the user adjusts the input text in the search bar 210 to "Which squab shops are there in area A?", the map application recommends three squab shops 221, 222, and 223 to the user. Among them, the squab shop 221 is named "XXXA squab shop (B area branch)", which shows that it is a squab shop located in area B of city C. It appears in the recommendation list just because the name includes the word "A", but it does not meet the user's intended need to be located in area A. The squab shop 222 is named "A squab shop old store (A area main store)", which shows that it is a squab shop located in area A of city C. However, the comprehensive rating of the store is only two stars, so it does not meet the user's intended "delicious" feature. The squab shop 223 is named "XXA squab king", which also appears in the recommendation list because the name includes the word "A", but it may not actually be located in area A.

[0055] As shown in FIG. 2 , even if the user adjusts the input text, the map application may still not be able to understand the user's intention well and return search results that satisfy the user.

[0056] In order to more deeply understand the needs of users and recommend real, reliable and effective search results to users, the present application proposes a map search method, which includes: obtaining a map search request sent by a terminal; in response to the map search request, inputting the map search content into a generative language model to obtain search requirement information generated by the generative language model; querying search results that match the search requirement information from a preset map database; and feeding back the search results to the terminal so that the terminal displays the search results in a map interface.

[0057] FIG3 is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application.

[0058] The implementation environment includes a terminal 310 , a server 320 , a generative language model 330 , and a map database 340 .

[0059] Terminal 310 is an electronic device capable of running a map application. This electronic device can be a mobile terminal such as a smartphone, tablet computer, laptop computer, or in-vehicle terminal, or a terminal such as a desktop computer or projection computer. For example, if terminal 310 is an in-vehicle terminal, terminal 310 can obtain map search results entered by a user via voice input. Another example is if terminal 310 is a smartphone, terminal 310 can obtain map search results entered via text in a map interface. The following description uses a smartphone as an example, but this is not intended to be limiting.

[0060] In some embodiments, the terminal 310 generates a map search request based on the user's search for content on the map, and transmits the map search request to the server 320. The server 320 feeds back the corresponding search results to the terminal so that the terminal displays the search results in the map interface.

[0061] Server 320 is the backend server for the map application. Server 320 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0062] In some embodiments, the server 320 transmits the map search content to the generative language model 330 , and the generative language model 330 generates search requirement information corresponding to the map search content.

[0063] Generative language model 330 refers to a machine learning model pre-trained on a large-scale text corpus, for example, a Generative Pre-trained Transformer (GPT) model, including GPT-1, GPT-2, GPT-3, GPT-3.5, GPT-4, and subsequent iterations thereof.

[0064] The GPT model is a large language model pre-trained by OpenAI based on a massive training sample and parameter system. Taking GPT-3 as an example, its model training layer depth reaches 96, the hidden layer dimension reaches 12,288, and the number of parameters reaches 175 billion, which can generate relatively complex, coherent, and creative text.

[0065] The training process of the GPT model is divided into two stages. The first stage is unsupervised pre-training using a large-scale unlabeled text corpus, and the second stage is supervised fine-tuning using labeled text corpus for specific downstream tasks.

[0066] In some embodiments, the generative language model 330 may be configured in the server 320 or in other servers, and may be called by the server 320 through a corresponding interface.

[0067] In some embodiments, the server 320 queries the map database 340 for search results that match the search requirement information.

[0068] The map database 340 is a database based on digitized map data. In some embodiments, the map database includes point of interest (POI) data, location-based services (LBS) data, and navigation data.

[0069] Optionally, the sources of data in the map database may include satellite data, road network data, surveying and mapping data, crowd-sourced data, etc.

[0070] Optionally, the source of data in the map database may also include Internet data, user search data, user feedback data, etc. For example, the map database may include data such as user reviews of businesses and ratings of places collected on the Internet.

[0071] Optionally, the data in the map database is updated in real time. For example, the map database may include real-time traffic flow, traffic lights, road congestion, and other real-time updated road conditions. Another example is that the map database may include real-time updated POI data. When the address, name, contact information, and other information of the POI changes, the content in the map database will be updated promptly.

[0072] In some embodiments, the map database 340 may be an independent database or may be configured in the server 320 .

[0073] It should be noted that the above embodiment only describes the general architecture of the implementation environment. The system may also include more or fewer components, or combine certain components, and this embodiment does not limit this.

[0074] FIG4 is a flow chart of a map search method provided by an exemplary embodiment of the present application. The method includes the following steps:

[0075] Step 401: Obtain a map search request sent by a terminal. The map search request includes map search content, and the map search text is natural language content.

[0076] A terminal is an electronic device that can run a map application. This electronic device can be a mobile terminal such as a smartphone, tablet computer, laptop computer, or vehicle-mounted terminal, or a terminal such as a desktop computer or projection computer.

[0077] A map search request is a request sent by a terminal to a server. The map search request includes map search content, which is natural language content.

[0078] Optionally, the map search request is a query request for a location, or a query request for a navigation route.

[0079] Optionally, the map search content is natural language text entered by the user through the text search bar in the map interface.

[0080] Optionally, the map search content is natural language audio input by the user in the vehicle terminal.

[0081] For example, the map search content may be one or more words, phrases, sentences, or paragraphs used for map search. For example, the map search content may be "The best pigeon restaurant in area A," or "The architecture of city D has both a quaint and modern feel. Please plan a tour route for out-of-town tourists from scenic spot E to street F, passing through at least one other scenic spot in city D."

[0082] For example, the map search content can be a direct description of the map search demand, such as "Help me find a mid-range Cantonese restaurant", "Which hospitals in City C can perform corneal cross-linking surgery"; it can also be an indirect description of the map search demand, such as "The temperature continues to be high during the Labor Day holiday. Instead of traveling far away, it is better to meet friends for tea in the air-conditioned room."

[0083] Step 402: In response to a map search request, the map search content is input into a generative language model to obtain search requirement information generated by the generative language model. The search requirement information is used to represent the search requirement of the map search content.

[0084] Search requirement information is used to classify or describe map search requirements. In some embodiments, the search requirement information may include classification label information. For example, the administrative division or location category to which the map search requirement belongs. In some embodiments, the search requirement information may include requirement description information. For example, the environmental characteristics or atmosphere characteristics of the map search requirement. In some embodiments, the search requirement information may be natural language text, such as one or more words, phrases, sentences, or paragraphs.

[0085] Step 403: Searching for search results matching the search requirement information from a preset map database.

[0086] The map database is a database based on digitized map data. In some embodiments, the map database includes point of interest (POI) data, location-based services (LBS) data, and navigation data.

[0087] Optionally, the sources of data in the map database may include satellite data, road network data, surveying and mapping data, crowd-sourced data, etc.

[0088] Optionally, the source of data in the map database may also include Internet data, user search data, user feedback data, etc. For example, the map database may include data such as user reviews of businesses and ratings of places collected on the Internet.

[0089] Optionally, the data in the map database is updated in real time. For example, the map database may include real-time traffic flow, traffic lights, road congestion, and other real-time updated road conditions. Another example is that the map database may include real-time updated POI data. When the address, name, contact information, and other information of the POI changes, the content in the map database will be updated promptly.

[0090] The search results that match the search requirement information refer to the search results that meet the search requirements of the map search content.

[0091] Optionally, the search result is one or more search results. For example, when the map search content is "the best squab shop in area A", the search result matching the search requirement information may be a squab shop with the highest overall ranking, or may be multiple squab shops with high overall rankings (such as the top 3).

[0092] In a possible implementation, the server may determine a location query statement or a navigation route query statement based on the search requirement information, and query the map database for search results that match the search requirement information based on the location query statement or the navigation route query statement.

[0093] For example, the location query statement or navigation route query statement may be a DSL statement or an SQL statement.

[0094] Step 404: Feedback the search results to the terminal so that the terminal displays the search results in a map interface.

[0095] Optionally, the map interface is an interface corresponding to a map application in the terminal, or an interface corresponding to a map applet.

[0096] In one possible implementation, the terminal displays search results in the form of locations on a map interface. For example, when the map search content is "the best pigeon shop in area A", the terminal displays the location of the pigeon shop with the highest overall ranking on the map interface, and displays other information about the pigeon shop.

[0097] In one possible implementation, the terminal displays the search results in a list on the map interface. For example, when the map search content is "the best pigeon shop in area A", the terminal displays thumbnails of the top three pigeon shops in descending order of comprehensive scores in the map interface.

[0098] In one possible implementation, the terminal displays search results as navigation routes on a map interface. For example, if the map search query is "tourist routes that include attraction E and street F," the terminal displays a map of City D on the map interface and visually identifies one or more recommended tourist routes that include attraction E and street F. If multiple routes are available, they can be assigned different colors or shades based on their overall scores.

[0099] The terminal may also display search results in other forms in the map interface, and this specification does not limit this.

[0100] In summary, generating search demand information through a generative language model and querying search results from a map database based on the search demand information can help us deeply understand the user's search intent, recommend real and reliable search results to users, and improve the efficiency of map search.

[0101] In order to deeply understand the user's search intent and recommend results that meet the user's needs, a generative language model can be combined to determine the search results.

[0102] Refer to FIG5 , which is a flowchart of determining search results provided by an exemplary embodiment of the present application, including the following steps.

[0103] Step 501: In response to the map search request, the map search content is input into a generative language model to obtain classification label information and requirement description information generated by the generative language model.

[0104] The classification label information includes at least one classification label corresponding to the search requirement, and the classification label is a label used by the map database to classify map elements.

[0105] Optionally, when the search result is a place, the classification label can be the administrative division label of the search result. For example, for the map search content "the best pigeon shop in area A", the classification labels can be "City C" and "Area A". Optionally, the classification label can include multiple levels of labels. Optionally, the administrative division label can be determined based on the postal code corresponding to the administrative division. For example, the administrative division label can include a first-level administrative division label "518000" to represent City C and a second-level administrative division label "518107" to represent Area A.

[0106] Optionally, when the search result is a location, the classification label may be a location attribute label of the search result. For example, for the map search content "the best pigeon restaurant in area A", the location attribute label may include a first-level location attribute label "restaurant" and a second-level location attribute label "Cantonese restaurant".

[0107] Optionally, when the search result is a navigation route, the classification label may be a road attribute label of the search result, wherein the road attribute label includes but is not limited to road type, road level, travel direction, road width, road name, etc.

[0108] Optionally, when the search result is a navigation route, the classification tag may be a time requirement tag for the search result. For example, the time requirement tag may include a maximum navigation time limit, which indicates the maximum time required to complete the navigation route; or the time requirement tag may include a travel time, which indicates the time period for route navigation (such as the morning rush hour or the midday period).

[0109] The demand description information is used to describe the search demand in natural language.

[0110] Optionally, the requirement description information is a sentence or a paragraph of natural language text that describes the search requirement.

[0111] Optionally, when the search result is a place, the demand description information may include a description of the environmental characteristics, atmosphere characteristics, average price per person, business hours, etc. of the search demand.

[0112] For example, for the map search content "Find a quiet place to drink tea", the demand description information can be "a teahouse or teahouse with beautiful environment, quiet atmosphere and few people"; for the map search content "Where can I experience the splendor of the Water Splashing Festival in Yunnan", the demand description information can be "a lively place with a strong folk cultural atmosphere and open during the Water Splashing Festival".

[0113] Optionally, when the search result is a navigation route, the requirement description information may include a description of the starting point, end point, mode of transportation, road conditions, navigation time, etc. of the search requirement.

[0114] For example, for the map search content "What is the fastest way to get from Du Fu Thatched Cottage to People's Park", the demand description information can be "a navigation route with the starting point at the main gate of Du Fu Thatched Cottage, the end point at the main gate of People's Park, good road conditions, no congestion, and short travel time."

[0115] Refer to FIG. 6 , which is a schematic diagram of determining search results provided by an exemplary embodiment of the present application.

[0116] As shown in Figure 6, the map search content 610 is processed by the generative language model 620 to obtain classification label information 630 and requirement description information 640. The classification label information 630 includes multiple classification labels, such as classification label 1 (631) and classification label 2 (632).

[0117] Step 502: Based on the classification label information, query at least one candidate search result from the map database.

[0118] In a possible implementation, the server determines a location query statement or a navigation route query statement based on the classification tag information, and queries a map database for search results that match the search requirement information based on the location query statement or the navigation route query statement.

[0119] For example, the location query statement or the navigation route query statement may be a Domain-Specific Language (DSL) or a Structured Query Language (SQL).

[0120] Optionally, the candidate search results may be results pre-stored in a map database. For example, when the search result is a location, the candidate search results may be POI data pre-stored in the map database.

[0121] Optionally, the candidate search results are results calculated in real time based on a map database. For example, when the search result is a navigation route, the candidate search results may be multiple candidate routes calculated in real time based on the map database.

[0122] 6 , based on the classification label information 630 , at least one candidate search result 660 is queried from the map database 650 . For example, the candidate search results 660 may include candidate search result a ( 660 a ), candidate search result b ( 660 b ), candidate search result c ( 660 c ), and so on.

[0123] Optionally, when the search result is a location, the candidate search result 660 may include thousands of candidate POI data.

[0124] In some embodiments, each candidate search result corresponds to a candidate search result vector. For example, candidate search result a (660a) corresponds to candidate search result vector a (670a); candidate search result b (660b) corresponds to candidate search result vector b (670b); and candidate search result c (660c) corresponds to candidate search result vector c (670c).

[0125] A method for determining a candidate search result vector corresponding to a candidate search result may include at least one of the following manners.

[0126] 1. When the candidate search result is a candidate location, the location feature vector corresponding to the candidate location is determined as the candidate search result vector.

[0127] In one possible implementation, the location feature vector corresponding to the candidate location can be determined based on POI data in a map database. For example, the location name, introduction information, business hours, etc. of the POI data are vectorized to obtain the location feature vector corresponding to the candidate location.

[0128] In one possible implementation, the location feature vector corresponding to the candidate location can also be determined based on internet data, user feedback data, and other data in the map database. For example, a feature extraction network can be used to extract the location feature vector corresponding to the candidate location from POI data, relevant online articles, and user reviews.

[0129] 2. When the candidate search result is a candidate route, obtain a segment feature vector corresponding to each segment in the candidate route; generate a candidate route feature vector for the candidate route based on the segment feature vector; and determine the candidate route feature vector as the candidate search result vector.

[0130] In one possible implementation, the segment feature vectors corresponding to each segment in the candidate route may be determined based on data pre-stored in a map database, for example, by extracting the segment feature vectors from the road network data corresponding to the segment using a feature extraction network.

[0131] In one possible implementation, the segment feature vectors corresponding to each road segment in the candidate route can be determined based on real-time data updated in a map database. For example, a feature extraction network can be used to extract the segment feature vectors from real-time data such as traffic flow, traffic light status, and road congestion.

[0132] Optionally, the segment feature vectors corresponding to multiple segments are concatenated to generate a candidate route feature vector of the candidate route.

[0133] Step 503: Determine a search result from at least one candidate search result based on the requirement description information.

[0134] In some embodiments, the requirement description information can be vectorized to obtain a requirement description vector; the vector distance between the requirement description vector and the candidate search result vector corresponding to at least one candidate search result is determined; and based on the vector distance, a search result that matches the search requirement information is determined from at least one candidate search result.

[0135] As shown in FIG. 6 , the requirement description information 640 may be vectorized to obtain a requirement description vector 680 .

[0136] Optionally, the requirement description information 640 is vectorized based on an embedding layer in natural language processing.

[0137] In some embodiments, the search result 690 may be a candidate search result (eg, candidate search result a) corresponding to a candidate search result vector that is closest to the requirement description vector 680 .

[0138] In some embodiments, search results 690 may be N candidate search results (eg, candidate search results a and candidate search results b, N=2) corresponding to the first N candidate search result vectors closest to the requirement description vector 680, where N is a preset positive integer.

[0139] In this embodiment, by generating classification label information through a generative language model, the classification label corresponding to the search result expected by the user can be obtained, so as to determine the candidate search results that match the classification label from the map database; by generating demand description information through a generative language model, an in-depth understanding of the user's intentions and needs can be achieved; based on the vector distance between the demand description vector and the candidate search result vector, the search result is determined, and the search result that best meets the user's needs can be selected from the candidate search results, without the user having to view and compare each candidate search result in turn, thereby improving the efficiency of map search.

[0140] When the map search content is input into the generative language model, in order to make the output result of the model be classification label information, first prompt information can be input into the generative language model to prompt that the output format of the output result is classification label information.

[0141] In some embodiments, the map search content and the first prompt information are input into a generative language model to obtain classification label information output by the generative language model.

[0142] Optionally, the first prompt information is a sentence or a paragraph of natural language text. For example, the first prompt information may be “Please confirm at least one classification label” or “Please input the administrative division label and location attribute label corresponding to the search requirement”.

[0143] Optionally, the first prompt information can be concatenated with the map search content, and the concatenated text can be input into the generative language model. The first prompt information can be located at the beginning, middle, or end of the text.

[0144] The first prompt information is used to prompt the generative language model that the output result is classification label information. In order to enable the generative language model to understand the meaning of the first prompt information, the pre-trained generative language model can be trained with a training sample containing the first prompt information. The training process is fine-tuning based on the pre-training.

[0145] Refer to FIG. 7 , which is a schematic diagram of fine-tuning a pre-trained generative language model using a training sample containing first prompt information provided by an exemplary embodiment of the present application.

[0146] As shown in FIG. 7 , the training sample 710 includes first prompt information 711 and a first sample search text 712 .

[0147] Regarding the training process of fine-tuning the pre-trained generative language model, first prompt information 711 and first sample search text 712 can be input into the pre-trained generative language model 720 to obtain sample classification label information 730. Based on the sample classification label information 730 and the true classification label information 740 corresponding to the first sample search text 712, a first loss function 750 is constructed. Based on the first loss function 750, the parameters of the pre-trained generative language model 720 are iteratively updated to perform model training.

[0148] The first sample search text 712 represents multiple sets of pre-collected map search content. The classification label information ground truth 740 represents at least one actual classification label corresponding to each set of map search content. In some embodiments, the classification label information ground truth 740 can be obtained based on manual annotation. In some embodiments, the classification label information ground truth 740 can be generated based on a generative language model and determined after manual verification or correction.

[0149] Optionally, the first loss function 750 is a cross entropy loss function.

[0150] In some embodiments, training can be performed using various methods. For example, training can be performed based on a gradient descent method. When a preset condition is met, training ends, and a trained generative language model is obtained. The preset condition may be that the loss function converges or the number of iterations reaches a threshold.

[0151] When the map search content is input into the generative language model, in order to make the output result of the model be the requirement description information, second prompt information can be input into the generative language model to prompt that the output format of the output result is the requirement description information.

[0152] In some embodiments, the map search content and the second prompt information are input into a generative language model to obtain demand description information output by the generative language model.

[0153] Optionally, the second prompt information is a sentence or a paragraph of natural language text. For example, the second prompt information can be "Please describe your search requirements" or "Please summarize the requirements for map search content."

[0154] Optionally, the second prompt information can be concatenated with the map search content, and the concatenated text can be input into the generative language model. The second prompt information can be located at the beginning, middle, or end of the text.

[0155] In some embodiments, the training process and application process of the generative language model may be performed by the same server, or by different servers, and this specification does not limit this.

[0156] In this embodiment, by fine-tuning the pre-trained generative language model with training samples containing the first prompt information, the model can generate classification label information based on the output format prompted by the first prompt information; when the second prompt information is input, due to the powerful semantic understanding ability of the generative language model itself, the model can generate requirement description information based on the output format prompted by the second prompt information.

[0157] At the same time, since the true value of the classification label information does not directly reflect the specific content of the data stored in the map database (such as POI data, LBS data, etc.) when training the generative language model, the method of this embodiment will not leak data to the generative language model, thereby improving the data security of map search.

[0158] The user's real-time location may affect the determination of search results. For example, when the user is in area A, the map search content "delicious pigeon shop" may correspond to the search results of pigeon shops in area A, rather than pigeon shops in area B. This can provide users with recommendations for suitable places nearby.

[0159] In some embodiments, the map application may apply to the user for location permission, and after obtaining the user's consent, enable the location permission. In some embodiments, when the location permission is enabled, the map search request includes the real-time location.

[0160] Optionally, the real-time location is the longitude and latitude coordinates of the terminal in real time.

[0161] In some embodiments, the real-time location prompt information may be determined based on the real-time location. For example, the real-time location prompt information may be determined based on the province, city, district, or street where the real-time location is located.

[0162] Optionally, the real-time location prompt information is a sentence or a paragraph of natural language text. For example, the real-time location information may be "The user's current real-time location is XX Street, XX District, XX City, XX Province".

[0163] Refer to FIG8 , which is a schematic diagram of determining classification label information based on real-time location prompt information provided by an exemplary embodiment of the present application.

[0164] As shown in FIG8 , the map search content 811 , the first prompt information 812 , and the real-time location prompt information 813 are input into the generative language model 820 , and the classification label information 830 output by the generative language model 820 is obtained.

[0165] Real-time location information is used to indicate the real-time location of map search requests. To help the generative language model understand the meaning of real-time location information, the pre-trained generative language model can be trained using training samples containing real-time location information. This training process is fine-tuning based on the pre-training.

[0166] Specifically, the sample real-time search text, the first prompt information, and the real-time location prompt information can be input into a pre-trained generative language model to obtain the sample real-time classification label information. Based on the sample real-time classification label information and the true value of the classification label information corresponding to the sample real-time search text, a loss function is constructed. Based on the loss function, the parameters of the pre-trained generative language model are iteratively updated to perform model training.

[0167] The sample real-time search texts are pre-collected sets of map search content with location permissions enabled. The true value of the classification label information corresponding to the sample real-time search texts is at least one actual classification label corresponding to each set of map search content with location permissions enabled.

[0168] In some embodiments, the true value of the classification label information can be obtained based on manual annotation. In some embodiments, the true value of the classification label information can be generated based on a generative language model and determined after manual verification or correction.

[0169] Optionally, the loss function is the cross entropy loss function.

[0170] In some embodiments, training can be performed using various methods. For example, training can be performed based on a gradient descent method. When a preset condition is met, training ends, and a trained generative language model is obtained. The preset condition may be that the loss function converges or the number of iterations reaches a threshold.

[0171] In some embodiments, the training process and application process of the generative language model may be performed by the same server, or by different servers, and this specification does not limit this.

[0172] Refer to FIG9 , which is a schematic diagram of determining demand description information based on real-time location prompt information provided by an exemplary embodiment of the present application.

[0173] As shown in FIG9 , the map search content 911 , the second prompt information 912 , and the real-time location prompt information 913 are input into the generative language model 920 , and the requirement description information 930 output by the generative language model 920 is obtained.

[0174] Real-time location information is used to indicate the real-time location of map search requests. To help the generative language model understand the meaning of real-time location information, the pre-trained generative language model can be trained using training samples containing real-time location information. This training process is fine-tuning based on the pre-training.

[0175] Specifically, the sample real-time search text, the second prompt information, and the real-time location prompt information can be input into a pre-trained generative language model to obtain the sample real-time demand description information.

[0176] Based on the sample real-time demand description information and the true value of the demand description information corresponding to the sample real-time search text, a loss function is constructed, and the parameters of the pre-trained generative language model are iteratively updated based on the loss function to perform model training.

[0177] The sample real-time search texts are pre-collected sets of map search content with location permissions enabled. The true value of the demand description information corresponding to the sample real-time search texts is at least one actual demand description corresponding to each set of map search content with location permissions enabled.

[0178] In some embodiments, the true value of the requirement description information can be obtained based on manual annotation. In some embodiments, the true value of the requirement description information can be generated based on a generative language model and determined after manual verification or correction.

[0179] Optionally, the real-time demand description information of the sample can be vectorized to obtain a sample description vector; the true value of the demand description information can be vectorized to obtain a true value description vector; and a loss function can be constructed based on the difference between the sample description vector and the true value description vector.

[0180] Optionally, the loss function is the cross entropy loss function.

[0181] In some embodiments, training can be performed using various methods. For example, training can be performed based on a gradient descent method. When a preset condition is met, training ends, and a trained generative language model is obtained. The preset condition may be that the loss function converges or the number of iterations reaches a threshold.

[0182] In some embodiments, the training process and application process of the generative language model may be performed by the same server, or by different servers, and this specification does not limit this.

[0183] In this embodiment, the pre-trained generative language model is fine-tuned through sample real-time search text. When the positioning permission is enabled, the search results can be determined based on the user's real-time location, so that results that are closer and meet the requirements can be recommended to the user, thereby improving the efficiency of map search.

[0184] In a possible scenario, in addition to obtaining search results, the user also wants to learn more about issues related to the search results.

[0185] For example, for the map search content "the best squab restaurant in area A", in addition to looking for the squab restaurant with the highest comprehensive score in area A, the user may also want to know more about the differences between this restaurant and other squab restaurants, how to make an appointment and get a number, or what means of transportation should be chosen to arrive the fastest, and other related questions.

[0186] For example, for the map search content "What is the fastest way to get from Du Fu Thatched Cottage to People's Park", in addition to obtaining the navigation route with the shortest time, the user may also want to know whether tolls will be incurred by following the navigation route, how many traffic lights there are along the way, or whether there are any driving restrictions, etc.

[0187] Therefore, after searching the preset map database for search results that match the search requirement information, interaction questions can be further determined, wherein the interaction questions refer to questions related to the search results.

[0188] Optionally, the interactive question is a sentence or a paragraph of natural language text.

[0189] In some embodiments, after the server feeds back search results to the terminal so that the terminal displays the search results in the map interface, the server may also feed back interaction questions to the terminal so that the terminal displays the interaction questions in the map interface.

[0190] Refer to FIG10 , which is a schematic diagram of displaying interactive information provided by an exemplary embodiment of the present application.

[0191] As shown in Figure 10, when the user enters the map search content "What delicious pigeon restaurants are there in area A" in the search bar 1010 in the map interface, the server receives the map search request and feeds back the search results to the terminal. The terminal displays the search results (A pigeon restaurant) in the form of a location card 1020 in the map interface.

[0192] After displaying the search results, the server may also provide feedback to the terminal on interactive questions, so that the terminal can display the interactive questions on the map interface.

[0193] As shown in FIG. 10 , the terminal displays an interaction box 1030 in the map interface for interacting with questions related to the search results.

[0194] Exemplarily, the interaction box 1030 may include an interaction prompt box 1031. The interaction prompt box 1031 displays the text "You can continue to ask" to prompt the user to further ask or view the interaction questions.

[0195] For example, the interaction box 1030 may further include a first interaction question box 1032 and a second interaction question box 1033. The first interaction question box 1032 displays the text "Compare the time for taking a taxi and taking a bus", and the second interaction question box 1033 displays the text "What is the difference between this store and other stores?"

[0196] The user can trigger the first interactive question box 1032 and the second interactive question box 1033 to obtain answers to corresponding interactive questions.

[0197] For example, the user can click on the first interactive question box 1032 to trigger it. After clicking on the trigger, the corresponding text answer will be displayed in the map interface, such as "It is estimated that taking a taxi will take 20 minutes, and it is estimated that taking a bus will take 35 minutes."

[0198] Regarding the method of generating interactive questions, in one possible implementation method, after querying the search results that match the search requirement information from a preset map database, the search results, map search content and third prompt information can be input into a generative language model to obtain the interactive questions output by the generative language model.

[0199] Optionally, the third prompt information is a sentence or a paragraph of natural language text. For example, the third prompt information may be "Please generate an interactive question related to the search result" or "Please input other questions that the user may continue to ask about the place."

[0200] The third prompt information is used to prompt the generative language model to output the result in the form of an interactive question. To enable the generative language model to understand the meaning of the third prompt information, the pre-trained generative language model can be trained using training samples containing the third prompt information. This training process is fine-tuning based on the pre-training.

[0201] Refer to FIG11 , which is a schematic diagram of fine-tuning a pre-trained generative language model using training samples containing third prompt information provided by an exemplary embodiment of the present application.

[0202] As shown in FIG. 11 , the training sample 1110 includes a second sample search text 1111 , a sample search result 1112 , and third prompt information 1113 .

[0203] Regarding the training process of fine-tuning the pre-trained generative language model, the second sample search text 1111, the sample search result 1112, and the third prompt information 1113 can be input into the pre-trained generative language model 1120 to obtain a sample interaction question 1130. Based on the sample interaction question 1130 and the true value 1140 of the interaction question corresponding to the second sample search text 1111, a second loss function 1150 is constructed, and the parameters of the pre-trained generative language model 1120 are iteratively updated based on the second loss function 1150 to perform model training.

[0204] The second sample search text 1111 represents multiple sets of pre-collected map search content. The sample search results 1112 represent the search results corresponding to the multiple sets of map search content. The interaction question ground truth 1140 represents at least one actual interaction question corresponding to each set of sample search results. In some embodiments, the interaction question ground truth 1140 can be obtained based on manual annotation. In some embodiments, the interaction question ground truth 1140 can be generated based on a generative language model and determined after manual verification or correction.

[0205] Optionally, the sample interaction problem 1130 can be vectorized to obtain a sample interaction problem vector; the interaction problem truth value 1140 can be vectorized to obtain a true value interaction problem vector; and based on the difference between the sample interaction problem vector and the true value interaction problem vector, a second loss function 1150 can be constructed.

[0206] Optionally, the second loss function 1150 is a cross entropy loss function.

[0207] In some embodiments, training can be performed using various methods. For example, training can be performed based on a gradient descent method. When a preset condition is met, training ends, and a trained generative language model is obtained. The preset condition may be that the loss function converges or the number of iterations reaches a threshold.

[0208] In this embodiment, based on the search results, interactive questions are generated by a generative language model and presented to the user, which can provide users with questions related to the search results, thereby enriching the usage scenarios of map search, improving the efficiency of map search, and providing users with a more convenient and intelligent search experience.

[0209] Referring to FIG. 12 , FIG. 12 is a structural block diagram of a map search device provided by an exemplary embodiment of the present application, the device comprising:

[0210] An acquisition module 1201 is configured to acquire a map search request sent by a terminal, wherein the map search request includes map search content, and the map search content is natural language content;

[0211] A generating module 1202 is configured to, in response to the map search request, input the map search content into a generative language model to obtain search requirement information generated by the generative language model, wherein the search requirement information is used to represent the search requirement of the map search content;

[0212] The matching module 1203 is used to query the preset map database for search results that match the search requirement information;

[0213] The feedback module 1204 is configured to feed back the search results to the terminal, so that the terminal displays the search results in the map interface.

[0214] Optionally, the generating module 1202 is configured to:

[0215] In response to the map search request, inputting the map search content into a generative language model to obtain classification label information and requirement description information generated by the generative language model, wherein the classification label information includes at least one classification label corresponding to the search requirement, the classification label being a label used by the map database to classify map elements, and the requirement description information is used to provide a natural language description of the search requirement;

[0216] Optionally, the matching module 1203 is configured to:

[0217] Based on the classification label information, query at least one candidate search result from the map database;

[0218] Based on the requirement description information, a search result matching the search requirement information is determined from at least one of the candidate search results.

[0219] Optionally, the matching module 1203 is configured to:

[0220] Performing vectorization processing on the demand description information to obtain a demand description vector;

[0221] Obtaining a candidate search result vector corresponding to at least one candidate search result;

[0222] Determining a vector distance between the requirement description vector and the candidate search result vector;

[0223] Based on the vector distance, a search result matching the search requirement information is determined from at least one of the candidate search results.

[0224] Optionally, the matching module 1203 is configured to:

[0225] In a case where the candidate search result is a candidate location, determining a location feature vector corresponding to the candidate location as the candidate search result vector;

[0226] In the case that the candidate search result is a candidate route, a segment feature vector corresponding to each segment in the candidate route is obtained; a candidate route feature vector of the candidate route is generated based on the segment feature vector; and the candidate route feature vector is determined as the candidate search result vector.

[0227] Optionally, the generating module 1202 is configured to:

[0228] Inputting the map search content and the first prompt information into the generative language model to obtain the classification label information output by the generative language model;

[0229] Inputting the map search content and the second prompt information into the generative language model to obtain the demand description information output by the generative language model;

[0230] The first prompt information and the second prompt information are used to prompt the output format of the output result.

[0231] Optionally, the generating module 1202 is configured to:

[0232] Inputting the first prompt information and the first sample search text into the pre-trained generative language model to obtain sample classification label information;

[0233] Constructing a first loss function based on the sample classification label information and the true value of the classification label information corresponding to the first sample search text;

[0234] Parameters of the pre-trained generative language model are updated based on the first loss function.

[0235] Optionally, when the location permission is enabled, the map search request includes a real-time location, and the generating module 1202 is configured to:

[0236] Inputting the map search content, the first prompt information, and the real-time location prompt information into the generative language model to obtain the classification label information output by the generative language model; the real-time location prompt information is used to prompt the real-time location of the map search request;

[0237] The map search content, the second prompt information, and the real-time location prompt information are input into the generative language model to obtain the demand description information output by the generative language model.

[0238] Optionally, after searching the preset map database for search results that match the search requirement information, a generating module 1202 is configured to:

[0239] Inputting the search results, the map search content, and the third prompt information into the generative language model to obtain an interactive question output by the generative language model; the interactive question is a question related to the search results; wherein the third prompt information is used to indicate the output format of the output result;

[0240] After feeding back the search results to the terminal so that the terminal displays the search results on the map interface, the method further includes:

[0241] Feedback the interaction problem to the terminal so that the terminal displays the interaction problem in the map interface.

[0242] Optionally, the generating module 1202 is configured to:

[0243] Inputting a second sample search text, a sample search result corresponding to the second sample search text, and the third prompt information into the pre-trained generative language model to obtain a sample interaction question;

[0244] Constructing a second loss function based on the sample interaction question and the true value of the interaction question corresponding to the sample search result;

[0245] Parameters of the pre-trained generative language model are updated based on the second loss function.

[0246] FIG13 is a flowchart of a map search method provided by another exemplary embodiment of the present application. The method is executed by a terminal and includes the following steps:

[0247] Step 1301: Obtain map search content, where the map search text is natural language content.

[0248] A terminal is an electronic device that can run a map application. This electronic device can be a mobile terminal such as a smartphone, tablet computer, laptop computer, or vehicle-mounted terminal, or a terminal such as a desktop computer or projection computer.

[0249] Optionally, the map search content is natural language text entered by the user through the text search bar in the map interface.

[0250] Optionally, the map search content is based on natural language audio input by the user in the in-vehicle terminal.

[0251] For example, the map search content may be one or more words, phrases, sentences, or paragraphs used for map search. For example, the map search content may be "The best pigeon restaurant in area A," or "The architecture of city D has both a quaint and modern feel. Please plan a tour route for out-of-town tourists from scenic spot E to street F, passing through at least one other scenic spot in city D."

[0252] For example, the map search content can be a direct description of the map search demand, such as "Help me find a mid-range Cantonese restaurant", "Which hospitals in City C can perform corneal cross-linking surgery"; it can also be an indirect description of the map search demand, such as "The temperature continues to be high during the Labor Day holiday. Instead of traveling far away, it is better to meet friends for tea in the air-conditioned room."

[0253] Step 1302: Send a map search request containing map search content to the server. The map search request is used to instruct the server to input the map search content into the generative language model, obtain search requirement information generated by the generative language model, and query search results that match the search requirement information from a preset map database. The search requirement information is used to represent the search requirements of the map search content.

[0254] A map search request is a request sent by a terminal to a server. The map search request includes map search content, which is natural language content.

[0255] Optionally, the map search request is a query request for a location, or a query request for a navigation route.

[0256] Search requirement information is used to classify or describe map search requirements. In some embodiments, the search requirement information may include classification label information. For example, the administrative division or location category to which the map search requirement belongs. In some embodiments, the search requirement information may include requirement description information. For example, the environmental characteristics or atmosphere characteristics of the map search requirement. In some embodiments, the search requirement information may be natural language text, such as one or more words, phrases, sentences, or paragraphs.

[0257] The map database is a database based on digitized map data. In some embodiments, the map database includes point of interest (POI) data, location-based services (LBS) data, and navigation data.

[0258] Optionally, the sources of data in the map database may include satellite data, road network data, surveying and mapping data, crowd-sourced data, etc.

[0259] Optionally, the source of data in the map database may also include Internet data, user search data, user feedback data, etc. For example, the map database may include data such as user reviews of businesses and ratings of places collected on the Internet.

[0260] Optionally, the data in the map database is updated in real time. For example, the map database may include real-time traffic flow, traffic lights, road congestion, and other real-time updated road conditions. Another example is that the map database may include real-time updated POI data. When the address, name, contact information, and other information of the POI changes, the content in the map database will be updated promptly.

[0261] The search results that match the search requirement information refer to the search results that meet the search requirements of the map search content.

[0262] Optionally, the search result is one or more search results. For example, when the map search content is "the best squab shop in area A", the search result matching the search requirement information may be a squab shop with the highest overall ranking, or may be multiple squab shops with high overall rankings (such as the top 3).

[0263] In a possible implementation, the server may determine a location query statement or a navigation route query statement based on the search requirement information, and query the map database for search results that match the search requirement information based on the location query statement or the navigation route query statement.

[0264] For example, the location query statement or navigation route query statement may be a DSL statement or an SQL statement.

[0265] Step 1303: Display the search results fed back by the server in the map interface.

[0266] Optionally, the map interface is an interface corresponding to a map application in the terminal, or an interface corresponding to a map applet.

[0267] In one possible implementation, the terminal displays search results in the form of locations on a map interface. For example, when the map search content is "the best pigeon shop in area A", the terminal displays the location of the pigeon shop with the highest overall ranking on the map interface, and displays other information about the pigeon shop.

[0268] In one possible implementation, the terminal displays the search results in a list on the map interface. For example, when the map search content is "the best pigeon shop in area A", the terminal displays thumbnails of the top three pigeon shops in descending order of comprehensive scores in the map interface.

[0269] In one possible implementation, the terminal displays search results as navigation routes on a map interface. For example, if the map search query is "tourist routes that include attraction E and street F," the terminal displays a map of City D on the map interface and visually identifies one or more recommended tourist routes that include attraction E and street F. If multiple routes are available, they can be assigned different colors or shades based on their overall scores.

[0270] The terminal may also display search results in other forms in the map interface, and this specification does not limit this.

[0271] In summary, generating search demand information through a generative language model and querying search results from a map database based on the search demand information can help us deeply understand the user's search intent, recommend real and reliable search results to users, and improve the efficiency of map search.

[0272] Referring to FIG. 14 , FIG. 14 is a structural block diagram of a map search device provided by another exemplary embodiment of the present application, the device comprising:

[0273] An acquisition module 1401 is used to acquire map search content, where the map search content is natural language content;

[0274] A sending module 1402 is configured to send a map search request containing the map search content to a server, wherein the map search request is configured to instruct the server to input the map search content into a generative language model, obtain search requirement information generated by the generative language model, and query a preset map database for search results matching the search requirement information, wherein the search requirement information is configured to represent the search requirement for the map search content.

[0275] The display module 1403 is used to display the search results fed back by the server in a map interface.

[0276] It should be noted that in the process of collecting user-related data (such as real-time location), this application may display a prompt interface, pop-up window or output a voice prompt message. The prompt interface, pop-up window or voice prompt message is used to remind the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining user-related data after obtaining the user's confirmation operation on the prompt interface or pop-up window. Otherwise (that is, when the user's confirmation operation on the prompt interface or pop-up window is not obtained), the relevant steps of obtaining user-related data are terminated, that is, the user's relevant data is not obtained. In other words, the information involved in this application (including but not limited to user device information, user personal information, user's real-time location), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of relevant countries and regions. For example, the real-time location of the user involved in this application is obtained with full authorization.

[0277] 15 is a schematic diagram of the structure of a computer device provided by an exemplary embodiment of the present application. The computer device 1500 can be implemented as the server or terminal in the above embodiments.

[0278] Specifically, the computer device 1500 includes a central processing unit (CPU) 1501, a system memory 1504 including a random access memory 1502 and a read-only memory 1503, and a system bus 1505 connecting the system memory 1504 and the CPU 1501. The computer device 1500 also includes a basic input / output system (I / O system) 1506 for facilitating information transmission between various components within the computer, and a non-volatile storage device 1507 for storing an operating system 1513, application programs 1514, and other program modules 1515.

[0279] The basic input / output system 1506 includes a display 1508 for displaying information and an input device 1509 such as a mouse and keyboard for user input. The display 1508 and the input device 1509 are connected to the central processing unit 1501 via an input / output controller 1510 connected to the system bus 1505. The basic input / output system 1506 may also include an input / output controller 1510 for receiving and processing input from a variety of other devices such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 1510 also provides output to a display screen, printer, or other types of output devices.

[0280] The non-volatile storage device 1507 is connected to the central processing unit 1501 via a storage controller (not shown) connected to the system bus 1505. The non-volatile storage device 1507 and its associated computer-readable medium provide non-volatile storage for the computer device 1500. In other words, the non-volatile storage device 1507 may include a computer-readable medium (not shown) such as a hard disk or drive.

[0281] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include random access memory (RAM), read-only memory (ROM), flash memory or other solid-state storage technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, tape cassette, magnetic tape, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage medium is not limited to the above-mentioned ones. The above-mentioned system memory 1504 and non-volatile storage device 1507 can be collectively referred to as memory.

[0282] The memory stores one or more programs, and the one or more programs are configured to be executed by one or more central processing units 1501. The one or more programs contain instructions for implementing the above-mentioned methods. The central processing unit 1501 executes the one or more programs to implement the methods provided by the above-mentioned various method embodiments.

[0283] According to various embodiments of the present application, the computer device 1500 may also be connected to a remote computer on a network such as the Internet for operation. That is, the computer device 1500 may be connected to a network 1512 via a network interface unit 1511 connected to the system bus 1505, or the network interface unit 1511 may be used to connect to other types of networks or remote computer systems (not shown).

[0284] The memory also includes one or more programs, which are stored in the memory and include steps executed by a computer device in the method provided in the embodiment of the present application.

[0285] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the method described in any of the above embodiments.

[0286] Optionally, the computer-readable storage medium may include: ROM, RAM, solid state drives (SSDs) or optical disks, etc. Among them, RAM may include resistance random access memory (ReRAM) and dynamic random access memory (DRAM).

[0287] The present invention provides a computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method described in the above embodiment.

[0288] Those skilled in the art will appreciate that all or part of the steps of the above embodiments may be accomplished by hardware or by programs instructing the relevant hardware to accomplish the steps. The programs may be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk, or an optical disk. The above are merely optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included within the scope of protection of the present application.

[0289] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0290] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that variations and improvements are possible within the scope of the present application, as would be apparent to one skilled in the art. These variations and improvements fall within the scope of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.

Claims

1. A map search method, executed by a server, comprising: Acquire a map search request sent by a terminal, wherein the map search request includes map search content, and the map search content is natural language content; In response to the map search request, inputting the map search content into a generative language model to obtain search requirement information generated by the generative language model, wherein the search requirement information is used to characterize the search requirement of the map search content; Querying a preset map database for search results that match the search requirement information; and The search results are fed back to the terminal so that the terminal displays the search results in a map interface.

2. According to the method of claim 1, the search requirement information includes classification label information and requirement description information, the classification label information includes at least one classification label corresponding to the search requirement, the classification label is a label used by the map database to classify map elements, the requirement description information is used to describe the search requirement in natural language, and the querying of search results matching the search requirement information from the preset map database includes: Based on the classification label information, query at least one candidate search result from the map database; Based on the requirement description information, a search result matching the search requirement information is determined from at least one of the candidate search results.

3. The method according to claim 2, wherein the step of determining a search result matching the search requirement information from at least one of the candidate search results based on the requirement description information comprises: Vectorizing the requirement description information to obtain a requirement description vector; Obtaining a candidate search result vector corresponding to at least one of the candidate search results; Determining a vector distance between the requirement description vector and the candidate search result vector; Based on the vector distance, a search result matching the search requirement information is determined from at least one of the candidate search results.

4. The method according to claim 3, wherein obtaining a candidate search result vector corresponding to at least one candidate search result comprises: In the case where the candidate search result is a candidate location, determining a location feature vector corresponding to the candidate location as the candidate search result vector; When the candidate search result is a candidate route, obtaining a segment feature vector corresponding to each segment in the candidate route; generating a candidate route feature vector of the candidate route based on the road segment feature vector; The candidate route feature vector is determined as the candidate search result vector.

5. The method according to any one of claims 2 to 4, wherein in response to the map search request, the map search content is input into a generative language model to obtain classification label information and requirement description information generated by the generative language model, including: Inputting the map search content and the first prompt information into the generative language model to obtain the classification label information output by the generative language model; Inputting the map search content and the second prompt information into the generative language model to obtain the demand description information output by the generative language model; The first prompt information and the second prompt information are used to prompt the output format of the output result.

6. According to the method of claim 5, the training method of the generative language model comprises: Inputting the first prompt information and the first sample search text into the pre-trained generative language model to obtain sample classification label information; Constructing a first loss function based on the sample classification label information and the true value of the classification label information corresponding to the first sample search text; Parameters of the pre-trained generative language model are updated based on the first loss function.

7. The method according to claim 5 or 6, wherein when the location permission is enabled, the map search request includes a real-time location; and in response to the map search request, inputting the map search content into a generative language model to obtain classification label information and demand description information generated by the generative language model, comprising: Inputting the map search text, the first prompt information and the real-time location prompt information into the generative language model to obtain the classification label information output by the generative language model; The real-time location prompt information is used to prompt the real-time location of the map search request; The map search content, the second prompt information and the real-time location prompt information are input into the generative language model to obtain the demand description information output by the generative language model.

8. The method according to any one of claims 2 to 7, comprising: Inputting the search results, the map search content and the third prompt information into the generative language model to obtain an interactive question output by the generative language model; The interactive question is a question related to the search result; wherein the third prompt information is used to prompt the output format of the output result; The method further comprises: The interactive problem is fed back to the terminal so that the terminal displays the interactive problem in the map interface.

9. The method according to claim 8, wherein the training method of the generative language model comprises: Inputting a second sample search text, a sample search result corresponding to the second sample search text, and the third prompt information into the pre-trained generative language model to obtain a sample interaction question; Constructing a second loss function based on the sample interaction question and the true value of the interaction question corresponding to the sample search result; Parameters of the pre-trained generative language model are updated based on the second loss function.

10. A map search method, executed by a terminal, comprising: Acquire map search content, where the map search content is natural language content; Sending a map search request including the map search content to a server, wherein the map search request is used to instruct the server to input the map search content into a generative language model, obtain search requirement information generated by the generative language model, and query a preset map database for search results matching the search requirement information, wherein the search requirement information is used to represent the search requirement of the map search content; and The search results fed back by the server are displayed in a map interface.

11. A map search device, the device comprising: An acquisition module, used to acquire a map search request sent by a terminal, wherein the map search request includes map search content, and the map search content is natural language content; A generating module, configured to, in response to the map search request, input the map search content into a generative language model to obtain search requirement information generated by the generative language model, wherein the search requirement information is used to characterize the search requirement of the map search content; A matching module, used to query a preset map database for search results that match the search requirement information; and A feedback module is used to feed back the search results to the terminal so that the terminal displays the search results in the map interface.

12. A map search device, comprising: An acquisition module, used to acquire map search content, where the map search content is natural language content; a sending module, configured to send a map search request containing the map search content to a server, wherein the map search request is used to instruct the server to input the map search content into a generative language model, obtain search requirement information generated by the generative language model, and query a preset map database for search results matching the search requirement information, wherein the search requirement information is used to characterize the search requirement of the map search content; and A display module is used to display the search results fed back by the server in a map interface.

13. A server, comprising: A processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the map search method according to any one of claims 1 to 9.

14. A terminal comprising a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the map search method as claimed in claim 10.

15. A computer-readable storage medium, wherein at least one instruction is stored in the computer-readable storage medium, and the instruction is loaded and executed by a processor to implement the map search method according to any one of claims 1 to 10.

16. A computer program product, comprising computer instructions, wherein the computer instructions are stored in a computer-readable storage medium; a processor of a terminal reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the terminal executes the map search method as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Map searching method and device, and computer readable storage medium

    CN107491489A

  • Voice recognition method and device, server and storage medium

    CN110310631A

  • Searching method and device, electronic equipment and storage medium

    CN114036373A

  • Method for realizing service analysis self-service query, computer equipment and storage medium

    CN115640308A

  • Patent document query method based on diffusion model and computer equipment

    CN115794999A

Cited By

  • User demand processing method and device under map application, equipment and storage medium

    CN119760115A

  • Tourism route recommendation method and device, equipment, storage medium and program product

    CN121412442A