User intention recognition method, server and terminal equipment
By constructing prompt words and inputting them to fine-tune the large language model when the intent score is low, the problem of slow and inaccurate intent recognition speed of the large language model is solved, and the accuracy and speed of intent recognition are improved.
Patent Information
- Application Number
- CN202511157553.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-18
- Publication Date
- 2025-12-30
AI Technical Summary
Large language models are slow in intent recognition and have inaccurate outputs, failing to meet user needs.
When the intent score is low, prompt words are constructed using user input information, definitions and examples of multiple candidate intents, and then fed into a fine-tuned large language model for intent filtering.
It improves the accuracy and speed of intent recognition, meeting user needs.
Smart Images

Figure CN121234924A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of natural language processing technology, and in particular to a user intent recognition method, server, and terminal device. Background Technology
[0002] Large Language Models (LLMs), also known as large-scale language models, are artificial intelligence models designed to understand and generate human language. Large language models typically refer to language models containing hundreds of billions or more parameters, trained on massive amounts of text data to gain a deep understanding of language.
[0003] Intent recognition is one of the core tasks of natural language understanding, aiming to automatically determine the underlying purpose or need from user input. Large language models can be used for intent recognition, but using a full-scale large language model can lead to slow intent recognition speed. To improve speed, lightweight large language models can be used, but the output user intent may be inaccurate. If the user intent is inaccurate, the information returned to the user will also be inaccurate and fail to meet the user's needs. Summary of the Invention
[0004] Some embodiments of this application provide a user intent recognition method, server, and terminal device. When the user intent score obtained by the intent recognition model is low, prompt words can be constructed using user input information, definitions and examples of multiple candidate intents, and the prompt words can be input into a fine-tuned large language model to obtain accurate user intent, thereby meeting user needs.
[0005] Firstly, some embodiments of this application provide a user intent recognition method, applied to a server, including:
[0006] Receive user input information sent by the terminal device;
[0007] User input information is fed into the intent recognition model to obtain the first user intent and the intent score corresponding to the first user intent. The intent score is used to characterize the accuracy of intent recognition.
[0008] If the intent score is lower than the first threshold, multiple candidate intents corresponding to the user input information are obtained, and the candidate intents are associated with the first user intent.
[0009] Based on user input, as well as the name, definition, and example text of the candidate intent, a first prompt word is constructed;
[0010] The first prompt word is input into the fine-tuned large language model to obtain the second user intent. The fine-tuned large language model is used to filter out the accurate user intent corresponding to the user input information from multiple candidate intents.
[0011] The above technical solution has the following advantages or beneficial effects: when the user intent score obtained by the intent recognition model is low, prompt words can be constructed using user input information, the definition and examples of multiple candidate intents, and the prompt words can be input into the fine-tuned large language model to obtain accurate user intent, thereby meeting user needs.
[0012] In some embodiments, the step of inputting user input information into an intent recognition model to obtain a first user intent and an intent score corresponding to the first user intent includes:
[0013] The user input information is fed into the intent recognition model to obtain the first user intent, the first slot information, and the intent score corresponding to the first user intent;
[0014] After inputting the first prompt word into the fine-tuned large language model to obtain the second user intent, the method also includes:
[0015] If the intent score is lower than the second threshold, retrieve the label corresponding to the first slot information from the slot database;
[0016] Based on user input information, second user intent, first slot information, and the tags corresponding to the first slot information, construct a second prompt word;
[0017] The second prompt word is input into the fine-tuned large language model to obtain the second slot information.
[0018] The above technical solution has the following advantages or beneficial effects: when the user intent score obtained by the intent recognition model is low, prompt words can be constructed using user input information, second user intent, first slot information and the label corresponding to the first slot information, and the prompt words can be input into the fine-tuned large language model to obtain accurate slot information, thereby meeting user needs.
[0019] In some embodiments, the step of obtaining multiple candidate intents corresponding to user input information includes:
[0020] Feature extraction is performed on the user input information to obtain the first feature vector;
[0021] The sample text of the candidate intents is obtained from the intent database, and features are extracted from the sample texts to obtain the second feature vector. The candidate intents include all intents involved in the dialogue system.
[0022] Calculate the similarity between the first feature vector and the second feature vector;
[0023] Sort the similarity scores from highest to lowest, and mark the top-ranked candidate intentions as candidate intentions.
[0024] The above technical solution has the following advantages or beneficial effects: by matching user input information with example text of candidate intents through similarity calculation, the candidate intents associated with the user input information can be recalled from a large number of candidate intents, which helps to select the accurate intent corresponding to the user input information from the candidate intents in the future.
[0025] In some embodiments, the step of obtaining multiple candidate intents corresponding to user input information includes:
[0026] Obtain the intent domain of the first user intent, which includes user intents whose semantic similarity to the first user intent is within a preset threshold;
[0027] Mark user intents in the intent domain as candidate intents.
[0028] The above technical solution has the following advantages or beneficial effects: it divides the candidate intents into multiple intent domains based on semantic similarity, and can quickly lock the candidate intents associated with the user input information based on the intent domain of the first user intent, which helps to select the accurate intent corresponding to the user input information from the candidate intents in the future.
[0029] In some embodiments, after inputting the second cue word into the fine-tuned large language model to obtain the second slot information, the method further includes:
[0030] If the intent score is higher than or equal to the first threshold, a first query instruction is generated based on the first user intent and the second slot information, and the first difficulty level corresponding to the first user intent is obtained from the intent mapping table. The intent mapping table includes the correspondence between user intent and difficulty level, and the difficulty level is used to characterize the difficulty of responding to the input information corresponding to the user intent.
[0031] The first query command is input into the language model corresponding to the first level of difficulty, and the first response information is obtained. The number of parameters of the language model is proportional to the level of difficulty.
[0032] Send a first response message to the terminal device so that the terminal device can display the first response message.
[0033] The above technical solution has the following advantages or beneficial effects: It distributes responses to large models with different parameter sizes based on the difficulty of the user's intent; by having small models handle simple tasks, response speed is improved and resource consumption is reduced. By having large models handle complex tasks, the accuracy of the response information is improved.
[0034] In some embodiments, after inputting the first prompt word into the fine-tuned large language model to obtain the second user intent, the method further includes:
[0035] If the intent score is lower than the first threshold, a second query instruction is generated based on the second user intent and the second slot information, and the second difficulty level corresponding to the second user intent is obtained from the intent mapping table.
[0036] The second query command is input into the language model corresponding to the second difficulty level to obtain the second response information;
[0037] Send a second response message to the terminal device so that the terminal device can display the second response message.
[0038] The above technical solution has the following advantages or beneficial effects: It distributes responses to large models with different parameter sizes based on the difficulty of the user's intent; by having small models handle simple tasks, response speed is improved and resource consumption is reduced. By having large models handle complex tasks, the accuracy of the response information is improved.
[0039] In some embodiments, the step of inputting user input information into an intent recognition model to obtain a first user intent and an intent score corresponding to the first user intent includes:
[0040] When the user input information is voice data, the voice data is recognized to obtain the user input text;
[0041] The user input text is fed into the intent recognition model to obtain the first user intent and the intent score corresponding to the first user intent.
[0042] The above technical solution has the following advantages or beneficial effects: it automatically converts speech into text, enabling the system to understand natural spoken input, and significantly improving convenience and accessibility.
[0043] Secondly, some embodiments of this application provide a user intent recognition method, applied to a terminal device, including:
[0044] Receive user input information;
[0045] User input information is sent to the server so that the server can input the user input information into the intent recognition model to obtain a first user intent and its corresponding intent score. If the intent score is lower than a first threshold, multiple candidate intents corresponding to the user input information are obtained. Based on the user input information, as well as the names, intent definitions, and example texts of the candidate intents, a first prompt word is constructed. The first prompt word is input into a fine-tuned large language model to obtain a second user intent. The intent score is used to characterize the accuracy of intent recognition. The candidate intents are associated with the first user intent. The fine-tuned large language model is used to filter out the accurate user intent corresponding to the user input information from multiple candidate intents.
[0046] The above technical solution has the following advantages or beneficial effects: when the user intent score obtained by the intent recognition model is low, prompt words can be constructed using user input information, the definition and examples of multiple candidate intents, and the prompt words can be input into the fine-tuned large language model to obtain accurate user intent, thereby meeting user needs.
[0047] Thirdly, some embodiments of this application provide a server, including:
[0048] The communication module is configured to establish a communication connection with the terminal device;
[0049] The processing module is configured as follows:
[0050] Receive user input information sent by the terminal device;
[0051] User input information is fed into the intent recognition model to obtain the first user intent and the intent score corresponding to the first user intent. The intent score is used to characterize the accuracy of intent recognition.
[0052] If the intent score is lower than the first threshold, multiple candidate intents corresponding to the user input information are obtained, and the candidate intents are associated with the first user intent.
[0053] Based on user input, as well as the name, definition, and example text of the candidate intent, a first prompt word is constructed;
[0054] The first prompt word is input into the fine-tuned large language model to obtain the second user intent. The fine-tuned large language model is used to filter out the accurate user intent corresponding to the user input information from multiple candidate intents.
[0055] The above technical solution has the following advantages or beneficial effects: when the user intent score obtained by the intent recognition model is low, prompt words can be constructed using user input information, the definition and examples of multiple candidate intents, and the prompt words can be input into the fine-tuned large language model to obtain accurate user intent, thereby meeting user needs.
[0056] Fourthly, some embodiments of this application provide a terminal device, including:
[0057] The communicator is configured to establish a communication connection with the server.
[0058] The controller is configured as follows:
[0059] Receive user input information;
[0060] User input information is sent to the server so that the server can input the user input information into the intent recognition model to obtain a first user intent and its corresponding intent score. If the intent score is lower than a first threshold, multiple candidate intents corresponding to the user input information are obtained. Based on the user input information, as well as the names, intent definitions, and example texts of the candidate intents, a first prompt word is constructed. The first prompt word is input into a fine-tuned large language model to obtain a second user intent. The intent score is used to characterize the accuracy of intent recognition. The candidate intents are associated with the first user intent. The fine-tuned large language model is used to filter out the accurate user intent corresponding to the user input information from multiple candidate intents.
[0061] The above technical solution has the following advantages or beneficial effects: when the user intent score obtained by the intent recognition model is low, prompt words can be constructed using user input information, the definition and examples of multiple candidate intents, and the prompt words can be input into the fine-tuned large language model to obtain accurate user intent, thereby meeting user needs.
[0062] In the technical solution provided in this application embodiment, after receiving user input information sent by the terminal device, the user input information can first be input into an intent recognition model to obtain a first user intent and a corresponding intent score, wherein the intent score is used to characterize the accuracy of intent recognition. If the intent score is lower than a first threshold, multiple candidate intents corresponding to the user input information are obtained. Then, based on the user input information, as well as the names, intent definitions, and example texts of the candidate intents, a first prompt word is constructed. Finally, the first prompt word is input into a fine-tuned large language model to obtain a second user intent. In this application embodiment, when the user intent score obtained through the intent recognition model is low, prompt words can be constructed using user input information, the definitions and examples of multiple candidate intents, and the prompt words can be input into a fine-tuned large language model to obtain an accurate user intent, thereby meeting user needs. Attached Figure Description
[0063] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0064] Figure 1 This is a schematic diagram illustrating an operational scenario between a display device and a control device provided in some embodiments of this application;
[0065] Figure 2 This is a schematic diagram of the hardware configuration of a display device provided in some embodiments of this application;
[0066] Figure 3 This is a schematic diagram of the software configuration of a display device provided in some embodiments of this application;
[0067] Figure 4 A flowchart illustrating a user intent recognition method provided in some embodiments of this application;
[0068] Figure 5 A flowchart illustrating a method for obtaining candidate intents provided in some embodiments of this application;
[0069] Figure 6 A flowchart illustrating another method for obtaining candidate intents provided in some embodiments of this application;
[0070] Figure 7 A flowchart illustrating another intent recognition method provided in some embodiments of this application;
[0071] Figure 8 A flowchart illustrating a slot information identification method provided in some embodiments of this application;
[0072] Figure 9 A flowchart illustrating a method for recognizing user intent and slot information provided in some embodiments of this application;
[0073] Figure 10 This is a timing diagram of a user interaction method provided in some embodiments of this application. Detailed Implementation
[0074] The embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described below do not represent all embodiments consistent with this application. They are merely examples of systems and methods consistent with some aspects of this application as detailed in the claims.
[0075] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.
[0076] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.
[0077] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.
[0078] The term "module" refers to any known or subsequently developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.
[0079] In this embodiment, the terminal device is a device that inputs programs and data to a computer or receives processing results from the computer via communication facilities. The terminal device is typically located in a convenient location where it can connect to a remote computer using communication facilities, and it mainly consists of a communication interface control device combined with dedicated or selected input / output devices.
[0080] Terminal devices include display devices, smart speakers, in-vehicle devices, smart home devices, smart robots, and wearable devices.
[0081] In this embodiment, display device 200 generally refers to a device with screen display and data processing capabilities. For example, display device 200 includes, but is not limited to, smart TVs, mobile terminals, computers, monitors, advertising screens, wearable devices, virtual reality devices, augmented reality devices, etc.
[0082] Figure 1 This is a schematic diagram illustrating an operational scenario between a display device and a control device provided in some embodiments of this application. For example... Figure 1 As shown, a user can operate the display device 200 via touch operation, a mobile terminal 300, and a control device 100. The control device 100 receives user input commands and converts them into control commands that the display device 200 can recognize and respond to. For example, the control device 100 can be a remote control, a stylus, a gamepad, etc.
[0083] The mobile terminal 300 can function as a control device for human-computer interaction between the user and the display device 200. It can also function as a communication device for establishing a communication connection with the display device 200 and exchanging data. In some embodiments, the mobile terminal 300 can have software applications installed on it and communicate with the display device 200 via network communication protocols to achieve one-to-one control and data communication. Furthermore, it can transmit audio and video content displayed on the mobile terminal 300 to the display device 200 for synchronized display.
[0084] In some embodiments, the mobile terminal 300 or other electronic devices may also simulate the functions of the control device 100 by running an application that controls the display device 200.
[0085] like Figure 1 The diagram also shows that the display device 200 communicates with the server 400 via various communication methods. This allows the display device 200 to communicate via a local area network (LAN), a wireless local area network (WLAN), and other networks.
[0086] Display device 200 can provide broadcast television reception function, and can also be equipped with intelligent network television function that provides computer support, including but not limited to network television, smart television, Internet Protocol television (IPTV), etc.
[0087] Figure 2 Provided for some embodiments of this application Figure 1 Hardware configuration block diagram of display device 200.
[0088] In some embodiments, the display device 200 may include at least one of a tuner 210, a communication device 220, a detector 230, a device interface 240, a controller 250, a display 260, an audio output device 270, a memory, a power supply, and a user input interface.
[0089] In some embodiments, detector 230 is used to acquire signals from the external environment or to interact with the outside world. For example, detector 230 includes a light receiver, a sensor for acquiring ambient light intensity; or, detector 230 includes an image acquisition device, such as a camera, which can be used to acquire external environmental scenes, user attributes, or user interaction gestures; or, detector 230 includes a sound acquisition device, such as a microphone, for receiving external sounds.
[0090] In some embodiments, the display 260 includes display function components for presenting images and driving components for driving image display. The display 260 is used to receive and display image signals output from the controller 250. For example, the display 260 can be used to display video content, image content, menu control interface components, and user control UI interfaces, etc.
[0091] In some embodiments, the communication device 220 is a component used to communicate with external devices or the server 400 according to various communication protocol types. The display device 200 may have multiple communication devices 220 depending on the supported communication methods. For example, when the display device 200 supports wireless network communication, it may have a communication device 220 with WiFi functionality. When the display device 200 supports Bluetooth connectivity, it needs to have a communication device 220 with Bluetooth functionality.
[0092] The communication device 220 enables the display device 200 to communicate with external devices or the server 400 via wireless or wired connections. Wired connections utilize data cables, interfaces, or other components to connect the display device 200 to external devices. Wireless connections utilize wireless signals or wireless networks. The display device 200 can directly establish a connection with external devices or indirectly through gateways, routers, or other connection devices.
[0093] In some embodiments, the controller 250 may include at least one of a central processing unit, a video processor, an audio processor, a graphics processor, and a power processor, and a first to an nth interface for input / output. The controller 250 controls the operation of the display device and responds to user operations through various software control programs stored in memory. The controller 250 controls the overall operation of the display device 200.
[0094] In some embodiments, the controller 250 and the tuner 210 may be located in different separate devices, that is, the tuner 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.
[0095] In some embodiments, a user can input user commands through a graphical user interface (GUI) displayed on a display 260, and the user input interface receives user input commands through the graphical user interface (GUI).
[0096] In some embodiments, the audio output device 270 can be a built-in speaker of the display device 200 or an external audio output device connected to the display device 200. For the external audio output device connected to the display device 200, the display device 200 may also be provided with an external audio output terminal, through which the audio output device can be connected to the display device 200 to output sound from the display device 200.
[0097] In some embodiments, the user input interface 280 can be used to receive instructions from user input.
[0098] In some embodiments, to enable user interaction, the display device 200 may run an operating system. An operating system is a computer program that manages and controls the hardware and software resources of the display device 200. The operating system can control the display device to provide a user interface; for example, the operating system can directly control the display device to provide a user interface, or it can provide a user interface by running applications. The operating system also allows users to interact with the display device 200.
[0099] It should be noted that the operating system can be a native operating system based on a specific operating platform, a third-party operating system that is deeply customized based on a specific operating platform, or an independent operating system specifically developed for display devices.
[0100] An operating system can be divided into different modules or levels based on the functions it implements, for example... Figure 3 As shown, in some embodiments, the system is divided into four layers, from top to bottom: the Applications layer (referred to as the "Application Layer"), the Application Framework layer (referred to as the "Framework Layer"), the System Library layer, and the Kernel layer.
[0101] In some embodiments, the application layer provides services and interfaces for applications, enabling the display device 200 to run applications and interact with the user based on the applications. The application layer may contain at least one application, which may be a built-in Windows program, system settings program, or clock program of the operating system; or it may be an application developed by a third-party developer. In specific implementations, the application packages in the application layer are not limited to the examples above.
[0102] The framework layer provides application programming interfaces (APIs) and a programming framework for applications. The application framework layer includes predefined functions. It acts as a central processing unit, determining the actions taken by applications within the application layer. Through the API, applications can access system resources and obtain system services during execution.
[0103] like Figure 3 As shown, the application framework layer in this embodiment includes a view system, managers, and content providers. The view system designs and implements the application's interface and interactions, and includes lists, grids, text boxes, and buttons. The managers include at least one of the following modules: an activity manager for interacting with all running activities in the system; a location manager for providing system services or applications with access to system location services; a package manager for retrieving various information related to application packages currently installed on the device; a notification manager for controlling the display and clearing of notification messages; and a window manager for managing icons, windows, toolbars, wallpapers, and desktop widgets on the user interface.
[0104] In some embodiments, the Activity Manager manages the lifecycle of individual applications and common navigation and back functions, such as controlling application exit, opening, and back actions. The Window Manager manages all window programs, such as obtaining the screen size, determining if a status bar is present, locking the screen, capturing the screen, and controlling changes to the display window, such as shrinking the display window, shaking the display, or distorting the display.
[0105] In some embodiments, the system runtime library layer can provide support for the framework layer. When the framework layer is used, the operating system runs the instruction library contained in the system runtime library layer, such as the C / C++ instruction library, to implement the functions to be performed by the framework layer.
[0106] In some embodiments, the kernel layer is a functional layer situated between the hardware and software of the display device 200. The kernel layer can implement functions such as hardware abstraction, multitasking, and memory management. For example, ... Figure 3As shown, hardware drivers can be configured in the kernel layer. The drivers included in the kernel layer can be at least one of the following: audio driver, display driver, Bluetooth driver, camera driver, WIFI driver, USB driver, HDMI driver, sensor driver (such as fingerprint sensor, temperature sensor, pressure sensor, etc.), and power driver, etc.
[0107] It should be noted that the above examples are merely a simple division of operating system functions and do not limit the specific form of the operating system of the display device 200 in this application embodiment. Depending on the function of the display device, the type of operating system, and other factors, the number of levels and the specific level type of the operating system may be expressed in other forms.
[0108] Large language models are artificial intelligence models designed to understand and generate human language. They contain hundreds of billions or more parameters and are trained on massive amounts of text data. At this stage, the computer's "brain" becomes enormous, possessing billions or even hundreds of billions of parameters. This is akin to upgrading the computer's brain to a giant supercomputer. This allows computers to perform exceptionally well on a wide range of tasks, sometimes even surpassing human intelligence. To explore the limits of performance, many researchers have begun training increasingly massive language models, such as GPT-3 with 175 billion parameters and PaLM with 540 billion parameters. Although these large language models use similar architectures and pre-training tasks to smaller language models (such as BERT with 330 million parameters and GPT-2 with 1.5 billion parameters), they exhibit drastically different capabilities, particularly demonstrating remarkable potential in solving complex tasks, a phenomenon known as "emergent capability." For example, GPT-3 can learn context to solve few-shot tasks, while GPT-2 performs poorly in this regard. Therefore, the research community has given these massive language models a name: "Large Language Models (LLM)".
[0109] LLM has had a profound impact on many fields. In natural language processing, it helps computers better understand and generate text, including writing articles, answering questions, and translating languages. In information retrieval, it improves search engines, making it easier for users to find the information they need.
[0110] Currently, various manufacturers have successively open-sourced LLMs of various sizes, such as 0.5B, 3B, 7B, and 72B. Training and fine-tuning based on open-source LLMs to suit one's own business is a convenient way to stand on the shoulders of giants.
[0111] Intent recognition is one of the core tasks of natural language understanding, aiming to automatically determine the underlying purpose or need from user input. Large language models can be used for intent recognition, but using a full-scale large language model can lead to slow intent recognition speed. To improve speed, lightweight large language models can be used, but the output user intent may be inaccurate. If the user intent is inaccurate, the information returned to the user will also be inaccurate and fail to meet the user's needs.
[0112] For example, if a user inputs "What movies does Xiao A watch?", the correct user intent is a movie / TV show search. However, the intent model outputs an intent for a music search. In this case, the server will return information about Xiao A's music works, which does not meet the user's need to search for Xiao A's movies.
[0113] To improve the accuracy of intent recognition, embodiments of this application provide a server 400, such as... Figure 4 As shown, the processing module of server 400 is configured to perform the following steps:
[0114] Step S401: Receive user input information sent by the terminal device.
[0115] The terminal device can send the user input information to the server 400 after receiving the user input information.
[0116] In some embodiments, user input information includes voice data. The terminal device's sound collector can collect ambient sounds in real time and identify the collected ambient sounds. If the identified ambient sounds include a voice wake-up word, a wake-up prompt tone can be played, and the user's voice data can be collected through the sound collector and sent to the server 400.
[0117] In some embodiments, after detecting that the user presses the voice key of the control device 100, the terminal device displays a prompt page to start collecting voice data, and uses the control device 100 to collect the voice data input by the user. The terminal device receives the voice data sent by the control device 100 and sends the voice data to the server 400.
[0118] In some embodiments, user input information includes text data. When displaying a dialog page, the terminal device receives the text data entered by the user on the dialog page, and then sends the user-entered text data to the server 400.
[0119] In some embodiments, user input information includes multimedia data, such as image data, video data, audio data, and file data. When displaying a dialog page, the terminal device receives the multimedia data selected by the user on the dialog page, or receives image data, video data, and audio data recorded or captured by the user in real time on the dialog page, and then sends the user-input multimedia data to the server 400. Alternatively, the multimedia data can be sent to the server 400 along with user-input voice data or text data. For example, a user can select a locally stored image on the dialog page and then input voice data asking "Who is the person in the picture?"
[0120] Step S402: Input the user input information into the intent recognition model to obtain the first user intent and the intent score corresponding to the first user intent.
[0121] Before inputting user input into the intent recognition model, the user input needs to be preprocessed. The purpose of preprocessing is to convert the user input into text data. If the user input is already in text format, it can be directly input into the intent recognition model.
[0122] When the user input information is voice data, the voice data needs to be recognized first to obtain the user input text. Then, the user input text is input into the intent recognition model to obtain the first user intent and the intent score corresponding to the first user intent.
[0123] When user input is multimedia data, it needs to be first input into a multimodal model to obtain descriptive text. For example, a multimodal model can be used to recognize image data and obtain descriptive text for that image data. This descriptive text is then input into an intent recognition model to obtain the first user intent and its corresponding intent score. If multiple types of user input are included in the same round of dialogue, they can all be converted to text and then concatenated together before being input into the intent recognition model.
[0124] In some embodiments, the intent recognition model can be a lightweight model. A lightweight model typically refers to a model with fewer parameters, lower computational resource consumption, faster inference speed, and suitability for deployment on resource-constrained devices. Compared to large models with more parameters, lightweight models have faster inference speeds but lower accuracy. Therefore, the intent recognition model can output an intent score corresponding to the first user intent, which characterizes the accuracy of intent recognition. The level of the intent score determines whether further intent recognition is needed. The solution proposed in this application can improve inference speed when intent recognition is relatively accurate.
[0125] Step S403: Determine whether the intent score is lower than the first threshold.
[0126] Set an intent score threshold, also known as the first threshold. When the intent score is higher than or equal to the first threshold, the intent is considered correctly interpreted and no further intent recognition is needed. When the intent score is lower than the first threshold, the intent interpretation is considered not entirely reliable and the intent needs to be recognized again.
[0127] If the intent score is lower than the first threshold, proceed to step S404: obtain multiple candidate intents corresponding to the user input information.
[0128] Typically, open-domain intents are broadly and finely divided, resulting in a vast number of intents; this dialogue system contains 400 to 500 intents. Clearly, using a large model to clarify four or five hundred intents is inappropriate. This embodiment requires a preliminary coarse-grained retrieval of all intents, i.e., obtaining multiple candidate intents corresponding to the user input information. Ten to thirty can be selected as candidate intents. Then, a large model is used to clarify these candidate intents, i.e., intent re-identification. Candidate intents can be user intents associated with the first user intent.
[0129] In some embodiments, such as Figure 5 As shown, one implementation method for obtaining multiple candidate intents corresponding to user input information may include:
[0130] Step S501: Extract features from the user input information to obtain the first feature vector.
[0131] The implementation of extracting features from user input information to obtain a first feature vector may include: inputting user input information into a vector representation model and outputting the first feature vector.
[0132] Step S502: Obtain sample text of the candidate intent from the intent database, and extract features from the sample text to obtain the second feature vector.
[0133] The candidate intents include all intents involved in the dialogue system. Example text refers to a typical expression of the candidate intent. For example, the example text for a weather query intent would be "How's the weather today?". There can be one or more example texts.
[0134] The implementation of extracting features from example text to obtain a second feature vector may include: inputting the example text into a vector representation model and outputting a second feature vector.
[0135] The second feature vector can be obtained in advance through a vector representation model, and the second feature vector is saved in correspondence with the candidate intention.
[0136] Step S503: Calculate the similarity between the first feature vector and the second feature vector.
[0137] The similarity between the first feature vector and the second feature vector is calculated using cosine similarity.
[0138] In some embodiments, after calculating the similarity between the first feature vector and the second feature vector, step S504 can be performed: sorting the similarity from largest to smallest, and marking the candidate intents with the highest preset ranking as candidate intents.
[0139] For example, after calculating the similarity between all second feature vectors and first feature vectors, the candidate intents corresponding to the second feature vectors ranked in the top 10-top 30 can be selected as candidate intents.
[0140] In some embodiments, after calculating the similarity between the first feature vector and the second feature vector, it is determined whether the similarity is greater than a preset similarity threshold. If the similarity is greater than the similarity threshold, the candidate intent corresponding to the second feature vector is marked as a candidate intent. If the similarity is less than or equal to the similarity threshold, the candidate intent corresponding to the second feature vector is not marked as a candidate intent.
[0141] In some embodiments, after iterating through the similarity between all second feature vectors and first feature vectors, the number of candidates marked as candidate intents is counted. If this number exceeds a preset number, the candidate intents ranked lower are deleted to ensure that the number of retained candidate intents is the preset number. If this number does not exceed the preset number, no deletion is performed on the candidate intents.
[0142] This application embodiment can match user input information with example text of candidate intents by similarity calculation, thereby recalling candidate intents associated with user input information from a large number of candidate intents, which helps to select the accurate intent corresponding to user input information from the candidate intents in the future.
[0143] In some embodiments, such as Figure 6 As shown, one implementation method for obtaining multiple candidate intents corresponding to user input information may include:
[0144] Step S601: Obtain the intent domain of the first user intent. The intent domain includes user intents whose semantic similarity to the first user intent is within a preset threshold.
[0145] In this embodiment, all candidate intents in the dialogue system are divided into multiple intent domains based on semantic similarity, and the semantic similarity of intents in each intent domain is within a preset threshold. The correspondence between each intent domain and candidate intents is stored in an intent domain mapping table. The intent domain in which the first user intent belongs can be obtained from the intent domain mapping table, and the semantic similarity between the user intent in that intent domain and the first user intent is within a preset threshold.
[0146] Step S602: Mark the user intent in the intent domain as a candidate intent.
[0147] For example, the intent domain includes the film and television domain, which includes three candidate intents: film and television search, movie ticket purchase, and short video search. If the first user intent is film and television search, the intent domain for film and television search is determined as the film and television domain. Then, all candidate intents under the film and television domain—namely, film and television search, movie ticket purchase, and short video search—are marked as candidate intents.
[0148] This application embodiment divides candidate intents into multiple intent domains based on semantic similarity. Based on the intent domain of the first user intent, candidate intents associated with user input information can be quickly identified, which helps to select the accurate intent corresponding to user input information from the candidate intents in the subsequent process.
[0149] Step S405: Based on the user input information, as well as the name, intent definition, and example text of the candidate intent, construct the first prompt word.
[0150] In this embodiment, all intent names, intent definitions, and example texts are maintained in an intent database. When a candidate intent is determined, the name, intent definition, and example text of the candidate intent are automatically read from the intent database, and then concatenated with the user input information to form a first prompt word. The first prompt word may also include limitations on the output format.
[0151] For example, the first prompt word is as follows:
[0152] You are an intent parsing assistant. Please analyze and accurately output the true intent of the user's input.
[0153] The user input is XXXXXX.
[0154] The following intention exists:
[0155] Intent Name: Film and Television Search. Definition: Search for film and television works, movies, TV series, etc., based on dimensions such as actor, genre, rating, etc., or search for videos related to actors. Example: Films about to be released in theaters.
[0156] Intent Name: Dubbing. Definition: Dubbing for film and television works. Example: Who dubbed XXX? Who provided the voice for XX?
[0157] Intent Name: Movie Ticket Search. Definition: Search for movie tickets. Example: Buy group-buy tickets for XXX.
[0158] Intent Name: Short Video Search. Definition: Search for short videos. Example: Play a short video.
[0159] Intent Name: Movie / TV VIP Membership. Definition: Movie / TV VIP membership. Example: Open a membership.
[0160] You only need to provide the intent name; no further analysis is required.
[0161] The following is an example and its input / output format:
[0162] User input: XXX's movie;
[0163] Output: Movie and TV search.
[0164] Cue word engineering is a method specifically designed to optimize language models. Its goal is to guide these models to generate more accurate and targeted output text by designing and adjusting input prompts.
[0165] When interacting with large pre-trained language models such as GPT-3 and BERT, the given prompts significantly impact the content and quality of the model's responses. Prompt engineering focuses on creating the most effective prompts so that the model can understand and meet the user's needs. This may involve understanding different scenarios, using correct vocabulary and grammatical structures, and experimenting with different prompting strategies to observe which works best.
[0166] This application's embodiments use prompt words as input. Firstly, when new intents are added, the new intents can be re-identified without affecting the dialogue system or requiring code modification. Secondly, as is well known, the quality of the prompt design directly affects the performance of the large model, and a configurable prompt can, to some extent, control and fine-tune the output of the large language model without re-iterating the model. In this application's embodiments, when a certain type of statement clarification is incorrect, the intent definition in the intent database can be modified or supplemented with examples to optimize and modify the prompt, thereby providing the model with more hints to improve performance.
[0167] Step S406: Input the first prompt word into the fine-tuned large language model to obtain the second user intent.
[0168] In this embodiment, fine-tuning the large language model can be used to filter out the accurate user intent corresponding to the user input information from multiple candidate intents. It can also be used to supplement the unparsed slot information based on the filtered accurate user intent, and to delete the parsed redundant slot information.
[0169] The language model in this embodiment adopts the Transformer architecture. Transformer is a deep learning model architecture for natural language processing and other sequence-to-sequence tasks. The Transformer architecture introduces a self-attention mechanism, a key innovation that makes it perform well when processing sequential data.
[0170] Here are some key components and features of the Transformer: 1. Self-Attention Mechanism: This is one of the core concepts of the Transformer. It allows the model to consider all positions in the input sequence simultaneously, rather than processing them step-by-step like recurrent neural networks or convolutional neural networks. Self-attention allows the model to assign different attention weights based on different parts of the input sequence, thus better capturing semantic relationships. 2. Multi-Head Attention: The self-attention mechanism in the Transformer is extended to multiple attention heads, each of which can learn different attention weights to better capture different types of relationships. Multi-head attention allows the model to process different information subspaces in parallel. 3. Stacked Layers: The Transformer is typically composed of multiple identical encoder and decoder layers stacked together. These stacked layers help the model learn complex feature representations and semantics. 4. Positional Encoding: Since the Transformer does not have built-in sequence positional information, it requires additional positional encoding to represent the positional order of words in the input sequence. 5. Residual Connections and Layer Normalization: These techniques help mitigate the vanishing and exploding gradient problems during training, making the model easier to train. 6. Encoder and Decoder: A Transformer typically includes an encoder for processing the input sequence and a decoder for generating the output sequence, making it suitable for sequence-to-sequence tasks such as machine translation.
[0171] In this embodiment, the language model adopts the LLaMA architecture. LLaMA is a large language model based on the Transformer architecture, with some improvements over the original Transformer architecture. Overall, the initial version of LLaMA's architecture differs from the original Transformer in three main ways: 1. Pre-normalization: To improve stability during training, LLaMA normalizes the input of the Transformer sub-layers instead of the output, specifically using Root Mean Square Layer Normalization (RMSNorm). Pre-normalization makes the training process more stable. This design places the normalization of the first layer before the multi-head attention layer, and the normalization of the second layer before the fully connected layer, while placing the shortcut between the multi-head attention layer and the feedforward neural network (FNN) layer. 2. SwiGLU activation function: LLaMA uses the same SwiGLU activation function as PaLM to replace the original ReLU function to improve model performance. The SwiGLU activation function used by LLaMA is also used in multiple LLM applications such as PaLM, and it can significantly improve performance on many evaluation datasets compared to ReLU. 3. Rotational position encoding: LLaMA does not use absolute position encoding, but uses relative position encoding RoPE.
[0172] This application employs Low-Rank Adaptation (LoRA) fine-tuning to fine-tune a large language model, resulting in a fine-tuned large language model. LoRA is a fine-tuning model, which can be understood as a plugin for a stable diffusion model, used to satisfy a specific style or specified character attribute. By using the SD model + LoRA fine-tuning training method, only the LoRA model with a small number of parameters needs to be trained, which can achieve good results in downstream segmentation tasks. LoRA significantly reduces the memory usage during SD model training because it does not optimize the main model (SD model), so the optimizer parameters of the main model do not need to be stored. However, the computational cost does not change significantly because LoRA adds residual gradients to the full parameter gradients of the main model, while saving the process of updating weights in the main model optimizer.
[0173] Fine-tuning steps: 1. Freeze the weights of the trained SD model; 2. Inject the LoRA module into the U-Net structure of the SD model and combine it with the CrossAttention module, and only fine-tune the parameters of this part; 3. After training the new parameters, use parameter re-tuning to merge the new parameters with the old model parameters.
[0174] This application embodiment utilizes a fully fine-tuned large model based on the constructed prompt words to re-identify intent, thereby improving the accuracy of user intent distribution.
[0175] If the intent score is higher than or equal to the first threshold, the process ends without needing to re-identify the output intent.
[0176] Intent recognition methods can be such as Figure 7 As shown, user input information is fed into the intent recognition model to obtain the intent parsing result, namely the first user intent and its intent score. If the intent score is less than a first threshold, candidate intents are recalled through feature vectors or intent domain mapping. Then, the intent definition and example text of the candidate intents are obtained from the intent database and used to construct prompt words with the user input information. The prompt words are then input into the fine-tuned large language model to obtain the intent result of re-identification, namely the second user intent.
[0177] In this embodiment of the application, the step of inputting user input information into the intent recognition model to obtain a first user intent and an intent score corresponding to the first user intent includes: inputting user input information into the intent recognition model to obtain a first user intent, first slot information, and an intent score corresponding to the first user intent. The intent score can also be used to characterize the accuracy of the first slot information.
[0178] Slot information identification methods such as Figure 8 As shown. After obtaining the second user intent in the fine-tuning of the large language model based on the first prompt word input, step S801 is executed: determining whether the intent score is lower than the second threshold. The second threshold and the first threshold can be the same or different. The first threshold is used to limit whether intent re-identification is needed, and the second threshold is used to limit whether slot information identification is needed.
[0179] Set an intent score threshold for slot information, i.e., the second threshold. When the intent score is higher than or equal to the second threshold, the slot information parsing is considered relatively complete and accurate, and no further identification of the slot information is required. When the intent score is lower than the second threshold, the slot information parsing is considered not entirely reliable, and the slot information needs to be identified again.
[0180] If the intent score is lower than the second threshold, proceed to step S802: retrieve the tag corresponding to the first slot information from the slot database.
[0181] Tags are used to characterize the attributes of the first slot information. For example, slot information is "A," and "A" corresponds to the tags "actor" and "singer." All tags corresponding to slot information are maintained uniformly in the slot database. After determining the first slot information, the tags corresponding to the first slot information can be retrieved from the slot database.
[0182] The slot database allows for the unified configuration of slot information that no longer requires further identification, or the addition of a slot that requires further identification. For example, the tag "Director" corresponding to "A" can be deleted from the slot database, eliminating the need for further confirmation of this tag. Conversely, the tag "Summer Movie Season" corresponding to "XX" can be added, requiring further confirmation of this tag.
[0183] Step S803: Construct a second prompt word based on user input information, second user intent, first slot information, and the label corresponding to the first slot information.
[0184] The parsing of search slots is directly related to the intent results. For example, if user A has two tags: actor and singer, when the intent is a movie / TV search, the parsing should be for the actor tag; when the intent is a music search, the parsing should be for the singer tag. Therefore, user intent needs to be incorporated when constructing secondary suggestion keywords.
[0185] It should be noted that when the intent is below the first threshold, the user intent selected for constructing the second prompt is the second user intent. When the intent is above or equal to the first threshold, the user intent selected for constructing the second prompt is the first user intent. The second prompt can also include limitations on the output format, etc.
[0186] For example, the second prompt word is as follows:
[0187] You are a slot information parsing assistant. Please analyze and accurately output the slot information input by the user.
[0188] The user input is XXXXXX.
[0189] The slot information is as follows:
[0190] Slot information A: Tag A1, Tag A2.
[0191] Slot information B: Tag B1, Tag B2, Tag B3.
[0192] You only need to provide the slot information; no other analysis is required.
[0193] The following is an example and its input / output format:
[0194] User input: AAA;
[0195] Output: BBB.
[0196] Step S804: Input the second prompt word into the fine-tuned large language model to obtain the second slot information.
[0197] The slot information identification method provided in this application embodiment involves adding or deleting slot information after parsing, deleting unnecessary redundant slots, and adding key slots that have not been solved.
[0198] If the intent score is higher than or equal to the second threshold, the process ends without needing to re-identify the output slot information.
[0199] In some embodiments, when user input information is fed into the intent recognition model, in addition to obtaining the first user intent and its corresponding intent score, the model also obtains first slot information and a score between the first slot information and general word segmentation. The score can be used to determine the degree of difference between the parsed first slot information and general word segmentation. The lower the score, the greater the difference. A score threshold is set; when the score is below the threshold, the slot information of the user input information needs to be re-identified, i.e., the step of retrieving the tag corresponding to the first slot information from the slot database is performed. When the score is higher than or equal to the score threshold, there is no need to re-identify the slot information.
[0200] User intent and slot information recognition methods, such as Figure 9 As shown, user input information is fed into the intent recognition model to obtain user intent, slot information, and intent score. When the intent score is below a first threshold, candidate intents are recalled, and prompt words are constructed based on user input information, the definition of candidate intents, and example text. These prompt words are then input into the fine-tuned large language model to obtain the accurate user intent. When the intent score is above or equal to the first threshold, the user intent is determined to be the accurate user intent. When the intent score is below a second threshold, prompt words are constructed based on user input information, the accurate user intent, and slot information labels. These prompt words are then input into the fine-tuned large language model to obtain the accurate slot information.
[0201] In some embodiments, after inputting the first prompt word into the fine-tuned large language model to obtain the second user intent, if the intent score is lower than the first threshold, a second query instruction can be generated based on the output second user intent and the second slot information, and a second difficulty level corresponding to the second user intent can be obtained from the intent mapping table. The intent mapping table includes the correspondence between user intent and difficulty level, and the difficulty level is used to characterize the difficulty of responding to the input information corresponding to the user intent.
[0202] Taking into account the difficulty level of the input information corresponding to different user intentions, the system saves the corresponding user intentions and difficulty levels. For example, the input information for responding to a novel search intention is simpler than the input information for responding to a military commentary intention, so the difficulty level for novel search can be set to easy, and the difficulty level for military commentary can be set to difficult.
[0203] The second query command is input into the language model corresponding to the second difficulty level to obtain the second response information, wherein the number of parameters in the language model is proportional to the difficulty level. The second response information is then sent to the terminal device so that the terminal device can display the second response information.
[0204] The terminal device can display the text and controls in the reply message on the screen, and can also convert the text in the reply message into a broadcast voice and play the broadcast voice.
[0205] For example, if the second difficulty level is "easy", the query can be sent to the language model corresponding to the "easy" difficulty level, where the language model has 0.5B parameters. If the second difficulty level is "difficult", the query can be sent to the language model corresponding to the "difficult" difficulty level, where the language model has 7B parameters.
[0206] After inputting the first prompt word into the fine-tuned large language model to obtain the second user intent, if the intent score is higher than or equal to a first threshold, a first query instruction can be generated based on the first user intent and the second slot information, and the first difficulty level corresponding to the first user intent can be obtained from the intent mapping table. Then, the first query instruction is input into the language model corresponding to the first difficulty level to obtain the first response information. Finally, the first response information is sent to the terminal device so that the terminal device can display the first response information.
[0207] It should be noted that if the intent score is higher than or equal to the second threshold, there is no need to re-identify the first slot information; instead, a query instruction is generated based on the first slot information. Furthermore, user input information can also be added to the query instruction.
[0208] This application's embodiments can distribute responses to large models with different parameter sizes based on the difficulty of the user's intent. By having small models handle simple tasks, response speed is improved and resource consumption is reduced. By having large models handle complex tasks, the accuracy of the response information is improved.
[0209] In some embodiments, the user interaction method may be as follows: Figure 10 As shown. The server includes a pre-intention recognition module, a post-intention recognition module, and a business processing module. After receiving user input information, the terminal device sends the user input information to the pre-intention recognition module. The pre-intention recognition module inputs the user input information into the intention recognition model to obtain the first user intention, the first slot information, and the intention score, and then sends them to the post-intention recognition module.
[0210] The post-intention recognition module determines whether the intention score is lower than a first threshold. If the intention score is lower than the first threshold, it acquires multiple candidate intentions corresponding to the user input information. Then, based on the user input information, the names of the candidate intentions, the intention definitions, and example text, it constructs a first prompt word. The first prompt word is then input into the fine-tuned large language model to obtain the second user intention, and the final user intention is determined to be the second user intention. If the intention score is higher than or equal to the first threshold, the final user intention is determined to be the first user intention.
[0211] The subsequent intent recognition module further determines whether the intent score is lower than a second threshold. If the intent score is lower than the second threshold, a second prompt word is constructed based on the user input information, the end-user intent, the first slot information, and the label corresponding to the first slot information. The second prompt word is input into the fine-tuned large language model to obtain the second slot information, and the final slot information is determined to be the second slot information. If the intent score is higher than or equal to the second threshold, the final slot information is determined to be the first slot information. A query instruction is generated based on the end-user intent and the final slot information, and the query instruction is sent to the business processing module.
[0212] The business processing module parses the query command to obtain the end-user's intent, retrieves the difficulty level corresponding to the end-user's intent from the intent mapping table, inputs the query command into the language model corresponding to the difficulty level, outputs the response information, and sends the response information to the terminal device. The terminal device displays the response information.
[0213] It should be noted that if the terminal device has sufficient computing power, memory, and storage space, the above intent recognition model, fine-tuned large language model, and language models of different difficulty levels can be partially or fully deployed on the terminal device, so that the terminal device can complete some or all of the server 400's execution operations.
[0214] This application's embodiments rely on a combination of large language models, LoRa fine-tuning, cue word feature engineering, and large and small models to re-identify inaccurate user intent and slot information, thereby improving the accuracy of user intent distribution, the rejection rate of out-of-domain statements, and the completeness and accuracy of slot parsing.
[0215] Some embodiments of this application also provide a computer-readable storage medium that can store a program. When the computer storage medium is configured in a display device or server, the program, when executed, can include the program steps involved in the user intent recognition method in the above embodiments. The computer storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0216] This application provides an electronic device, which includes a processor and a memory for storing processor-executable instructions. The processor is configured to read executable instructions from the memory and execute the instructions to implement the user intent recognition method described in the above embodiments.
[0217] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A user intention recognition method, characterized by, Applied to a server, comprising: receiving user input information sent by a terminal device; inputting the user input information into an intent recognition model to obtain a first user intent and an intent score corresponding to the first user intent, the intent score being used to represent the accuracy of intent recognition; in the case where the intent score is lower than a first threshold, obtaining a plurality of candidate intents corresponding to the user input information, the candidate intents being associated with the first user intent; based on the user input information, and the name, intent definition and example text of the candidate intents, constructing a first prompt word; inputting the first prompt word into a fine-tuned large language model to obtain a second user intent, the fine-tuned large language model being used to filter out an accurate user intent corresponding to the user input information from the plurality of candidate intents.
2. The method of claim 1, wherein, The step of inputting the user input information into the intent recognition model to obtain the first user intent and the intent score corresponding to the first user intent comprises: inputting the user input information into the intent recognition model to obtain a first user intent, first slot information and an intent score corresponding to the first user intent; after inputting the first prompt word into the fine-tuned large language model to obtain the second user intent, the method further comprises: in the case where the intent score is lower than a second threshold, obtaining a label corresponding to the first slot information in a slot database; based on the user input information, the second user intent, the first slot information and the label corresponding to the first slot information, constructing a second prompt word; inputting the second prompt word into the fine-tuned large language model to obtain second slot information.
3. The method of claim 1, wherein, The step of obtaining a plurality of candidate intents corresponding to the user input information comprises: performing feature extraction on the user input information to obtain a first feature vector; obtaining example text of a candidate intent from an intent database, and performing feature extraction on the example text to obtain a second feature vector, the candidate intent including all intents involved in a dialogue system; calculating the similarity between the first feature vector and the second feature vector; ranking the similarity from large to small, and marking the candidate intent ranked in the top pre-set number of positions as a candidate intent.
4. The method of claim 1, wherein, The step of obtaining a plurality of candidate intents corresponding to the user input information comprises: obtaining an intent domain in which the first user intent is located, the intent domain including user intents having a semantic similarity within a pre-set threshold with the first user intent; marking the user intents in the intent domain as candidate intents.
5. The method of claim 2, wherein, After inputting the second prompt word into the fine-tuned large language model to obtain the second slot information, the method further comprises: in the case where the intent score is higher than or equal to the first threshold, generating a first query instruction according to the first user intent and the second slot information, and obtaining a first difficulty level corresponding to the first user intent in an intent mapping table, the intent mapping table including a correspondence between user intents and difficulty levels, the difficulty level being used to represent the difficulty of responding to input information corresponding to the user intent; inputting the first query instruction into a language model corresponding to the first difficulty level to obtain first reply information, a parameter quantity of the language model being proportional to the difficulty level; sending the first reply information to the terminal device to enable the terminal device to display the first reply information.
6. The method of claim 5, wherein, After the first prompt word is input into the fine-tuned large language model to obtain the second user intent, the method further includes: in a case where the intent score is lower than a first threshold, generating a second query instruction according to the second user intent and the second slot information, and obtaining a second difficulty level corresponding to the second user intent in an intent mapping table; inputting the second query instruction into a language model corresponding to the second difficulty level to obtain second reply information; sending the second reply information to the terminal device to enable the terminal device to display the second reply information.
7. The method of claim 1, wherein, The step of inputting the user input information into the intent recognition model to obtain the first user intent and the intent score corresponding to the first user intent includes: in a case where the user input information is voice data, recognizing the voice data to obtain user input text; inputting the user input text into the intent recognition model to obtain the first user intent and the intent score corresponding to the first user intent.
8. A user intent recognition method characterized by, Applied to a terminal device, including: receiving user input information; sending the user input information to a server to enable the server to input the user input information into an intent recognition model to obtain a first user intent and an intent score corresponding to the first user intent, and in a case where the intent score is lower than a first threshold, obtaining a plurality of candidate intents corresponding to the user input information; constructing a first prompt word based on the user input information and a name, intent definition and example text of the candidate intent; inputting the first prompt word into a fine-tuned large language model to obtain a second user intent, the intent score being used to represent an accuracy of intent recognition, the candidate intent being associated with the first user intent, and the fine-tuned large language model being used to screen an accurate user intent corresponding to the user input information from a plurality of the candidate intents.
9. A server, characterized by including: a communication module configured to establish a communication connection with a terminal device; a processing module configured to: receive user input information sent by the terminal device; input the user input information into an intent recognition model to obtain a first user intent and an intent score corresponding to the first user intent, the intent score being used to represent an accuracy of intent recognition; in a case where the intent score is lower than a first threshold, obtain a plurality of candidate intents corresponding to the user input information, the candidate intent being associated with the first user intent; construct a first prompt word based on the user input information and a name, intent definition and example text of the candidate intent; input the first prompt word into a fine-tuned large language model to obtain a second user intent, the fine-tuned large language model being used to screen an accurate user intent corresponding to the user input information from a plurality of the candidate intents.
10. A terminal device, comprising: including: a communicator configured to establish a communication connection with a server; a controller configured to: receive user input information; send the user input information to the server, so that the server inputs the user input information into an intent recognition model to obtain a first user intent and an intent score corresponding to the first user intent, and in a case where the intent score is lower than a first threshold, obtain a plurality of candidate intents corresponding to the user input information; construct a first prompt word based on the user input information, and a name, an intent definition, and example text of the candidate intents; input the first prompt word into a fine-tuned large language model to obtain a second user intent, the intent score being used to represent an accuracy degree of intent recognition, the candidate intents being associated with the first user intent, and the fine-tuned large language model being used to screen out an accurate user intent corresponding to the user input information from the plurality of candidate intents.