Task planning agent training and map information searching method and device, electronic equipment and medium

By employing a task planning agent training method, combined with large language models and reinforcement learning, the problem of error accumulation and inefficiency caused by unreasonable task decomposition in map search systems is solved, achieving efficient and accurate processing of complex queries and improving user experience.

CN121722985APending Publication Date: 2026-03-24BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-16
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing map search systems suffer from problems such as error accumulation due to unreasonable task splitting granularity, redundant information parsing, and low efficiency when processing complex queries, especially when user needs are transformed.

Method used

A task planning agent training method is adopted. Through pre-training and reinforcement learning, combined with a large language model and reward function, end-to-end retrieval call instructions with reasonable granularity are designed to realize the direct mapping from search statements to search instructions, and information search is carried out in multiple map search tools.

Benefits of technology

It significantly improves the map retrieval system's ability to satisfy complex queries, enhances multi-step planning capabilities, and improves the accuracy of intent parsing and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121722985A_ABST
    Figure CN121722985A_ABST
Patent Text Reader

Abstract

The invention provides a task planning agent training method and device, electronic equipment, a computer readable storage medium and a computer program product, and relates to the field of artificial intelligence, in particular to the technical field of intention understanding, map information retrieval and agents. According to the implementation scheme, a pre-trained task planning agent is obtained; obtaining a sample search statement for training the task planning agent and at least one sample search instruction which corresponds to the sample search statement and serves as a training label; determining a reward function for training the task planning agent; and based on the sample search statement, the at least one sample search instruction corresponding to the sample search statement and the reward function, performing intensive training on the task planning agent to maximize the reward function.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the field of artificial intelligence, in particular to the fields of intent understanding, map search and agent technology, and specifically to a task planning agent training and map information search method and device, electronic equipment, computer readable storage medium and computer program product. BACKGROUND

[0002] Artificial intelligence is a discipline that studies enabling computers to simulate some human thinking processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), which includes both hardware and software technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing, etc. Artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, and machine learning / deep learning, big data processing technology, knowledge graph technology, etc.

[0003] The map application processes tens of millions of user search requests per day. How to accurately understand user needs and return high-quality results is a key link in the map user experience. User search requests present the characteristics of thousands of people and thousands of faces, including precise searches with clear semantics or multiple semantics, and complex general search needs. Therefore, in the map search scenario, how to accurately understand user intent to effectively improve the accuracy of map information search becomes a key.

[0004] The methods described in this section can not necessarily be the methods previously conceived or adopted. Unless otherwise indicated, any method described in this section should not be assumed to be prior art merely because it is included in this section. Similarly, unless otherwise indicated, issues raised in this section should not be considered to have been recognized in any prior art. SUMMARY

[0005] The present disclosure provides a task planning agent training and map information search method, device, electronic equipment, computer readable storage medium and computer program product.

[0006] According to an aspect of the present disclosure, a task planning agent training method is provided, including: obtaining a pre-trained task planning agent, wherein the task planning agent is configured to perform intent understanding on a search sentence related to map information to obtain at least one search instruction, wherein the at least one search instruction is configured to perform information search in a corresponding map search tool of a plurality of map search tools to obtain a search result corresponding to the search sentence; obtaining a sample search sentence used for training the task planning agent and at least one sample search instruction corresponding to the sample search sentence as a training label; determining a reward function used for training the task planning agent, wherein the reward function is configured to represent a quality of a search instruction output by the task planning agent; and performing reinforcement training on the task planning agent based on the sample search sentence, the at least one sample search instruction corresponding to the sample search sentence and the reward function to maximize the reward function.

[0007] According to another aspect of the present disclosure, a map information search method is provided, including: obtaining a search sentence related to map information; inputting the search sentence into a trained task planning agent to obtain at least one search instruction corresponding to the search sentence; and sequentially performing information search through map search tools corresponding to the at least one search instruction respectively based on the at least one search instruction to obtain a search result corresponding to the search sentence, wherein the task planning agent is trained based on a task planning agent training method.

[0008] According to another aspect of the present disclosure, a task planning agent training apparatus is provided, including: a first obtaining unit configured to obtain a pre-trained task planning agent, wherein the task planning agent is configured to perform intent understanding on a search sentence related to map information to obtain at least one search instruction, wherein the at least one search instruction is configured to perform information search in a corresponding map search tool of a plurality of map search tools to obtain a search result corresponding to the search sentence; a second obtaining unit configured to obtain a sample search sentence used for training the task planning agent and at least one sample search instruction corresponding to the sample search sentence as a training label; a determining unit configured to determine a reward function used for training the task planning agent, wherein the reward function is configured to represent a quality of a search instruction output by the task planning agent; and a reinforcement training unit configured to perform reinforcement training on the task planning agent based on the sample search sentence, the at least one sample search instruction corresponding to the sample search sentence and the reward function to maximize the reward function.

[0009] According to another aspect of this disclosure, a map information search device is provided, comprising: a third acquisition unit configured to acquire a search statement related to map information; an input unit configured to input the search statement into a trained task planning agent to obtain at least one search instruction corresponding to the search statement; and a search unit configured to perform information search sequentially through map search tools corresponding to the at least one search instruction based on the at least one search instruction to obtain search results corresponding to the search statement, wherein the task planning agent is trained based on a task planning agent training method.

[0010] According to another aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; the memory storing instructions executable by the at least one processor to enable the at least one processor to perform the methods described in this disclosure.

[0011] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions for causing a computer to perform the methods described in this disclosure.

[0012] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the methods described in this disclosure.

[0013] According to one or more embodiments of this disclosure, the map retrieval system's ability to satisfy complex queries can be significantly improved, and the retrieval system is endowed with multi-step planning capabilities. Through understanding and modeling the map retrieval system, end-to-end retrieval call instructions with reasonable granularity are designed, realizing a direct mapping from search statements to search instructions; and a two-stage training method is adopted, comprehensively considering the dynamic environment, effectively improving the accuracy of intent parsing by the task planning agent.

[0014] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0015] The accompanying drawings exemplify embodiments and form part of the specification, serving together with the textual description to explain exemplary implementations of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0016] Figure 1A schematic diagram of an exemplary system in which the various methods described herein may be implemented according to embodiments of the present disclosure is shown; Figure 2 A flowchart of a task planning agent training method according to an embodiment of the present disclosure is shown; Figure 3 A schematic diagram of a task planning agent for map retrieval according to an exemplary embodiment of the present disclosure is shown; Figure 4 A flowchart of a map information search method according to an embodiment of the present disclosure is shown; Figure 5 A structural block diagram of a task planning agent training apparatus according to an embodiment of the present disclosure is shown; Figure 6 A structural block diagram of a map information search device according to an embodiment of the present disclosure is shown; and Figure 7 A structural block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation

