Intention recognition method and system

Through the intention recognition method combined with large-scale fine-tuning and financial knowledge graph, the complexity and accuracy of intention recognition in the financial futures field are solved, and efficient intention recognition under a small number of labeled samples is achieved.

CN119294512APending Publication Date: 2025-01-10SHANGHAI FINANCIAL FUTURES INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411268588.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

Intent recognition algorithms in the financial futures field face the problems of complex language expression, overlapping intentions and multiple intention recognition, resulting in limited recognition accuracy and response speed.

Method used

A large model fine-tuning is used to generate an intent identification data set, combining rule matching and deep learning similarity matching, using financial knowledge graphs for intent identification, construct an intent classification scenario data set in the financial futures field, and improve model performance through LoRA fine-tuning.

Benefits of technology

In the absence of a large number of vertical field corpus, the accuracy and response speed of the intention recognition algorithm are improved, and the intention recognition capability in the financial futures field is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119294512A_ABST
    Figure CN119294512A_ABST
Patent Text Reader

Abstract

The invention discloses an intention recognition method and system, which can jointly solve the problem of intention recognition in a dialogue assistant by means of a method for automatically constructing an intention recognition data set and generating pseudo label data in combination with rule matching, deep learning similarity matching and a large model under the condition of providing a small number of labeled samples. According to the technical scheme, the method comprises the steps of 1, generating an intention recognition data set by using a large model; 2, pre-matching the user questions, and correspondingly carrying out the intention recognition based on similarity matching in the step 3 and the intention recognition based on the large model in the step 4 on the basis of a pre-matching result; 3, performing intention recognition based on similarity matching; and 4, performing intention recognition based on the large model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an intention recognition technology, and in particular to an intention recognition method and system based on large model fine-tuning applied to the financial field, especially the financial futures field. Background Art

[0002] With the continuous development of natural language processing technology, the application of intelligent dialogue assistants has gradually become popular in the field of financial futures, and has achieved remarkable results in improving transaction efficiency, providing professional consultation, and improving user experience. Compared with manual customer service, intelligent dialogue assistants can provide 7x24 hours of all-weather service, answering users' questions and needs at any time, greatly improving the availability and convenience of services. Secondly, based on powerful data processing and analysis capabilities, intelligent dialogue assistants can provide accurate market conditions, trading suggestions and risk warnings in real time to help users make more informed investment decisions. However, the financial futures market is complex and changeable, and users may raise various questions and needs when interacting with dialogue assistants, which places high demands on the system's response speed and accuracy.

[0003] The intent recognition algorithm is the core technology of the intelligent conversation assistant and the basis for the smooth operation of the entire conversation assistant. For example, in the field of financial futures, users may ask various questions about market trends, trading strategies, account information, etc. The role of intent recognition is to accurately judge the specific needs of users, thereby triggering the corresponding conversation process or operation logic. For the field of machine learning and deep learning, this problem can be abstractly defined as a text classification problem.

[0004] Although intent recognition plays an important role in conversational assistants, it also faces many challenges in practical applications. First, the language expressions in the field of financial futures are complex and diverse. Users may use professional terms, colloquial expressions, or even implicit intentions, which increases the difficulty of intent recognition. Secondly, there may be overlapping or blurred boundaries between intents. For example, "asking about market trends" and "consulting for trading advice" may involve similar information, but the actual intentions are different, which requires the system to have a higher level of discrimination. In addition, the sentences input by the user may contain multiple intentions or switch across intentions. How to accurately identify and process such complex combinations of intentions is also a major difficulty. Summary of the invention

[0005] A brief summary of one or more aspects is given below to provide a basic understanding of these aspects. This summary is not an exhaustive overview of all conceived aspects, and is neither intended to identify the key or critical elements of all aspects nor to define the scope of any or all aspects. Its only purpose is to give some concepts of one or more aspects in a simplified form as a prelude to a more detailed description that will be given later.

[0006] The purpose of the present invention is to solve the above-mentioned problems and to provide an intent recognition method and system. With the provision of a small number of labeled samples, the present invention can rely on the method of automatically constructing an intent recognition data set and generating pseudo-label data, combined with rule matching, deep learning similarity matching and large models, to jointly solve the intent recognition problem in conversational assistants.

[0007] The technical solution of the present invention is: the present invention discloses an intention recognition method, the method comprising:

[0008] Step 1: Generate intent recognition dataset using a large model;

