Training method and device of map intention understanding model and electronic equipment
By acquiring training data and generating sample call instructions using a large language model, a map intent understanding model is trained, which solves the problems of low retrieval efficiency and error accumulation in map retrieval systems, and improves the accuracy and efficiency of the model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING BAIDU NETCOM SCI & TECH CO LTD
- Filing Date
- 2025-12-04
- Publication Date
- 2026-04-24
AI Technical Summary
In map retrieval systems, retrieval requests for complex needs need to be broken down into multiple basic needs, resulting in poor retrieval efficiency and error accumulation, which reduces the accuracy of map intent understanding models.
By acquiring training data, including sample map retrieval requests and sample call instructions, and combining this with a large language model to generate sample call instructions, the initial map intent understanding model is trained, thereby improving the model's accuracy and efficiency.
The map intent understanding model accurately determines the invocation instructions for each retrieval request, avoiding error accumulation and improving retrieval efficiency and accuracy.
Smart Images

Figure CN121919291A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, particularly to the fields of deep learning, natural language processing, intelligent search, and large models, and especially to a training method, apparatus, and electronic device for a map intent understanding model. Background Technology
[0002] Currently, in map retrieval systems, retrieval requests with complex needs require the map intent retrieval model to break them down into multiple basic requirements to obtain retrieval instructions for processing. This results in poor retrieval efficiency and error accumulation, reducing the accuracy of the map intent understanding model. Summary of the Invention
[0003] This disclosure provides a training method, apparatus, and electronic device for a map intent understanding model.
[0004] According to one aspect of this disclosure, a method for training a map intent understanding model is provided. The method includes: acquiring training data; the training data includes sample map retrieval requests and sample invocation instructions; the instruction type of the sample invocation instructions corresponds to the retrieval function of the map retrieval system; acquiring an initial map intent understanding model; and training the initial map intent understanding model using the sample map retrieval requests and the sample invocation instructions to obtain a trained map intent understanding model.
[0005] According to another aspect of this disclosure, a map retrieval method is provided, the method comprising: acquiring a map retrieval request to be processed; inputting the map retrieval request into a map intent understanding model, and acquiring a call instruction output by the map intent understanding model; the map intent understanding model being determined according to the training method of the map intent understanding model as described above; and performing call processing on a map retrieval system according to the call instruction to obtain map retrieval results.
[0006] According to another aspect of this disclosure, a training apparatus for a map intent understanding model is provided. The apparatus includes: a first acquisition module for acquiring training data; the training data includes sample map retrieval requests and sample invocation instructions; the instruction type of the sample invocation instructions corresponds to the retrieval function of the map retrieval system; a second acquisition module for acquiring an initial map intent understanding model; and a training processing module for training the initial map intent understanding model using the sample map retrieval requests and the sample invocation instructions to obtain a trained map intent understanding model.
[0007] According to another aspect of this disclosure, a map retrieval device is provided, the device comprising: a first acquisition module for acquiring a map retrieval request to be processed; a second acquisition module for inputting the map retrieval request into a map intent understanding model and acquiring a call instruction output by the map intent understanding model; the map intent understanding model is determined according to the training method of the map intent understanding model as described above; and a call processing module for performing call processing on the map retrieval system according to the call instruction to obtain map retrieval results.
[0008] 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; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the training method of the map intent understanding model proposed above in this disclosure; or to perform the map retrieval method proposed above in this disclosure.
[0009] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided that stores computer instructions for causing a computer to execute the training method of the map intent understanding model proposed in this disclosure; or, to execute the map retrieval method proposed in this disclosure.
[0010] According to another aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the steps of the training method for the map intent understanding model proposed above in this disclosure; or, implements the steps of the map retrieval method proposed above in this disclosure.
[0011] 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
[0012] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein: Figure 1 This is a schematic diagram based on the first embodiment of the present disclosure; Figure 2 This is a schematic diagram according to the second embodiment of the present disclosure; Figure 3 This is a schematic diagram according to the third embodiment of the present disclosure; Figure 4 This is a schematic diagram illustrating the training of the map intent understanding model; Figure 5 This is a schematic diagram according to the fourth embodiment of the present disclosure; Figure 6 This is a schematic diagram according to the fifth embodiment of the present disclosure; Figure 7 This is a block diagram of an electronic device used to implement the training method or map retrieval method of the map intent understanding model in the embodiments of this disclosure. Detailed Implementation
[0013] 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 and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0014] Currently, in map retrieval systems, retrieval requests with complex needs require the map intent retrieval model to break them down into multiple basic requirements to obtain retrieval instructions for processing. This results in poor retrieval efficiency and error accumulation, reducing the accuracy of the map intent understanding model.
[0015] To address the aforementioned issues, this disclosure proposes a training method, apparatus, and electronic device for a map intent understanding model.
[0016] Figure 1 The diagram is based on the first embodiment of the present disclosure. It should be noted that the training method of the map intent understanding model in the present disclosure can be applied to a training device for the map intent understanding model. The device can be configured in an electronic device so that the electronic device can perform the training function of the map intent understanding model.
[0017] Among them, electronic devices can be any device with computing capabilities, such as personal computers (PCs), mobile terminals, servers, etc. Mobile terminals can be, for example, in-vehicle devices, mobile phones, tablets, personal digital assistants, wearable devices, smart speakers, servers, server clusters, and other hardware devices with various operating systems, touch screens and / or displays.
[0018] The training device for the map intent understanding model can also be software within an electronic device, such as training software for the map intent understanding model. The following embodiments use an electronic device as an example for illustration.
[0019] like Figure 1 As shown, the training method for this map intent understanding model may include the following steps: Step 101: Obtain training data; the training data includes sample map retrieval requests and sample calling instructions; the instruction type of the sample calling instructions corresponds to the retrieval function of the map retrieval system.
[0020] In this embodiment of the disclosure, the retrieval functions and corresponding instruction types of the map retrieval system can be determined by combining historical map retrieval requests. Specifically, before step 101, in order to facilitate the construction of training data, it is necessary to first determine the various retrieval functions and instruction types of the map retrieval system to improve the accuracy of the constructed training data, thereby improving the accuracy of the trained map intent understanding model.
[0021] The process by which an electronic device determines the various search functions and instruction types of a map retrieval system can be, for example, acquiring multiple historical map retrieval requests; performing clustering processing on the multiple historical map retrieval requests to obtain at least one clustering result; and determining the various search functions of the map retrieval system and the instruction types corresponding to the search functions based on the at least one clustering result.
[0022] When clustering multiple historical map retrieval requests, the electronic device can calculate the similarity between the request targets of the multiple historical map retrieval requests, and then perform clustering based on the similarity. For each clustering result, the electronic device can determine a retrieval function and a command type based on the various historical map retrieval requests within the clustering result.
[0023] In this embodiment of the disclosure, the map retrieval system includes retrieval functions such as location search, travel guide search, and knowledge query. The command type corresponding to the location search function is, for example, a location search type; the command type corresponding to the travel guide search function is, for example, a travel guide search type; and the command type corresponding to the knowledge query function is, for example, a knowledge query type.
[0024] Among them, the setting of various instruction types can improve the flexibility and richness of instruction type settings, thereby increasing the richness of training data.
[0025] Step 102: Obtain the initial map intent understanding model.
[0026] The initial map intent understanding model can be a pre-trained model that utilizes map-related knowledge. The number of parameters in the map intent understanding model is smaller than that in the large language model.
[0027] Step 103: The initial map intent understanding model is trained using sample map retrieval requests and sample call instructions to obtain the trained map intent understanding model.
[0028] In this embodiment of the disclosure, the electronic device may perform step 103 as follows: input the sample map retrieval request into the map intent understanding model, obtain the predicted invocation instruction output by the map intent understanding model; determine the loss function value of the map intent understanding model based on the predicted invocation instruction and the sample invocation instruction; and perform parameter adjustment processing on the map intent understanding model based on the loss function value to obtain the trained map intent understanding model.
[0029] The electronic device determines the loss function value of the map intent understanding model based on the predicted call command and the sample call command, and then performs parameter adjustment processing on the map intent understanding model so that the predicted call command obtained by the map intent understanding model is as close as possible to the sample call command, thereby improving the accuracy of the trained map intent understanding model.
[0030] The method for training a map intent understanding model according to this embodiment involves acquiring training data, including sample map retrieval requests and sample invocation instructions. The instruction type of the sample invocation instructions corresponds to the retrieval function of the map retrieval system. An initial map intent understanding model is acquired. The initial map intent understanding model is then trained using the sample map retrieval requests and sample invocation instructions to obtain a trained map intent understanding model. The correspondence between the instruction type of the sample invocation instructions and the retrieval function of the map retrieval system allows the trained map intent understanding model to determine a single invocation instruction for each map retrieval request, avoiding the need to determine invocation instructions corresponding to multiple basic requirements, thereby improving the accuracy of the trained map intent understanding model.
[0031] To further improve the training efficiency of the map intent understanding model and reduce the cost of acquiring training data, a large language model and sample map retrieval requests can be combined to generate sample call instructions. For example... Figure 2 As shown, Figure 2 This is a schematic diagram based on the second embodiment of the present disclosure. Figure 2 The illustrated embodiment may include the following steps: Step 201: Obtain the sample map retrieval request.
[0032] In this embodiment of the disclosure, the sample map retrieval request can be selected from historical map retrieval requests; and / or generated based on the construction template of the map retrieval request and map information.
[0033] Step 202: Obtain the prompt text; the prompt text indicates the execution of the task to generate the call command based on the command type corresponding to each search function of the map search system.
[0034] In this embodiment of the disclosure, the prompt text needs to describe the instruction types corresponding to each retrieval function of the map retrieval system, which facilitates the execution of the instruction generation task by the large language model, thereby improving the accuracy of the sample instruction generation task generated by the large language model. Correspondingly, before step 202, the electronic device may also perform the following process: obtaining the instruction template corresponding to each instruction type; the instruction template includes: the calling interface and parameter items; constructing the prompt text based on the calling interface and parameter items in the instruction template and the description information of the instruction generation task.
[0035] In this embodiment of the disclosure, when the type of the call instruction template is a location search type, the call instruction template includes at least one of the following parameter items: search keywords, search center point, search area, search filter conditions, and search result sorting conditions.
[0036] The number of search center points can be one or more. The filtering parameters involved in the search filtering conditions can include at least one of the following: max_distance (maximum distance, in meters), min_price (minimum price, in yuan), max_price (maximum price, in yuan), min_rating (minimum rating, range 0-5), max_cycling_time (cycling within XX minutes), max_driving_time (driving within XX minutes), max_subway_time (subway within XX minutes), max_bus_time (bus within XX minutes), max_walk_time (walking within XX minutes), min_class (minimum class, range 1-5), opening_time (opening hours), history (object's historical behavior), exclude (object exclusion options), etc.
[0037] The search results sorting criteria can include at least one of the following: distance, price, rating, popularity, and class. Sorting order can be, for example, ascending or descending.
[0038] The search query was titled "What are some good restaurants around the Summer Palace?". The search keywords were "food," the search center was the Summer Palace, and the search area was the area surrounding the Summer Palace.
[0039] The search query was titled "What are some highly-rated restaurants around the Summer Palace?". The search keywords were "food"; the search center was the Summer Palace; the search area was the area surrounding the Summer Palace; the search filter was "rating greater than the default rating threshold"; and the search results were sorted by rating.
[0040] In this embodiment of the disclosure, when the type of the call instruction template is a strategy search type, the call instruction template includes at least one of the following parameter items: search keywords, search area, and the destination location of the strategy to be searched. In this embodiment of the disclosure, when the type of the call instruction template is a knowledge query type, the call instruction template may include search keywords.
[0041] Specifically, different parameter items are set for the call instruction template corresponding to each instruction type. This allows the large language model to extract the required parameters from the sample map retrieval request based on the parameter quantity in the call instruction template corresponding to the instruction type after determining the instruction type, and then generate the sample call instruction, thereby improving the accuracy of the determined sample call instruction.
[0042] Step 203: Input the sample map retrieval request and prompt text into the large language model, and obtain the sample call instruction output by the large language model.
[0043] Step 204: Generate training data based on the sample map retrieval request and sample call instruction.
[0044] In this embodiment of the disclosure, the electronic device can combine and process the correspondence between multiple sample map retrieval requests and sample call instructions to obtain training data.
[0045] Step 205: Obtain the initial map intent understanding model.
[0046] Step 206: The initial map intent understanding model is trained using sample map retrieval requests and sample call instructions to obtain the trained map intent understanding model.
[0047] It should be noted that for details of steps 205 and 206, please refer to [the relevant documentation / reference]. Figure 1 Steps 102 to 103 in the illustrated embodiment will not be described in detail here.
[0048] The training method for the map intent understanding model in this embodiment involves: acquiring sample map retrieval requests; acquiring prompt text; the prompt text instructing the execution of a task to generate call commands based on the command types corresponding to various retrieval functions of the map retrieval system; inputting the sample map retrieval requests and prompt text into a large language model to acquire sample call commands output by the large language model; generating training data based on the sample map retrieval requests and sample call commands; acquiring an initial map intent understanding model; and training the initial map intent understanding model using the sample map retrieval requests and sample call commands to obtain a trained map intent understanding model. The method of generating sample call commands by combining the large language model and sample map retrieval requests reduces the cost of acquiring training data and further improves the training efficiency of the map intent understanding model.
[0049] Figure 3 This is a schematic diagram based on the third embodiment of the present disclosure. It should be noted that the map retrieval method of the present disclosure can be applied to a map retrieval device, which can be configured in an electronic device so that the electronic device can perform map retrieval functions.
[0050] Among them, electronic devices can be any device with computing capabilities, such as personal computers (PCs), mobile terminals, servers, etc. Mobile terminals can be, for example, in-vehicle devices, mobile phones, tablets, personal digital assistants, wearable devices, smart speakers, servers, server clusters, and other hardware devices with various operating systems, touch screens and / or displays.
[0051] The map retrieval device can also be software within an electronic device, such as map retrieval software. In the following embodiments, an electronic device is used as an example for illustration.
[0052] like Figure 3 As shown, the map retrieval method may include the following steps: Step 301: Obtain the map retrieval request to be processed.
[0053] Among them, the map search requests to be processed include, for example, "What are some good restaurants around the Summer Palace?".
[0054] Step 302: Input the map retrieval request into the map intent understanding model and obtain the calling instruction output by the map intent understanding model; the map intent understanding model is based on, for example... Figure 1 or Figure 2 The training method for the map intent understanding model shown in the embodiment is determined.
[0055] In the case of a map retrieval request to be processed, such as "What are some good restaurants around the Summer Palace?", the call command can include the following: search keyword "food"; search center point "Summer Palace"; search area "surrounding area of the Summer Palace".
[0056] The map intent understanding model can be trained using training data. This training data may include sample map retrieval requests and the corresponding sample invocation instructions.
[0057] The training process of the map intent understanding model can be as follows: acquiring training data; the training data includes sample map retrieval requests and sample call instructions; the instruction type of the sample call instructions corresponds to the retrieval function of the map retrieval system; acquiring the initial map intent understanding model; and using the sample map retrieval requests and sample call instructions to train the initial map intent understanding model to obtain the trained map intent understanding model.
[0058] Step 303: Call the map retrieval system according to the call instruction to obtain map retrieval results.
[0059] The map retrieval method of this disclosure involves: acquiring a map retrieval request to be processed; inputting the map retrieval request into a map intent understanding model; and acquiring the invocation instruction output by the map intent understanding model. The map intent understanding model is based on, for example... Figure 1 or Figure 2 The training method of the map intent understanding model shown in the embodiment is determined; the map retrieval system is called according to the calling instruction to obtain the map retrieval result; wherein, the map intent understanding model can determine a calling instruction for each map retrieval request, avoiding the need to determine the calling instructions corresponding to multiple basic needs, thereby avoiding error accumulation and improving the accuracy of map retrieval.
[0060] The following example illustrates this. For example... Figure 4 The image shown is a schematic diagram illustrating the training of the map intent understanding model. Figure 4 The process may include the following steps.
[0061] Step 401, Task Design. This involves determining the map API set (i.e., the set of command templates). The map API set includes location search APIs, guide / note search APIs, and knowledge query APIs.
[0062] Step 402, data collection, i.e., acquiring training data. The process of acquiring training data is as follows: generating requests (i.e., map search requests) based on users' online needs and sending them to the large language model; the large language model outputs the location search instruction corresponding to user request 1, the strategy search instruction corresponding to user request 2, and the knowledge query instruction corresponding to user request 3.
[0063] Step 403: Based on the collected data, train the map intent understanding model so that it combines the understanding ability of a large language model with the fast response capability of a small model.
[0064] To implement the above embodiments, this disclosure also provides a training apparatus for a map intent understanding model. For example... Figure 5 As shown, Figure 5 This is a schematic diagram according to the fourth embodiment of the present disclosure. The training device 50 for the map intent understanding model may include: a first acquisition module 501, a second acquisition module 502, and a training processing module 503.
[0065] The first acquisition module 501 is used to acquire training data, which includes sample map retrieval requests and sample call instructions. The instruction type of the sample call instructions corresponds to the retrieval function of the map retrieval system. The second acquisition module 502 is used to acquire an initial map intent understanding model. The training processing module 503 is used to train the initial map intent understanding model using the sample map retrieval requests and the sample call instructions to obtain a trained map intent understanding model.
[0066] As one possible implementation of this disclosure, the first acquisition module 501 includes: a first acquisition unit, a second acquisition unit, a third acquisition unit, and a generation unit; the first acquisition unit is used to acquire the sample map retrieval request; the second acquisition unit is used to acquire a prompt text; the prompt text indicates the execution processing of a call instruction generation task based on the instruction type corresponding to each retrieval function of the map retrieval system; the third acquisition unit is used to input the sample map retrieval request and the prompt text into a large language model to acquire the sample call instruction output by the large language model; the generation unit is used to generate the training data according to the sample map retrieval request and the sample call instruction.
[0067] As one possible implementation of this disclosure, the apparatus further includes: a third acquisition module and a construction module; the third acquisition module is used to acquire a call instruction template corresponding to each instruction type; the call instruction template includes: a call interface and parameter items; the construction module is used to construct the prompt text based on the call interface and parameter items in the call instruction template and the description information of the call instruction generation task.
[0068] As one possible implementation of this disclosure, the apparatus further includes: a fourth acquisition module, a clustering processing module, and a determination module; the fourth acquisition module is used to acquire multiple historical map retrieval requests; the clustering processing module is used to perform clustering processing on the multiple historical map retrieval requests to obtain at least one clustering result; the determination module is used to determine each retrieval function of the map retrieval system and the instruction type corresponding to the retrieval function based on the at least one clustering result.
[0069] As one possible implementation of this disclosure, the instruction type includes at least one of the following: location search type, strategy search type, and knowledge inquiry type.
[0070] As one possible implementation of this disclosure, the call instruction template corresponding to the location search type includes at least one of the following parameter items: search keywords, search center point, search area, search filter conditions, and search result sorting conditions; the call instruction template corresponding to the strategy search type includes at least one of the following parameter items: search keywords, search area, and the destination location of the strategy to be searched; the parameter items in the call instruction template corresponding to the knowledge inquiry type include search keywords.
[0071] As one possible implementation of this disclosure, the training processing module 503 is specifically configured to: input the sample map retrieval request into the map intent understanding model, obtain the predicted invocation instruction output by the map intent understanding model; determine the loss function value of the map intent understanding model based on the predicted invocation instruction and the sample invocation instruction; and perform parameter adjustment processing on the map intent understanding model based on the loss function value to obtain the trained map intent understanding model.
[0072] The training apparatus for the map intent understanding model in this embodiment acquires training data, including sample map retrieval requests and sample invocation instructions. The instruction type of the sample invocation instructions corresponds to the retrieval function of the map retrieval system. An initial map intent understanding model is acquired. The initial map intent understanding model is trained using the sample map retrieval requests and sample invocation instructions to obtain a trained map intent understanding model. The instruction type of the sample invocation instructions corresponds to the retrieval function of the map retrieval system, enabling the trained map intent understanding model to determine a single invocation instruction for each map retrieval request, avoiding the need to determine invocation instructions corresponding to multiple basic requirements, thereby improving the accuracy of the trained map intent understanding model.
[0073] To implement the above embodiments, this disclosure also provides a map retrieval device. For example... Figure 6 As shown, Figure 6This is a schematic diagram according to the fifth embodiment of the present disclosure. The map retrieval device 60 may include: a first acquisition module 601, a second acquisition module 602, and a call processing module 603.
[0074] The first acquisition module 601 is used to acquire a map retrieval request to be processed; the second acquisition module 602 is used to input the map retrieval request into a map intent understanding model and acquire the calling instruction output by the map intent understanding model; the map intent understanding model is based on, for example... Figure 1 or Figure 2 The training method for the map intent understanding model shown in the embodiment is determined; the call processing module 603 is used to call the map retrieval system according to the call instruction to obtain map retrieval results.
[0075] The map retrieval device of this disclosure acquires a map retrieval request to be processed; inputs the map retrieval request into a map intent understanding model, and acquires the calling instruction output by the map intent understanding model; the map intent understanding model is based on, for example, Figure 1 or Figure 2 The training method of the map intent understanding model shown in the embodiment is determined; the map retrieval system is called according to the calling instruction to obtain the map retrieval result; wherein, the map intent understanding model can determine a calling instruction for each map retrieval request, avoiding the need to determine the calling instructions corresponding to multiple basic needs, thereby avoiding error accumulation and improving the accuracy of map retrieval.
[0076] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision, and disclosure of users' personal information are all carried out with the consent of the users, and all comply with the provisions of relevant laws and regulations, and do not violate public order and good morals.
[0077] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0078] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may 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.
[0079] 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.
[0080] Multiple components in electronic device 700 are connected to I / O interface 705, including: input unit 706, such as keyboard, mouse, etc.; output unit 707, such as various types of displays, speakers, etc.; storage unit 708, such as disk, optical disk, etc.; and communication unit 709, such as network card, modem, wireless transceiver, etc. 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.
[0081] The computing unit 701 can be various 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 for training a map intent understanding model or map retrieval methods. For example, in some embodiments, the methods for training a map intent understanding model or map retrieval methods can 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 can 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 the methods for training a map intent understanding model or map retrieval methods described above can be performed. Alternatively, in other embodiments, computing unit 701 may be configured in any other suitable manner (e.g., by means of firmware) to perform a training method for a map intent understanding model or a map retrieval method.
[0082] 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), payload-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.
[0083] 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.
[0084] 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.
[0085] 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).
[0086] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user 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., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0087] 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.
[0088] 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 executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0089] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for training a map intent understanding model, the method comprising: Obtain training data; The training data includes sample map retrieval requests and sample call instructions; The instruction type of the sample retrieval command corresponds to the retrieval function of the map retrieval system; Obtain the initial map intent understanding model; The initial map intent understanding model is trained using the sample map retrieval request and the sample call instruction to obtain the trained map intent understanding model.
2. The method according to claim 1, wherein, The acquisition of training data includes: Obtain the sample map retrieval request; Obtain prompt text; the prompt text indicates the execution of the task to generate a call command based on the command type corresponding to each search function of the map retrieval system; Input the sample map retrieval request and the prompt text into the large language model, and obtain the sample call instruction output by the large language model; The training data is generated based on the sample map retrieval request and the sample call instruction.
3. The method according to claim 2, wherein, Before obtaining the prompt text, the method further includes: Obtain the call instruction template corresponding to each instruction type; the call instruction template includes: a call interface and parameter items; The prompt text is constructed based on the calling interface and parameter items in the calling instruction template, as well as the description information of the calling instruction generation task.
4. The method according to claim 2 or 3, wherein, Before obtaining the prompt text, the method further includes: Retrieve multiple historical map search requests; Clustering is performed on the multiple historical map retrieval requests to obtain at least one clustering result; Based on the at least one clustering result, determine each retrieval function of the map retrieval system and the corresponding instruction type of the retrieval function.
5. The method according to claim 1 or 3, wherein, The instruction types include at least one of the following: location search type, strategy search type, and knowledge inquiry type.
6. The method according to claim 5, wherein, The call instruction template corresponding to the location search type includes at least one of the following parameters: search keywords, search center point, search area, search filter conditions, and search result sorting conditions. The call command template corresponding to the strategy search type includes at least one of the following parameters: search keywords, search area, and destination of the strategy to be searched; The parameters in the call instruction template corresponding to the knowledge query type include search keywords.
7. The method according to claim 1, wherein, The step of training the initial map intent understanding model using the sample map retrieval request and the sample call instruction to obtain the trained map intent understanding model includes: Input the sample map retrieval request into the map intent understanding model and obtain the prediction call instruction output by the map intent understanding model; The loss function value of the map intent understanding model is determined based on the predicted invocation instruction and the sample invocation instruction; The map intent understanding model is adjusted according to the loss function value to obtain the trained map intent understanding model.
8. A map retrieval method, the method comprising: Obtain map search requests to be processed; Input the map retrieval request into the map intent understanding model and obtain the calling instruction output by the map intent understanding model; The map intent understanding model is determined according to the training method of the map intent understanding model as described in any one of claims 1 to 7; The map retrieval system is invoked according to the invocation instruction to obtain map retrieval results.
9. A training apparatus for a map intent understanding model, the apparatus comprising: The first acquisition module is used to acquire training data; The training data includes sample map retrieval requests and sample call instructions; The instruction type of the sample retrieval command corresponds to the retrieval function of the map retrieval system; The second acquisition module is used to acquire the initial map intent understanding model; The training processing module is used to train the initial map intent understanding model using the sample map retrieval request and the sample call instruction to obtain the trained map intent understanding model.
10. A map retrieval device, the device comprising: The first acquisition module is used to acquire map retrieval requests to be processed. The second acquisition module is used to input the map retrieval request into the map intent understanding model and acquire the calling instruction output by the map intent understanding model; the map intent understanding model is determined according to the training method of the map intent understanding model as described in any one of claims 1 to 7; The call processing module is used to call the map retrieval system according to the call instruction in order to obtain map retrieval results.
11. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to perform the method of any one of claims 1 to 7; Alternatively, the method described in claim 8 may be performed.
12. 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 to 7; or to perform the method according to claim 8.
13. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 7; or implements the method according to claim 8.