[0017] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0018] In this disclosure, unless otherwise stated, the use of terms such as "first," "second," etc., to describe various elements is not intended to limit the positional, temporal, or importance relationships of these elements; such terms are merely used to distinguish one element from another. In some examples, the first element and the second element may refer to the same instance of that element, while in other cases, based on the context, they may refer to different instances.

[0019] The terminology used in the description of the various examples described in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context explicitly indicates otherwise, an element may be one or more unless the number of elements is specifically limited. Furthermore, the term "and / or" as used in this disclosure covers any one of the listed items and all possible combinations thereof.

[0020] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.

[0021] Figure 1A schematic diagram of an exemplary system 100 in which the various methods and apparatus described herein can be implemented according to embodiments of this disclosure is shown. Reference Figure 1 The system 100 includes one or more client devices 101, 102, 103, 104, 105 and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105 and 106 can be configured to execute one or more applications.

[0022] In embodiments of this disclosure, server 120 may run one or more services or software applications that enable methods for performing task planning agent training and map information search.

[0023] In some embodiments, server 120 may also provide other services or software applications, which may include non-virtual and virtual environments. In some embodiments, these services may be provided as web-based services or cloud services, such as to users of client devices 101, 102, 103, 104, 105 and / or 106 under a Software as a Service (SaaS) model.

[0024] exist Figure 1 In the configuration shown, server 120 may include one or more components that implement the functions performed by server 120. These components may include software components, hardware components, or combinations thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 can sequentially interact with server 120 using one or more client applications to utilize the services provided by these components. It should be understood that various different system configurations are possible and may differ from system 100. Therefore, Figure 1 This is an example of a system used to implement the various methods described herein, and is not intended to be limiting.

[0025] Users can use client devices 101, 102, 103, 104, 105, and / or 106 to determine training data, obtain search information, etc. The client devices can provide an interface that allows users to interact with them. The client devices can also output information to the user through this interface. Although... Figure 1 Only six client devices are described, but those skilled in the art will understand that this disclosure can support any number of client devices.

[0026] Client devices 101, 102, 103, 104, 105, and / or 106 may include various types of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptops), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors, or other sensing devices. These computer devices can run various types and versions of software applications and operating systems, such as Microsoft Windows, Apple iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as Google Chrome OS); or include various mobile operating systems, such as Microsoft Windows Mobile OS, iOS, Windows Phone, and Android. Portable handheld devices may include cellular phones, smartphones, tablets, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Gaming systems may include various handheld gaming devices, internet-enabled gaming devices, etc. Client devices are capable of executing various applications, such as various internet-related applications, communication applications (such as email applications), short message service (SMS) applications, and can use various communication protocols.

[0027] Network 110 can be any type of network well known to those skilled in the art, and can support data communication using any of a variety of available protocols (including but not limited to TCP / IP, SNA, IPX, etc.). By way of example only, one or more networks 110 can be a local area network (LAN), an Ethernet-based network, a token ring network, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.

[0028] Server 120 may include one or more general-purpose computers, special-purpose server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running a virtual operating system, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that can be virtualized to maintain virtual storage devices for servers). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.

[0029] The computing unit in server 120 can run one or more operating systems, including any of the aforementioned operating systems and any commercially available server operating system. Server 120 can also run any of a variety of additional server applications and / or middleware applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.

[0030] In some implementations, server 120 may include one or more applications to analyze and merge data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.

[0031] In some implementations, server 120 can be a server for a distributed system or a server integrated with blockchain. Server 120 can also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in the cloud computing service system, designed to address the shortcomings of traditional physical hosts and Virtual Private Server (VPS) services, such as high management difficulty and weak business scalability.

[0032] System 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as training data, map search tools, etc. Databases 130 may reside in various locations. For example, a database used by server 120 may be local to server 120, or it may be located remotely to server 120 and may communicate with server 120 via a network-based or dedicated connection. Databases 130 may be of different types. In some embodiments, the database used by server 120 may be, for example, a relational database. One or more of these databases may store, update, and retrieve data from and from the databases in response to commands.

[0033] In some embodiments, one or more of the databases 130 may also be used by an application to store application data. The databases used by the application may be of different types, such as key-value stores, object stores, or regular stores supported by a file system.

[0034] Figure 1The system 100 can be configured and operated in various ways to enable the application of the various methods and apparatus described in this disclosure.

[0035] It is understood that the intelligent agent mentioned in the embodiments of this disclosure can be an intelligent application or entity capable of autonomous action, environmental perception, decision-making, and interaction with the environment. Generally, the intelligent agent can generate results that conform to the user's intent based on prompts provided by the user, such as images and text. Since the basic principles and architecture of intelligent agents are known in the art, this disclosure does not elaborate on these details to avoid obscuring the main points of this disclosure.

[0036] When retrieving map information, key information in the user's search query can typically be identified and used as slots for information retrieval in the map retrieval system. Taking the point search function as an example, slots include name, location features, location category, and center point. The intent understanding model needs to distinguish the content mentioned in the user's request that is associated with the slots and parse the corresponding content to the specific slots.

[0037] Currently, map search functions are widely used, including location searches and queries for information related to a specific location. However, if the granularity of map information search task breakdown is unreasonable, a single user request may involve multiple, sequential calls to the map search system API. This not only leads to error accumulation and distortion of user requirements during multiple translation processes, but also results in the inherent inefficiency of sequential API calls. Alternatively, unreasonable task breakdown granularity can easily lead to problems with slot design and redundant information parsing.

[0038] Therefore, according to embodiments of this disclosure, a method for training a task planning agent is provided. Figure 2 A flowchart of a task planning agent training method according to an embodiment of the present disclosure is shown, such as... Figure 2As shown, method 200 includes: obtaining a pre-trained task planning agent, wherein the task planning agent is used to understand the intent of search statements related to map information to obtain at least one search instruction, wherein the at least one search instruction is used to search for information in a corresponding map search tool among multiple map search tools to obtain search results corresponding to the search statement (step 210); obtaining sample search statements for training the task planning agent, and at least one sample search instruction corresponding to the sample search statements as training labels (step 220); determining a reward function for training the task planning agent, wherein the reward function can be used to characterize the quality of the search instructions output by the task planning agent (step 230); and performing reinforcement training on the task planning agent based on the sample search statements, at least one sample search instruction corresponding to the sample search statements, and the reward function to maximize the reward function (step 240).