[0009] Step 2: Pre-match the user's questions, and based on the pre-matching results, perform the intent recognition based on similarity matching in step 3 and the intent recognition based on the large model in step 4;

[0010] Step 3: Intent recognition based on similarity matching;

[0011] Step 4: Perform intent recognition based on the large model.

[0012] According to an embodiment of the intention recognition method of the present invention, step 1 further includes:

[0013] Step 1-1: Collect the corpus of the set field and perform data cleaning;

[0014] Step 1-2: Use the cleaned corpus to fine-tune the large model to obtain a large model suitable for the set domain;

[0015] Step 1-3: Construct a small part of the annotated data of the intent classification scenario in the set domain, and provide it as input to the large model of the set domain, so that the large model of the set domain can imitate the small part of the annotated data to generate an intent recognition dataset with the same format but different questions.

[0016] According to an embodiment of the intention recognition method of the present invention, the fine-tuning of step 1-2 is LoRA fine-tuning.

[0017] According to an embodiment of the intention recognition method of the present invention, step 2 further includes:

[0018] Set up multiple fixed phrases and questions with high frequency of occurrence. If the user's question is exactly the same as the preset question, the intent recognition result will be directly output as the classification result corresponding to the preset question, and the answer corresponding to the preset question will be output; if the user's question does not completely match the preset question, the user's question and the constructed large-scale intent classification dataset will be used together for similarity matching intent recognition and large model intent recognition.

[0019] According to an embodiment of the intention recognition method of the present invention, step 3 further includes:

[0020] First, use the word segmenter to segment the input user text to obtain a vocabulary sequence;

[0021] Then, a deep learning model is used to learn the embedded representation and generate the corresponding vector representation for the user input;

[0022] Afterwards, a deep learning model is used to learn embedded representations and generate corresponding vector representations for the questions in the intent recognition dataset.

[0023] Furthermore, the cosine similarity calculation method is used to calculate the vector similarity between the user question and the question in the intent recognition dataset;

[0024] Finally, if the similarity calculation result is greater than the preset maximum confidence, the result of this intent recognition is output as the intent category corresponding to the data. If it is less than the preset maximum confidence, it is sorted by similarity and a preset number of intent questions and corresponding categories that are closest to the user's question are added to the candidate set.

[0025] According to an embodiment of the method for intention recognition of the present invention, step 4 further comprises:

[0026] First, the user question and the candidate set obtained in step 3 are used as the data to be recognized as the input of the large model recognition;

[0027] Then, the entities mentioned in the user’s question are linked to the entities in the financial knowledge graph, and the BERT model is used for sequence labeling tasks;

[0028] Afterwards, the obtained financial knowledge graph entity information and the adjacent node entity information of the financial knowledge graph are supplemented as user input, and the prompt engineering construction method is used to test the performance of the large model under different prompt prefixes, and construct the final prompt prefix of the large model input;

[0029] Next, the prompt prefix, user question, and candidate set are concatenated into a long text, which is input into the big model for inference generation to obtain the big model’s response.

[0030] Finally, keyword extraction and rule matching are used to post-process the data generated by the large model to obtain the final intent recognition results.

[0031] According to an embodiment of the intention recognition method of the present invention, the set field is the financial futures field.

[0032] The present invention also discloses an intention recognition system, the system comprising:

[0033] The dataset generation module is used to generate the intent recognition dataset using the large model;

[0034] The pre-matching module is used to pre-match user questions and, based on the pre-matching results, to perform intent recognition based on similarity matching and intent recognition based on a large model;

[0035] Similarity matching intention recognition module, used for intention recognition based on similarity matching;

[0036] The intention recognition module of the large model is used to perform intention recognition based on the large model.

[0037] The present invention also discloses a computer device for intent recognition, comprising a memory, a processor, and program instructions stored in the memory and executable by the processor, wherein the processor executes the program instructions to implement the steps of the intent recognition method as described above.

[0038] The present invention also discloses a computer-readable storage medium for intent recognition, which stores program instructions executable by a processor to perform the steps of the intent recognition method as described above.

[0039] Compared with the prior art, the present invention has the following beneficial effects: The feature of the present invention is that it adopts a joint method of similarity matching algorithm based on deep learning model and large model discrimination, and specifically introduces two aspects of technical innovation: First, in order to solve the problem of difficulty in labeling financial data, firstly, large-scale financial corpus is used to fine-tune the large model with LoRA (Low-Rank Adaptation) to improve the text understanding ability of the large model in the field of financial futures, and then a small amount of labeled data is used to use the data enhancement method of large model prompt engineering to construct an intent recognition data set in the field of financial futures. Second, in order to solve the problem of inaccurate intent recognition in the field of financial futures, the constructed user question data set and the fine-tuned financial futures large model are combined, and the financial knowledge graph is introduced as an external think tank to jointly implement the intent recognition algorithm. The combination of the above multiple methods helps to improve the accuracy of the intent recognition algorithm.

