Data retrieval method, model training method, device and equipment
By introducing instruction text to correct query intent in data retrieval and combining multi-level and multi-hop query intent recognition technology, the problem of inaccurate intent recognition in traditional data retrieval methods is solved, achieving more efficient and accurate data retrieval.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING BAIDU NETCOM SCI & TECH CO LTD
- Filing Date
- 2023-06-14
- Publication Date
- 2026-07-03
Smart Images

Figure CN116842130B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence, specifically to natural language processing, deep learning, and intelligent recommendation technologies, which can be applied in smart city and smart government scenarios. Specifically, it relates to a data retrieval method, an intent recognition model training method, a device, an electronic device, a computer-readable storage medium, and a computer program product. Background Technology
[0002] Artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies mainly include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.
[0003] With the advent of the big data era, data retrieval methods have become increasingly important. Data retrieval is widely used in various fields, such as e-commerce, social media, and search engines. Traditional data retrieval methods are typically based on keyword search, which retrieves data by matching keywords in the query with data in a database.
[0004] The methods described in this section are not necessarily methods that had been previously conceived or adopted. Unless otherwise specified, no method described in this section should be assumed to be prior art simply because it is included in this section. Similarly, unless otherwise specified, the issues mentioned in this section should not be considered to be accepted in any prior art. Summary of the Invention
[0005] This disclosure provides a data retrieval method, an intent recognition model training method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
[0006] According to one aspect of this disclosure, a data retrieval method is provided, comprising: acquiring query text and instruction text input by a user, wherein the instruction text is used to define the category of data to be retrieved; identifying at least one entity word in the query text based on the query text; determining at least one query intent of the user based on the query text, the instruction text, and the at least one entity word; and performing data retrieval based on the at least one query intent and the at least one entity word to obtain target data.
[0007] According to another aspect of this disclosure, a method for training an intent recognition model is provided, comprising: acquiring at least one sample data, each sample data including query text, instruction text, and at least one query intent label, wherein the instruction text is used to define the category of the data to be retrieved; for each sample data, performing the following operations: identifying at least one entity word in the query text corresponding to the sample data; predicting at least one intent prediction result using the intent recognition model based on the query text, instruction text, and at least one entity word corresponding to the sample data; and adjusting at least one parameter of the intent recognition model based on the at least one intent prediction result and the at least one query intent label corresponding to the sample data.
[0008] According to another aspect of this disclosure, a data retrieval apparatus is provided, comprising: a first acquisition unit configured to acquire query text and instruction text input by a user, wherein the instruction text is used to define the category of data to be retrieved; an identification unit configured to identify at least one entity word in the query text based on the query text; a determination unit configured to determine at least one query intent of a user based on the query text, the instruction text, and at least one entity word; and a retrieval unit configured to perform data retrieval based on at least one query intent and at least one entity word to obtain target data.
[0009] According to another aspect of this disclosure, a training apparatus for an intent recognition model is provided, comprising: a first acquisition unit configured to acquire at least one sample data, each sample data including query text, instruction text, and at least one query intent tag, the instruction text being used to define the category of data to be retrieved; an execution unit configured to perform operations performed by the following subunits for each sample data, the execution unit comprising: an identification subunit configured to identify at least one entity word in the query text corresponding to the sample data; a prediction subunit configured to predict at least one intent prediction result using the intent recognition model based on the query text, instruction text, and at least one entity word corresponding to the sample data; and an adjustment subunit configured to adjust at least one parameter of the intent recognition model based on the at least one intent prediction result and the at least one query intent tag corresponding to the sample data.
[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; 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 data retrieval method or the training method for the intent recognition model described above.
[0011] According to another aspect of this disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to perform the above-described data retrieval method or intention recognition model training method.
[0012] According to another aspect of this disclosure, a computer program product is provided, including a computer program, wherein the computer program, when executed by a processor, implements the above-described data retrieval method or the training method for the intent recognition model.
[0013] According to one or more embodiments of this disclosure, intent recognition can be made more accurate and better suited to the actual needs of users, thereby improving the accuracy of subsequent data retrieval.
[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 1 A 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;
[0017] Figure 2 A flowchart of a data retrieval method according to an embodiment of the present disclosure is shown;
[0018] Figure 3 A flowchart illustrating the determination of at least one query intent according to an embodiment of the present disclosure is shown;
[0019] Figure 4 A flowchart of a data retrieval method according to an exemplary embodiment of the present disclosure is shown;
[0020] Figure 5 A flowchart illustrating the acquisition of target data according to an embodiment of the present disclosure is shown;
[0021] Figure 6 A flowchart illustrating a training method for an intent recognition model according to an embodiment of the present disclosure is shown;
[0022] Figure 7 A structural block diagram of a data retrieval apparatus according to an embodiment of the present disclosure is shown;
[0023] Figure 8 A structural block diagram of a training apparatus for an intent recognition model according to an embodiment of the present disclosure is shown;
[0024] Figure 9 A structural block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation
[0025] 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.
[0026] 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.
[0027] 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.
[0028] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.
[0029] Figure 1 A 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.
[0030] In embodiments of this disclosure, server 120 may run one or more services or software applications that enable the execution of the data retrieval method or the training method of the intent recognition model described above.
[0031] 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.
[0032] 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.
[0033] Users can use client devices 101, 102, 103, 104, 105, and / or 106 to obtain their query text and instruction text. 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.
[0034] 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.
[0035] Network 110 can be any type of network well known to those skilled in the art, and can use any of a variety of available protocols (including but not limited to TCP / IP, SNA, IPX, etc.) to support data communication. 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.
[0036] 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.
[0037] 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.
[0038] 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 / or 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 / or 106.
[0039] 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.
[0040] 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 audio files and video files. 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 away from 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.
[0041] 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.
[0042] 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.
[0043] According to some embodiments, such as Figure 2 As shown, a data retrieval method is provided, including:
[0044] Step S201: Obtain the query text and instruction text input by the user. The instruction text is used to limit the category of data to be retrieved.
[0045] Step S202: Based on the query text, identify and obtain at least one entity word in the query text;
[0046] Step S203: Based on the query text, instruction text, and at least one entity word, determine at least one query intent of the user; and
[0047] Step S204: Perform data retrieval based on at least one query intent and at least one entity word to obtain target data.
[0048] Therefore, by introducing instruction text during intent recognition, the intent of the query text can be further corrected through the instruction text, making intent recognition more accurate and better in line with the actual needs of users, thereby improving the accuracy of subsequent data retrieval.
[0049] In some embodiments, the data retrieval method described above can be applied to application scenarios such as single-table retrieval and multi-table retrieval. For example, in the context of government affairs search, where data is stored in the form of structured text (e.g., multiple tables), the data retrieval method described above can be applied to the retrieval of relevant archival objects in the aforementioned field.
[0050] In some embodiments, the query text and instruction text input by the user can be obtained first. In some exemplary embodiments, the query text may be, for example, "a person named XX".
[0051] In some embodiments, the instruction text can be used to define the category of data to be retrieved. In some exemplary embodiments, the instruction text can, for example, define the category of data to be retrieved as basic information about people, view information, etc. For example, instruction text for searching basic information about people may include "find people," "search for people," "search for people information," etc., and instruction text for searching view information may include "search for photos," "search for views," "find visual data," etc.
[0052] In some embodiments, the instruction text can reflect the user's query intent to a certain extent. By combining the instruction text with the query text to identify the query intent, the query text expressed by the user in natural language can be used as a reference and correction, thereby improving the accuracy of intent recognition.
[0053] In some embodiments, entity words in the query text can be identified by applying a pre-trained named entity recognition model. For example, when performing named entity recognition on "material A purchased from XX location at XX time", the entity words "XX time", "XX location", and "material A" can be identified, which correspond to the entities "time", "location", and "material" respectively.
[0054] In some embodiments, identifying at least one entity word in the query text based on the query text may include: using a trained first named entity recognition model to identify operation instruction words in the query text; and in response to identifying at least one operation instruction word in the query text, using a trained second named entity recognition model to identify the first query text after filtering out at least one operation instruction word, so as to obtain at least one entity word.
[0055] Therefore, before extracting entity words, the command words in the query text are first identified and filtered to avoid misidentifying command words as entity words during entity word extraction, which would affect the accuracy of subsequent data retrieval.
[0056] In some embodiments, when users enter query text, they often include some operation instruction words related to the retrieval operation, such as "search for employees named XXX", which contains the operation instruction words "search for employees of...". If such operation instruction words are misidentified as entity words, it may affect the subsequent retrieval of target data.
[0057] Therefore, we can first train a first named entity recognition model for recognizing and annotating operation command words based on a sample dataset containing sample query texts after annotating the operation command words.
[0058] Before performing entity word recognition on the query text, a trained first named entity recognition model can be used to identify operation instruction words in the query text. Then, the operation instruction words in the query text are filtered out from the query text, and a trained second named entity recognition model is used to identify the first query text after filtering out the operation instruction words, thereby obtaining the entity words in the query text for use in the retrieval and ranking of downstream target data.
[0059] In some embodiments, the first query text after filtering out operation instruction words and the identified entity words can be input together into the downstream target data retrieval module and sorting module, so as to recall and sort the target data through more accurate and richer semantic information.
[0060] In some embodiments, determining at least one query intent of a user based on query text, instruction text, and at least one entity word may include: in response to a trained intent recognition model being available and the query text not matching any of the preset query texts in a first preset list, inputting the query text, instruction text, and at least one entity word into the intent recognition model to obtain at least one intent recognition result output by the intent recognition model as at least one query intent, wherein at least one preset query text in the first preset list includes at least one historical query text in which the intent recognition result obtained by applying the intent recognition model contains an error.
[0061] In some embodiments, in response to the availability of a pre-trained intent recognition model (i.e., the intent recognition model is available), query text, instruction text, and at least one entity word can be input into a pre-trained intent recognition model to obtain at least one query intent output by the model.
[0062] In some embodiments, before applying the model, it can be first determined whether the query text matches a preset query text in a first preset list, thereby determining whether the current query text is a query text for which the intent recognition model has made a recognition error in the preprocessing. If it is determined that the query text is not pre-existing in the list, the above information is input into the model to obtain the corresponding query intent.
[0063] In some exemplary embodiments, the query text, instruction text, and at least one entity word can be concatenated according to a preset format and then input into the model. The preset format could be, for example, “[Time][Location][SEP]Query Text[SEP]Instruction Text”, where SEP is the separator.
[0064] Therefore, by setting a first preset list, historical query texts that have identification errors in the model are filtered out when they are reviewed or reported by users, and the remaining query texts are applied to the trained intent recognition model for intent recognition, thereby improving the efficiency and accuracy of intent recognition, and thus improving the efficiency and accuracy of subsequent data retrieval.
[0065] In some embodiments, such as Figure 3 As shown, determining at least one user query intent based on the query text, instruction text, and at least one entity word also includes:
[0066] Step S301: In response to at least one of the following conditions being met: the intent recognition model is unavailable and the query text matches the first preset query text in the first preset list, multiple sentence templates are obtained, each of the multiple sentence templates corresponding to at least one preset query intent;
[0067] Step S302: For each of the multiple sentence templates, in response to the sentence template including a slot corresponding to the entity type of a first entity word among at least one entity word, fill the slot with the first entity word to obtain a first query sentence; and
[0068] Step S303: For each sentence template in the multiple sentence templates, determine the first matching degree based at least on the first query sentence and the query text; and
[0069] Step S304: Obtain the first query sentence with the highest matching degree among at least one first query sentence corresponding to the query text, and use at least one preset query intent corresponding to the sentence template corresponding to the first query sentence as at least one query intent.
[0070] Therefore, when the intent recognition model cannot be obtained (e.g., due to network signal interruption, the intent recognition model cannot be obtained online), and / or the recognition results obtained by the intent recognition model are inaccurate, intent recognition can be performed by applying template matching. This allows for accurate processing of cases that the model cannot accurately recognize, improving the accuracy of intent recognition, ensuring the stability and reliability of data retrieval, and improving the accuracy of subsequent data retrieval.
[0071] In some embodiments, multiple sentence templates can be predefined, and the query intent corresponding to each sentence template can be defined. Each sentence template includes at least one entity slot, and some sentence templates may also contain at least one preset keyword.
[0072] In some embodiments, entity words extracted from the query text can be filled into each entity word slot corresponding to that entity word, thereby obtaining at least one first query sentence after filling. Subsequently, by calculating the first matching degree between each first query sentence and the query text, the sentence template that best matches the query text can be determined, and the preset query intent corresponding to the sentence template can be used as the query intent of the query text.
[0073] In some exemplary embodiments, the query text is, for example, "goods A transported by plane to location XX at XX time", and the sentence template can be, for example, "[time] plane [location] [goods]", with the corresponding query intent being "search for goods transported by plane (Flight_Property)". Here, [time], [location], and [goods] are entity slots, and "plane" is a keyword.
[0074] For the above sentence template, entity words can be filled into the corresponding slots, and the semantic similarity between the obtained first query sentence "XX time, plane, XX location, supplies A" and the query text can be calculated to determine the first matching degree.
[0075] In some exemplary embodiments, the query text is, for example, “Supplies A transported by plane to location XX at XX time”, and the sentence template can be, for example, “[time].*by plane.*of.*supplies”, where [time] is an entity slot and “by plane” and “supplies” are keywords.
[0076] For the above sentence template, after filling the entity words into the corresponding slots, the obtained first query sentence "XX time.* take a plane.* of.* supplies" is matched with the query text using regular expressions to determine the first matching degree.
[0077] In some embodiments, determining a first degree of match, at least based on a first query statement and query text, may include: determining a first degree of match based on the first query statement and a second query statement consisting of instruction text and query text.
[0078] Therefore, by simultaneously applying template matching to both instruction text and query text for intent recognition, the accuracy of intent recognition using template matching can be further improved.
[0079] Figure 4 A flowchart of a data retrieval method according to an exemplary embodiment of the present disclosure is shown.
[0080] In some exemplary embodiments, such as Figure 4 As shown, the data retrieval method may include: step S401, identifying at least one entity word in the query text based on the query text; step S402, determining whether preset conditions are met, wherein the preset conditions include that the trained intent recognition model is available and the query text does not match each preset query text in the first preset list; step S403, in response to meeting the preset conditions, inputting the query text, instruction text, and at least one entity word into the intent recognition model to obtain at least one intent recognition result output by the intent recognition model as at least one query intent; step S404, in response to not meeting the preset conditions, determining at least one query intent corresponding to the query text based on template matching; and step S405, performing data retrieval based on at least one query intent and at least one entity word to obtain target data.
[0081] In some embodiments, the number of at least one query intent is multiple and includes multiple first intents corresponding to different levels in a preset intent system. The preset intent system includes at least one superior intent and at least one subordinate intent corresponding to each of the at least one superior intent.
[0082] Determining at least one query intent of a user based on query text, instruction text, and at least one entity word may further include: for each subordinate intent among a plurality of first intents, in response to the plurality of first intents not including a parent intent corresponding to the subordinate intent, deleting the subordinate intent from the plurality of first intents to update at least one query intent.
[0083] Therefore, by setting multi-level query intents, in cases where lower-level query intents are difficult to identify, they can at least match the upper-level tags, thereby avoiding intent recognition failure and improving the overall reliability of the intent recognition and data retrieval solution. At the same time, for the problem of inaccurate matching of lower-level tags, correction can be made by matching the upper-level tags (when no upper-level intent corresponding to the lower-level intent is found among the multiple identified intents, the lower-level intent is judged to be inaccurate, and the upper-level intent is used as the basis for subsequent table retrieval), thereby improving the accuracy of intent recognition.
[0084] In some exemplary embodiments, the preset intent system may include a parent label "Search for transported goods (Trip_Property)" and its child labels may include, for example, "Search for goods transported by air (Flight_Property)" and "Search for goods transported by train (Train_Property)".
[0085] In some embodiments, data retrieval includes table data retrieval in multiple tables, at least one query intent includes a multi-hop query intent, the multi-hop query intent includes multiple sub-intents and query dependencies between the multiple sub-intents, the multiple sub-intents include a first sub-intent and a second sub-intent dependent on the first sub-intent, and data retrieval based on at least one query intent and at least one entity term to obtain target data includes:
[0086] For each query intent in at least one query intent, perform the following operation:
[0087] Step S501: In response to the query intent being a multi-hop query intent, at least one first table is determined among multiple tables based on the first sub-intent in the multi-hop query intent;
[0088] Step S502: Based on at least one entity word, perform table data retrieval on at least one first table to obtain at least one first data;
[0089] Step S503: Based on the second sub-intent in the multi-hop query intent, determine at least one second table among multiple tables; and
[0090] Step S504: Based on at least one entity word and at least one first data, perform a table data retrieval on at least one second table to obtain at least one second data; and
[0091] Step S505: Obtain target data based on at least one second data corresponding to each query intent in at least one query intent.
[0092] In some embodiments, for multi-table query application scenarios, the query intent may include a single-table query intent. For example, the query intent corresponding to the query text "a person named XX" may be "basic information of a person".
[0093] In some embodiments, for multi-table query application scenarios, the query intent corresponding to the situation where it is necessary to query table data in multiple tables sequentially, and the retrieval of subsequent tables needs to be based on the data obtained from the retrieval of preceding tables, can be set as a multi-hop intent.
[0094] In some embodiments, a multi-hop intent may be, for example, "Property_Same_Trip" (goods transported together), and its corresponding query text may be, for example, "goods transported together with property A". This multi-hop intent may include three sub-intents: "goods-vehicle-goods", and there is a query dependency between adjacent sub-intents. That is, first, "property A" needs to be queried in the property table, and based on the query results, the vehicle used to transport property A needs to be queried in the vehicle table. Then, based on the above query results, the goods transported together with property A need to be queried.
[0095] Therefore, by setting up multi-hop query intents and integrating multiple sub-intents and their dependencies into a single multi-hop intent, a multi-hop intent can be directly obtained based on the intent recognition model. This improves recognition efficiency while avoiding the dependency confusion caused by different word order in the query text in existing technologies, thus enhancing the accuracy of intent recognition and subsequent table retrieval.
[0096] In some embodiments, all the above-described types of query intents can be placed in the same query intent library, and a recall can be performed in the tag library based on the above method to determine the query intent of the query text.
[0097] In some embodiments, there is a many-to-many relationship between the instruction text and the query intent. For example, the instruction text "search view information" can correspond to the query intents "search for database view", "search for people view", etc., and the query intent "search for database information" can also correspond to the instruction texts "search view information", "search for material information", "search for people information", etc.
[0098] In some embodiments, such as Figure 6 As shown, a training method for an intent recognition model is provided, including:
[0099] Step S601: Obtain at least one sample data, each sample data including query text, instruction text and at least one query intent label, the instruction text being used to limit the category of the data to be retrieved;
[0100] For each sample in at least one set of sample data, perform the following operation:
[0101] Step S602: Based on the query text corresponding to the sample data, identify and obtain at least one entity word in the query text;
[0102] Step S603: Based on the query text, instruction text, and at least one entity word corresponding to the sample data, use the intent recognition model to predict and obtain at least one intent prediction result; and
[0103] Step S604: Based on at least one intent prediction result and at least one query intent label corresponding to the sample data, adjust at least one parameter of the intent recognition model.
[0104] Therefore, by applying the intent recognition model trained based on this method, instruction text can be introduced during intent recognition. The intent of the query text can be further corrected through the instruction text, making intent recognition more accurate and better in line with the actual needs of users, thereby improving the accuracy of subsequent data retrieval.
[0105] In some embodiments, the number of at least one sample data is multiple, and obtaining at least one sample data may include: obtaining at least one first query text and at least one original instruction text corresponding to at least one first query text, each of the at least one first query text corresponding to at least one first intent label; for each of the at least one first query text, performing the following operations: inputting the original instruction text corresponding to the first query text into a pre-trained language model to obtain at least one first instruction text output by the pre-trained language model, wherein the semantic similarity between each of the at least one first instruction text and the original instruction text is greater than a preset threshold; and obtaining multiple first sample data based on the first query text, the original instruction text corresponding to the first query text, and at least one first instruction text, wherein the sample label of each of the multiple first sample data is at least one first intent label corresponding to the first query text; and obtaining at least one sample data based on the multiple first sample data corresponding to each of the at least one first query text.
[0106] Therefore, by generalizing instruction text based on pre-trained language models, we can obtain richer and more varied sample instruction texts from a small number of instruction texts, thereby improving the accuracy of the model's intent recognition and enabling the model to adapt to the user's varied expression methods.
[0107] In some embodiments, a small initial instruction set may be constructed first, and the mapping relationship between the initial instruction set and the query intent may be marked. In some embodiments, the initial instruction set may also be obtained from an instruction set that stores instructions with identification errors.
[0108] Subsequently, a pre-trained language model is applied to analyze the original instruction text and output at least one first instruction text that is semantically similar to the original instruction text. Based on each first instruction text and the corresponding query text, a new sample data is constructed. This allows for the acquisition of richer and more varied sample instruction texts from a small number of instruction texts, thereby improving the accuracy of the model's intent recognition and enabling the model to adapt to the user's varied expression methods.
[0109] In some embodiments, at least one generalized text of each of the first query text and the original instruction text can be obtained and then randomly combined to further generalize the sample data, thereby enabling the model to cover a wider range of expressions.
[0110] In some embodiments, based on the query text, instruction text, and at least one entity word corresponding to the sample data, using an intent recognition model to predict at least one intent prediction result may include: constructing a first query sentence according to a first preset sentence template based on the instruction text and at least one entity word corresponding to the sample data and the query text corresponding to the sample data; and inputting the first query sentence into the intent recognition model to obtain at least one intent prediction result output by the intent recognition model.
[0111] Therefore, by constructing sample texts based on sample data and sentence templates, it is possible to obtain richer and more varied sample data from a small amount of sample data, thereby improving the accuracy of the model's intent recognition and enabling the model to adapt to the user's varied expression methods.
[0112] In some embodiments, instruction text, query text, entity words, etc. in the sample data can be simply concatenated sequentially and input into the model to obtain prediction results.
[0113] In some embodiments, multiple sentence templates can be preset, each including at least one entity word slot. Instruction text, query text, entity words, etc., from sample data can be filled into the corresponding slots in the sentence templates to obtain reconstructed query sentences. By inputting the reconstructed sentence into the model and training it based on the prediction results, the diversity of sample data can be further improved, the accuracy of intent recognition of the model can be enhanced, and the model can adapt to the diverse expressions of users.
[0114] In some embodiments, at least one sample data includes second sample data, and the number of at least one query intent tags corresponding to the second sample data is multiple and includes multiple second intent tags corresponding to different levels in a preset intent system. The preset intent system includes at least one superior intent and at least one subordinate intent corresponding to each of the at least one superior intent.
[0115] Therefore, by setting multi-level query intents, in cases where lower-level query intents are difficult to identify, they can at least match the upper-level tags, thereby avoiding intent recognition failure and improving the overall reliability of the intent recognition and data retrieval solution. At the same time, for the problem of inaccurate matching of lower-level tags, correction can be made by matching the upper-level tags (when no upper-level intent corresponding to the lower-level intent is found among the multiple identified intents, the lower-level intent is judged to be inaccurate, and the upper-level intent is used as the basis for subsequent table retrieval), thereby improving the accuracy of intent recognition.
[0116] In some embodiments, at least one sample data includes third sample data, and at least one query intent label corresponding to the third sample data includes a multi-hop query intent label, which includes multiple sub-intents and query dependencies between the multiple sub-intents.
[0117] Therefore, by setting multi-hop query intents and defining multiple sub-intents and their dependencies within a single multi-hop intent, a multi-hop intent can be directly obtained based on the intent recognition model. This improves recognition efficiency while avoiding the dependency confusion caused by different word orders in the query text, as seen in existing technologies. This enhances the accuracy of intent recognition and subsequent table retrieval.
[0118] In some embodiments, such as Figure 7 As shown, a data retrieval device 700 is provided, comprising:
[0119] The first acquisition unit 710 is configured to acquire query text and instruction text input by the user, wherein the instruction text is used to limit the category of the data to be retrieved;
[0120] The recognition unit 720 is configured to recognize at least one entity word in the query text based on the query text.
[0121] Determining unit 730 is configured to determine at least one query intent of a user based on query text, instruction text, and at least one entity word; and
[0122] The retrieval unit 740 is configured to perform data retrieval based on at least one query intent and at least one entity term to obtain target data.
[0123] The operations performed by units 710 to 740 of the data retrieval device 700 are similar to the operations of steps S201 to S204 in the data retrieval method described above, and will not be described in detail here.
[0124] In some embodiments, the determining unit may include: a first obtaining subunit configured to, in response to the availability of a trained intent recognition model and the fact that the query text does not match each preset query text in a first preset list, input the query text, the instruction text, and at least one entity word into the intent recognition model to obtain at least one intent recognition result output by the intent recognition model as at least one query intent, wherein at least one preset query text in the first preset list includes at least one historical query text in which the intent recognition result obtained by applying the intent recognition model contains an error.
[0125] In some embodiments, the determining unit may include: a second obtaining subunit configured to, in response to at least one of the following conditions being met: the intent recognition model is unavailable and the query text matches a first preset query text in a first preset list, obtain a plurality of sentence templates, each of the plurality of sentence templates corresponding to at least one preset query intent; an execution subunit configured to, for each of the plurality of sentence templates, perform the following operations: in response to the sentence template including a slot corresponding to the entity type of a first entity word in at least one entity word, fill the first entity word into the slot to obtain a first query sentence; and determine a first matching degree based at least on the first query sentence and the query text; and a third obtaining subunit configured to obtain the first query sentence with the highest first matching degree among at least one first query sentence corresponding to the query text, so as to use at least one preset query intent corresponding to the sentence template of the first query sentence as at least one query intent.
[0126] In some embodiments, determining a first degree of match, at least based on a first query statement and query text, may include: determining a first degree of match based on the first query statement and a second query statement consisting of instruction text and query text.
[0127] In some embodiments, such as Figure 8 As shown, a training device 800 for an intent recognition model is provided, comprising:
[0128] The first acquisition unit 810 is configured to acquire at least one sample data, each of the at least one sample data including query text, instruction text and at least one query intent label, wherein the instruction text is used to limit the category of the data to be retrieved;
[0129] Execution unit 820 is configured to perform the operations performed by the following subunits for each of at least one set of sample data. Execution unit 820 includes:
[0130] The identification subunit 821 is configured to identify at least one entity word in the query text based on the query text corresponding to the sample data.
[0131] Prediction subunit 822 is configured to predict at least one intent prediction result based on the query text, instruction text, and at least one entity word corresponding to the sample data, using an intent recognition model; and
[0132] The adjustment subunit 823 is configured to adjust at least one parameter of the intent recognition model based on at least one intent prediction result and at least one query intent label corresponding to the sample data.
[0133] The operations performed by units 810, 820 and subunits 821 to 823 of the training device 800 for the intent recognition model are similar to the operations of steps S601 to S604 in the training method for the intent recognition model described above, and will not be repeated here.
[0134] According to embodiments of this disclosure, an electronic device, a readable storage medium, and a computer program product are also provided.
[0135] refer to Figure 9 The present invention describes a structural block diagram of an electronic device 900 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.
[0136] like Figure 9 As shown, the electronic device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded into a random access memory (RAM) 903 from a storage unit 908. The RAM 903 may also store various programs and data required for the operation of the electronic device 900. The computing unit 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0137] Multiple components in electronic device 900 are connected to I / O interface 905, including: input unit 906, output unit 907, storage unit 908, and communication unit 909. Input unit 906 can be any type of device capable of inputting information to electronic device 900. Input unit 906 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device, and can include, but is not limited to, a mouse, keyboard, touchscreen, trackpad, trackball, joystick, microphone, and / or remote control. Output unit 907 can be any type of device capable of presenting information, and can include, but is not limited to, a monitor, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 908 can include, but is not limited to, hard disk and optical disk. Communication unit 909 allows electronic device 900 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and can 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.
[0138] The computing unit 901 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 901 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 901 performs the various methods and processes described above, such as the data retrieval method or the intent recognition model training method described above. For example, in some embodiments, the data retrieval method or the intent recognition model training method described above can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 900 via ROM 902 and / or communication unit 909. When the computer program is loaded into RAM 903 and executed by the computing unit 901, one or more steps of the data retrieval method or the intent recognition model training method described above can be performed. Alternatively, in other embodiments, the computing unit 901 may be configured in any other suitable manner (e.g., by means of firmware) to perform the data retrieval method or the training method of the intent recognition model described above.
[0139] 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.
[0140] 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.
[0141] 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.
[0142] 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).
[0143] 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 embodiments 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.
[0144] 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.
[0145] 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.
[0146] 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 data retrieval method, comprising: Obtain the query text and instruction text input by the user, wherein the instruction text is used to limit the category of the data to be retrieved; Based on the query text, at least one entity word in the query text is identified and obtained, including: Using a trained first named entity recognition model, identify operation instruction words in the query text; and In response to the identification of at least one operation instruction word in the query text, a trained second named entity recognition model is used to identify the first query text after filtering out the at least one operation instruction word to obtain the at least one entity word; Based on the query text, the instruction text, and the at least one entity word, determine at least one query intent of the user; and Data retrieval is performed based on at least one query intent and at least one entity term to obtain target data.
2. The method according to claim 1, wherein, Determining at least one query intent of the user based on the query text, the instruction text, and the at least one entity word includes: In response to the trained intent recognition model being available and the query text not matching any of the preset query texts in the first preset list, the query text, the instruction text, and the at least one entity word are input into the intent recognition model to obtain at least one intent recognition result output by the intent recognition model, which serves as the at least one query intent, wherein... At least one preset query text in the first preset list includes at least one historical query text in which the intent recognition result obtained by applying the intent recognition model is incorrect.
3. The method according to claim 2, wherein, Determining at least one query intent of the user based on the query text, the instruction text, and the at least one entity word includes: In response to at least one of the following conditions being met: the intent recognition model is unavailable and the query text matches a first preset query text in the first preset list, a plurality of sentence templates are obtained, each of the plurality of sentence templates corresponding to at least one preset query intent; For each of the plurality of sentence templates, perform the following operations: In response to the sentence template including a slot corresponding to the entity type of the first entity word among the at least one entity words, the first entity word is filled into the slot to obtain a first query sentence; and A first matching degree is determined based at least on the first query statement and the query text; and Obtain the first query sentence with the highest matching degree among at least one first query sentence corresponding to the query text, and use at least one preset query intent corresponding to the sentence template corresponding to the first query sentence as the at least one query intent.
4. The method according to claim 3, wherein, Determining the first matching degree based at least on the first query statement and the query text includes: The first matching degree is determined based on the first query statement and the second query statement composed of the instruction text and the query text.
5. The method according to claim 1, wherein, The number of the at least one query intent is multiple and includes multiple first intents corresponding to different levels in a preset intent system. The preset intent system includes at least one superior intent and at least one subordinate intent corresponding to each of the at least one superior intent. Determining the user's at least one query intent based on the query text, the instruction text, and the at least one entity word further includes: For each subordinate intent among the plurality of first intents, in response to the plurality of first intents not including the parent intent corresponding to the subordinate intent, the subordinate intent is deleted from the plurality of first intents to update the at least one query intent.
6. The method according to any one of claims 1-5, wherein, The data retrieval includes table data retrieval in multiple tables, the at least one query intent includes a multi-hop query intent, the multi-hop query intent includes multiple sub-intents and query dependencies between the multiple sub-intents, the multiple sub-intents include a first sub-intent and a second sub-intent that depends on the first sub-intent, and the data retrieval based on the at least one query intent and the at least one entity term to obtain target data includes: For each of the at least one query intent, perform the following operations: In response to the query intent being a multi-hop query intent, at least one first table is determined among the plurality of tables based on the first sub-intent in the multi-hop query intent; Based on the at least one entity word, perform table data retrieval on the at least one first table to obtain at least one first data; Based on the second sub-intent in the multi-hop query intent, at least one second table is determined from the plurality of tables; and Based on the at least one entity word and the at least one first data, a table data retrieval is performed on the at least one second table to obtain at least one second data; and The target data is obtained based on at least one second data corresponding to each of the at least one query intent.
7. A method for training an intent recognition model, the method comprising: Obtain at least one sample data, each of the at least one sample data including query text, instruction text and at least one query intent tag, wherein the instruction text is used to limit the category of the data to be retrieved; For each of the at least one sample data, perform the following operation: Based on the query text corresponding to the sample data, at least one entity word in the query text is identified; Based on the query text, instruction text, and at least one entity word corresponding to the sample data, at least one intent prediction result is obtained using the intent recognition model, including: Based on the instruction text corresponding to the sample data, at least one of the at least one entity words, and the query text corresponding to the sample data, a first query sentence is constructed according to a first preset sentence template; and The first query statement is input into the intent recognition model to obtain at least one intent prediction result output by the intent recognition model; and Based on the at least one intent prediction result and the at least one query intent label corresponding to the sample data, adjust at least one parameter of the intent recognition model.
8. The method according to claim 7, wherein, The number of the at least one sample data is multiple, and obtaining the at least one sample data includes: Obtain at least one first query text and at least one original instruction text corresponding to the at least one first query text, wherein each of the at least one first query texts corresponds to at least one first intent tag; For each of the at least one first query texts, perform the following operations: The original instruction text corresponding to the first query text is input into a pre-trained language model to obtain at least one first instruction text output by the pre-trained language model. The semantic similarity between each of the at least one first instruction text and the original instruction text is greater than a preset threshold. Based on the first query text, the original instruction text corresponding to the first query text, and at least one first instruction text, multiple first sample data are obtained, wherein the sample label of each of the multiple first sample data is at least one first intent label corresponding to the first query text; and Based on the multiple first sample data corresponding to each of the at least one first query texts, obtain the at least one sample data.
9. The method according to claim 7, wherein, The at least one sample data includes second sample data, and the number of at least one query intent tags corresponding to the second sample data is multiple and includes multiple second intent tags corresponding to different levels in a preset intent system. The preset intent system includes at least one superior intent and at least one subordinate intent corresponding to each of the at least one superior intent.
10. The method according to any one of claims 7 to 9, wherein, The at least one sample data includes third sample data, and the at least one query intent label corresponding to the third sample data includes a multi-hop query intent label, which includes multiple sub-intents and query dependencies between the multiple sub-intents.
11. A data retrieval device, comprising: The first acquisition unit is configured to acquire query text and instruction text input by the user, wherein the instruction text is used to limit the category of the data to be retrieved; The recognition unit is configured to recognize at least one entity word in the query text based on the query text, including: Using a trained first named entity recognition model, identify operation instruction words in the query text; and In response to the identification of at least one operation instruction word in the query text, a trained second named entity recognition model is used to identify the first query text after filtering out the at least one operation instruction word to obtain the at least one entity word; The determining unit is configured to determine at least one query intent of the user based on the query text, the instruction text, and the at least one entity word; and The retrieval unit is configured to perform data retrieval based on the at least one query intent and the at least one entity word to obtain target data.
12. The apparatus according to claim 11, wherein, The determining unit includes: A first acquisition subunit is configured to, in response to the availability of a trained intent recognition model and the query text not matching any preset query text in a first preset list, input the query text, the instruction text, and the at least one entity word into the intent recognition model to obtain at least one intent recognition result output by the intent recognition model as the at least one query intent, wherein... At least one preset query text in the first preset list includes at least one historical query text in which the intent recognition result obtained by applying the intent recognition model is incorrect.
13. The apparatus according to claim 12, wherein, The determining unit further includes: The second acquisition subunit is configured to acquire multiple sentence templates in response to at least one of the following conditions: the intent recognition model is unavailable and the query text matches a first preset query text in the first preset list, each of the multiple sentence templates corresponding to at least one preset query intent. The execution subunit is configured to perform the following operations for each of the plurality of sentence templates: In response to the sentence template including a slot corresponding to the entity type of the first entity word among the at least one entity words, the first entity word is filled into the slot to obtain a first query sentence; and A first matching degree is determined based at least on the first query statement and the query text; and The third acquisition subunit is configured to acquire the first query sentence with the highest matching degree among at least one first query sentence corresponding to the query text, so as to use at least one preset query intent corresponding to the sentence template corresponding to the first query sentence as the at least one query intent.
14. The apparatus according to claim 13, wherein, Determining the first matching degree based at least on the first query statement and the query text includes: The first matching degree is determined based on the first query statement and the second query statement composed of the instruction text and the query text.
15. A training apparatus for an intent recognition model, the apparatus comprising: The first acquisition unit is configured to acquire at least one sample data, each of the at least one sample data including query text, instruction text and at least one query intent tag, wherein the instruction text is used to limit the category of the data to be retrieved; An execution unit is configured to perform the operations performed by the following subunits for each of the at least one set of sample data, the execution unit comprising: The identification subunit is configured to identify at least one entity word in the query text based on the query text corresponding to the sample data. The prediction subunit is configured to predict at least one intent prediction result based on the query text, instruction text, and at least one entity word corresponding to the sample data, using the intent recognition model, including: Based on the instruction text corresponding to the sample data, at least one of the at least one entity words, and the query text corresponding to the sample data, a first query sentence is constructed according to a first preset sentence template; and The first query statement is input into the intent recognition model to obtain at least one intent prediction result output by the intent recognition model; and The adjustment subunit is configured to adjust at least one parameter of the intent recognition model based on the at least one intent prediction result and at least one query intent label corresponding to the sample data.
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 executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method of any one of claims 1-10.
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-10.
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-10.
Citation Information
Patent Citations
Information retrieval method, medium, equipment and device
CN116108137A