[0039] According to embodiments of this disclosure, a method for constructing a task planning agent for complex map queries is proposed. The constructed task planning agent can effectively decompose the intent of complex map user queries into one or more sub-tasks executable by the map retrieval system, efficiently acquiring high-quality relevant information to meet user needs. Furthermore, through understanding and modeling the map retrieval system, end-to-end retrieval call instructions with reasonable granularity are designed, realizing a direct mapping from search statements to search instructions; and a two-stage training method is adopted, comprehensively considering the dynamic environment, effectively improving the accuracy of intent parsing by the task planning agent.

[0040] In the embodiments of this disclosure, the map search tool can be a pre-defined backend service interface or API that can be called by the model, such as a POI (Point of Interest) retrieval interface or route planning interface of a map engine. The search statement is the raw query entered by the user in natural language, such as: "I want to find a coffee shop near Nanjing West Road with a rating higher than 4.5." The search instruction is a formatted instruction output by the task planning agent for the system to execute; it can be a single instruction or a sequence of instructions. For example, it typically includes operation type, parameters, and constraints. For example, the search query above could be JSON or structured data in a specific format, such as: {"action": "search_poi", "type": "coffee", "location_constraint": "Nanjing West Road", "rating_min": 4.5}. When the map search tool executes this query, it will obtain search results that are relevant to map information, such as a list of coffee shops that meet the criteria (including name, address, rating, etc.). For example, when the search query is "Please tell me the Starbucks near Peking University, and the fastest bus route to one of them," the agent might output the following sequence of instructions: Instruction 1: {Search type: precise location, search keyword: "Peking University cafeteria"}, which returns a specific location ID or coordinates; Instruction 2: {Search type: fuzzy query, search keyword: "Starbucks," with the condition "near the result of step 1 (i.e., returned by instruction 1)"}; Instruction 3: {Search type: route planning, search keywords include: "starting point: current location," "destination: result of step 2," and "mode: public transport"}. The search results are structured or unstructured data returned by the map search tool after executing the corresponding instructions. For example, for the above instruction sequence, the search results would be: a list of Starbucks near Peking University, and a bus route map and estimated time to reach one of them.

[0041] In the embodiments of this disclosure, by introducing reinforcement training and reward functions, the task planning agent can learn and optimize in more complex, multi-step planning scenarios, i.e., it can generate at least one search instruction. The agent does not simply mimic the instructions in the training data, but adjusts its strategy based on the rewards obtained after actually executing the instructions (reflecting the quality of the search results), thereby learning how to generate the most efficient and accurate sequence of search instructions, effectively improving the processing capability for complex queries.

[0042] According to some embodiments, obtaining sample search statements for training the task planning agent, and at least one sample search instruction corresponding to the sample search statements as training labels, includes: obtaining sample search statements for training the task planning agent, user feature data corresponding to the sample search statements, and at least one sample search instruction corresponding to the sample search statements as training labels. The task planning agent is used to perform intent understanding on map information-related search statements based on the user feature data to obtain at least one search instruction.

[0043] By incorporating personalized user information into the intent understanding and task planning process through the above embodiments, the map retrieval system can significantly improve its ability to satisfy fuzzy, implicit, or personalized queries, thereby optimizing the user experience.

[0044] Specifically, in some examples, this user characteristic data can be the context of the user's conversation with the agent, enhancing the contextual awareness during intent understanding. For instance, if a user simply says "find the nearest gas station," without user characteristic data (such as vehicle type, commuting habits, etc.), the agent will provide a regular gas station. However, by understanding from the contextual dialogue that the user is an electric vehicle owner, the agent can identify the implicit constraints behind the user's request, thereby generating more accurate instructions, such as automatically replacing "gas station" with "charging station."