[0040] In detail, first of all, the entire architecture is the biggest innovation. Based on this architecture, domain-related intent recognition tasks can be implemented in fields that lack a large amount of vertical domain corpus.

[0041] Secondly, in response to the current situation of lack of large-scale intent recognition datasets in the financial field, the present invention constructs a large-scale intent recognition dataset in the financial field through an automated expansion algorithm.

[0042] Furthermore, the present invention combines rule matching, deep learning models and large models to effectively improve the accuracy of intent recognition and classification algorithms. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The above features and advantages of the present invention can be better understood after reading the detailed description of the embodiments of the present disclosure in conjunction with the following drawings. In the drawings, the components are not necessarily drawn to scale, and components with similar related properties or features may have the same or similar reference numerals.

[0044] Figure 1 A flow chart of an embodiment of the intention recognition method of the present invention is shown.

[0045] Figure 2 A schematic diagram showing an embodiment of an intention recognition system of the present invention is shown. DETAILED DESCRIPTION

[0046] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. Note that the aspects described below in conjunction with the accompanying drawings and specific embodiments are only exemplary and should not be construed as limiting the scope of protection of the present invention in any way.

[0047] Figure 1 FIG. 1 shows a flow chart of an embodiment of the method for identifying intentions of the present invention. Figure 1 , the implementation steps of the method of this embodiment are described in detail as follows.

[0048] Step 1: Generate an intent recognition dataset using a large model.

[0049] In view of the lack of large-scale intent recognition datasets in the financial field, a large-scale intent recognition dataset in the financial field was constructed through automated expansion.

[0050] The specific processing process of step 1 is as follows:

[0051] Step 1-1: Collect financial futures-related corpus, such as research reports, financial news, financial announcements, etc., and perform data cleaning to eliminate low-quality texts.

[0052] Step 1-2: Use the cleaned financial corpus to fine-tune the large model using LoRA (Low-Rank Adaptation) to obtain the financial futures large model.

[0053] The specific processing of this step is:

[0054] First, select a basic large model: select a pre-trained large model (such as the GPT series, ChatGLM series, Llama series, etc.) as the basic model. This basic model has been trained on a large amount of general text data and has certain language understanding and generation capabilities.

[0055] Secondly, prepare LoRA parameters: LoRA is a lightweight model fine-tuning technique that adjusts model parameters by adding low-rank matrices (i.e., the rank of the matrix is ​​much smaller than its number of rows and columns) to the original model. Compared with directly fine-tuning the entire model parameters, this method has the advantages of high computational efficiency, small amount of data required, and little impact on the original model. During the LoRA fine-tuning process, it is necessary to initialize a set of low-rank matrices (usually two matrices: one for downward projection and one for upward projection). The dimensions and number of these matrices are determined according to the specific task and data set size.

[0056] Then, build training data: Use the cleaned financial futures-related corpus to build a training data set. This data should cover various topics and scenarios in the field of financial futures so that the big model can learn the specific knowledge and language patterns in this field.

[0057] After that, train the LoRA parameters: input the training data into the basic large model, and adjust the large model output through the LoRA parameters. During the training process, only the LoRA parameters are updated, while the other parameters of the basic large model remain unchanged. The LoRA parameters are optimized through the back propagation algorithm, so that the large model performs better in tasks in the field of financial futures.

[0058] Finally, we get the financial futures big model: after sufficient training, the model containing the LoRA parameters is regarded as the financial futures big model. This model not only maintains the general capabilities of the basic big model, but also has the specific knowledge and language patterns in the field of financial futures.

[0059] The above-mentioned LoRA method is only used as an example to fine-tune the large model, and can be replaced by other fine-tuning methods, such as full parameter fine-tuning (Full Fine-tuning), adapter adjustment (Adapter-based Tuning), etc.

[0060] Step 1-3: Construct a small part of labeled data for intent classification scenarios in the financial futures field, and provide it as input to the financial futures big model, so that the financial futures big model can imitate the labeled data and generate an intent recognition dataset with the same format but different questions.

[0061] Step 2: Pre-match the user questions, and based on the pre-matching results, perform the intent recognition based on similarity matching in step 3 and the intent recognition based on the large model in step 4.

