Intention recognition method, device, apparatus and storage medium
Patent Information
- Application Number
- CN202611213372.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-11
- Publication Date
- 2026-10-27
AI Technical Summary
[0004]本申请的主要目的在于提供了一种意图识别方法、装置、设备及存储介质,旨在解决如何生成覆盖各种表述习惯、专业术语及边缘场景的高保真样本,提升模型性能的技术问题
[0015]本申请通过获取用户输入的原始文本,再将原始文本输入至预设意图识别模型中,得到意图识别结果,预设意图识别模型基于对初始意图识别模型训练得到,初始意图识别模型的训练数据集基于生成对抗模型得到。本申请中初始意图识别模型的训练数据集基于生成对抗模型得到,能够结合生成对抗模型基于金融领域知识自动生成训练数据集,无需直接使用敏感的真实业务数据,有效规避了数据隐私与合规风险,并且利用生成对抗模型的生成能力可以低成本、大规模地合成涵盖各种表述习惯、专业术语及边缘场景的高保真样本,然后基于训练数据集对初始意图识别模型进行训练得到初始意图识别模型,从而能够充分训练初始意图识别模型,提升训练得到的预设意图识别模型性能,再通过预设意图识别模型对原始文本进行意图识别,进而能够提升意图识别的准确性。
Smart Images