[0045] In some examples, this user characteristic data can also be used to create user profiles, improving the personalization of fuzzy search and recommendations. When processing fuzzy queries, without personalized information, the system can only make recommendations based on popular trends or ratings. However, by combining user characteristic data (such as users' historical preferences for cuisine, average spending levels, and frequently visited locations), the agent can generate instructions that include personalized ranking information or search keywords.

[0046] According to some embodiments, obtaining a pre-trained task planning agent includes: obtaining a plurality of first search statements, wherein each of the plurality of first search statements is used for map information search; for each first search statement, inputting the first search statement into a large language model to obtain at least one first search instruction corresponding to the first search statement, wherein the at least one first search instruction corresponds to a corresponding map search tool; and training a preset task planning agent based on each first search statement and the at least one first search instruction corresponding to each first search statement to obtain the pre-trained task planning agent.

[0047] In the above embodiment, the powerful capabilities of Large Language Models (LLM) are leveraged for high-quality, large-scale data construction, thereby efficiently and accurately completing the pre-training phase. Traditional supervised training heavily relies on manual annotation or existing logs, which is costly and has limited data coverage. This embodiment, however, utilizes the powerful semantic understanding capabilities of Large Language Models to accurately segment the real needs of online users—multiple initial search statements—into different map search tasks and automatically determines the input parameters required to complete these tasks. Thus, the model can batch-construct binary data pairs of <user request, call instruction>. These automatically generated data pairs are not only numerous but also contain proprietary knowledge of map retrieval system API calls.

[0048] In some examples, the binary data pairs obtained from the large language model can be filtered to obtain a high-quality set of binary data pairs. The obtained high-quality set of binary data pairs is used as training data, and the task planning agent (SFT model) is trained through supervised fine-tuning.

[0049] In some embodiments, when the binary data pairs obtained based on a large language model are filtered, the quality of the obtained search results can be maximized while keeping the time delay within a controllable range. Here, the quality of the search results can be measured in various ways, such as the content matching degree between the search query and the search results, and semantic similarity. By filtering the binary data pairs used for training based on quality and time delay, the specific capabilities of the task planning agent in map retrieval scenarios can be effectively improved, enabling it to output high-quality answers during the supervised fine-tuning SFT stage.

[0050] By using this high-quality data to train a pre-defined task planning agent in a supervised fine-tuning manner, it is possible to quickly and effectively enable the agent to convert natural language requests into structured search instructions, laying the foundation for subsequent deep optimization based on reinforcement learning and greatly improving the quality and efficiency of the pre-trained model.

[0051] In some embodiments, the acquired first search statements can be real search statements related to map information search, or they can be constructed search statements for map information search (e.g., implemented through a corresponding intelligent agent or large model). For example, the first search statement could be: "I want to find a Japanese ramen restaurant within five kilometers of me with the highest rating." Subsequently, this statement, along with specifications regarding the map search tool API (i.e., proprietary knowledge), is fed as contextual input to a pre-trained large language model. Based on its powerful semantic understanding and contextual reasoning capabilities, the large language model outputs the corresponding first search instruction.

[0052] This output process is equivalent to LLM performing task decomposition and parameter extraction. For example, LLM might output a structured instruction: {"task": "POI_search", "query": "Japanese ramen", "filters": ["distance<5km", "rating = max"]}. This process is repeated in batches to generate corresponding instructions for a large number of search statements, thus constructing batch <user request, call instruction> binary data pairs. After obtaining a large number of high-quality <first search statement, first search instruction> binary data pairs, these are used as the training set. Using these data pairs, a pre-defined task planning agent is subjected to supervised fine-tuning training. The goal of the training is to enable this agent to learn to mimic the output of LLM, that is, given a first search statement, the agent can accurately output the corresponding first search instruction. After completing this training, the pre-trained task planning agent is obtained.

[0053] This exemplary operation effectively utilizes the "knowledge distillation" function of LLM, transferring and solidifying the complex map query understanding capabilities and API call knowledge contained in LLM into a dedicated and more efficient task planning agent, enabling it to handle subsequent reinforcement training tasks.

[0054] According to some embodiments, the at least one map search tool includes at least one of the following: a first tool for performing precise location searches, a second tool for performing fuzzy location searches, and a third tool for performing web page content searches. Each of the at least one map search tool includes a search type and search keywords in its corresponding search instructions. The search type identifies the corresponding map search tool, and the search keywords are determined based on the corresponding search statement for the corresponding map search tool to search for information related to the search keywords.

[0055] In this embodiment, the coverage and processing capabilities of the task planning agent are greatly expanded through the flexible invocation of multiple tools and the structured design of instructions. Traditional map search often focuses only on locations and navigation, but users' real needs are diverse. This embodiment refines the map search tool into at least one of the following: a first tool for precise location search, a second tool for fuzzy location search, and a third tool for web page content search. This achieves specialized processing of different types of information, greatly improving the accuracy and efficiency of intent understanding, and further effectively avoiding the various problems caused by unreasonable task decomposition granularity.

[0056] In some embodiments, the map search tool may include: a first tool for precise location search, a second tool for fuzzy location search, and a third tool for web content search. When a user queries a specific, officially registered place name, the agent can directly select the first tool (precise location search). If the user queries a generalized or fuzzy concept (e.g., "Are there any highly rated coffee shops nearby?"), the agent will select the second tool (fuzzy search / recommendation). This precise tool matching simplifies the agent's decision-making process, enabling it to translate user intent into the most efficient search path with minimal computational cost and time. Secondly, it enhances the ability to handle complex queries, especially those involving information fusion.

[0057] Currently, the demand for map queries has gone beyond simple location finding. Users may need unstructured information about a location, such as user notes, in-depth reviews, or the latest promotions. Therefore, by introducing a third tool for web content searching, the task planning agent can generate information fusion search sequences that combine location and non-location information. For example, the agent can first use a first or second tool to identify a location, and then immediately use the third tool to retrieve in-depth web content related to that location. This allows the system to meet users' needs for rich, real-time information.

[0058] To achieve this precise routing and efficient invocation, the search instructions corresponding to the map search tool in the above embodiments are designed as a structured format containing two main elements: search type and search keywords. By explicitly requiring the instructions to include search type and search keywords, it ensures that the agent can transmit the core elements of the user's query to the backend tool in the most targeted way. This structured instruction output optimizes the retrieval efficiency of the backend tool, ensures a high degree of matching between search keywords and the underlying search logic of the target tool, thereby improving the accuracy of the final search results.

[0059] Through this reinforcement learning training, the task planning agent can flexibly switch and combine the first, second, and third tools to generate a complete, efficient, and semantically clear sequence of instructions, ensuring comprehensive satisfaction of complex user intentions.

[0060] According to some embodiments, the search instructions corresponding to the first tool further include a search area. The search area is used to enable the first tool to search for information related to the search keywords within the search area.

[0061] In the above embodiments, the search instructions corresponding to the first tool (precise location search tool) include not only the search type and search keywords, but also a search area. This limits the search scope of the first tool to include information related to the keywords within a specified area. By introducing a search area (such as the vicinity of the user's current location or the city name mentioned in the user's query) as part of the instructions, a large number of irrelevant locations with the same name can be eliminated in real time, ensuring that the results returned by the first tool are the "precise location" that the user expects within a specific spatial range, thereby directly improving the effectiveness of the search.

[0062] For example, in some embodiments, the first tool for implementing precise location search supports finding a specific location or searching within a specific location. For instance, the MCP (Model Context Protocol) of the first tool can be described as follows: { name: "map_poi_search" (i.e., the tool name, identifying the tool used for map location searching), Description: "Uses the map's precise location search capability to find the basic location and information of a place". Arguments: { query: { type: "array", minItems: 1, description: "Search for location names, multiple locations can be searched simultaneously", "items":{"type":"string"}}, area: { type: "string", description: "Survey limited cities"} }, required: ["query"] } } In the example above, the protocol description clearly states the tool's purpose: "To utilize the map's precise location lookup capabilities to find the basic location and information of a place." The protocol includes two key parameters: first, the query: this is a required parameter, of type array, meaning the task planning agent can input one or more search location names simultaneously. These are search keywords extracted by the agent from the user's search query. Second, the area limitation, i.e., the search region: this is an optional (non-required) parameter, of type string, used to specify the search area. For example, it allows the agent to limit the search scope to a specific city when performing a precise location search, eliminating ambiguity caused by locations with the same name and improving search accuracy.

[0063] According to some embodiments, the search instructions corresponding to the second tool further include at least one of the following: a search area, a search center point, and sorting information. The search area is used to enable the second tool to search for information related to the search keyword within the search area; the search center point is used to enable the second tool to search for information related to the search keyword around the search center point; and the sorting information is used to enable the second tool to sort the searched information.

[0064] Through the above embodiments, the search instructions corresponding to the second tool (location fuzzy search recommendation tool) may include at least one of the following in addition to the search type and search keywords: search area, search center point, and sorting information. This provides multi-dimensional spatial constraints and result optimization capabilities for fuzzy search, significantly improving the personalization, relevance, and user experience of fuzzy queries.