[0062] Step 2 further includes the following processing steps:

[0063] Set some fixed phrases and questions with high frequency. If the user's question is exactly the same as the preset question, the recognition result will be directly output as the classification result corresponding to the preset question, and the answer corresponding to the preset question will be output. If the user's question does not completely match the preset question, the user's question and the constructed large-scale intent classification data set will be used together for similarity matching intent recognition and large model intent recognition.

[0064] Step 3: Perform intent recognition based on similarity matching.

[0065] Step 3 specifically includes the following similarity matching process.

[0066] First, the word segmenter is used to segment the input user text to obtain the vocabulary sequence [w1,w2,…,w m ].

[0067] Then, a deep learning model is used to learn the embedding representation and generate the corresponding vector representation [v1, v2, …, v m ]. The vectorization method is not limited to using deep learning models to generate vector representations, and can be replaced by other vectorization methods, such as word embedding models (Word Embedding Models), sentence embedding models (Sentence Embedding Models), etc.

[0068] Afterwards, a deep learning model is used to learn the embedded representation and generate the corresponding vector representation [q1,q2,…,q m ].

[0069] Finally, the cosine similarity calculation method is used to calculate the vector similarity between the user question and the question in the intent recognition dataset. For two n-dimensional word vectors A = [a1,…,a n ],B=[b1,…,b n ], the calculation method is as follows:

[0070]

[0071] Among them, the similarity calculation result of cos(A, B) is a decimal between 0 and 1, and the maximum confidence θ is set. If the similarity calculation result is greater than the maximum confidence θ, the result of this intent recognition is output as the intent category corresponding to the data. If it is less than the maximum confidence θ, it is sorted by similarity, and a preset number (for example, 5) of intent questions and corresponding categories that are closest to the user's question are added to the candidate set.

[0072] Step 4: Perform intent recognition based on the large model.

[0073] This step combines rule matching, deep learning models, and large models to effectively improve the accuracy of the intent recognition classification algorithm. Large model intent recognition is not limited to a single large model, and can be replaced by other generative language models that can perform question-answering, such as LaMDA (Language Model for Dialogue Applications) and BART (Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension).

[0074] Step 4 further includes the following processing steps.

[0075] First, the user question and the candidate set obtained in step 3 are used as the data to be recognized as the input of the large model recognition.

[0076] Then, the entities mentioned in the user’s question are linked to the entities in the financial knowledge graph, and the deep learning model BERT (Bidirectional Encoder Representations from Transformers) is used for sequence labeling tasks. The label calculation formula for each word in the user’s question is as follows:

[0077] y n =softmax(W s h n +b s )

[0078] Among them, y n Indicates the label of the current word, h n Represents the hidden state of the current word, W s and b s Represents the transformation matrix and bias, and softmax() means normalizing the result.

[0079] Afterwards, the obtained financial knowledge graph entity information and the adjacent node entity information of the financial knowledge graph are supplemented as user input. The prompt engineering construction method is used to test the performance of the large model under different prompt prefixes and construct the final prompt prefix of the large model input. The prompt engineering construction method is, for example, the One-shot & Few-shot prompt learning method, the Chain-of-Thought (CoT) prompt method, etc.

[0080] Next, the prompt prefix, user question and candidate set are concatenated into a long text, which is input into the big model for inference generation to obtain the big model's response.

[0081] Finally, we use keyword extraction, regular matching and other rule matching methods to post-process the data generated by the large model to obtain the final intent recognition result. Specifically: First, we use keyword extraction technology to extract the core words related to the intent from the text. Then, we can build regular expressions based on these core words to find information or structures in the text that are more directly related to the intent. Then we build regular expressions to match specific text patterns that contain these keywords. Finally, we combine the results of keyword extraction and regular matching to comprehensively judge the intent of the text and give the final intent recognition result.

[0082] Figure 2 The principle of an embodiment of the intention recognition system of the present invention is shown. Figure 2 The system of this embodiment includes: a data set generation module, a pre-matching module, a similarity matching intention recognition module, and a large model intention recognition module.

[0083] The dataset generation module is used to generate intent recognition datasets using large models.

[0084] The dataset generation module is further configured as:

[0085] Collect corpus in the specified field and perform data cleaning;

[0086] Use the cleaned corpus to fine-tune the large model to obtain a large model suitable for the set field;

