Intention recognition method and device based on local large model
By deploying a large language model on a local terminal and combining it with multimodal data processing and confidence assessment, the problems of high latency, high cost, and privacy risks caused by cloud dependence are solved, achieving efficient and accurate intent recognition.
Patent Information
- Application Number
- CN202511782380.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-29
- Publication Date
- 2026-02-17
AI Technical Summary
Existing intent recognition technologies rely on large cloud models, resulting in high latency, high cost, and privacy risks. Furthermore, single-modal information is prone to misjudgment, and existing systems lack comprehensive utilization of multimodal information and confidence assessment.
The large language model is deployed on the local terminal, and multimodal data is transformed into structured representations. The local large model is used for intent recognition, and the recognition accuracy is improved through confidence assessment and correction mechanisms, including the fusion processing of text, speech and image data.
It reduces latency and cost, improves the accuracy and security of intent recognition, and significantly reduces the false positive rate, making it suitable for scenarios such as intelligent customer service and voice assistants.
Smart Images

Figure CN121542873A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of natural language processing technology, and in particular to an intent recognition method and apparatus based on a local large model. Background Technology
[0002] Intent recognition, a key technology in Natural Language Processing (NLP) and human-computer interaction, is widely used in scenarios such as intelligent customer service, voice assistants, and robot interaction. Its main task is to analyze the natural language input of users, determine their intent category, and provide a basis for subsequent task execution. Currently, there are several main methods for intent recognition: 1. Rule-based and keyword matching method: This method identifies intent using pre-defined rules and keyword lists. While technically simple, it can only handle a limited range of expressions. It is prone to misjudgment when users use highly flexible or semantically complex language.
[0003] 2. Cloud-based Inference Services Based on Large Language Models (LLM): With the development of large models such as the GPT series, PaLM, and Wenxin Yiyan, more and more intent recognition systems are directly calling cloud-based large model APIs. This type of method performs better in semantic understanding and complex scenarios, but it relies on external services. Furthermore, cloud-based large model services require network transmission, resulting in significant inference latency, making it difficult to meet the low-latency requirements of robots, in-vehicle systems, etc. The high cost of long-term calls to cloud APIs increases system operating costs and limits large-scale deployment. Cloud-based inference requires uploading user input data to servers, posing a data leakage risk in sensitive scenarios such as medical consultations and in-vehicle voice systems. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide an intent recognition method and apparatus based on a local large model, which avoids dependence on the cloud by deploying the large language model on the local terminal, thus solving the problems of high latency, privacy risks and high costs, and also solves the problem of inaccurate intent recognition results generated by rule and keyword matching.
[0005] This application provides an intent recognition method based on a local large model, the intent recognition method comprising: Acquire the multimodal data required for intent recognition; The multimodal data is transformed into a structured representation to construct a unified prompt text; The prompt text is analyzed using a local large model to identify the candidate intent; The candidate intents are evaluated for quality, and a target intent that meets the requirements is obtained based on the evaluation results; wherein the target intent is determined directly by the candidate intents or by the corrected candidate intents.
[0006] Optionally, the multimodal data includes at least two of text data, voice data, and image data.
[0007] Optionally, the step of converting the multimodal data into a structured representation and constructing a unified prompt text includes: Based on the data type of each single modal data in the multimodal data, determine the data processing strategy corresponding to each single modal data. For each single-modal data point in the multimodal data, the single-modal data point is processed according to the data processing strategy corresponding to that single-modal data point to obtain the feature data corresponding to that single-modal data point; All feature data are merged into unified structured data; The structured data and intent category description are added to a preset prompt template to obtain the prompt text.
[0008] Optionally, the step of performing a quality assessment on the candidate intents and obtaining a target intent that meets the requirements based on the assessment results includes: Determine whether the confidence level of the local large model when generating the candidate intent is greater than a confidence threshold; If it is greater than the target intent, the candidate intent will be directly determined as the target intent, or the candidate intent after regularization and cleaning will be determined as the target intent. If it is not greater than, the candidate intent is re-determined according to the preset correction strategy to obtain the corrected candidate intent; The corrected candidate intent corresponding to a confidence level greater than the confidence threshold is determined as the target intent, or the corrected candidate intent corresponding to a sampling consistency greater than the consistency threshold after multiple corrections is determined as the target intent.
[0009] Optionally, the step of redetermining the candidate intent according to a preset correction strategy to obtain the corrected candidate intent includes: Based on the keywords in the candidate intent, supplementation is performed according to preset rules to obtain the corrected candidate intent; or, The multimodal data is verified and output using a lightweight classifier to obtain corrected candidate intents; or, Multimodal data is re-collected, and reasoning is performed on the re-collected multimodal data using a local large model to obtain corrected candidate intents.
[0010] Optionally, determining the data processing strategy corresponding to each single-modal data based on the data type of each single-modal data in the multimodal data includes: When the data type of the single-modal data is text data, the corresponding data processing strategy is to perform text standardization processing; When the data type of the single-modal data is speech data, the corresponding data processing strategy is to convert the speech data into text data and extract speech prosody features. When the data type of the single-modal data is image data, the corresponding data processing strategy is to perform visual scene encoding processing on the image data.
[0011] Optionally, after obtaining the target intent that meets the requirements, the intent recognition method further includes: The target intent and its corresponding confidence score are output to the target system.
[0012] This application embodiment also provides an intent recognition device based on a local large model, the intent recognition device comprising: The acquisition module is used to acquire the multimodal data required for intent recognition; A construction module is used to transform the multimodal data into a structured representation and construct a unified prompt text; The intent recognition module is used to perform intent recognition on the prompt text using a local large model to determine candidate intents; An evaluation module is used to perform a quality evaluation on the candidate intents and obtain a target intent that meets the requirements based on the evaluation results; wherein the target intent is directly determined by the candidate intents or by the corrected candidate intents.
[0013] Optionally, the multimodal data includes at least two of text data, voice data, and image data.
[0014] Optionally, when the construction module is used to transform the multimodal data into a structured representation and construct a unified prompt text, the construction module is used to: Based on the data type of each single modal data in the multimodal data, determine the data processing strategy corresponding to each single modal data. For each single-modal data point in the multimodal data, the single-modal data point is processed according to the data processing strategy corresponding to that single-modal data point to obtain the feature data corresponding to that single-modal data point; All feature data are merged into unified structured data; The structured data and intent category description are added to a preset prompt template to obtain the prompt text.
[0015] Optionally, when the evaluation module performs a quality assessment on the candidate intent and obtains a target intent that meets the requirements based on the assessment results, the evaluation module is used to: Determine whether the confidence level of the local large model when generating the candidate intent is greater than a confidence threshold; If it is greater than the target intent, the candidate intent will be directly determined as the target intent, or the candidate intent after regularization and cleaning will be determined as the target intent. If it is not greater than, the candidate intent is re-determined according to the preset correction strategy to obtain the corrected candidate intent; The corrected candidate intent corresponding to a confidence level greater than the confidence threshold is determined as the target intent, or the corrected candidate intent corresponding to a sampling consistency greater than the consistency threshold after multiple corrections is determined as the target intent.
[0016] Optionally, when the evaluation module redetermines candidate intents according to a preset correction strategy to obtain corrected candidate intents, the evaluation module is used to: Based on the keywords in the candidate intent, supplementation is performed according to preset rules to obtain the corrected candidate intent; or, The multimodal data is verified and output using a lightweight classifier to obtain corrected candidate intents; or, Multimodal data is re-collected, and reasoning is performed on the re-collected multimodal data using a local large model to obtain corrected candidate intents.
[0017] Optionally, when determining the data processing strategy corresponding to each unimodal data based on the data type of each unimodal data in the multimodal data, the construction module is used to: When the data type of the single-modal data is text data, the corresponding data processing strategy is to perform text standardization processing; When the data type of the single-modal data is speech data, the corresponding data processing strategy is to convert the speech data into text data and extract speech prosody features. When the data type of the single-modal data is image data, the corresponding data processing strategy is to perform visual scene encoding processing on the image data.
[0018] Optionally, the intent recognition device further includes an output module, the output module being used for: After obtaining the target intent that meets the requirements, the target intent and its corresponding confidence score are output to the target system.
[0019] This application also provides an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of the intent recognition method described above are performed.
[0020] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the intent recognition method described above.
[0021] This application provides an intent recognition method and apparatus based on a local large model. The method includes: acquiring multimodal data required for intent recognition; converting the multimodal data into a structured representation to construct a unified prompt text; performing intent recognition on the prompt text using a local large model to determine candidate intents; performing quality assessment on the candidate intents and obtaining a target intent that meets the requirements based on the assessment results; wherein the target intent is directly determined by the candidate intents or by the corrected candidate intents.
[0022] This solution addresses the issues of high latency, privacy risks, and high costs by deploying the large language model locally on the terminal, avoiding reliance on the cloud. It can simultaneously receive text, voice, and video input, injecting a unified structured description into the prompt layer, enabling the large model to recognize multimodal intents. Furthermore, confidence is assessed after model output; if the confidence is insufficient, rule supplementation and a lightweight classifier are triggered for re-collection, significantly reducing the false positive rate.
[0023] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0024] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 A flowchart illustrating an intent recognition method based on a local large model provided in an embodiment of this application; Figure 2 One of the structural schematic diagrams of an intent recognition device based on a local large model provided in an embodiment of this application; Figure 3This is a second schematic diagram of the structure of an intent recognition device based on a local large model, provided as an embodiment of this application. Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. Based on the embodiments of this application, every other embodiment obtained by those skilled in the art without inventive effort falls within the scope of protection of this application.
[0027] Intent recognition, a key technology in Natural Language Processing (NLP) and human-computer interaction, is widely used in scenarios such as intelligent customer service, voice assistants, and robot interaction. Its main task is to analyze the natural language input of users, determine their intent category, and provide a basis for subsequent task execution. Currently, there are several main methods for intent recognition: 1. Rule-based and keyword matching method: This method identifies intent using pre-defined rules and keyword lists. While technically simple, it can only handle a limited range of expressions. It is prone to misjudgment when users use highly flexible or semantically complex language.
[0028] 2. Cloud-based Inference Services Based on Large Language Models (LLM): With the development of large models such as the GPT series, PaLM, and Wenxin Yiyan, more and more intent recognition systems are directly calling cloud-based large model APIs. This type of method performs better in semantic understanding and complex scenarios, but it relies on external services. Furthermore, cloud-based large model services require network transmission, resulting in significant inference latency, making it difficult to meet the low-latency requirements of robots, in-vehicle systems, etc. The high cost of long-term calls to cloud APIs increases system operating costs and limits large-scale deployment. Cloud-based inference requires uploading user input data to servers, posing a data leakage risk in sensitive scenarios such as medical consultations and in-vehicle voice systems.
[0029] Furthermore, most current intent recognition methods rely solely on text input, lacking comprehensive utilization of multimodal information such as speech tone and visual environment. In real-world interaction scenarios, single-modal information can easily lead to misjudgments and unnatural interactions. Moreover, existing systems typically output only an intent category without providing reliable confidence metrics. When the model's confidence is insufficient, the system will still produce incorrect results, causing downstream tasks to malfunction.
[0030] Based on this, the embodiments of this application provide an intent recognition method and apparatus based on a local large model, which deploys the large language model on the local terminal, avoids dependence on the cloud, and solves the problems of high latency, privacy risks and high costs. It also solves the problem of inaccurate intent recognition results generated by rule and keyword matching.
[0031] Please see Figure 1 , Figure 1 This is a flowchart illustrating an intent recognition method based on a local large model, provided as an embodiment of this application. Figure 1 As shown in the embodiments of this application, the intent recognition method includes: S101. Obtain the multimodal data required for intent recognition.
[0032] S102. The multimodal data is converted into a structured representation to construct a unified prompt text.
[0033] S103. Perform intent recognition on the prompt text using a local large model to determine candidate intent recognition.
[0034] S104. Perform a quality assessment on the candidate intents and obtain the target intents that meet the requirements based on the assessment results.
[0035] The implementation of each step in the above embodiments of this application will be described in detail below.
[0036] For step S101, multimodal data required for intent recognition is obtained based on the application scenario, preset acquisition rules, or the functions of the local device.
[0037] In one embodiment provided in this application, the multimodal data includes at least two of text data, voice data, and image data.
[0038] The text data can be text entered by the user through a terminal.
[0039] The voice and image data can be acquired through voice acquisition components (such as microphones) and image acquisition components (such as cameras) on a local terminal that deploys a large language model.
[0040] The collected image data is mainly used for target detection, gesture recognition, and scene summarization.
[0041] Regarding step S102, in one embodiment provided in this application, the step of converting the multimodal data into a structured representation and constructing a unified prompt text includes: S1021. Based on the data type of each single-modal data in the multimodal data, determine the data processing strategy corresponding to each single-modal data.
[0042] S1022. For each single-modal data in the multimodal data, process the single-modal data according to the data processing strategy corresponding to the single-modal data to obtain the feature data corresponding to the single-modal data.
[0043] S1023. Merge all feature data into unified structured data.
[0044] S1024. Add the structured data and intent category description to the preset prompt template to obtain the prompt text.
[0045] For step S1021, the data types of single-modal data include text data types, voice data types, and image data types.
[0046] In one embodiment provided in this application, determining the data processing strategy corresponding to each unimodal data based on the data type of each unimodal data in the multimodal data includes: when the data type of the unimodal data is text data, the corresponding data processing strategy is to perform text standardization processing; when the data type of the unimodal data is speech data, the corresponding data processing strategy is to convert the speech data into text data and perform speech prosody feature extraction processing; when the data type of the unimodal data is image data, the corresponding data processing strategy is to perform visual scene encoding processing on the image data.
[0047] In this embodiment, the speech prosodic feature extraction process involves extracting pitch, energy, pauses, speech rate, etc., to generate structured prosodic features.
[0048] Visual scene encoding processing specifically refers to using detection / tracking algorithms to output the category and spatial orientation of candidate targets.
[0049] For step S1022, this step involves processing each type of single-modal data in the multimodal data to obtain the key feature data contained therein for intent recognition.
[0050] For step S1023, for example, when the multimodal data includes text data, voice data and image data, merging all feature data into unified structured data can be done by merging text, prosody and visual elements into a unified JSON structure.
[0051] The following demonstrates a JSON structure based on three types of data: {"text":"Bring that over", "prosody":{"emphasis":"that","tone":"neutral"}, "vision":{"object":"bottle","loc":"right-front","gesture":"pointing"}} Specifically, step S1024 may include: inserting the structured data and intent category description as variables into a preset prompt template to obtain the prompt text.
[0052] Regarding step S103, the local large model refers to a large language model deployed on a local device.
[0053] Here, local devices can be examples such as robot-mounted industrial control computers or intelligent terminal edge servers. The large language model can be a local quantized version of Qwen2.5-7B or LLaMA2-7B, etc.
[0054] The large language model deployed locally can be guaranteed to run in real time on a single consumer-grade GPU or edge computing chip (such as NVIDIA Jetson Orin s).
[0055] In this step, the candidate intent is the result with the highest probability among the intent prediction results.
[0056] Regarding step S104, the target intent is determined directly by the candidate intent or by the corrected candidate intent.
[0057] Furthermore, in one embodiment provided in this application, the step of performing a quality assessment on the candidate intent and obtaining a target intent that meets the requirements based on the assessment result includes: S1041. Determine whether the confidence level of the local large model when generating the candidate intent is greater than the confidence threshold.
[0058] S1042. If it is greater than the target intent, the candidate intent will be directly determined as the target intent, or the candidate intent after regularization and cleaning will be determined as the target intent.
[0059] S1043. If it is not greater than, the candidate intent is re-determined according to the preset correction strategy to obtain the corrected candidate intent. S1044. The corrected candidate intent corresponding to a confidence level greater than the confidence level threshold is determined as the target intent, or the corrected candidate intent corresponding to a sampling consistency greater than the consistency threshold after multiple corrections is determined as the target intent.
[0060] For step S1041, the confidence threshold can be preset statically or adaptively.
[0061] The confidence level corresponding to the candidate intent can be determined by the maximum matching degree between the candidate intent and the intent tags in the predefined tag set.
[0062] For step S1042, the candidate intent is cleaned by regularization, which may specifically include removing redundant symbols.
[0063] Regarding step S1043, three methods for determining the corrected candidate intent are provided here, as follows: Method 1: Based on the keywords in the candidate intent, supplement them according to preset rules to obtain the corrected candidate intent.
[0064] Method 2: The multimodal data is verified and output using a lightweight classifier to obtain corrected candidate intents.
[0065] Method 3 involves re-collecting multimodal data and using a local large model to infer the re-collected multimodal data to obtain corrected candidate intents.
[0066] In Method 1, for example, if the candidate intent includes the keyword "go to point A", then the keyword will be added as "go to A scene explanation".
[0067] In Method 2, the lightweight classifier can be an SVM or a small DNN.
[0068] In Method 3, the re-collection of multimodal data can specifically involve: actively querying the user and completing the re-collection of multimodal data based on the user's supplementary information.
[0069] Regarding step S1044, if the confidence level of the candidate intent determined after multiple corrections is still less than the confidence threshold, but the consistency of the candidate intent determined after multiple corrections is greater than the consistency threshold, then the candidate intent will not be re-determined, and the last determined corrected candidate intent will be directly determined as the target intent.
[0070] Furthermore, in one embodiment provided in this application, after obtaining the target intent that meets the requirements, the intent recognition method further includes: outputting the target intent and its corresponding confidence score to the target system.
[0071] This implementation method specifically includes: returning the final determined target intent and confidence level through a unified interface. The interface supports JSON format output, facilitating integration with robot ROS systems, vehicle control systems, or dialogue management systems. This achieves seamless integration with application systems and ensures real-time availability.
[0072] Furthermore, taking the robot's explanation scenario as an example, the application process of this solution will be explained: In the car showroom, a customer said to the humanoid robot, "Take me to see the new energy vehicle models that were just introduced." Input collection: The speech was transcribed as "Take me to see the new energy vehicle models that were just introduced"; The rhythmic features indicate that "new energy vehicle models" are in a stressed position; The vision module detected that a poster for a new energy vehicle was being displayed on the screen in the showroom.
[0073] Build prompts: Generate JSON representation: { "text": "Take me to see the new energy vehicles you just introduced", "prosody": {"emphasis": "new energy vehicle models"}, "vision": {"object": "EV-car-poster", "loc": "front-left"} } Reasoning and Analysis: The large model combines text, repetition location, and visual information to determine the intent as "to go to explain the new energy vehicle model".
[0074] The results parsing module standardizes the output labels.
[0075] Confidence assessment and correction: The model outputs a probability of 0.85, which is higher than the threshold of 0.7, so it is output directly.
[0076] Output results: The output intent is "Go to scene C for explanation" and is passed to the robot navigation module through the interface.
[0077] The robot autonomously plans its route and leads users to the new energy vehicle exhibition area.
[0078] In this way, the achieved effects include: through multimodal fusion and confidence mechanisms, the system avoids ambiguity regarding "just introduced", ensuring the accuracy of intent recognition.
[0079] The interfaces and parameter configurations in this solution can be implemented in the following ways: Input interface: Supports JSON format multimodal data input; Output interface: Standardized intent label + confidence score.
[0080] Parameter configuration reference: Confidence threshold: 0.7 (adjustable from 0.6 to 0.8); Number of sampling times: 3–5; Model size: 7B parameter-quantized version, can run on a single GPU; Average response time: ≤ 500 ms.
[0081] This solution addresses the issues of high latency, privacy risks, and high costs by deploying the large language model locally on the terminal, avoiding reliance on the cloud. It can simultaneously receive text, voice, and video input, injecting a unified structured description into the prompt layer, enabling the large model to recognize multimodal intents. Furthermore, confidence is assessed after model output; if the confidence is insufficient, rule supplementation and a lightweight classifier are triggered for re-collection, significantly reducing the false positive rate.
[0082] Based on the same inventive concept, this application also provides an intent recognition device corresponding to the intent recognition method. Since the principle of the device in this application is similar to the intent recognition method described above in this application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0083] Please see Figure 2 , Figure 3 , Figure 2 This is one of the structural schematic diagrams of an intent recognition device based on a local large model provided in an embodiment of this application. Figure 3 This is a second schematic diagram of the structure of an intent recognition device based on a local large model, provided as an embodiment of this application. Figure 2 As shown, the intent recognition device 200 includes: The acquisition module 210 is used to acquire the multimodal data required for intent recognition; The construction module 220 is used to convert the multimodal data into a structured representation and construct a unified prompt text; The intent recognition module 230 is used to perform intent recognition on the prompt text using a local large model to determine candidate intents; Evaluation module 240 is used to perform quality evaluation on the candidate intent and obtain a target intent that meets the requirements based on the evaluation results; wherein the target intent is directly determined by the candidate intent or determined by the corrected candidate intent.
[0084] Optionally, the multimodal data includes at least two of text data, voice data, and image data.
[0085] Optionally, when the construction module 220 is used to convert the multimodal data into a structured representation and construct a unified prompt text, the construction module 220 is used to: Based on the data type of each single modal data in the multimodal data, determine the data processing strategy corresponding to each single modal data. For each single-modal data point in the multimodal data, the single-modal data point is processed according to the data processing strategy corresponding to that single-modal data point to obtain the feature data corresponding to that single-modal data point; All feature data are merged into unified structured data; The structured data and intent category description are added to a preset prompt template to obtain the prompt text.
[0086] Optionally, when the evaluation module 240 performs a quality assessment on the candidate intent and obtains a target intent that meets the requirements based on the assessment result, the evaluation module 240 is used to: Determine whether the confidence level of the local large model when generating the candidate intent is greater than a confidence threshold; If it is greater than the target intent, the candidate intent will be directly determined as the target intent, or the candidate intent after regularization and cleaning will be determined as the target intent. If it is not greater than, the candidate intent is re-determined according to the preset correction strategy to obtain the corrected candidate intent; The corrected candidate intent corresponding to a confidence level greater than the confidence threshold is determined as the target intent, or the corrected candidate intent corresponding to a sampling consistency greater than the consistency threshold after multiple corrections is determined as the target intent.
[0087] Optionally, when the evaluation module 240 is used to redetermine the candidate intent according to a preset correction strategy to obtain the corrected candidate intent, the evaluation module 240 is used to: Based on the keywords in the candidate intent, supplementation is performed according to preset rules to obtain the corrected candidate intent; or, The multimodal data is verified and output using a lightweight classifier to obtain corrected candidate intents; or, Multimodal data is re-collected, and reasoning is performed on the re-collected multimodal data using a local large model to obtain corrected candidate intents.
[0088] Optionally, when the construction module 220 determines the data processing strategy corresponding to each single-modal data based on the data type of each single-modal data in the multimodal data, the construction module 220 is used to: When the data type of the single-modal data is text data, the corresponding data processing strategy is to perform text standardization processing; When the data type of the single-modal data is speech data, the corresponding data processing strategy is to convert the speech data into text data and extract speech prosody features. When the data type of the single-modal data is image data, the corresponding data processing strategy is to perform visual scene encoding processing on the image data.
[0089] Optional, such as Figure 3 As shown, the intent recognition device 200 further includes an output module 250, which is used for: After obtaining the target intent that meets the requirements, the target intent and its corresponding confidence score are output to the target system.
[0090] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 4 As shown, the electronic device 400 includes a processor 410, a memory 420, and a bus 430.
[0091] The memory 420 stores machine-readable instructions executable by the processor 410. When the electronic device 400 is running, the processor 410 communicates with the memory 420 via the bus 430. When the machine-readable instructions are executed by the processor 410, they can perform the operations described above. Figure 1 The steps in the method embodiment shown are specifically implemented in the method embodiment and will not be repeated here.
[0092] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can perform the above-described actions. Figure 1 The steps in the method embodiment shown are specifically implemented in the method embodiment and will not be repeated here.
[0093] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0094] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0095] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0096] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0097] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0098] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The scope of protection of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An intent recognition method based on a local large model, characterized in that, The intent recognition method includes: Acquire the multimodal data required for intent recognition; The multimodal data is transformed into a structured representation to construct a unified prompt text; The prompt text is analyzed using a local large model to identify the candidate intent; The candidate intents are evaluated for quality, and a target intent that meets the requirements is obtained based on the evaluation results; wherein the target intent is determined directly by the candidate intents or by the corrected candidate intents.
2. The intent recognition method according to claim 1, characterized in that, The multimodal data includes at least two of text data, voice data, and image data.
3. The intent recognition method according to claim 1, characterized in that, The step of converting the multimodal data into a structured representation and constructing a unified prompt text includes: Based on the data type of each single modal data in the multimodal data, determine the data processing strategy corresponding to each single modal data. For each single-modal data point in the multimodal data, the single-modal data point is processed according to the data processing strategy corresponding to that single-modal data point to obtain the feature data corresponding to that single-modal data point; All feature data are merged into unified structured data; The structured data and intent category description are added to a preset prompt template to obtain the prompt text.
4. The intent recognition method according to claim 1, characterized in that, The step of performing a quality assessment on the candidate intents and obtaining a target intent that meets the requirements based on the assessment results includes: Determine whether the confidence level of the local large model when generating the candidate intent is greater than a confidence threshold; If it is greater than the target intent, the candidate intent will be directly determined as the target intent, or the candidate intent after regularization and cleaning will be determined as the target intent. If it is not greater than, the candidate intent is re-determined according to the preset correction strategy to obtain the corrected candidate intent; The corrected candidate intent corresponding to a confidence level greater than the confidence threshold is determined as the target intent, or the corrected candidate intent corresponding to a sampling consistency greater than the consistency threshold after multiple corrections is determined as the target intent.
5. The intent recognition method according to claim 4, characterized in that, The process of redetermining candidate intents according to a preset correction strategy to obtain corrected candidate intents includes: Based on the keywords in the candidate intent, supplementation is performed according to preset rules to obtain the corrected candidate intent; or, The multimodal data is verified and output using a lightweight classifier to obtain corrected candidate intents; or, Multimodal data is re-collected, and reasoning is performed on the re-collected multimodal data using a local large model to obtain corrected candidate intents.
6. The intent recognition method according to claim 3, characterized in that, The step of determining the data processing strategy corresponding to each single-modal data point based on the data type of each single-modal data point in the multimodal data includes: When the data type of the single-modal data is text data, the corresponding data processing strategy is to perform text standardization processing; When the data type of the single-modal data is speech data, the corresponding data processing strategy is to convert the speech data into text data and extract speech prosody features. When the data type of the single-modal data is image data, the corresponding data processing strategy is to perform visual scene encoding processing on the image data.
7. The intent recognition method according to claim 1, characterized in that, After obtaining the target intent that meets the requirements, the intent recognition method further includes: The target intent and its corresponding confidence score are output to the target system.
8. An intent recognition device based on a local large model, characterized in that, The intent recognition device includes: The acquisition module is used to acquire the multimodal data required for intent recognition; A construction module is used to transform the multimodal data into a structured representation and construct a unified prompt text; The intent recognition module is used to perform intent recognition on the prompt text using a local large model to determine candidate intents; An evaluation module is used to perform a quality evaluation on the candidate intents and obtain a target intent that meets the requirements based on the evaluation results; wherein the target intent is directly determined by the candidate intents or by the corrected candidate intents.
9. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory via the bus, and the machine-readable instructions are executed by the processor to perform the steps of the intent recognition method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the intent recognition method as described in any one of claims 1 to 7.