[0065] Understandably, for vague requests like "finding nearby coffee shops," relying solely on keywords is often insufficient. By introducing a search area (e.g., the current city) or a more precise search center (e.g., the user's current location or a landmark), the agent can precisely limit the scope of the fuzzy query to a geographic space meaningful to the user. This avoids fuzzy searches returning a large number of irrelevant results, allowing the second tool to efficiently recommend locations the user truly needs, greatly enhancing the accuracy and relevance of fuzzy searches.

[0066] In the above embodiments, ranking information can endow the system with intelligent recommendation capabilities. Fuzzy searches often correspond to users' non-explicit needs, such as "finding the best restaurant." Ranking information allows the agent to generate instructions based on the user's implicit intent or preferences (such as "distance priority," "rating priority," "popularity priority"). This enables the second tool to customize the arrangement of search results according to the user's actual needs, thereby improving the usability of search results and user satisfaction.

[0067] For example, in some embodiments, the second tool supports returning multiple search or recommended location results based on query information. For instance, the MCP (Model Context Protocol) of the second tool can be described as follows: { name: "map_search", Description: "Utilizes the map's location search and recommendation capabilities, supporting location search and location decision recommendation." Arguments: { query: { type: "array", minItems: 1, description: "Search for query terms; multiple query terms can be searched simultaneously.", "items":{"type":"string"}}, area: { type: "string", description: "The city or region to be searched"}, center: { type: "array", minItems: 1, description: "An array of search center points; a search will be performed around one or more center points", "items":{"type":"string"}}, sort: { type: "object", description: "Forced sorting parameter", "additionalProperties":{"type":["string"],"description":"Values ​​can be 'asc' (ascending) or 'desc' (descending)"}}, }, required: ["query"] } } In the example above, the protocol description clearly defines the tool's purpose: "To invoke the map's location search and recommendation capabilities, supporting location lookup and location decision recommendation." The protocol stipulates that when generating instructions, the task planning agent can optionally provide three additional parameters for optimizing search results, in addition to the mandatory query: First, the query, the core of the instruction, is an array used to input search keywords extracted from the user's statement. Second, the area and center parameters. The area parameter limits the search to a city or large region; the center parameter can be an array of coordinates or locations, instructing the search tool to perform a surrounding search centered on that point. Finally, the protocol includes a sort parameter, an object used to force a specific order in which search results are arranged, such as "distance ascending" or "rating descending."

[0068] By incorporating the aforementioned parameters into a combined structure, the MCP protocol of this second tool enables the task planning agent to efficiently and accurately transform complex fuzzy search intentions with spatial and ranking constraints into instructions that can be executed by the underlying map search tool, thus fully leveraging the second tool's capabilities in location search and recommendation.

[0069] For example, in some embodiments, the third tool supports searching web page content (such as notes related to map information). For instance, the MCP (Model Context Protocol) of the third tool can be described as follows: { name: "page_and_note_search", Description: "Utilizes web search and note search capabilities to support general search engine queries across the entire internet." Arguments: { query: { type: "array", minItems: 1, description: "Search query array", "items":{"type":"string"}} }, required: ["query"] } } In the example above, the protocol description clearly defines the tool's purpose: "To invoke web page search and note search capabilities, supporting general search engine searches across the entire internet." Similar to the first and second tools, this protocol also specifies the query information that the task planning agent must provide when generating instructions.

[0070] Figure 3 A schematic diagram of a task planning agent for map retrieval according to an exemplary embodiment of the present disclosure is shown. Figure 3 As shown, after the corresponding user request (i.e., search statement) is input into the agent, the agent can generate at least one search instruction (i.e., a sequence of call instructions for the search tool to execute) that matches the request, based on its complex map query understanding capabilities and knowledge of search tool API calls, and combined with user feature data. Thus, through the flexible invocation of multiple tools and the structured design of instructions, the coverage and processing capabilities of the task planning agent are greatly expanded, significantly improving the accuracy and efficiency of intent understanding, and further effectively avoiding the various problems caused by unreasonable task decomposition granularity.

[0071] According to some embodiments, obtaining a sample search statement for training the task planning agent and at least one sample search instruction corresponding to the sample search statement includes: obtaining a second search statement to input into the pre-trained task planning agent, obtaining at least one second search instruction corresponding to the second search statement; obtaining a second search result corresponding to the second search statement based on the at least one second search instruction through a corresponding map search tool; determining the content matching degree between the second search result and the second search statement to correct the at least one second search instruction; and using the second search statement as the sample search statement and the corrected at least one second search instruction as the at least one sample search instruction.

[0072] In some embodiments, the content matching degree between the second search result and the second search statement is determined. This content matching degree can be a key metric for evaluating the quality of the search instructions output by the task planning agent and is also an important source of reward signals during reinforcement training. Specifically, the content matching degree measures the degree of content or semantic fit between the second search result obtained based on the model's output second search instruction and the user's original second search statement. Its purpose is to determine whether the task planning agent accurately understands the user's true intent.

[0073] For example, if a user's search query is "I want to go to the subway station near Hongqiao Airport," but due to an incorrect query, the search result returns "train timetable for Hongqiao Railway Station," then the content relevance between the two is very low, and the content match will be judged as low. Conversely, if the search result is "exit information for the subway station at Hongqiao Airport Terminal 2," then the semantics of the two are highly consistent, and the content match will be judged as high.

[0074] In the embodiments of this disclosure, the specific method for determining the content matching degree can employ various techniques, including but not limited to semantic similarity-based computational models, coverage evaluation of key information (such as location, category, and constraints), or combining implicit user feedback (such as whether a certain item in the search results was clicked). By determining the content matching degree, the second search instruction initially output by the task planning agent can be effectively corrected to guide the subsequent reinforcement learning process.

[0075] According to some embodiments, determining the matching degree between the second search result and the second search statement to modify the at least one second search instruction includes: determining the search level corresponding to the second search result and the second search statement based on the determined content matching degree between the second search result and the second search statement, wherein the search level is a corresponding level among a plurality of preset search levels, wherein the plurality of preset search levels are used to represent different degrees of satisfaction of the search needs represented by the corresponding search statement by the corresponding search result; and modifying the at least one second search instruction in response to determining that the search level corresponding to the second search result and the second search statement is a search level among the plurality of preset search levels used to represent the lower degree of satisfaction.

[0076] Through the above embodiments, a hierarchical and refined feedback mechanism is introduced into the reinforcement learning training of the task planning agent. That is, by converting the content matching degree into the search level, the output instructions of the task planning agent can be efficiently and targetedly corrected.