[0087] A small part of the annotated data of the intent classification scenario in the set domain is constructed and provided as input to the large model of the set domain, so that the large model of the set domain can imitate the small part of the annotated data to generate an intent recognition dataset with the same format but different questions.

[0088] The specific processing and Figure 1 Step 1 in the method shown is the same and will not be repeated here.

[0089] The pre-matching module is used to pre-match user questions and, based on the pre-matching results, perform intent recognition based on similarity matching and intent recognition based on a large model.

[0090] The pre-matching module is further configured as follows: multiple fixed phrases and questions with higher frequencies are set. If the user's question is exactly the same as the preset question, the intent recognition result is directly output as the classification result corresponding to the preset question, and the answer corresponding to the preset question is output; if the user's question is not completely matched with the preset question, the user's question and the constructed large-scale intent classification data set are used together for similarity matching intent recognition and large model intent recognition.

[0091] Pre-matching module specific processing and Figure 1 Step 2 in the method shown is the same and will not be repeated here.

[0092] The similarity matching intention recognition module is used to perform intention recognition based on similarity matching.

[0093] The intent recognition module for similarity matching is further configured as follows:

[0094] First, use the word segmenter to segment the input user text to obtain a vocabulary sequence;

[0095] Then, a deep learning model is used to learn embedded representations and generate corresponding vector representations for user inputs;

[0096] Afterwards, a deep learning model is used to learn embedded representations and generate corresponding vector representations for the questions in the intent recognition dataset.

[0097] Furthermore, the cosine similarity calculation method is used to calculate the vector similarity between the user question and the question in the intent recognition dataset;

[0098] Finally, if the similarity calculation result is greater than the preset maximum confidence, the result of this intent recognition is output as the intent category corresponding to the data. If it is less than the preset maximum confidence, it is sorted by similarity and a preset number of intent questions and corresponding categories that are closest to the user's question are added to the candidate set.

[0099] Specific processing and Figure 1 Step 3 in the method shown is the same and will not be repeated here.

[0100] The intention recognition module of the large model is used to perform intention recognition based on the large model.

[0101] The intent recognition module of the large model is further configured as follows:

[0102] First, the user question and the candidate set obtained in step 3 are used as the data to be recognized as the input of the large model recognition;

[0103] Then, the entities mentioned in the user’s question are linked to the entities in the financial knowledge graph, and the BERT model is used for sequence labeling tasks;

[0104] Afterwards, the obtained financial knowledge graph entity information and the adjacent node entity information of the financial knowledge graph are supplemented as user input, and the prompt engineering construction method is used to test the performance of the large model under different prompt prefixes, and construct the final prompt prefix of the large model input;

[0105] Next, the prompt prefix, user question, and candidate set are concatenated into a long text, which is input into the big model for inference generation to obtain the big model’s response.

[0106] Finally, keyword extraction and rule matching are used to post-process the data generated by the large model to obtain the final intent recognition results.

[0107] Specific processing and Figure 1 Step 4 in the method shown is the same and will not be repeated here.

[0108] In addition, the present invention also discloses a computer device for intent recognition, the computer device comprising a memory, a processor and program instructions stored in the memory for the processor to execute, wherein the processor executes the program instructions to implement the following Figure 1 The steps of the intent recognition method shown in the embodiment.

[0109] In addition, the present invention also discloses a computer-readable storage medium for intent recognition, which stores program instructions executable by a processor, such as Figure 1 The steps of the intent recognition method shown in the embodiment.

[0110] Although the above methods are illustrated and described as a series of actions for simplicity of explanation, it should be understood and appreciated that these methods are not limited by the order of the actions, because according to one or more embodiments, some actions may occur in a different order and / or concurrently with other actions from those illustrated and described herein or not illustrated and described herein but understandable to those skilled in the art.

[0111] Those skilled in the art will further appreciate that the various illustrative logic blocks, modules, circuits, and algorithm steps described in conjunction with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or a combination of the two. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps are generally described above in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system. The technician may implement the described functionality in different ways for each specific application, but such implementation decisions should not be interpreted as resulting in a departure from the scope of the present invention.

[0112] The various illustrative logic blocks, modules, and circuits described in conjunction with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in cooperation with a DSP core, or any other such configuration.

[0113] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software module may reside in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read and write information from / to the storage medium. In an alternative, a storage medium may be integrated into a processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In an alternative, the processor and the storage medium may reside in a user terminal as discrete components.