Figure CN122985996A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of financial technology, and in particular to an intent recognition method, apparatus, device, and storage medium. Background Technology
[0002] Currently, in the fields of intelligent financial customer service and intelligent question answering, user question intent recognition solutions based on large models have gradually replaced traditional keyword matching and shallow deep learning methods. Existing mainstream technical solutions typically collect a large number of real user question and answer logs, which are then manually labeled by professionals to form a training dataset. Subsequently, a selected large model is trained to adapt the model to specific financial business scenarios.
[0003] However, acquiring training data in vertical domains is costly and carries privacy risks: the financial sector involves highly specialized business processes and diverse user expressions. Relying on manually labeled real user data to build training sets is not only expensive and time-consuming, but also carries significant risks of data compliance and leakage, as real business data often involves user privacy and sensitive financial information. Furthermore, the scarcity of long-tail intent samples in real-world scenarios leads to uneven distribution of training data, affecting the model's ability to recognize low-frequency intents. Traditional data augmentation methods generate samples of limited quality: while traditional data augmentation techniques such as synonym replacement and back-translation are commonly used to address insufficient training data, these methods generate sentences with limited patterns and semantic authenticity, failing to cover the complex expression habits and terminology of the financial sector. They cannot effectively simulate the distribution of real user questions, making it difficult to generate high-quality samples that conform to the professional context of the financial sector. This results in limited improvement to model performance, leading to insufficient training when the model encounters long-tail intents or complex sentence structures. Summary of the Invention
[0004] The main objective of this application is to provide an intent recognition method, apparatus, device, and storage medium, which aims to solve the technical problem of how to generate high-fidelity samples covering various expression habits, professional terms, and edge scenarios, thereby improving model performance.
[0005] To achieve the above objectives, this application provides an intent recognition method, which includes the following steps: Get the raw text input by the user; The original text is input into a preset intent recognition model to obtain intent recognition results. The preset intent recognition model is obtained by training an initial intent recognition model, and the training dataset of the initial intent recognition model is obtained based on a generative adversarial model.
[0006] Optionally, before inputting the original text into a preset intent recognition model to obtain the intent recognition result, the method further includes: Collect historical financial data and extract financial knowledge triples from the historical financial data; The training dataset is determined based on the financial knowledge triplet and the generative adversarial model. The initial intent recognition model is trained using the training dataset to obtain the preset intent recognition model.
[0007] Optionally, the generative adversarial model includes a generator and a discriminator; The step of determining the training dataset based on the financial knowledge triples and the generative adversarial model includes: Convert the financial knowledge triples into embedded vectors; The embedding vector is input into the generator to obtain the user-simulated text; The user-simulated text and real text are input into the discriminator to obtain the true probability and predicted intent of the user-simulated text; The training dataset is determined based on the true probability and the prediction intent.
[0008] Optionally, inputting the embedding vector into the generator to obtain user-simulated text includes: Sample random noise vectors from a standard normal distribution; The embedded vector is concatenated with the random noise vector to obtain the concatenated vector; The concatenated vector is input into the generator to obtain the user-simulated text.
[0009] Optionally, determining the training dataset based on the true probability and the prediction intent includes: If the true probability is greater than a preset threshold, the corresponding target text is determined; Construct a financial knowledge pool corresponding to the aforementioned financial knowledge triplet; The initial dataset is determined based on the prediction intent and the financial knowledge pool; The initial dataset is cleaned to obtain the training dataset.
[0010] Optionally, determining the initial dataset based on the prediction intent and the financial knowledge pool includes: Obtain the conditional intent used when generating the target text from the financial knowledge pool, and extract the slot information from the target text from the financial knowledge pool; Determine whether the predicted intent is consistent with the conditional intent and whether the slot information contains the necessary slots corresponding to the conditional intent; Ruoyi Figure 1 If the target text and the conditional intent are included and contain the necessary slots, then the target text and the conditional intent are used as the initial dataset.
[0011] Optionally, training the initial intent recognition model using the training dataset to obtain a preset intent recognition model includes: The initial intent recognition model is trained using the training dataset and LoRA technology to obtain the preset intent recognition model.
[0012] Furthermore, to achieve the above objectives, this application also provides an intent recognition device, the intent recognition device comprising: The text acquisition module is used to acquire the raw text input by the user; The intent recognition module is used to input the original text into a preset intent recognition model to obtain the intent recognition result. The preset intent recognition model is obtained by training an initial intent recognition model, and the training dataset of the initial intent recognition model is obtained based on a generative adversarial model.
[0013] In addition, to achieve the above objectives, this application also proposes an intent recognition device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the intent recognition method as described above.
[0014] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and which, when executed by a processor, implements the steps of the intent recognition method described above.
[0015] This application obtains raw text input by the user and then feeds it into a preset intent recognition model to obtain intent recognition results. The preset intent recognition model is trained on an initial intent recognition model, whose training dataset is obtained based on a generative adversarial model (GAP). The initial intent recognition model's training dataset, based on a GAP, can automatically generate training datasets using financial domain knowledge, without directly using sensitive real business data, effectively avoiding data privacy and compliance risks. Furthermore, leveraging the generative capabilities of the GAP, high-fidelity samples covering various expression habits, professional terminology, and edge scenarios can be synthesized at low cost and on a large scale. The initial intent recognition model is then trained on the training dataset, thus fully training it and improving the performance of the trained preset intent recognition model. Finally, the preset intent recognition model is used to recognize intent from the raw text, thereby improving the accuracy of intent recognition. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0017] 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, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating the first embodiment of the intent recognition method of this application; Figure 2 This is a flowchart illustrating the second embodiment of the intent recognition method of this application; Figure 3 This is an architecture diagram of a generative adversarial model for an embodiment of the intent recognition method of this application; Figure 4 This is a flowchart illustrating the third embodiment of the intent recognition method of this application; Figure 5 This is an overall architecture diagram of an embodiment of the intent recognition method of this application; Figure 6 This is a structural block diagram of the first embodiment of the intent recognition device of this application; Figure 7 This is a schematic diagram of the structure of the intent recognition device in the hardware operating environment involved in the embodiments of this application.
[0019] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0020] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0021] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0022] The main solution of this application embodiment is: to obtain the original text input by the user; to input the original text into a preset intent recognition model to obtain the intent recognition result, wherein the preset intent recognition model is obtained based on the training of an initial intent recognition model, and the training dataset of the initial intent recognition model is obtained based on a generative adversarial model.
[0023] Currently, in the fields of intelligent financial customer service and intelligent question answering, user question intent recognition solutions based on large models have gradually replaced traditional keyword matching and shallow deep learning methods. Existing mainstream technical solutions typically collect a large number of real user question and answer logs, which are then manually labeled by professionals to form a training dataset. Subsequently, a selected large model is trained to adapt the model to specific financial business scenarios.
[0024] However, acquiring training data in vertical domains is costly and carries privacy risks: the financial sector involves highly specialized business processes and diverse user expressions. Relying on manually labeled real user data to build training sets is not only expensive and time-consuming, but also carries significant risks of data compliance and leakage, as real business data often involves user privacy and sensitive financial information. Furthermore, the scarcity of long-tail intent samples in real-world scenarios leads to uneven distribution of training data, affecting the model's ability to recognize low-frequency intents. Traditional data augmentation methods generate samples of limited quality: while traditional data augmentation techniques such as synonym replacement and back-translation are commonly used to address insufficient training data, these methods generate sentences with limited patterns and semantic authenticity, failing to cover the complex expression habits and terminology of the financial sector. They cannot effectively simulate the distribution of real user questions, making it difficult to generate high-quality samples that conform to the professional context of the financial sector. This results in limited improvement to model performance, leading to insufficient training when the model encounters long-tail intents or complex sentence structures.
[0025] This application obtains raw text input by the user and then feeds it into a preset intent recognition model to obtain intent recognition results. The preset intent recognition model is trained on an initial intent recognition model, whose training dataset is obtained based on a generative adversarial model (GAP). The initial intent recognition model's training dataset, based on a GAP, can automatically generate training datasets using financial domain knowledge, without directly using sensitive real business data, effectively avoiding data privacy and compliance risks. Furthermore, leveraging the generative capabilities of the GAP, high-fidelity samples covering various expression habits, professional terminology, and edge scenarios can be synthesized at low cost and on a large scale. The initial intent recognition model is then trained on the training dataset, thus fully training it and improving the performance of the trained preset intent recognition model. Finally, the preset intent recognition model is used to recognize intent from the raw text, thereby improving the accuracy of intent recognition.
[0026] It should be noted that the executing entity of this application can be a computing service device with data processing, network communication, and program execution functions, such as a computer, or an electronic device or intent recognition device capable of performing the above functions. The following description uses an intent recognition device as an example to illustrate this embodiment and the subsequent embodiments.
[0027] Based on this, embodiments of this application provide an intent recognition method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the intent recognition method of this application.
[0028] In this embodiment, the intent recognition method includes the following steps: Step S10: Obtain the original text input by the user.
[0029] Understandably, it is possible to obtain the raw text input by the user, that is, the natural language content input in the chat window, speech-to-text, etc., such as how to apply for credit card bill installment.
[0030] Step S20: Input the original text into the preset intent recognition model to obtain the intent recognition result. The preset intent recognition model is obtained by training the initial intent recognition model. The training dataset of the initial intent recognition model is obtained by generative adversarial model.
[0031] It should be understood that the preset intent recognition model can be a pre-trained model that can be deployed and used online. This preset intent recognition model is based on the training of the initial intent recognition model. The initial intent recognition model can be an untrained model, such as Qwen3-4B, Qwen3-8B, Qwen3-14B, Qwen3-32B, etc. The initial intent recognition model can be trained with a large amount of labeled data to enable it to learn the ability to classify financial intent.
[0032] It is understandable that the training data used to train the initial intent recognition model in this embodiment is not entirely taken from real historical data, but is generated by a generative adversarial model. It can automatically generate training datasets based on financial domain knowledge, without directly using sensitive real business data, effectively avoiding data privacy and compliance risks. Furthermore, by utilizing the generative adversarial model's generation capabilities, high-fidelity samples covering various expression habits, professional terms, and edge scenarios can be synthesized at low cost and on a large scale.
[0033] In a specific implementation, the preset intent recognition model in this embodiment can be used for intent recognition in the financial field. The original text can be input into the preset intent recognition model to obtain the intent recognition result.
[0034] This embodiment obtains the original text input by the user and then inputs it into a preset intent recognition model to obtain the intent recognition result. The preset intent recognition model is trained on an initial intent recognition model, and the training dataset of the initial intent recognition model is obtained based on a generative adversarial model. In this embodiment, the training dataset of the initial intent recognition model is obtained based on a generative adversarial model, which can automatically generate a training dataset based on financial domain knowledge, without directly using sensitive real business data, effectively avoiding data privacy and compliance risks. Furthermore, the generative adversarial model can synthesize high-fidelity samples covering various expression habits, professional terms, and edge scenarios at low cost and on a large scale. Then, the initial intent recognition model is trained on the training dataset to obtain the initial intent recognition model, thereby fully training the initial intent recognition model, improving the performance of the trained preset intent recognition model, and then using the preset intent recognition model to perform intent recognition on the original text, thereby improving the accuracy of intent recognition.
[0035] refer to Figure 2 , Figure 2 This is a flowchart illustrating the second embodiment of the intent recognition method of this application.
[0036] Based on the first embodiment described above, in this embodiment, before step S20, the method further includes: Step S01: Collect historical financial data and extract financial knowledge triples from the historical financial data.
[0037] Understandably, data collected from the financial sector within historical periods can include both structured and unstructured data. Structured data includes product manuals, business FAQs, and regulatory provisions, while unstructured data includes historical anonymized Q&A logs.
[0038] It should be understood that financial knowledge triples can be extracted from historical financial data. In one feasible embodiment, structured data is extracted using SQL, and unstructured data is extracted using a large model prompt. Using Named Entity Recognition (NER) and Relation Extraction (RE) techniques, financial knowledge triples of [entity-relation-attribute] are extracted from the above data, such as [credit card-includes-bill installment] and [loan-has interest rate-LPR+basis points].
[0039] Step S02: Determine the training dataset based on the financial knowledge triplet and the generative adversarial model.
[0040] Understandably, in order to address the scarcity of real data and privacy issues, this embodiment can utilize generative adversarial models (GANs) to synthesize high-quality training datasets.
[0041] Further, in this embodiment, step S202 includes: converting the financial knowledge triplet into an embedding vector; inputting the embedding vector into the generator to obtain user-simulated text; inputting the user-simulated text and real text into the discriminator to obtain the true probability and predicted intent of the user-simulated text; and determining the training dataset based on the true probability and the predicted intent.
[0042] It should be understood that a Generative Adversarial Model (GAN) is an adversarial game framework consisting of a generator G and a discriminator D. The generator G generates realistic data to deceive the discriminator D, while the discriminator D distinguishes real data from the fake data generated by the generator G. The two co-evolve in a game until a Nash equilibrium is reached. In this embodiment, the generator G uses a Transformer-based sequence generation model, specifically the BERT model; the discriminator D is also based on the Transformer architecture, and also uses the BERT model. Training process: The goal of the generator G is to minimize the discriminator's judgment loss, i.e., to generate sentences that are as realistic as possible so that the discriminator might misclassify them as real samples, while also conforming to the specified financial intent label. The goal of the discriminator D is to maximize the loss function that correctly distinguishes real samples from generated samples, while accurately predicting the intent label. Through adversarial training, utilizing the iterative game between the generator G and the discriminator D, the generator can ultimately produce text data that highly approximates real user queries in terms of syntax, semantics, and financial expertise.
[0043] Understandably, financial knowledge triples can be converted into embedded vectors. For example, [credit card - includes - installment billing] can be transformed into a numerical vector that a computer can understand, which can be done through BERT encoding. The embedded vectors are then input into a generator to obtain simulated user text, such as "how to apply for credit card installment billing".
[0044] In the specific implementation, the real text can be genuine user questions extracted from historical anonymized logs, while the user-simulated text is a hypothetical question output by generator G. The user-simulated text and the real text are input into discriminator D, which outputs the true probability and predicted intent of the user-simulated text. The true probability determines whether the user-simulated text was written by a real user or generated by the generator; the output range is 0 to 1, with values closer to 1 indicating a stronger resemblance to real text. The predicted intent determines the financial intent category to which the user-simulated text belongs. The training dataset is then determined based on the true probability and predicted intent.
[0045] Reference Figure 3 , Figure 3 This is an architecture diagram of a generative adversarial model for an embodiment of the intent recognition method of this application, as shown below. Figure 3As shown, the generator G adopts a sequence generation model based on Transformer. To prevent the model from overfitting, the input is a random noise vector z and a financial knowledge triplet embedding vector e, and the output is a simulated user natural language question x, i.e. fake data. The discriminator D is also based on the Transformer architecture. The input is fake data and real data, and the output is the probability P that the sentence belongs to real financial corpus.
[0046] Furthermore, in this embodiment, the step of inputting the embedding vector into the generator to obtain user-simulated text includes: sampling a random noise vector from a standard normal distribution; concatenating the embedding vector with the random noise vector to obtain a concatenated vector; and inputting the concatenated vector into the generator to obtain user-simulated text.
[0047] Understandably, a random noise vector can be sampled from the standard normal distribution N(0, 1), i.e., a set of values can be randomly selected as the random creative seed for the generator, ensuring that the generated result is different each time. Similarly, the knowledge triple, such as credit card-include-billing installment, can generate multiple questions by adding different random noise vectors, such as how to handle credit card billing installments and how to activate billing installment services.
[0048] It should be understood that the embedded vector and the random noise vector can be concatenated. In one feasible embodiment, the two vectors can be joined end-to-end to form a longer vector, which is then used as the concatenated vector. The concatenated vector is then input into the generator, and through autoregressive decoding, the user-simulated text is obtained.
[0049] Furthermore, in this embodiment, determining the training dataset based on the true probability and the prediction intent includes: determining the corresponding target text when the true probability is greater than a preset threshold; constructing a financial knowledge pool corresponding to the financial knowledge triple; determining an initial dataset based on the prediction intent and the financial knowledge pool; and cleaning the initial dataset to obtain the training dataset.
[0050] Understandably, when the true probability exceeds a preset threshold (which could be 0.7, 0.5, 0.9, etc.), the corresponding target text is determined. Only generated samples deemed sufficiently realistic by the discriminator are retained for subsequent filtering. After obtaining the financial knowledge triples, various user question templates can be defined based on templates, covering standard questions, colloquial questions, and noisy questions (such as those containing typos). For example, templates could be: "What is the {attribute} of {product}?" or "How do I find the {action} of {product}?" Finally, a financial knowledge pool is formed: a financial domain knowledge pool containing intent tags, slots, and corresponding standard questions is constructed, serving as constraints for subsequent GAN generation.
[0051] It should be understood that the initial dataset can be determined based on the prediction intent and financial knowledge pool. The initial dataset is then cleaned to obtain the training dataset. In one feasible embodiment, low-quality content can be identified and removed using a prompt to ensure the purity of the training data. Here, the Deepseek R1 model is used, ultimately resulting in a high-quality final training dataset for model fine-tuning.
[0052] Further, in this embodiment, determining the initial dataset based on the predictive intent and the financial knowledge pool includes: obtaining the conditional intent used when generating the target text from the financial knowledge pool, and extracting slot information from the target text from the financial knowledge pool; determining whether the predictive intent is consistent with the conditional intent and whether the slot information contains the necessary slots corresponding to the conditional intent; if the intent is consistent with the conditional intent, then... Figure 1 If the target text and the conditional intent are included and contain the necessary slots, then the target text and the conditional intent are used as the initial dataset.
[0053] Understandably, the conditional intent used when generating the target text and the slot information in the target text can be obtained from the financial knowledge pool. That is, for each target text that passes the authenticity screening, the conditional intent at the time of its generation can be traced back. The conditional intent refers to the intent label corresponding to the knowledge triple input to the generator when generating the target text, and the slot information contained in the target text can be extracted. Slot values can be extracted from the target text using NER (Named Entity Recognition).
[0054] It should be understood that determining whether the predicted intent aligns with the conditional intent and whether the slot information includes the necessary slots corresponding to the conditional intent constitutes a double quality check, ensuring that the generated sample is both relevant to the topic and informationally complete. If the intention... Figure 1 If the target text contains the necessary slots, then the correspondence between the target text and the conditional intent is used as the initial dataset.
[0055] Step S03: Train the initial intent recognition model using the training dataset to obtain the preset intent recognition model.
[0056] In practice, the initial intent recognition model can be trained using a training dataset, and after training, a preset intent recognition model can be obtained.
[0057] This embodiment collects historical financial data and extracts financial knowledge triples from it. Then, it determines a training dataset based on the financial knowledge triples and a generative adversarial model (GAP). The initial intent recognition model is then trained using this training dataset to obtain a preset intent recognition model. This embodiment solves the problem of constructing and collecting model training datasets in financial business scenarios by determining the training dataset based on financial knowledge triples and a GAP, achieving a high-quality data training set construction effect.
[0058] refer to Figure 4 , Figure 4 This is a flowchart illustrating the third embodiment of the intent recognition method of this application.
[0059] Based on the above embodiments, in this embodiment, step S03 includes: Step S031: Train the initial intent recognition model using the training dataset and LoRA technology to obtain the preset intent recognition model.
[0060] Understandably, this embodiment, based on a comprehensive comparison of model capabilities and resource consumption among Qwen3-4B, Qwen3-8B, Qwen3-14B, and Qwen3-32B, ultimately selected Qwen3-14B as the initial intent recognition model.
[0061] It should be understood that LoRA technology can be used for model fine-tuning during the initial intent recognition model training process. Regarding training parameters, to reduce GPU resource consumption and considering training time, the batch size for fine-tuning is set to 1. To prevent underfitting or overfitting, experimental verification shows that the learning rate is set to 0.00001, the learning rate adjustment plan is cosine, and the warm-up ratio is 0.03. Furthermore, regularization techniques are used to randomly freeze the network, improving model training stability and further reducing the risk of overfitting. Experiments show that a regularization coefficient of 0.01 is required. The optimal values for LoRA model training parameters were obtained through extensive experiments. This configuration, with the base model frozen, only injects a low-rank adapter with a rank of 8 into the query, key, and value projection layers (q / k / v_proj) in the attention mechanism. A scaling factor of 32 amplifies the fine-tuning signal, and a Dropout of 0.01 is used to prevent overfitting, thereby efficiently improving the model's adaptability to specific tasks with extremely low parameter count. As shown below: LoRA scaling factor: 32; LoRA rank: 8; LoRADropout factor: 0.01; LoRA target module: [q_proj,k_proj,v_proj]; warm-up ratio: 0.03; gradient accumulation steps: 2; training epochs: 2; optimizer: adamw_torch; maximum sequence length: 4096; data concatenation: false; evaluation batch size: 4; validation interval: 0.2; training framework: llm_factory; training GPU: Huawei 910B 64G version.
[0062] In the actual implementation, after model fine-tuning, the objective data metrics on the test set are shown in the table below.
[0063] ROUGE-1 ROUGE-2 ROUGE-L BLUE-4 94.97% 93.60% 97.40% 97.15% In the table, the ROUGE series of metrics focuses on recall, i.e., whether the generated content covers the key information of the reference text. ROUGE-1 focuses on vocabulary coverage, not word order. ROUGE-2 focuses on local phrases and word order. ROUGE-3 focuses on sentence-level semantic structure and overall fluency. The BLUE series of metrics focuses on precision, i.e., how much of the generated content appears in the reference text.
[0064] Furthermore, to demonstrate the effectiveness of the fine-tuned model, ablation experiments were conducted using additional real-world problem corpora. The base model Qwen3-14B and the fine-tuned model were validated for intent recognition under the same prompt. The model input was the intent recognition test set, and the output was the intent. An intent recognition accuracy rate was obtained by comparing the labeled accuracy with the model's output intent, as shown in the table below.
[0065] Model Qwen3-14B Fine-tuned model Intent recognition accuracy 87.5% 92.4% As can be seen, the fine-tuned model has a significantly improved accuracy in intent recognition compared to Qwen3-14B.
[0066] In the specific implementation, refer to Figure 5 , Figure 5 This is an overall architecture diagram of an embodiment of the intent recognition method of this application, as shown below. Figure 5 As shown, the first layer involves training set construction, including building fundamental knowledge in the financial field (knowledge graph / triples / business rules); GAN model generation to enhance data, addressing data scarcity and generating massive synthetic samples; and large-scale model data augmentation to further improve data quality and diversity. The second layer involves LoRA module training, including LoRA format data preparation (converting training data to LoRA fine-tuning format); LoRA parameter tuning (optimizing hyperparameters such as learning rate, rank, and Dropout); and LoRA matrix module training (freezing the base model and training only the low-rank adapter). The third layer involves LoRA large-scale model inference for user intent recognition.
[0067] This embodiment trains the initial intent recognition model using a training dataset and LoRA technology to obtain a preset intent recognition model. This embodiment uses LoRA technology for model fine-tuning, significantly reducing memory usage and computational resource consumption during training, shortening the training cycle, and preserving the original powerful general semantic understanding capabilities of the large model, thus improving the generalization stability of model training and inference.
[0068] Reference Figure 6 , Figure 6 This is a structural block diagram of the first embodiment of the intent recognition device of this application.
[0069] like Figure 6 As shown, the intent recognition device proposed in this application includes: The text acquisition module 10 is used to acquire the raw text input by the user; The intent recognition module 20 is used to input the original text into a preset intent recognition model to obtain the intent recognition result. The preset intent recognition model is obtained based on the training of an initial intent recognition model. The training dataset of the initial intent recognition model is obtained based on a generative adversarial model.
[0070] This embodiment obtains the original text input by the user and then inputs it into a preset intent recognition model to obtain the intent recognition result. The preset intent recognition model is trained on an initial intent recognition model, and the training dataset of the initial intent recognition model is obtained based on a generative adversarial model. In this embodiment, the training dataset of the initial intent recognition model is obtained based on a generative adversarial model, which can automatically generate a training dataset based on financial domain knowledge, without directly using sensitive real business data, effectively avoiding data privacy and compliance risks. Furthermore, the generative adversarial model can synthesize high-fidelity samples covering various expression habits, professional terms, and edge scenarios at low cost and on a large scale. Then, the initial intent recognition model is trained on the training dataset to obtain the initial intent recognition model, thereby fully training the initial intent recognition model, improving the performance of the trained preset intent recognition model, and then using the preset intent recognition model to perform intent recognition on the original text, thereby improving the accuracy of intent recognition.
[0071] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this application. In practical applications, those skilled in the art can select some or all of it to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.
[0072] In addition, for technical details not described in detail in this embodiment, please refer to the intent recognition method provided in any embodiment of this application, which will not be repeated here.
[0073] Based on the first embodiment of the intent recognition device described above, a second embodiment of the intent recognition device of this application is proposed.
[0074] In this embodiment, the intent recognition device further includes a model training module, which is used to collect historical financial data and extract financial knowledge triples from the historical financial data; determine a training dataset based on the financial knowledge triples and the generative adversarial model; and train the initial intent recognition model using the training dataset to obtain a preset intent recognition model.
[0075] Furthermore, the generative adversarial model includes a generator and a discriminator; the model training module is also used to convert the financial knowledge triples into embedding vectors; input the embedding vectors into the generator to obtain user-simulated text; input the user-simulated text and real text into the discriminator to obtain the true probability and predicted intent of the user-simulated text; and determine the training dataset based on the true probability and the predicted intent.
[0076] Furthermore, the model training module is also used to sample random noise vectors from a standard normal distribution; concatenate the embedding vector with the random noise vector to obtain a concatenated vector; and input the concatenated vector into the generator to obtain user-simulated text.
[0077] Furthermore, the model training module is also used to determine the corresponding target text when the true probability is greater than a preset threshold; construct a financial knowledge pool corresponding to the financial knowledge triple; determine an initial dataset based on the prediction intent and the financial knowledge pool; and perform data cleaning on the initial dataset to obtain a training dataset.
[0078] Furthermore, the model training module is also used to obtain the conditional intent used when generating the target text from the financial knowledge pool, and extract slot information from the target text from the financial knowledge pool; determine whether the predicted intent is consistent with the conditional intent and whether the slot information contains the necessary slots corresponding to the conditional intent; if the intent is consistent with the conditional intent, the module further determines whether the predicted intent is consistent with the conditional intent and whether the slot information contains the necessary slots corresponding to the conditional intent. Figure 1 If the target text and the conditional intent are included and contain the necessary slots, then the target text and the conditional intent are used as the initial dataset.
[0079] Furthermore, the model training module is also used to train the initial intent recognition model using the training dataset and LoRA technology to obtain a preset intent recognition model.
[0080] Other embodiments or specific implementations of the intent recognition device of this application can be found in the above-described method embodiments, and will not be repeated here.
[0081] This application provides an intent recognition device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the intent recognition method in Embodiment 1 above.
[0082] The following is for reference. Figure 7 The diagram illustrates a structural schematic suitable for implementing the intent recognition device in the embodiments of this application. The intent recognition device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 7The intent recognition device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0083] like Figure 7 As shown, the intent recognition device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the intent recognition device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the intent identification device to communicate wirelessly or wiredly with other devices to exchange data. While the figures show intent identification devices with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0084] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0085] The intent recognition device provided in this application, employing the intent recognition method in the above embodiments, can solve the technical problem of how to generate high-fidelity samples covering various expression habits, professional terms, and edge scenarios, thereby improving model performance. Compared with the prior art, the beneficial effects of the intent recognition device provided in this application are the same as those of the intent recognition method provided in the above embodiments, and other technical features in this intent recognition device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0086] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0087] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included 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.
[0088] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the intent recognition method in the above embodiments.
[0089] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0090] The aforementioned computer-readable storage medium may be included in the intent recognition device; or it may exist independently and not assembled into the intent recognition device.
[0091] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the intent recognition device, cause the intent recognition device to: acquire the original text input by the user; input the original text into a preset intent recognition model to obtain an intent recognition result, wherein the preset intent recognition model is obtained based on training an initial intent recognition model, and the training dataset of the initial intent recognition model is obtained based on a generative adversarial model.
[0092] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof. These programming languages include object-oriented programming languages—such as Python, Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0093] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0094] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0095] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described intent recognition method. This solves the technical problem of how to generate high-fidelity samples covering various expression habits, technical terms, and edge cases, thereby improving model performance. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the intent recognition method provided in the above embodiments, and will not be repeated here.
[0096] The above description is only a part of the embodiments of this application and does not limit the scope of protection of this application. All equivalent structural transformations made under the technical concept of this application and using the content of this application specification and drawings, or direct / indirect applications in other related technical fields, are included in the scope of protection of this application.
Claims
1. An intent recognition method, characterized in that, The intent recognition method includes the following steps: Get the raw text input by the user; The original text is input into a preset intent recognition model to obtain intent recognition results. The preset intent recognition model is obtained by training an initial intent recognition model, and the training dataset of the initial intent recognition model is obtained based on a generative adversarial model.
2. The intent recognition method as described in claim 1, characterized in that, Before inputting the original text into the preset intent recognition model to obtain the intent recognition result, the process further includes: Collect historical financial data and extract financial knowledge triples from the historical financial data; The training dataset is determined based on the financial knowledge triplet and the generative adversarial model. The initial intent recognition model is trained using the training dataset to obtain the preset intent recognition model.
3. The intent recognition method as described in claim 2, characterized in that, The generative adversarial model includes a generator and a discriminator; The step of determining the training dataset based on the financial knowledge triples and the generative adversarial model includes: Convert the financial knowledge triples into embedded vectors; The embedding vector is input into the generator to obtain the user-simulated text; The user-simulated text and real text are input into the discriminator to obtain the true probability and predicted intent of the user-simulated text; The training dataset is determined based on the true probability and the prediction intent.
4. The intent recognition method as described in claim 3, characterized in that, The step of inputting the embedding vector into the generator to obtain user-simulated text includes: Sample random noise vectors from a standard normal distribution; The embedded vector is concatenated with the random noise vector to obtain the concatenated vector; The concatenated vector is input into the generator to obtain the user-simulated text.
5. The intent recognition method as described in claim 3, characterized in that, Determining the training dataset based on the true probability and the prediction intent includes: If the true probability is greater than a preset threshold, the corresponding target text is determined; Construct a financial knowledge pool corresponding to the aforementioned financial knowledge triplet; The initial dataset is determined based on the prediction intent and the financial knowledge pool; The initial dataset is cleaned to obtain the training dataset.
6. The intent recognition method as described in claim 5, characterized in that, The step of determining the initial dataset based on the prediction intent and the financial knowledge pool includes: Obtain the conditional intent used when generating the target text from the financial knowledge pool, and extract the slot information from the target text from the financial knowledge pool; Determine whether the predicted intent is consistent with the conditional intent and whether the slot information contains the necessary slots corresponding to the conditional intent; If the intent is consistent and the necessary slots are included, then the target text and the conditional intent are used as the initial dataset.
7. The intent recognition method as described in any one of claims 2 to 6, characterized in that, The step of training the initial intent recognition model using the training dataset to obtain the preset intent recognition model includes: The initial intent recognition model is trained using the training dataset and LoRA technology to obtain the preset intent recognition model.
8. An intent recognition device, characterized in that, The intent recognition device includes: The text acquisition module is used to acquire the raw text input by the user; The intent recognition module is used to input the original text into a preset intent recognition model to obtain the intent recognition result. The preset intent recognition model is obtained by training an initial intent recognition model, and the training dataset of the initial intent recognition model is obtained based on a generative adversarial model.
9. An intent recognition device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the intent recognition method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the intent recognition method as described in any one of claims 1 to 7.