[0077] In the above embodiments, firstly, based on the content matching degree between the determined second search result and the second search statement, the degree of satisfaction of the user's needs is divided into multiple preset search levels. For example, referring to the example described above, it can be divided into three levels: simple, medium, and difficult. These search levels are explicitly used to represent the different degrees to which the corresponding search results satisfy the search needs represented by the corresponding search statement. For example, if the search results fully match the user's intent, they may be classified as "simple" or "high satisfaction"; if the search results are partially relevant but lack core information, they are classified as "medium"; if the search results are completely irrelevant or incorrect, they are classified as "difficult" or "low satisfaction".

[0078] Furthermore, in the above embodiments, in response to determining that the search level corresponding to the second search result and the second search statement is a search level among the preset multiple search levels used to characterize the degree of satisfaction, such as "medium" or "difficult," the system will modify the second search instruction. By modifying the second search instruction, a higher-quality "target action" can be provided to guide the reinforcement training of the task planning agent.

[0079] Specifically, when the agent's generated second search instruction results in a "low satisfaction level" (i.e., low matching degree), it indicates a flaw in the original instruction. In this case, the system corrects the original instruction to return results that meet the user's needs. For example, for the search query "find a Japanese restaurant near the Shanghai Museum," if the model incorrectly outputs only a search for "Japanese food" without including "near the Shanghai Museum," resulting in a "difficult" level, the corrected instruction will be manually labeled or generated with model assistance to ensure it includes the geographical constraint "near the Shanghai Museum." For a "medium" level, the correction might simply involve fine-tuning the filtering parameters. This targeted correction mechanism ensures that the agent can learn more quickly during reinforcement training how to transform low-quality instructions into high-quality ones, thereby effectively improving the accuracy of intent parsing.

[0080] According to some embodiments, the value of the reward function is determined based on a format reward term and a content reward term. The format reward term characterizes the correctness of the format of at least one third search instruction generated by the task planning agent based on the sample search statement, and the content reward term characterizes the correctness of the task planning agent's understanding of the intent of the sample search statement.

[0081] The above embodiments provide a comprehensive and structured metric system for the optimization objective of the reinforcement learning phase, namely the reward function. This ensures that the task planning agent, during optimization, not only pursues the correctness of intent understanding but also considers the usability of output instructions. In method 200, the value of the reward function is a key indicator used to quantify the quality of the third search instruction output by the model. By decomposing the reward function into at least two components: a format reward term and a content reward term, a dual constraint on instruction quality is achieved.

[0082] Specifically, the format reward term characterizes the correctness of the format of at least one third search instruction generated by the task planning agent based on the sample search statement. For example, if the model generates a search instruction that should be a specific JSON object, but its output is incorrectly formatted text or lacks necessary fields, then the format reward term will award a lower or negative value. This ensures that the instructions generated by the agent are executable and can be correctly parsed and invoked by the map search tool.

[0083] When the third search instruction generated by the agent is a sequence of instructions comprising multiple instructions, the format reward and content reward can be determined provided that the execution order of the instruction sequence is consistent. For example, the reward values ​​of the format reward corresponding to each instruction can be weighted, multiplied, or otherwise calculated to determine the final reward value of the format reward; the same applies to the content reward.

[0084] In some embodiments, the content reward is used to characterize the correctness of the task planning agent's understanding of the search query intent. This reward can be determined based on how well the search results returned by the agent's generated instructions match the user's original intent. If the instructions accurately extract all elements of the user's intent (e.g., location, filtering criteria, sorting requirements) and obtain highly relevant search results, then the content reward value will be high. Alternatively, the string matching (e.g., consistency) of the corresponding parameters in the instructions can be directly used as part of the content reward.

[0085] According to some embodiments, the reward function can also be used to characterize the time delay required for the task planning agent to generate at least one third search instruction based on the third search statement, wherein the time delay is determined based on at least one of the number of the generated third search instructions and the number of thought markers generated in the process of generating the at least one third search instruction.

[0086] In the above embodiments, the reward function can be used not only to characterize the quality of the search instructions output by the task planning agent, but also to characterize the time delay required to generate the search instructions. Alternatively, the quality of the search instructions characterized by the reward function can also be reflected by the time delay. This optimizes the planning efficiency of the agent and reduces computational and time costs.

[0087] In some examples, this time delay can be determined based on at least one of the number of search instructions generated and the number of thought tokens (i.e., tokens) generated during the generation process. Specifically, in reinforcement learning, if multiple sequences of instructions can achieve the same search result (i.e., the same content reward), the system tends to choose the sequence with the fewest instructions. Fewer instructions result in a lighter time delay penalty, thus encouraging the agent to learn to generate the most concise and efficient planning path. The number of thought tokens is also a key metric for measuring the inference cost of large language models (LLMs). When generating complex sequences of instructions, the agent may internally generate a large number of intermediate steps or "thinking" processes (i.e., thought tokens). The more thought tokens, the longer the inference time and the more computational resources consumed. If the number of thought tokens is included in the calculation of time delay and a negative reward is given, the system will penalize redundant and unnecessary internal computation processes. This prompts the agent to learn a more direct instruction generation method, significantly reducing system latency.

[0088] According to some embodiments, the content reward item is determined based on the content similarity between the at least one third search instruction and the corresponding information in the at least one sample search instruction.

[0089] For example, each third search instruction can determine its content similarity value with the corresponding information in the corresponding sample search instruction, and then the content similarity values ​​corresponding to multiple third search instructions are weighted and summed; furthermore, when a third search instruction includes multiple parameters, the content similarity value corresponding to the third search instruction can be determined based on the weighted sum of the content similarity values ​​determined by the multiple parameters.

[0090] According to some embodiments, the content reward item is determined based on the following operations: in response to determining that the map search tool corresponding to each of the at least one third search instruction is the same as the map search tool corresponding to each of the at least one sample search instruction, the content reward item is determined based on the content similarity of the corresponding information in the at least one third search instruction and the at least one sample search instruction; in response to determining that the map search tool corresponding to each of the at least one third search instruction is different from the map search tool corresponding to each of the at least one sample search instruction, and the value determined based on the content similarity of the corresponding information in the at least one third search instruction and the at least one sample search instruction is greater than a first preset value, the content reward item is determined as a second preset value; in response to determining that the map search tool corresponding to each of the at least one third search instruction is different from the map search tool corresponding to each of the at least one sample search instruction, and the value determined based on the content similarity of the corresponding information in the at least one third search instruction and the at least one sample search instruction is not greater than the first preset value, the content reward item is determined as a third preset value.

