An intelligent question-answering method and system for large financial models
By extracting the objects, focus and keywords of financial consulting questions and combining the feature fusion technology of the intention recognition model, the matching difficulties of the intelligent question-and-answer system when dealing with problems with large differences in different expression methods is solved, and more accurate answer matching and user Improved experience.
Patent Information
- Application Number
- CN202411025255.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-07-30
AI Technical Summary
When existing intelligent question-and-answer systems deal with financial consulting questions with different expression methods of different users, it is difficult to accurately match the answers to the questions, resulting in poor user experience.
By extracting the objects, focus and keywords of financial consulting questions, calculating the similarity with candidate questions, and using pre-trained intent recognition models, the probability of answering questions is determined based on the fusion of text features and intent features, thereby improving the accuracy of answers. .
It enhances the feature expression ability of the intelligent question-and-answer system, recognizes the semantic intentions of users, improves the accurate answers to user questions, and improves the user experience.
Smart Images

Figure CN118551025B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of intelligent question answering technology, and specifically relates to an intelligent question answering method and system for a large financial model. Background Art
[0002] With the development of artificial intelligence technology and natural language processing technology, intelligent question-answering systems have gradually been widely used in the financial field. Intelligent question-answering systems can answer questions raised by users conveniently and quickly.
[0003] At present, when answering questions raised by users through intelligent question-answering systems, the more common method is to use keyword recognition to identify the keywords in the user's consulting questions, and search for similar consulting questions and their answers from the pre-set question corpus based on the keywords, thereby realizing intelligent question-answering of the questions raised by users. However, in actual situations, for the same consulting question, there are large differences in the way different users express it, and keyword recognition often fails to match the answer to the question, so that the question raised by the user cannot be answered or the answer content does not correspond to the question raised by the user, resulting in a poor user experience.
[0004] Therefore, how to provide an effective solution to accurately answer questions raised by users has become a difficult problem to be solved in the prior art. Summary of the invention
[0005] The purpose of the present invention is to provide an intelligent question-answering method and system for a large financial model to solve the above-mentioned problems existing in the prior art.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] In a first aspect, the present invention provides an intelligent question-answering method for a large financial model, comprising:
[0008] Extract the first question object, the first question focus and the first keyword of the current financial consulting question;
[0009] Extracting the second question object, the second question focus and the second keyword of each candidate financial consulting question in the question corpus;
[0010] Based on the first question object, the first question focus, the first keyword, the second question object of each candidate financial consulting question, the second question focus of each candidate financial consulting question and the second keyword of each candidate financial consulting question, the similarity between the current financial consulting question and each candidate financial consulting question is calculated to obtain a matching result between the current financial consulting question and each candidate financial consulting question;
[0011] If the current financial consulting question does not match any of the candidate financial consulting questions, the current financial consulting question, each of the candidate financial consulting questions, and the answers to the candidate financial consulting questions are used as inputs of a pre-trained intent recognition model to perform operations to obtain the probability that the answers to the candidate financial consulting questions are the answers to the current financial consulting question;
[0012] Determine the answer to the current financial consulting question based on the probability that the answer to each candidate financial consulting question is the answer to the current financial consulting question;
[0013] The intention recognition model includes a text feature extraction layer, an intention feature extraction layer, a feature fusion layer and a classification decision layer. The text feature extraction layer is used to extract features of each candidate financial consulting question and the answer to each candidate financial consulting question to obtain text features corresponding to each candidate financial consulting question.
[0014] The intention feature extraction layer is used to extract features of the first question object and the first question focus of the current financial consulting question to obtain the intention feature corresponding to the current financial consulting question;
[0015] The feature fusion layer is used to fuse the text features corresponding to each candidate financial consulting question with the intention features corresponding to the current financial consulting question to obtain fused features corresponding to each candidate financial consulting question;
[0016] The classification decision layer is used to obtain the probability that the answer to each candidate financial consulting question is the answer to the current financial consulting question based on the fusion features corresponding to each candidate financial consulting question.
[0017] Based on the above disclosed content, the present invention extracts the first question object, the first question focus and the first keyword of the current financial consulting question; extracts the second question object, the second question focus and the second keyword of each candidate financial consulting question in the question corpus; based on the first question object, the first question focus, the first keyword, the second question object of each candidate financial consulting question, the second question focus of each candidate financial consulting question and the second keyword of each candidate financial consulting question, calculates the similarity between the current financial consulting question and each candidate financial consulting question, and obtains the matching result between the current financial consulting question and each candidate financial consulting question; if the current financial consulting question does not match any of the candidate financial consulting questions, then uses the current financial consulting question and each candidate financial consulting question and the question answers corresponding to each candidate financial consulting question as the input of a pre-trained intent recognition model for operation, and obtains the probability that the question answers corresponding to each candidate financial consulting question are the answers corresponding to the current financial consulting question; based on the probability of each candidate financial consulting question matching the answer to the question, the probability of each candidate financial consulting question matching the answer to the question The probability that the answer to the consulting question is the answer to the current financial consulting question is determined, and the answer to the current financial consulting question is determined; wherein, the intention recognition model includes a text feature extraction layer, an intention feature extraction layer, a feature fusion layer and a classification decision layer, and the text feature extraction layer is used to extract features of each candidate financial consulting question and the answer to each candidate financial consulting question respectively, and obtain text features corresponding to each candidate financial consulting question; the intention feature extraction layer is used to extract features of the first question object and the first question focus of the current financial consulting question, and obtain intention features corresponding to the current financial consulting question; the feature fusion layer is used to fuse the text features corresponding to each candidate financial consulting question with the intention features corresponding to the current financial consulting question, and obtain fusion features corresponding to each candidate financial consulting question; the classification decision layer is used to obtain the probability that the answer to each candidate financial consulting question is the answer to the current financial consulting question based on the fusion features corresponding to each candidate financial consulting question. In this way, when the corresponding candidate financial consulting questions and their corresponding answers cannot be matched by performing word similarity matching on words such as the question object, question focus and question keywords in the financial consulting questions, it is possible to perform feature fusion based on the text features of the candidate financial consulting questions and their answers, combined with the intention features extracted based on the question object and question focus of the financial consulting questions, and determine the answer corresponding to the current financial consulting question based on the fused features. Therefore, when conducting intelligent question and answering, it is possible to enrich the feature expression of the model, identify the user's semantic intent, and then make more accurate answers to the questions raised by the user, thereby improving the user's usage experience.
[0018] In one possible design, the method further includes:
[0019] If the matching result indicates that the current financial consulting question matches one of the candidate financial consulting questions, the answer to the question corresponding to one of the candidate financial consulting questions is used as the answer to the current financial consulting question.
[0020] In a possible design, extracting the first question object, the first question focus and the first keyword of the current financial consulting question includes:
[0021] Segmenting the current financial consulting question to obtain a plurality of words;
[0022] Taking the subject among the plurality of words as the first question object;
[0023] Based on the dependency relationship between the words in the plurality of words, determining the first question focus from the plurality of words;
[0024] The first keyword is obtained by extracting keywords from the current financial consulting question through natural language processing.
[0025] In a possible design, determining the first question focus from the multiple words based on the dependency relationship between the multiple words includes:
[0026] If a first word and a second word in the plurality of words have a dependency relationship, the second word is a question word, and the first word is neither an adverb nor a function word, then determining that the first word is the first question focus;
[0027] If a first word among the multiple words has a dependency relationship with a second word, the second word is a question word, and the first word is an adverb or a function word, then a third word having a dependency relationship with the first word is searched, and the third word is used as the first question focus.
[0028] In a possible design, the similarity between the current financial consulting question and each candidate financial consulting question is calculated according to the following formula (1):
[0029] (1);
[0030] in, represents the similarity between the current financial consulting problem and the i-th candidate financial consulting problem, , and represents the word vector corresponding to the first keyword, the word vector corresponding to the first question object, and the word vector corresponding to the first question focus, respectively. , and The word vector corresponding to the second keyword of the i-th candidate financial consulting question, the word vector corresponding to the second question object of the i-th candidate financial consulting question, and the word vector corresponding to the second question focus of the i-th candidate financial consulting question are represented in sequence. , and All are weights, and Cos represents cosine similarity.
[0031] In a possible design, determining the answer to the current financial consulting question based on the probability that the answer to each candidate financial consulting question is the answer to the current financial consulting question includes:
[0032] The answer to the target candidate financial consulting question with the highest probability and exceeding a preset threshold is used as the answer to the current financial consulting question.
[0033] In one possible design, the intention recognition model is a CPT model.
[0034] In a second aspect, the present invention provides an intelligent question-answering system for a large financial model, comprising:
[0035] A first extraction unit, used to extract a first question object, a first question focus and a first keyword of the current financial consulting question;
[0036] A second extraction unit is used to extract a second question object, a second question focus and a second keyword of each candidate financial consulting question in the question corpus;
[0037] A first calculation unit is used to calculate the similarity between the current financial consulting question and each candidate financial consulting question based on the first question object, the first question focus, the first keyword, the second question object of each candidate financial consulting question, the second question focus of each candidate financial consulting question and the second keyword of each candidate financial consulting question, so as to obtain a matching result between the current financial consulting question and each candidate financial consulting question;
[0038] A second calculation unit is used for, if the current financial consulting question does not match any of the candidate financial consulting questions, using the current financial consulting question and the candidate financial consulting questions and the answers to the candidate financial consulting questions as inputs of a pre-trained intent recognition model to perform calculations to obtain a probability that the answers to the candidate financial consulting questions are the answers to the current financial consulting question;
[0039] A determination unit, configured to determine an answer corresponding to the current financial consulting question based on the probability that the answer to each candidate financial consulting question is the answer corresponding to the current financial consulting question;
[0040] The intention recognition model includes a text feature extraction layer, an intention feature extraction layer, a feature fusion layer and a classification decision layer. The text feature extraction layer is used to extract features of each candidate financial consulting question and the answer to each candidate financial consulting question to obtain text features corresponding to each candidate financial consulting question.
[0041] The intention feature extraction layer is used to extract features of the first question object and the first question focus of the current financial consulting question to obtain the intention feature corresponding to the current financial consulting question;
[0042] The feature fusion layer is used to fuse the text features corresponding to each candidate financial consulting question with the intention features corresponding to the current financial consulting question to obtain fused features corresponding to each candidate financial consulting question;
[0043] The classification decision layer is used to obtain the probability that the answer to each candidate financial consulting question is the answer to the current financial consulting question based on the fusion features corresponding to each candidate financial consulting question.
[0044] In a third aspect, the present invention provides an electronic device comprising a memory, a processor and a transceiver which are communicatively connected in sequence, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the intelligent question-answering method for a large financial model as described in the first aspect or any possible design of the first aspect.
[0045] In a fourth aspect, the present invention provides a computer-readable storage medium having instructions stored thereon, which, when executed on a computer, executes the intelligent question-answering method for a large financial model as described in the first aspect or any possible design of the first aspect.
[0046] In a fifth aspect, the present invention provides a computer program product comprising instructions, which, when executed on a computer, causes the computer to execute the intelligent question-answering method for a large financial model as described in the first aspect or any possible design of the first aspect.
[0047] Beneficial effects:
[0048] The intelligent question-answering method and system for a large financial model provided by the present invention can, when the corresponding candidate financial consulting questions and their corresponding answers cannot be matched by performing word similarity matching on words such as the question object, question focus and question keywords in the financial consulting questions, perform feature fusion based on the text features of the candidate financial consulting questions and their answers, combined with the intention features extracted based on the question object and question focus of the financial consulting questions, and determine the answer corresponding to the current financial consulting question based on the fused features. Therefore, when performing intelligent question-answering, it is possible to enrich the feature expression of the model, identify the semantic intent of the user, and then make more accurate answers to the questions raised by the user, thereby improving the user experience and facilitating practical application and promotion. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 A flowchart of an intelligent question-answering method for a large financial model provided in an embodiment of the present application;
[0050] Figure 2 A schematic block diagram of an intelligent question-answering system for a large financial model provided in an embodiment of the present application;
[0051] Figure 3 A schematic block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in combination with the drawings and the description of the embodiments or the prior art. Obviously, the following description of the structure of the drawings is only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention.
[0053] It should be understood that although the terms first, second, etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another unit. For example, a first unit can be referred to as a second unit, and similarly, a second unit can be referred to as a first unit without departing from the scope of the exemplary embodiments of the present invention.
[0054] It should be understood that the term "and / or" that may appear in this article is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, B exists alone, and A and B exist at the same time. The term " / and" that may appear in this article describes another type of association object relationship, indicating that two relationships may exist. For example, A / and B can represent two situations: A exists alone, and A and B exist alone. In addition, the character " / " that may appear in this article generally indicates that the previous and next associated objects are in an "or" relationship.
[0055] In order to provide accurate answers to questions raised by users, an embodiment of the present application provides an intelligent question-answering method and system for a large financial model. The intelligent question-answering method and system for a large financial model can provide more accurate answers to questions raised by users and enhance the user experience.
[0056] The intelligent question-answering method for a large financial model provided in the embodiment of the present application can be applied to a user terminal or a server. It can be understood that the execution subject does not constitute a limitation on the embodiment of the present application.
[0057] The intelligent question-answering method for a large financial model provided in an embodiment of the present application will be described in detail below.
[0058] like Figure 1 As shown, it is a flowchart of the intelligent question-answering method for a large financial model provided in the first aspect of an embodiment of the present application. The intelligent question-answering method for a large financial model may include but is not limited to the following steps S101-S105.
[0059] Step S101. Extract the first question object, the first question focus and the first keyword of the current financial consulting question.
[0060] The first question object may refer to the object being consulted in the current financial consulting question, and the first question focus may refer to a certain aspect of the object being consulted that the user is concerned about. For example, if a financial consulting question is "What is the expected rate of return of Fund A?", then the first question object in the financial consulting question is "Fund A", and the first question focus in the financial consulting question is "rate of return".
[0061] When extracting the first question object, the first question focus and the first keyword of the current financial consulting question, the current financial consulting question can be first segmented to obtain multiple words, and then the subject of the multiple words can be used as the first question object, and the first question focus can be determined from the multiple words based on the dependency relationship between the multiple words. At the same time, the current financial consulting question can be keyword extracted through natural language processing (NLP) to obtain the first keyword. It can be understood that in one or more embodiments, the first keyword can include the first question object and / or the first question focus.
[0062] When determining the first question focus based on the dependency relationship of each word, the first question focus can be determined from multiple words according to the dependency relationship between words and the word type. Specifically, if the first word and the second word in the multiple words have a dependency relationship, the second word is a question word, and the first word does not belong to adverbs and function words, then the first word is determined to be the first question focus; if the first word and the second word in the multiple words have a dependency relationship, the second word is a question word, and the first word belongs to adverbs or function words, then the third word with a dependency relationship with the first word is searched, and the third word is used as the first question focus. Among them, the dependency relationship can be, but is not limited to, a verb-object relationship (VOB), a subject-verb relationship (SBV), a location relationship (LOC), and a preposition-object relationship (POB), etc., which are not listed one by one in the embodiments of the present application.
[0063] Step S102: Extract the second question object, the second question focus and the second keyword of each candidate financial consulting question in the question corpus.
[0064] The question corpus records various candidate financial consulting questions and the answers corresponding to the various candidate financial consulting questions. In the embodiment of the present application, the second question object of each candidate financial consulting question in the question corpus, the second question focus of each candidate financial consulting question and the second keyword of each candidate financial consulting question can be extracted.
[0065] The principle of extracting the second question object, the second question focus and the second keyword of each candidate financial consulting question in the question corpus is consistent with that in the aforementioned step S101 and will not be repeated here.
[0066] Step S103. Based on the first question object, the first question focus, the first keyword, the second question object of each candidate financial consulting question, the second question focus of each candidate financial consulting question and the second keyword of each candidate financial consulting question, calculate the similarity between the current financial consulting question and each candidate financial consulting question to obtain the matching result between the current financial consulting question and each candidate financial consulting question.
[0067] In the embodiment of the present application, the similarity between the current financial consulting question and each candidate financial consulting question can be calculated according to the following formula (1):
[0068] (1);
[0069] in, represents the similarity between the current financial consulting problem and the i-th candidate financial consulting problem, , and The word vector corresponding to the first keyword, the word vector corresponding to the first question object, and the word vector corresponding to the first question focus are represented in sequence. , and The word vector corresponding to the second keyword of the i-th candidate financial consulting question, the word vector corresponding to the second question object of the i-th candidate financial consulting question, and the word vector corresponding to the second question focus of the i-th candidate financial consulting question are represented in sequence. , and All are weights, and Cos represents cosine similarity.
[0070] Step S104. If the current financial consulting question does not match any of the candidate financial consulting questions, the current financial consulting question, each candidate financial consulting question and the answer to each candidate financial consulting question are used as input to a pre-trained intent recognition model for calculation to obtain the probability that the answer to each candidate financial consulting question is the answer to the current financial consulting question.
[0071] In an embodiment of the present application, an intention recognition model is pre-established for identifying whether the answer to a candidate financial consulting question is the answer to the financial consulting question. If the similarity between the current financial consulting question and each candidate financial consulting question is lower than a pre-set similarity threshold, it is determined that the current financial consulting question does not match each candidate financial consulting question. At this time, the current financial consulting question and each candidate financial consulting question and the answer to each candidate financial consulting question can be used as inputs of the pre-trained intention recognition model for calculation to obtain the probability that the answer to each candidate financial consulting question is the answer to the current financial consulting question.
[0072] Among them, the intention recognition model includes a text feature extraction layer, an intention feature extraction layer, a feature fusion layer and a classification decision layer. The text feature extraction layer is used to extract features of each candidate financial consulting question and the answer to each candidate financial consulting question respectively, and obtain text features corresponding to each candidate financial consulting question; the intention feature extraction layer is used to extract features of the first question object and the first question focus of the current financial consulting question, and obtain intention features corresponding to the current financial consulting question; the feature fusion layer is used to fuse the text features corresponding to each candidate financial consulting question with the intention features corresponding to the current financial consulting question, and obtain fusion features corresponding to each candidate financial consulting question; the classification decision layer is used to obtain the probability that the answer to each candidate financial consulting question is the answer corresponding to the current financial consulting question based on the fusion features corresponding to each candidate financial consulting question.
[0073] The intent recognition model may be, but is not limited to, a BERT (Bidirectional Encoder Representations from Transformers) model or a CPT (Chinese Pre-trained Unbalanced Transformer) model. In the embodiment of the present application, the intent recognition model is a CPT model.
[0074] In one or more embodiments, if the matching result indicates that the current financial consulting question matches one of the candidate financial consulting questions, the answer to the question corresponding to one of the candidate financial consulting questions can be directly used as the answer to the current financial consulting question.
[0075] Step S105. Based on the probability that the answer to each candidate financial consulting question is the answer to the current financial consulting question, determine the answer to the current financial consulting question.
[0076] In the embodiment of the present application, the answer to the target candidate financial consulting question with the highest corresponding probability and exceeding a preset threshold may be used as the answer to the current financial consulting question.
[0077] The present invention provides an intelligent question-answering method for a large financial model, which extracts the first question object, the first question focus and the first keyword of the current financial consulting question; extracts the second question object, the second question focus and the second keyword of each candidate financial consulting question in the question corpus; based on the first question object, the first question focus, the first keyword, the second question object of each candidate financial consulting question, the second question focus of each candidate financial consulting question and the second keyword of each candidate financial consulting question, calculates the similarity between the current financial consulting question and each candidate financial consulting question, and obtains the matching result between the current financial consulting question and each candidate financial consulting question; if the current financial consulting question does not match any of the candidate financial consulting questions, then uses the current financial consulting question and each candidate financial consulting question and the question answers corresponding to each candidate financial consulting question as the input of a pre-trained intent recognition model for operation, and obtains the probability that the question answers corresponding to each candidate financial consulting question are the answers corresponding to the current financial consulting question; based on each The probability that the answer to the candidate financial consulting question is the answer to the current financial consulting question is determined, and the answer to the current financial consulting question is determined; wherein, the intent recognition model includes a text feature extraction layer, an intent feature extraction layer, a feature fusion layer and a classification decision layer, and the text feature extraction layer is used to extract features of each candidate financial consulting question and the answer to each candidate financial consulting question respectively, and obtain text features corresponding to each candidate financial consulting question; the intent feature extraction layer is used to extract features of the first question object and the first question focus of the current financial consulting question, and obtain intent features corresponding to the current financial consulting question; the feature fusion layer is used to fuse the text features corresponding to each candidate financial consulting question with the intent features corresponding to the current financial consulting question, and obtain fusion features corresponding to each candidate financial consulting question; the classification decision layer is used to obtain the probability that the answer to each candidate financial consulting question is the answer to the current financial consulting question based on the fusion features corresponding to each candidate financial consulting question. In this way, when the corresponding candidate financial consulting questions and their corresponding answers cannot be matched by performing word similarity matching on words such as the question object, question focus and question keywords in the financial consulting questions, it is possible to perform feature fusion based on the text features of the candidate financial consulting questions and their answers, combined with the intention features extracted based on the question object and question focus of the financial consulting questions, and determine the answer corresponding to the current financial consulting question based on the fused features. Therefore, when conducting intelligent question and answering, it is possible to enrich the feature expression of the model, identify the user's semantic intent, and then make more accurate answers to the questions raised by the user, thereby improving the user experience and facilitating practical application and promotion.
[0078] See also Figure 2According to a second aspect of an embodiment of the present application, there is provided an intelligent question-answering system for a large financial model, the intelligent question-answering system for a large financial model comprising:
[0079] A first extraction unit, used to extract a first question object, a first question focus and a first keyword of the current financial consulting question;
[0080] A second extraction unit is used to extract a second question object, a second question focus and a second keyword of each candidate financial consulting question in the question corpus;
[0081] A first calculation unit is used to calculate the similarity between the current financial consulting question and each candidate financial consulting question based on the first question object, the first question focus, the first keyword, the second question object of each candidate financial consulting question, the second question focus of each candidate financial consulting question and the second keyword of each candidate financial consulting question, so as to obtain a matching result between the current financial consulting question and each candidate financial consulting question;
[0082] A second calculation unit is used for, if the current financial consulting question does not match any of the candidate financial consulting questions, using the current financial consulting question and the candidate financial consulting questions and the answers to the candidate financial consulting questions as inputs of a pre-trained intent recognition model to perform calculations to obtain a probability that the answers to the candidate financial consulting questions are the answers to the current financial consulting question;
[0083] A determination unit, configured to determine an answer corresponding to the current financial consulting question based on the probability that the answer to each candidate financial consulting question is the answer corresponding to the current financial consulting question;
[0084] The intention recognition model includes a text feature extraction layer, an intention feature extraction layer, a feature fusion layer and a classification decision layer. The text feature extraction layer is used to extract features of each candidate financial consulting question and the answer to each candidate financial consulting question to obtain text features corresponding to each candidate financial consulting question.
[0085] The intention feature extraction layer is used to extract features of the first question object and the first question focus of the current financial consulting question to obtain the intention feature corresponding to the current financial consulting question;
[0086] The feature fusion layer is used to fuse the text features corresponding to each candidate financial consulting question with the intention features corresponding to the current financial consulting question to obtain fused features corresponding to each candidate financial consulting question;
[0087] The classification decision layer is used to obtain the probability that the answer to each candidate financial consulting question is the answer to the current financial consulting question based on the fusion features corresponding to each candidate financial consulting question.
[0088] The working process, working details and technical effects of the intelligent question-answering system for financial large models provided in the second aspect of this embodiment can be found in the first aspect of the embodiment and will not be repeated here.
[0089] like Figure 3 As shown, the third aspect of an embodiment of the present application provides an electronic device, comprising a memory, a processor and a transceiver that are communicatively connected in sequence, wherein the memory is used to store computer programs, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the intelligent question and answer method for financial large models as described in the first aspect of the embodiment.
[0090] For specific examples, the memory may include but is not limited to random access memory (RAM), read-only memory (ROM), flash memory, first-in-first-out memory (FIFO) and / or first-in-last-out memory (FILO), etc.; the processor may be but is not limited to a microprocessor of the STM32F105 series, an ARM (Advanced RISC-Machines), an X86 or other architecture processor, or a processor with an integrated NPU (neural-network processing units); the transceiver may be but is not limited to a WiFi (Wireless Fidelity) wireless transceiver, a Bluetooth wireless transceiver, a General Packet Radio Service (GPRS) wireless transceiver, a ZigBee protocol (a low-power local area network protocol based on the IEEE802.15.4 standard, ZigBee) wireless transceiver, a 3G transceiver, a 4G transceiver and / or a 5G transceiver, etc.
[0091] The fourth aspect of this embodiment provides a computer-readable storage medium storing instructions for the intelligent question-answering method for a large financial model as described in the first aspect of the embodiment, that is, the computer-readable storage medium stores instructions, and when the instructions are run on a computer, the intelligent question-answering method for a large financial model as described in the first aspect is executed. The computer-readable storage medium refers to a carrier for storing data, which may include but is not limited to a floppy disk, an optical disk, a hard disk, a flash memory, a USB flash drive, and / or a memory stick, etc., and the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
[0092] The fifth aspect of this embodiment provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the intelligent question-answering method for financial large models as described in the first aspect of the embodiment, wherein the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
[0093] It should be understood that certain details are provided in the following description to facilitate a complete understanding of the example embodiments. However, it should be understood by those of ordinary skill in the art that the example embodiments can be implemented without these certain details. For example, the system can be shown in a block diagram to avoid obscuring the example with unnecessary details. In other examples, well-known processes, structures, and techniques may not be shown in unnecessary detail to avoid obscuring the example embodiments.
[0094] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An intelligent question-answering method for large financial models, It is characterized in that include: Extract the first question object, the first question focus and the first keyword of the current financial consulting question; Extracting the second question object, the second question focus and the second keyword of each candidate financial consulting question in the question corpus; Based on the first question object, the first question focus, the first keyword, the second question object of each candidate financial consulting question, the second question focus of each candidate financial consulting question and the second keyword of each candidate financial consulting question, the similarity between the current financial consulting question and each candidate financial consulting question is calculated to obtain a matching result between the current financial consulting question and each candidate financial consulting question; If the current financial consulting question does not match any of the candidate financial consulting questions, the current financial consulting question, each of the candidate financial consulting questions, and the answers to the candidate financial consulting questions are used as inputs of a pre-trained intent recognition model to perform operations to obtain the probability that the answers to the candidate financial consulting questions are the answers to the current financial consulting question; Determine the answer to the current financial consulting question based on the probability that the answer to each candidate financial consulting question is the answer to the current financial consulting question; The intention recognition model includes a text feature extraction layer, an intention feature extraction layer, a feature fusion layer and a classification decision layer. The text feature extraction layer is used to extract features of each candidate financial consulting question and the answer to each candidate financial consulting question to obtain text features corresponding to each candidate financial consulting question. The intention feature extraction layer is used to extract features of the first question object and the first question focus of the current financial consulting question to obtain the intention feature corresponding to the current financial consulting question; The feature fusion layer is used to fuse the text features corresponding to each candidate financial consulting question with the intention features corresponding to the current financial consulting question to obtain fused features corresponding to each candidate financial consulting question; The classification decision layer is used to obtain the probability that the answer to each candidate financial consulting question is the answer to the current financial consulting question based on the fusion features corresponding to each candidate financial consulting question; The extracting of the first question object, the first question focus and the first keyword of the current financial consulting question includes: Segmenting the current financial consulting question to obtain a plurality of words; Taking the subject among the plurality of words as the first question object; Based on the dependency relationship between the words in the plurality of words, determining the first question focus from the plurality of words; Extract keywords from the current financial consulting question through natural language processing to obtain the first keyword; The determining the first question focus from the multiple words based on the dependency relationship between the multiple words includes: If a first word and a second word in the plurality of words have a dependency relationship, the second word is a question word, and the first word is neither an adverb nor a function word, then determining that the first word is the first question focus; If a first word among the multiple words has a dependency relationship with a second word, the second word is a question word, and the first word is an adverb or a function word, then a third word having a dependency relationship with the first word is searched, and the third word is used as the first question focus.
2. The intelligent question-answering method for a large financial model according to claim 1, It is characterized in that The method further comprises: If the matching result indicates that the current financial consulting question matches one of the candidate financial consulting questions, the answer to the question corresponding to one of the candidate financial consulting questions is used as the answer to the current financial consulting question.
3. The intelligent question-answering method for a large financial model according to claim 1, It is characterized in that The similarity between the current financial consulting question and each candidate financial consulting question is calculated according to the following formula (1): (1); in, represents the similarity between the current financial consulting problem and the i-th candidate financial consulting problem, , and represents the word vector corresponding to the first keyword, the word vector corresponding to the first question object, and the word vector corresponding to the first question focus, respectively. , and The word vector corresponding to the second keyword of the i-th candidate financial consulting question, the word vector corresponding to the second question object of the i-th candidate financial consulting question, and the word vector corresponding to the second question focus of the i-th candidate financial consulting question are represented in sequence. , and All are weights, and Cos represents cosine similarity.
4. The intelligent question-answering method for a large financial model according to claim 1, It is characterized in that The step of determining the answer to the current financial consulting question based on the probability that the answer to each candidate financial consulting question is the answer to the current financial consulting question includes: The answer to the target candidate financial consulting question with the highest probability and exceeding a preset threshold is used as the answer to the current financial consulting question.
5. The intelligent question-answering method for a large financial model according to claim 1, It is characterized in that The intention recognition model is a CPT model.
6. An intelligent question-answering system for large financial models, It is characterized in that include: A first extraction unit, used to extract a first question object, a first question focus and a first keyword of the current financial consulting question; A second extraction unit is used to extract a second question object, a second question focus and a second keyword of each candidate financial consulting question in the question corpus; A first calculation unit is used to calculate the similarity between the current financial consulting question and each candidate financial consulting question based on the first question object, the first question focus, the first keyword, the second question object of each candidate financial consulting question, the second question focus of each candidate financial consulting question and the second keyword of each candidate financial consulting question, so as to obtain a matching result between the current financial consulting question and each candidate financial consulting question; A second calculation unit is used for, if the current financial consulting question does not match any of the candidate financial consulting questions, using the current financial consulting question and the candidate financial consulting questions and the answers to the candidate financial consulting questions as inputs of a pre-trained intent recognition model to perform calculations to obtain a probability that the answers to the candidate financial consulting questions are the answers to the current financial consulting question; A determination unit, configured to determine an answer corresponding to the current financial consulting question based on the probability that the answer to each candidate financial consulting question is the answer corresponding to the current financial consulting question; The intention recognition model includes a text feature extraction layer, an intention feature extraction layer, a feature fusion layer and a classification decision layer. The text feature extraction layer is used to extract features of each candidate financial consulting question and the answer to each candidate financial consulting question to obtain text features corresponding to each candidate financial consulting question. The intention feature extraction layer is used to extract features of the first question object and the first question focus of the current financial consulting question to obtain the intention feature corresponding to the current financial consulting question; The feature fusion layer is used to fuse the text features corresponding to each candidate financial consulting question with the intention features corresponding to the current financial consulting question to obtain fused features corresponding to each candidate financial consulting question; The classification decision layer is used to obtain the probability that the answer to each candidate financial consulting question is the answer to the current financial consulting question based on the fusion features corresponding to each candidate financial consulting question; When the first extraction unit is used to extract the first question object, the first question focus and the first keyword of the current financial consulting question, it is specifically used to: Segmenting the current financial consulting question to obtain a plurality of words; Taking the subject among the plurality of words as the first question object; Based on the dependency relationship between the words in the plurality of words, determining the first question focus from the plurality of words; Extract keywords from the current financial consulting question through natural language processing to obtain the first keyword; When the first extraction unit is used to determine the first question focus from the multiple words based on the dependency relationship between the multiple words, it is specifically used to: If a first word and a second word in the plurality of words have a dependency relationship, the second word is a question word, and the first word is neither an adverb nor a function word, then determining that the first word is the first question focus; If a first word among the multiple words has a dependency relationship with a second word, the second word is a question word, and the first word is an adverb or a function word, then a third word having a dependency relationship with the first word is searched, and the third word is used as the first question focus.
7. An electronic device, It is characterized in that It includes a memory, a processor and a transceiver which are communicatively connected in sequence, wherein the memory is used to store computer programs, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the intelligent question-answering method for financial large models as described in any one of claims 1 to 5.
8. A computer program product comprising a computer program or instructions, It is characterized in that When the computer program or the instruction is executed by a computer, the intelligent question-answering method for a large financial model as described in any one of claims 1 to 5 is implemented.