[0114] In one or more exemplary embodiments, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented as a computer program product in software, each function may be stored on or transmitted by a computer-readable medium as one or more instructions or codes. Computer-readable media include both computer storage media and communication media, including any medium that facilitates the transfer of a computer program from one place to another. Storage media may be any available medium that can be accessed by a computer. As an example and not limitation, such a computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer. Any connection is also properly referred to as a computer-readable medium. For example, if the software is transmitted from a website, a server, or other remote source using a coaxial cable, a fiber optic cable, a twisted pair, a digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwaves, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwaves are included in the definition of the medium. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, wherein disk often reproduces data magnetically, while disc reproduces data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0115] The previous description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be apparent to those skilled in the art, and the general principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples and designs described herein, but should be granted the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for intention recognition, characterized in that: Methods include: Step 1: Generate intent recognition dataset using a large model; Step 2: Pre-match the user's questions, and based on the pre-matching results, perform the intent recognition based on similarity matching in step 3 and the intent recognition based on the large model in step 4; Step 3: Intent recognition based on similarity matching; Step 4: Perform intent recognition based on the large model.

2. The method for intention recognition according to claim 1, characterized in that: Step 1 further comprises: Step 1-1: Collect the corpus of the set field and perform data cleaning; Step 1-2: Use the cleaned corpus to fine-tune the large model to obtain a large model suitable for the set domain; Step 1-3: Construct a small part of the annotated data of the intent classification scenario in the set domain, and provide it as input to the large model of the set domain, so that the large model of the set domain can imitate the small part of the annotated data to generate an intent recognition dataset with the same format but different questions.

3. The method for identifying intention according to claim 2, characterized in that: The fine-tuning of steps 1-2 is LoRA fine-tuning.

4. The method for identifying intention according to claim 1, characterized in that: Step 2 further includes: Set up multiple fixed phrases and questions with high frequency of occurrence. If the user's question is exactly the same as the preset question, the intent recognition result will be directly output as the classification result corresponding to the preset question, and the answer corresponding to the preset question will be output; if the user's question does not completely match the preset question, the user's question and the constructed large-scale intent classification dataset will be used together for similarity matching intent recognition and large model intent recognition.

5. The method for intention recognition according to claim 1, characterized in that: Step 3 further includes: First, use the word segmenter to segment the input user text to obtain a vocabulary sequence; Then, a deep learning model is used to learn the embedded representation and generate the corresponding vector representation for the user input; Afterwards, a deep learning model is used to learn embedded representations and generate corresponding vector representations for the questions in the intent recognition dataset. Furthermore, the cosine similarity calculation method is used to calculate the vector similarity between the user question and the question in the intent recognition dataset; Finally, if the similarity calculation result is greater than the preset maximum confidence, the result of this intent recognition is output as the intent category corresponding to the data. If it is less than the preset maximum confidence, it is sorted by similarity and a preset number of intent questions and corresponding categories that are closest to the user's question are added to the candidate set.

6. The method for intention recognition according to claim 5, characterized in that: Step 4 further includes: First, the user question and the candidate set obtained in step 3 are used as the data to be recognized as the input of the large model recognition; Then, the entities mentioned in the user’s question are linked to the entities in the financial knowledge graph, and the BERT model is used for sequence labeling tasks; Afterwards, the obtained financial knowledge graph entity information and the adjacent node entity information of the financial knowledge graph are supplemented as user input, and the prompt engineering construction method is used to test the performance of the large model under different prompt prefixes, and construct the final prompt prefix of the large model input; Next, the prompt prefix, user question, and candidate set are concatenated into a long text, which is input into the big model for inference generation to obtain the big model’s response. Finally, keyword extraction and rule matching are used to post-process the data generated by the large model to obtain the final intent recognition results.

7. The method for identifying intention according to claim 2, characterized in that: The setting field is the financial futures field.

8. An intention recognition system, characterized in that: The system includes: The dataset generation module is used to generate the intent recognition dataset using the large model; The pre-matching module is used to pre-match user questions and, based on the pre-matching results, to perform intent recognition based on similarity matching and intent recognition based on a large model; Similarity matching intention recognition module, used for intention recognition based on similarity matching; The intention recognition module of the large model is used to perform intention recognition based on the large model.

9. A computer device for intent recognition, characterized in that: The method comprises a memory, a processor and program instructions stored in the memory and executable by the processor, wherein the processor executes the program instructions to implement the steps of the intention recognition method as claimed in any one of claims 1 to 7.

10. A computer-readable storage medium for intent recognition, storing program instructions executable by a processor to perform the steps of the intent recognition method according to any one of claims 1 to 7.