[0091] Specifically, in some examples, the specific reward function can be defined in the following form:

[0092] in, Indicates the format of the reward items. This indicates a content reward item.

[0093] For example, formatted reward items can be determined based on the following form:

[0094] That is, when the search instructions generated by the model are in the correct format and are valid, if the number of generated search instructions is... And the number of thought markers is less than If the format reward is 1, then the value of the reward item can be assigned to 1; otherwise, it is 0. Through the above method, both the correctness of the generated instruction format and the time delay are guaranteed. This optimizes the planning efficiency of the agent and reduces computational and time costs.

[0095] For example, content rewards can be determined based on the following format:

[0096] in, Search terms used in instructions to represent model predictions ( ) and the search terms in the sample search instructions ( The similarity between ( ). That is, when the search tool determined by the agent is correct, the content reward item can be assigned a value of . If the search tool determined by the agent is incorrect, but Greater than the preset value When the reward is 0, the content reward item can be assigned a value of 0.2; otherwise, it can be assigned a value of 0.

[0097] It is understood that the values ​​for the format reward and content reward items mentioned above (such as 0.8, 0.2, and 1) are merely illustrative and not intended to be limiting. Furthermore, when the sample search command includes other parameters besides the search term, such as the search center point or search area, It can also be expressed as a weighted sum of the similarities among these multiple parameters, without any restrictions here.

[0098] According to embodiments of this disclosure, such as Figure 4 As shown, a map information search method 400 is also provided, including: obtaining a search statement related to map information (step 410); inputting the search statement into a trained task planning agent to obtain at least one search instruction corresponding to the search statement (step 420); and based on the at least one search instruction, sequentially performing information search through map search tools corresponding to the at least one search instruction to obtain search results corresponding to the search statement (step 430).

[0099] The task planning agent described in this disclosure can be trained based on any of the above embodiments of the task planning agent training method.

[0100] In some embodiments, the map search tool includes at least one of the following: a first tool for performing precise location searches, a second tool for performing fuzzy location searches, and a third tool for performing web page content searches. The search instructions output by the agent correspond to the respective search tools, such as by identifying them through the "search type" parameter in the search instructions.

[0101] It is understandable that the relevant concepts or features in the map information search method are the same as or similar to the relevant concepts or features in the above-mentioned agent training method, and will not be repeated here.

[0102] According to embodiments of this disclosure, such as Figure 5As shown, a task planning agent training device 500 is also provided, comprising: a first acquisition unit 510 configured to acquire a pre-trained task planning agent, wherein the task planning agent is used to perform intent understanding on search statements related to map information to obtain at least one search instruction, wherein the at least one search instruction is used to perform information search in a corresponding map search tool among multiple map search tools to obtain search results corresponding to the search statement; a second acquisition unit 520 configured to acquire sample search statements for training the task planning agent, and at least one sample search instruction corresponding to the sample search statements as training labels; a determination unit 530 configured to determine a reward function for training the task planning agent, wherein the reward function can be used to characterize the quality of the search instructions output by the task planning agent; and a reinforcement training unit 540 configured to perform reinforcement training on the task planning agent based on the sample search statements, at least one sample search instruction corresponding to the sample search statements, and the reward function, so as to maximize the reward function.

[0103] Here, the operation of each of the above units 510 to 540 of the task planning agent training device 500 is similar to the operation of steps 210 to 240 described above, and will not be repeated here.

[0104] According to embodiments of this disclosure, such as Figure 6 As shown, a map information search device 600 is also provided, comprising: a third acquisition unit 610 configured to acquire search statements related to map information; an input unit 620 configured to input the search statements into a trained task planning agent to obtain at least one search instruction corresponding to the search statements; and a search unit 630 configured to perform information searches sequentially using map search tools corresponding to the at least one search instruction, based on the at least one search instruction, to obtain search results corresponding to the search statements. The map intent understanding model can be trained based on any of the above embodiments of the agent training method.

[0105] Here, the operation of each of the above units 610 to 630 of the map information search device 600 is similar to the operation of steps 410 to 430 described above, and will not be repeated here.

[0106] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0107] According to embodiments of this disclosure, an electronic device, a readable storage medium, and a computer program product are also provided.

[0108] refer to Figure 7 The present invention describes a structural block diagram of an electronic device 700 that can serve as a server or client of the present disclosure, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0109] like Figure 7 As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. The RAM 703 may also store various programs and data required for the operation of the electronic device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0110] Multiple components in electronic device 700 are connected to I / O interface 705, including: input unit 706, output unit 707, storage unit 708, and communication unit 709. Input unit 706 can be any type of device capable of inputting information to electronic device 700. Input unit 706 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device, and may include, but is not limited to, a mouse, keyboard, touchscreen, trackpad, trackball, joystick, microphone, and / or remote control. Output unit 707 can be any type of device capable of presenting information, and may include, but is not limited to, a monitor, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 708 may include, but is not limited to, disk and optical disk. Communication unit 709 allows electronic device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth devices, 802.11 devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.

[0111] The computing unit 701 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as methods 200 and 400. For example, in some embodiments, methods 200 and 400 may be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of methods 200 and 400 described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to execute methods 200, 400 by any other suitable means (e.g., by means of firmware).

[0112] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0113] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0114] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0115] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0116] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), the Internet, and blockchain networks.

[0117] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0118] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0119] While embodiments or examples of this disclosure have been described with reference to the accompanying drawings, it should be understood that the methods, systems, and devices described above are merely exemplary embodiments or examples, and the scope of the invention is not limited by these embodiments or examples, but only by the granted claims and their equivalents. Various elements in the embodiments or examples may be omitted or replaced by their equivalents. Furthermore, the steps may be performed in a different order than that described in this disclosure. Further, various elements in the embodiments or examples may be combined in various ways. Importantly, as the technology evolves, many elements described herein can be replaced by equivalents that appear after this disclosure.

Claims

1. A method for training a task planning agent, comprising: A pre-trained task planning agent is obtained, wherein the task planning agent is used to understand the intent of search statements related to map information to obtain at least one search instruction, wherein the at least one search instruction is used to search for information in the corresponding map search tool among multiple map search tools to obtain the search results corresponding to the search statement. Obtain a sample search statement for training the task planning agent, and at least one sample search instruction corresponding to the sample search statement as a training label. Determine a reward function for training the task planning agent, wherein the reward function can be used to characterize the quality of the search instructions output by the task planning agent; and The task planning agent is reinforced and trained based on the sample search statement, at least one sample search instruction corresponding to the sample search statement, and the reward function, so as to maximize the reward function.

2. The method as described in claim 1, wherein, Obtaining a pre-trained task planning agent includes: Obtain multiple first search statements, wherein each of the multiple first search statements is used for map information search; For each first search statement, the first search statement is input into a large language model to obtain at least one first search instruction corresponding to the first search statement, wherein the at least one first search instruction corresponds to a corresponding map search tool; and Based on each first search statement and the at least one first search instruction corresponding to each first search statement, a preset task planning agent is trained to obtain the pre-trained task planning agent.

3. The method as described in claim 1 or 2, wherein, The at least one map search tool includes at least one of the following: a first tool for performing precise location searches, a second tool for performing fuzzy location searches, and a third tool for performing webpage content searches, wherein, The search instructions for each of the at least one map search tool include a search type and search keywords. The search type is used to identify the corresponding map search tool, and the search keywords are determined based on the corresponding search statement so that the corresponding map search tool can search for information related to the search keywords.

4. The method of claim 3, wherein, The search instructions corresponding to the first tool further include: a search area, wherein the search area is used to enable the first tool to search for information related to the search keyword within the search area.

5. The method of claim 3, wherein, The search instructions corresponding to the second tool also include at least one of the following: search area, search center point, and sorting information. The search area is used to enable the second tool to search for information related to the search keywords within the search area; The search center point is used to enable the second tool to search for information related to the search keyword in its surrounding area, centered on the search center point; and The sorting information is used to enable the second tool to sort the information obtained from the search.

6. The method of claim 1, wherein, Obtaining a sample search statement for training the task planning agent, and at least one sample search instruction corresponding to the sample search statement, includes: Obtain a second search statement to input into the pre-trained task planning agent, and obtain at least one second search instruction corresponding to the second search statement; Based on the at least one second search instruction, a second search result corresponding to the second search statement is obtained through a corresponding map search tool; Determine the content matching degree between the second search result and the second search statement to modify the at least one second search instruction; and The second search statement is used as the sample search statement, and the modified at least one second search instruction is used as the at least one sample search instruction.

7. The method of claim 6, wherein, Determining the match between the second search result and the second search statement to modify the at least one second search instruction includes: Based on the determined content matching degree between the second search result and the second search statement, a search level corresponding to the second search result and the second search statement is determined, wherein the search level is a corresponding level among a preset plurality of search levels, wherein the preset plurality of search levels are used to represent different degrees of satisfaction of the search needs represented by the corresponding search statement by the corresponding search results; and In response to determining that the search level corresponding to the second search result and the second search statement is one of the preset multiple search levels used to characterize the lower degree of satisfaction, the at least one second search instruction is modified.

8. The method of claim 1, wherein, The value of the reward function is determined based on a format reward item and a content reward item, wherein the format reward item is used to characterize the format correctness of at least one third search instruction generated by the task planning agent based on the sample search statement, and the content reward item is used to characterize the correctness of the task planning agent's understanding of the intent of the sample search statement.

9. The method as claimed in claim 1 or 8, wherein, The reward function can also be used to characterize the time delay required for the task planning agent to generate at least one third search instruction based on the third search statement, wherein the time delay is determined based on at least one of the number of the generated third search instructions and the number of thought markers generated in the process of generating the at least one third search instruction.

10. The method of claim 8, wherein, The content reward is determined based on the content similarity between the at least one third search instruction and the corresponding information in the at least one sample search instruction.

11. The method of claim 10, wherein, The content reward items are determined based on the following operations: In response to determining that the map search tool corresponding to each of the at least one third search instruction is the same as the map search tool corresponding to each of the at least one sample search instruction, the content reward item is determined based on the content similarity of the corresponding information in the at least one third search instruction and the at least one sample search instruction; In response to the determination that the map search tool corresponding to each of the at least one third search instruction is different from the map search tool corresponding to each of the at least one sample search instruction, and the value determined based on the content similarity between the corresponding information in the at least one third search instruction and the at least one sample search instruction is greater than a first preset value, the content reward item is determined to be a second preset value. In response to determining that the map search tool corresponding to each of the at least one third search instruction is different from the map search tool corresponding to each of the at least one sample search instruction, and that the value determined based on the content similarity between the corresponding information in the at least one third search instruction and the at least one sample search instruction is not greater than the first preset value, the content reward item is determined as the third preset value.

12. The method of claim 1, wherein, Obtaining a sample search statement for training the task planning agent, and at least one sample search instruction corresponding to the sample search statement as a training label, includes: The task planning agent acquires sample search statements for training the task planning agent, user feature data corresponding to the sample search statements, and at least one sample search instruction corresponding to the sample search statements as training labels, wherein the task planning agent is used to perform intent understanding on map information-related search statements based on the user feature data to obtain at least one search instruction.

13. A map information search method, comprising: Retrieve search terms related to map information; The search statement is input into a trained task planning agent to obtain at least one search instruction corresponding to the search statement. as well as Based on the at least one search command, information is searched sequentially using the map search tools corresponding to each of the at least one search command to obtain search results corresponding to the search query. The task planning agent is trained based on any one of claims 1-12.

14. A task planning agent training device, comprising: The first acquisition unit is configured to acquire a pre-trained task planning agent, wherein the task planning agent is used to perform intent understanding on search statements related to map information to obtain at least one search instruction, wherein the at least one search instruction is used to perform information search in the corresponding map search tool among multiple map search tools to obtain search results corresponding to the search statement. The second acquisition unit is configured to acquire a sample search statement for training the task planning agent, and at least one sample search instruction corresponding to the sample search statement as a training label. The determining unit is configured to determine a reward function for training the task planning agent, wherein the reward function can be used to characterize the quality of search instructions output by the task planning agent; and The reinforcement training unit is configured to perform reinforcement training on the task planning agent based on the sample search statement, at least one sample search instruction corresponding to the sample search statement, and the reward function, so as to maximize the reward function.

15. A map information search device, comprising: The third acquisition unit is configured to acquire search statements related to map information; An input unit is configured to input the search statement into a trained task planning agent to obtain at least one search instruction corresponding to the search statement. as well as The search unit is configured to perform information searches sequentially using map search tools corresponding to the at least one search command, based on the at least one search command, to obtain search results corresponding to the search statement. The task planning agent is trained based on any one of claims 1-12.

16. An electronic device comprising: At least one processor; as well as A memory that is communicatively connected to the at least one processor; in The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-13.

17. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-13.

18. A computer program product comprising a computer program, wherein, When the computer program is executed by a processor, it implements the method of any one of claims 1-13.