[go: up one dir, main page]

CN119336887A - Financial knowledge question answering method and system, and storage medium - Google Patents

Financial knowledge question answering method and system, and storage medium Download PDF

Info

Publication number
CN119336887A
CN119336887A CN202411879683.2A CN202411879683A CN119336887A CN 119336887 A CN119336887 A CN 119336887A CN 202411879683 A CN202411879683 A CN 202411879683A CN 119336887 A CN119336887 A CN 119336887A
Authority
CN
China
Prior art keywords
financial
target
answer
model
question
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202411879683.2A
Other languages
Chinese (zh)
Inventor
丁志勇
庞博
贝东昇
魏菊
高丽珺
卢苇
张志朋
闫珍
沈雨欣
王冉冉
万长松
朱芃玮
刘佳
石文君
李博华
张启明
李文建
杨达森
何欣
秦鹏
黄婧涵
车丽波
侯伟凤
潘北啸
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of Beijing
Original Assignee
Bank of Beijing
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of Beijing filed Critical Bank of Beijing
Priority to CN202411879683.2A priority Critical patent/CN119336887A/en
Publication of CN119336887A publication Critical patent/CN119336887A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/338Presentation of query results
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a financial knowledge question-answering method, a system and a storage medium. The method comprises the steps of converting a financial question text input by a target object into a vector form to obtain a financial question vector, analyzing the financial question vector by using a large language model to obtain a domain identification result corresponding to the financial question text, respectively analyzing the financial question vector by using a plurality of target models corresponding to financial research domains in a plurality of preset models for each financial research domain to obtain first answer results output by each target model, fusing the first answer results output by each target model to obtain second answer results corresponding to the financial research domain, and determining the target answer results of the financial question text according to the second answer results corresponding to the financial research domain. The application solves the technical problem that the accuracy is lower when the related question-answering system lacks the adaptation of knowledge in the financial field to answer the financial question.

Description

Financial knowledge question-answering method and system and storage medium
Technical Field
The application relates to the technical field of financial data processing, in particular to a financial knowledge question-answering method, a system and a storage medium.
Background
Currently, financial institutions integrate large language models into existing business processes and service platforms to obtain financial question-answering systems, such as intelligent customer service systems, investment consultants platforms, and the like. The large language model is realized by adopting natural language processing and machine learning technology, wherein the natural language processing can understand and generate human language to carry out natural and smooth dialogue with clients, and the machine learning technology learns financial knowledge through a large amount of historical data. Therefore, the financial question-answering system can greatly improve the overall operation efficiency and the customer experience.
However, limitations remain exposed due to the large language model in dealing with problems in the financial arts. For example, models tend to be less accurate in interpretation of financial terms and complex questions, and have less context awareness for multiple rounds of conversations. The method and the system have the advantages that when a user uses a financial question-answering system, the problem of fuzzy answer and incoherent logic is frequently encountered, the trust degree of the user on the system is affected, in addition, the existing large models are mostly universal, special optimization and training aiming at financial scenes are lacked, the depth requirement of the user on the professional knowledge cannot be fully met, meanwhile, the existing large models are all based on a corpus during training and cannot be updated in real time, and the model cannot reflect the latest information and dynamics when facing the rapidly-changing fields (such as scientific research, policy and regulation and the like), and the answer content is outdated or inaccurate.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the application provides a financial knowledge question-answering method, a system and a storage medium, which are used for at least solving the technical problem that the accuracy is lower when a question-answering is carried out on a financial problem due to the fact that a related question-answering system lacks adaptation of knowledge in the financial field.
According to one aspect of the embodiment of the application, a financial knowledge question answering method is provided, which comprises the steps of converting a financial question text input by a target object into a vector form to obtain a financial question vector, analyzing the financial question vector by using a large language model to obtain a domain identification result corresponding to the financial question text, wherein the domain identification result comprises at least one financial research domain related to the financial question text, analyzing the financial question vector by using a plurality of target models corresponding to the financial research domain in a plurality of preset models for each financial research domain respectively to obtain a first answer result output by each target model, fusing the first answer results output by each target model to obtain a second answer result corresponding to the financial research domain, determining the target answer result of the financial question text according to the second answer result corresponding to each financial research domain, and fine-tuning different large language models by using a pre-built financial knowledge database which comprises a plurality of financial knowledge vectors in the financial knowledge database.
Optionally, before converting the financial question text input by the target object into a vector form to obtain a financial question vector, the method further comprises the steps of obtaining an initial question text input by the target object, and correcting the initial question text by utilizing a pre-constructed financial word stock to convert wrong words in the initial question text into correct financial words to obtain the financial question text, wherein the financial word stock comprises words standardized according to financial knowledge and real financial corpus.
Optionally, converting the financial problem text input by the target object into a vector form to obtain a financial problem vector, wherein the method comprises the steps of extracting elements from the financial problem text by using a pre-trained text element extraction model to obtain a plurality of target elements in the financial problem text, wherein the text element extraction model is obtained by iterative training by using a plurality of groups of training sample data, the training sample data comprises texts in a problem text set and element labels in the texts, the types of the element labels comprise at least one of a financial main body, financial business, time, place and economic indexes, converting each target element into a corresponding word vector, and sequentially splicing word vectors corresponding to each target element according to the sequence of each target element in the financial problem text to obtain the financial problem vector.
Optionally, before the financial problem vector is respectively analyzed by utilizing a plurality of target models corresponding to the current financial research field in a plurality of preset models, the method further comprises the steps of obtaining quality scores of each preset model in the financial research field in the plurality of preset models for each financial research field, wherein the quality scores of the financial research field are used for reflecting satisfaction degrees of a plurality of users on historical answer results given by historical financial problem texts of the preset models for processing the financial research field, and taking the preset model with the quality score higher than a preset threshold value as the target model of the financial research field.
The method comprises the steps of determining initial input prompt information templates corresponding to financial question vectors according to the financial research fields, adjusting the initial input prompt information templates according to model characteristics of the target models to obtain target input prompt information templates corresponding to the target models, integrating a plurality of target elements in financial question texts into the target input prompt information templates for each target model to obtain input texts of the target models, extracting keyword vectors corresponding to keywords in the input texts by the target models, determining target financial knowledge vectors with similarity greater than a preset similarity threshold value from a financial knowledge database, and taking the target financial knowledge vectors as the first answer results output by the target models.
Optionally, fusion processing is carried out on a plurality of first answer results output by a plurality of target models to obtain a second answer result corresponding to the financial research field, wherein the fusion processing comprises the steps of taking the first answer result output by the target model with the highest quality score in the plurality of target models as a candidate answer result, determining common answer content between the rest answer results except the candidate answer result in the plurality of first answer results and the candidate answer result, wherein the common answer content is an answer segment with text similarity lower than a preset similarity threshold value between the rest answer results except the candidate answer result in the plurality of first answer results and the candidate answer result, determining the weight of each rest answer result according to the quality score of the target model to which each rest answer result belongs, and fusing other contents except the common answer content in each rest answer result into the candidate answer result according to the weight of each rest answer result to obtain the second answer result corresponding to the financial research field.
Optionally, determining the target answer result of the financial question text according to the second answer result corresponding to each financial research field includes taking the second answer result corresponding to the financial research field as the target answer result corresponding to the financial question text when the field identification result includes one financial research field, determining the dependency relationship corresponding to each financial research field according to a preset financial knowledge graph when the field identification result includes a plurality of financial research fields, and splicing the second answer result corresponding to each financial research field according to the dependency relationship to obtain the target answer result corresponding to the financial question text, wherein the financial knowledge graph is constructed by taking the plurality of financial research fields as graph nodes and taking the dependency relationship among the financial research fields as edges.
The training process of each preset model in the plurality of preset models comprises the steps of obtaining a first model parameter set and a second model parameter set which are obtained by training a large language model through a preset corpus, wherein the number of model parameters contained in the first model parameter set is larger than that of model parameters contained in the second model parameter set, adjusting each model parameter in the second model parameter set through a financial knowledge database in the training process of the large language model, and determining the model parameters of the preset model according to the first model parameter set and the adjusted second model parameter set.
According to another aspect of the embodiment of the application, a financial knowledge question-answering system is provided, which comprises a semantic analysis module, an identification module and a determination module, wherein the semantic analysis module is used for converting a financial question text input by a target object into a vector form to obtain a financial question vector, the identification module is used for analyzing the financial question vector by utilizing a pre-trained large language model to obtain a domain identification result corresponding to the financial question text, the domain identification result comprises the number and the type of financial research domains related to the financial question text, the question-answering module is used for analyzing the financial question vector by utilizing a plurality of target models corresponding to the financial research domains in a plurality of preset models respectively to obtain a first answer result output by each target model, the first answer results output by a plurality of target models respectively are fused to obtain a second answer result corresponding to the financial research domain, and the determination module is used for determining the target answer result of the financial question text according to the second answer result corresponding to each financial research domain, wherein the plurality of preset models are obtained by fine tuning different large language models by utilizing a pre-built financial knowledge database, and the financial knowledge database comprises a plurality of financial knowledge domains.
According to another aspect of the embodiment of the present application, there is also provided a nonvolatile storage medium including a stored computer program, where a device in which the nonvolatile storage medium is located executes the above-mentioned financial knowledge question-answering method by running the computer program.
In the embodiment of the application, the financial knowledge question answering system analyzes the financial question text in cooperation with a plurality of models related to each financial study field by analyzing the number and types of the financial study fields related to the financial question text input by the target object, so as to obtain a final answer result of the financial question text, wherein the plurality of target models corresponding to each financial study field are obtained by fine tuning different large language models by utilizing a financial knowledge database, and each target model can perform professional answer on related questions of the financial field. According to the technical scheme provided by the embodiment of the application, the intelligent question-answering system can accurately understand the financial domain questions so as to efficiently, accurately and rapidly answer the financial domain questions input by the user, and further solve the technical problem that the accuracy is lower when the related question-answering system lacks adaptation of the financial domain knowledge, so that the financial expertise is asked and answered.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a block diagram of the hardware architecture of an alternative computer terminal (or mobile device) in accordance with an embodiment of the present application;
FIG. 2 is a flow chart of an alternative method of financial knowledge question-answering according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an alternative financial knowledge question-answering system, in accordance with an embodiment of the present application;
fig. 4 is a schematic structural view of an alternative electronic device according to an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In addition, the related information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for presentation, analyzed data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party. For example, an interface is provided between the system and the relevant user or institution, before acquiring the relevant information, the system needs to send an acquisition request to the user or institution through the interface, and acquire the relevant information after receiving the consent information fed back by the user or institution.
Example 1
At present, a large language model is learned from a large-scale corpus through a deep learning technology, so that complex natural language texts can be understood and generated. Therefore, when the unstructured data (industry research report, policy file, academic article, news manuscript and the like) containing a large amount of knowledge is processed, the method can process various problems input by a user, and can also perform semantic search and information extraction in massive unstructured data, so that high-quality answers are generated. Therefore, the large language model is widely applied in various fields of finance, medical treatment, law, academic research and the like. Despite the significant progress of the existing large language models worldwide, there are still some important challenges and limitations in practical applications, specifically as follows:
(1) The existing large models are mostly universal large models, so that when professional questions in a specific field are processed, professional questions presented by a user cannot be accurately understood, semantic understanding deviation is easy to occur, and the accuracy of answer results for answering the questions is poor.
(2) The performance of the generic large model is highly dependent on the quality and quantity of training data, and therefore, when dealing with emerging fields or rare languages, the generic large model may not be able to generate high quality answers due to a lack of sufficient data support. Furthermore, the bias problem of the model is also closely related to the bias of the training data, which may lead to ethical and fairness problems in certain application scenarios.
(3) The general large model has huge knowledge reserves, but the knowledge is based on a corpus during training and cannot be updated in real time. This means that in the face of rapidly changing fields (e.g., scientific research, policy regulations, etc.), the model may not reflect the latest information and dynamics, resulting in outdated or inaccurate answers.
In order to solve the above problems, related solutions are provided in the embodiments of the present application, and are described in detail below. It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
The method embodiments provided by the embodiments of the present application may be performed in a mobile terminal, a computer terminal, or similar computing device. Fig. 1 shows a block diagram of a hardware architecture of a computer terminal (or mobile device) for implementing a financial knowledge question-answering method and a financial knowledge question-answering system. As shown in fig. 1, the computer terminal 10 (or mobile device 10) may include one or more (shown as 102a, 102b, 102 n) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU, or a processing device such as a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. Among other things, a display, an input/output interface (I/O interface), a Universal Serial BUS (USB) port (which may be included as one of the ports of the BUS BUS), a network interface, a power supply, and/or a camera. It will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 1 is merely illustrative and is not intended to limit the configuration of the electronic device described above. For example, the computer terminal 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
It should be noted that the one or more processors 102 and/or other data processing circuits described above may be referred to generally herein as "data processing circuits. The data processing circuit may be embodied in whole or in part in software, hardware, firmware, or any other combination. Furthermore, the data processing circuitry may be a single stand-alone processing module, or incorporated, in whole or in part, into any of the other elements in the computer terminal 10 (or mobile device). As referred to in embodiments of the application, the data processing circuit acts as a processor control (e.g., selection of the path of the variable resistor termination connected to the interface).
The memory 104 may be used to store software programs and modules of application software, such as a program instruction/data storage device corresponding to the financial knowledge question-answering method in the embodiment of the present application, and the processor 102 executes the software programs and modules stored in the memory 104, thereby executing various functional applications and data processing, that is, implementing the financial knowledge question-answering method of the application program. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. The specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module for communicating with the internet wirelessly.
The display may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with a user interface of the computer terminal 10 (or mobile device).
In the above operating environment, fig. 2 is a schematic flow chart of an alternative method for asking and answering financial knowledge according to an embodiment of the present application, as shown in fig. 2, the method at least includes steps S202-S208, wherein:
Step S202, converting the financial problem text input by the target object into a vector form to obtain a financial problem vector.
In the technical solution provided in step S202, the financial knowledge question-answering system may first obtain the input content (i.e. the financial question text) of the user (i.e. the "target object"). In order to facilitate subsequent model analysis, the financial problem text may be semantically parsed to be converted into a vector form, resulting in a financial problem vector.
Step S204, analyzing the financial problem vector by using the large language model to obtain a domain identification result corresponding to the financial problem text.
In the technical solution provided in step S204, the financial knowledge question answering system analyzes the financial question vector by using a large language model (such as GPT-3, GPT-4, etc.) to identify the financial research fields related to the financial question text, and determines the number of the financial research fields. Thus, the domain identification result includes at least one financial research domain related to the financial question text. The financial research fields comprise a plurality of financial research fields such as economic finance, industry thematic, key guest groups, benchmarking comparison and the like, for example, economic form, blockchain finance, internet of things finance, new energy automobiles, big data application, financial investment and the like.
Specifically, the identification about the financial research field can be implemented by adopting a small sample Prompt mode, wherein a few-shot (small sample) guide or an example is added in a Prompt, and a large language model is identified by using the thought of the small sample. That is, an example library including financial questions and domain tags of a plurality of financial research domains is constructed in advance, then the financial questions and domain tags are arranged in a predetermined template of promt in a specific format (e.g., markdown or JSON), when a user inputs a financial question, the example financial questions and example domain tags related to the financial questions in the example library are constructed in association with the financial questions, and the promt is input as input text to a large language model, which analyzes information in the financial questions and examples to identify the financial research domain to which the financial questions belong. Therefore, a small amount of high-quality examples are used for guiding the model to understand the problem in the specific field, the requirement for large-scale labeling data is reduced, and the learning speed and adaptability of the model for processing the problem in the new field are improved.
In addition, when identification is performed, a single financial research field can be obtained for a simple financial problem, and a plurality of financial research fields can be obtained for a complex financial problem.
For example, if the inputted financial problem text is "how to evaluate investment potential of new energy automobile industry and make corresponding investment policy", then the financial problem vector corresponding to the financial problem text is analyzed by using the large language model, and it can be determined that the financial problem text includes two fields of "new energy automobile" and "financial investment".
Step S206, for each financial research field, analyzing the financial question vector by utilizing a plurality of target models corresponding to the financial research field in a plurality of preset models respectively to obtain first answer results output by each target model respectively, and fusing the first answer results output by each target model to obtain second answer results corresponding to the financial research field.
In the technical solution provided in step S206, the processing taking into account the complex financial problem often requires cross-domain expertise and multi-source data support. For this purpose, the financial knowledge question system may analyze the identified respective financial research domains sequentially by analyzing the financial question vector using a plurality of target models corresponding to the financial research domains, respectively, to obtain first answer results output by the respective target models. Meanwhile, considering that each model has specific deviation and weakness, a single model can not cover all relevant aspects due to the limitation of information sources, so that the first answer results output by each target model are difficult to give complete answers, and for this purpose, the financial knowledge question system can analyze and sequentially analyze each identified financial research field, namely, fusion processing is carried out on the first answer results output by each target model, so as to obtain a second answer result corresponding to the financial research field, and accuracy and reliability of the answer result are improved.
Step S208, determining a target answer result of the financial question text according to the second answer results corresponding to the financial research fields.
In the technical solution provided in step S208, the financial knowledge question system may determine, according to the complexity of the financial question text, a target answer result corresponding to the financial question text from the second answer results corresponding to the respective financial research fields, so as to improve the comprehensiveness of the answer result.
Based on the above-mentioned schemes defined in step S202 to step S208, it may be known that, in an embodiment, the financial knowledge question answering system analyzes the financial question text in cooperation with a plurality of models related to each financial study field by analyzing the number and types of the financial study fields related to the financial question text input by the target object, so as to obtain a final answer result of the financial question text, where the plurality of target models corresponding to each financial study field are obtained by fine tuning different large language models using the financial knowledge database, so that each target model can perform professional answer on related questions of the financial field.
Therefore, through the technical scheme of the embodiment of the application, the intelligent question-answering system can accurately understand the financial field questions so as to efficiently, accurately and rapidly answer the financial field questions input by the user, and further solve the technical problem that the accuracy is lower when the related question-answering system lacks the adaptation of the financial field knowledge, so that the financial professional knowledge is answered.
The method of the financial knowledge question-answering in steps S202 to S208 according to the embodiment of the present application will be described in detail.
Firstly, the application scenario of the application is introduced, and the application scenario can be specifically that the financial client performs the question-answer interaction of the financial knowledge with the intelligent equipment (such as the intelligent robot) integrated with the financial knowledge question-answer system. In the process that the target object communicates with the intelligent device integrated with the financial knowledge question-answering system, the target object can wake up a voice assistant of the financial knowledge question-answering system through a wake-up word or touch screen operation, and the voice assistant can display text data corresponding to the voice data on an interface of the voice assistant and interact with the target object. Therefore, the intelligent device can collect the financial problem voice data proposed by the target object. However, since some users have accent problems, the financial problem voice data is converted into text data, and a conversion error may exist in the obtained financial problem text. For example, when the user inquires 'I want to inquire about the balance of my account' through voice, the system may misidentify 'account' as other words due to the deviation of voice recognition, resulting in misunderstanding of the system.
In addition, in the process that the target object is communicated with the intelligent device integrated with the financial knowledge question-answering system, the target object can also wake up the intelligent device directly through touch screen operation, and click a financial knowledge question-answering text input box on a visual display screen of the intelligent device to input financial question text in a text form. Some users may have errors in the entered financial question text due to the fact that the user may for some reason select the wrong text or misunderstand the financial terms when entering the text box. For example: the user is intended to ask "whether the recent gold price breaks through? the question is wrongly written as" whether the golden price breaks through 1800 yuan per pound? this changes not only the monetary units but also the weight units, resulting in a system that does not understand the meaning of the problem correctly.
For the two cases, before the financial knowledge question-answering system performs semantic analysis on the financial question text, the question text can be revised first, so that the situation that the financial question text is not matched with the real requirement of a user due to external factors is avoided.
As an alternative implementation mode, the financial knowledge question and answer system can revise the financial question text by the following method, comprising the steps of obtaining the initial question text input by a target object, and revising the initial question text by utilizing a pre-constructed financial word bank so as to convert wrong words in the initial question text into correct financial words, so that the financial question text is obtained.
The financial word library comprises words standardized according to financial knowledge and real financial corpus, so that the financial words in the financial word library are verified entities, namely, the word meaning and the word form of each financial word are correct. Therefore, the acquired initial question text (i.e. text data directly input by the user in the visual interface or text data converted from the financial question voice data of the user) is corrected according to the financial word bank, so that the wrong word in the text data is corrected to the correct financial word.
Further, the financial knowledge question-answering system performs semantic analysis on the corrected financial question text to obtain a corresponding financial question vector, including:
in step S2021, element extraction is performed on the financial question text by using the pre-trained text element extraction model, so as to obtain a plurality of target elements in the financial question text.
Step S2022 converts each target element into a corresponding phrase vector, and sequentially splices the phrase vectors corresponding to each target element according to the sequence of each target element in the financial problem text, so as to obtain the financial problem vector.
Specifically, the text element extraction model provided in the step S2021 includes using Word2vec as an embedding layer, embedding a stack-type recurrent neural network, and using a conditional random field model as a supervised model of the multi-classification task output layer. And the training process of the text element extraction model comprises the following steps:
the first step is to divide the multiple groups of sample data into a training set and a verification set according to a preset proportion.
The training set comprises a plurality of groups of training sample data, the training sample data comprises texts in the problem text set and element tags in the texts, the verification set comprises a plurality of groups of verification sample data, and the verification sample data comprises the texts in the problem text set and the element tags in the texts in a unified mode. In addition, the types of the element labels include, but are not limited to, financial subjects (e.g., companies, banks, etc.), financial businesses or products (e.g., loans, investments, insurance, etc.), time, virtual transaction locations or virtual transaction markets, economic indicators.
Training a pre-constructed initial model by utilizing a plurality of groups of training sample data in a training set, verifying the initial model by utilizing a verification set every other preset period, and verifying the extraction accuracy of a text element extraction model by utilizing a plurality of groups of verification sample data in the verification set;
And thirdly, when the extraction accuracy of the text element extraction model is larger than a preset threshold value, training is finished to obtain the text element extraction model.
The preset ratio may be 5:1, the preset period may be 500 iterations, and the extraction accuracy may be 98%. The setting of the above-mentioned preset proportion, preset period, and extraction accuracy is only described as an example, and may be specifically set according to the actual application scenario, which is not particularly limited in the present application.
After the text element extraction model is utilized by the financial knowledge question-answering system to extract each target element in the financial question text, the system can continuously convert each target element into a corresponding Word vector by utilizing a pre-trained model (such as BERT and Word2 Vec), and sequentially superimpose the Word vectors corresponding to each target element according to the sequence of each target element in the financial question text so as to obtain the financial question vector corresponding to the financial question text.
In the face of complex financial problems, analysis of complex financial problems using only a single model often fails to cover all of the complexity of the problem. Therefore, in the embodiment of the application, each financial research field related to the financial problem text is analyzed one by one, and a multi-model cooperative working mode is adopted in the analysis process, so that each model analyzes and solves the same problem at multiple angles according to the unique algorithm and training data, thereby providing a comprehensive solution and greatly improving customer satisfaction and problem solving accuracy.
However, since the existing general-purpose large model lacks a deep understanding of the expertise of a specific financial field, when analyzing complex financial problems using the general-purpose large model, it tends to be not accurate enough to interpret financial terms and complex problems. To this end, embodiments of the present application propose to fine tune a generic large model using a linear residual adjustment (LoRA) technique. The key of LoRA mechanism is that it does not touch the main structure and massive parameters of the large-scale pre-trained model, but skillfully introduces a set of small and learnable low-rank matrices, and fine-tunes only the key weights in the model. The method is equivalent to adding a layer of 'knowledge enhancement filter' specially aiming at the financial field on the basis of the original capability of the general large model, so that the dilution of the original capability of the general large model is avoided, the accuracy and the response speed of the general large model in processing specific financial problems are obviously enhanced, and meanwhile, the general capability of the model is reserved. Therefore, the universal large model is finely adjusted through LoRA mechanisms, so that the universal large model not only can better understand and respond to complex consultation related to finance, but also can deepen understanding of special terms, business processes and compliance requirements in the financial field while keeping the response capability of the model to wide topics.
Optionally, the financial knowledge question-answering system may use a pre-built financial knowledge database to fine tune different large language models to obtain multiple preset models. Because the algorithms and training data adopted by the preset models are different, the preset models provide different insights for users to compare and select from multiple dimensions when analyzing the same financial problem.
The different large language models may be large language models of different manufacturers, different versions and different functions. Each model has advantages in aspects of natural language processing, data analysis, intelligent recommendation and the like, and can be accurately matched according to specific requirements of users. In addition, the financial knowledge database includes knowledge vectors of a plurality of knowledge points in a plurality of financial research fields.
The financial knowledge question-answering system can train each preset model according to the following method, wherein the first model parameter set and the second model parameter set are obtained through training of a large language model by using a preset corpus, the number of model parameters contained in the first model parameter set is larger than that of model parameters contained in the second model parameter set, and therefore most model parameters of the large language model are contained in the first model parameter set, and only a small part of model parameters of the large language model are contained in the second model parameter set. And then, in the training process of the large language model, adjusting each model parameter in the second model parameter set by utilizing a financial knowledge database, wherein the financial knowledge database comprises financial knowledge vectors corresponding to a plurality of financial knowledge in a plurality of financial research fields, and finally, determining the model parameters of the preset model according to the first model parameter set and the adjusted second model parameter set.
That is, in the fine tuning process of the large language model, most of the original model parameters are kept unchanged, so that the extensive language understanding capability and the generating capability of the original large language model are protected; and finally, taking the first model parameter set and the adjusted second model parameter set as model parameters of a preset model to obtain the preset model, so that the preset model not only maintains the universal language capability, but also obtains the expertise of the financial field to carry out deep analysis on the financial field questions and generate professional answers, thereby showing higher accuracy and expertise in the processing of complex financial questions.
In addition, the financial knowledge database can be constructed by the financial knowledge question-answering system in advance, wherein the financial knowledge question-answering system takes 'economic finance', 'industry thematic', 'important objective group' and 'opposite standard comparison' as primary catalogs, subdivides each primary catalogs to obtain a plurality of secondary catalogs, subdivides each secondary objective into a plurality of tertiary catalogs (financial research fields), and each tertiary catalogs can comprise financial knowledge from historical asset configuration cases, market analysis reports, investment policy guidelines and the like.
Taking the above "industry topics" as an example, it can be subdivided into a plurality of secondary catalogs such as "technology industry", "finance industry", "construction industry", "consumption industry", "medical industry", "manufacturing industry", etc. The technology industry can be further divided into information technology industry, biotechnology industry, intelligent technology industry and the like, financial industry can be further divided into banks, funds and the like, building industry can be further divided into basic building, intelligent building, assembly building and the like, consumption industry can be further divided into cultural entertainment, food beverage, household appliance digital and the like, medical industry can be further divided into medical service, medical appliance, chemical pharmacy and the like, and manufacturing industry can be further divided into food manufacturing industry, automobile manufacturing industry, mechanical manufacturing industry and the like.
And carrying out systematic collection, arrangement and structuring treatment on the financial knowledge text data related to each financial research field, and introducing Word2Vec, BERT and other Embedding models to convert various financial knowledge text data into a vector form which can be understood by a machine, so as to obtain a financial knowledge database. That is, the financial knowledge question-answering system automatically builds and updates the business knowledge base by integrating BGE, multilingual-e5-large and other vectorization models, so as to ensure the effective sedimentation of business data.
It should be noted that the financial knowledge database may update the knowledge content periodically or in real time to ensure timeliness and comprehensiveness of the knowledge content. The periodic updating can be to periodically acquire the latest financial knowledge text data from multiple data sources according to preset time, classify and standard the data after preprocessing operation and convert the data into a vector form for storage, and directly acquire the latest financial knowledge text data when the key policy is released or the market is dynamically changed in real time, classify and standard the data after preprocessing operation and convert the data into the vector form for storage so as to ensure timeliness of the data.
Further, since the attention points of the preset models obtained by training are different when analyzing different financial research fields, the model performance of each preset model in different financial research fields is also different. In order to accurately analyze the complex financial problems, the embodiment of the application needs to determine a plurality of target models which are best in processing the related problems in each financial research field from a plurality of preset models.
Optionally, for each financial research domain, the financial knowledge question-answering system can determine a plurality of target models corresponding to the financial research domain according to the following method, wherein the method comprises the steps of firstly, obtaining quality scores of each preset model in the financial research domain in a plurality of preset models, wherein the quality scores of the financial research domain are used for reflecting satisfaction degrees of a plurality of users on historical answer results given by historical financial question texts of the preset models for processing the financial research domain, and taking the preset model with the quality scores of the financial research domain higher than a preset threshold value as the target model.
The financial knowledge question-answering system is used for analyzing historical answer results obtained by a plurality of preset models and inputting historical financial question texts related to the financial research field by a plurality of users to feed back the historical answer results to a target object, obtaining satisfaction degrees of the historical answer results output by the preset models by the users, wherein the satisfaction degrees can be represented by quantitative representation through scoring or character evaluation, and finally determining average values of the satisfaction degrees of the plurality of the historical answer results output by the preset models by the plurality of users to serve as quality scores of the preset models in the financial research field. And because the quality scores of different preset models in different financial research fields are different, the preset model with the quality score higher than a preset threshold value in the financial research field can be used as the target model. In other words, the model determination scheme establishes a mechanism by using user feedback, and dynamically evaluates and selects the model through quality scores, so that the model can continuously provide high-level service in a continuously-changing financial environment, and the system can adjust threshold values according to new feedback of the user and the performance of the model over time, further optimize model selection strategies and promote the intelligent level of overall financial research and decision support.
For example, in the risk management field, model a obtains an average user satisfaction score of 4.2 after processing 100 risk management questions, model B processes 80 questions with an average score of 4.5, model C processes 120 questions with an average score of 3.8, and a preset model with a quality score higher than 4.0 can be used as the target model in the risk management field.
Further, after determining each of the target models related to the financial research area, the financial knowledge question answering system may answer the financial question text according to the following method, including:
Step S2061, determining an initial input prompt message template corresponding to the financial problem vector according to the financial research field.
In the technical solution provided in step S2061, since the keywords related to different financial research domains are different, the financial knowledge question-answering system may select a predefined prompt message template according to the identified financial research domain, and the template generally includes domain-related guide words and question structures, so as to help the model focus on specific financial domain knowledge.
Step S2062, the initial input prompt message template is adjusted according to the model characteristics of each target model to obtain the target input prompt message template corresponding to each target model.
In the technical solution provided in step S2062, the financial knowledge question-answering system may adjust the initial prompt information template according to the model characteristics of each target model to adapt to the characteristics of each target model, considering that the architectures, preferences and advantages of different models are different. The content of the adjustment may include, but is not limited to, the length, complexity, structure, vocabulary selection, etc. of the adjustment prompt. This not only explicitly indicates what the model needs to be focused on, but also provides enough context to enable the model to generate more accurate and specialized answers. For example, for a more detail oriented model, more specific background information may need to be added to the prompt, while for a more abstract model, a more abstract and open prompt may be used.
Step S2063, for each target model, integrating a plurality of target elements in the financial question text into a target input prompt information template to obtain an input text of the target model, extracting keyword vectors corresponding to keywords in the input text by using the target model, determining target financial knowledge vectors with similarity greater than a preset similarity threshold value from a financial knowledge database, and taking the target financial knowledge vectors as first answer results output by the target model.
That is, the financial knowledge question-answering system utilizes the technologies of intention recognition, semantic retrieval, prompt engineering and the like to independently develop a large model plug-in framework, break through the data, flow and system barriers among systems, and remodel the system flow and user experience.
It should be noted that the financial knowledge question-answering system may feed back the first answer results output by the target models related to the financial research field to the target object, and obtain the satisfaction degree of the target object for each first answer result, and adjust the quality score of the target model in the financial research field by using the satisfaction degree of the first answer results output by each target model, so as to ensure that the answer results generated by using the target model later are closer to the user requirement.
For example, the financial problem input by the target object is that "based on the current market environment, the investment target of the client is steadily increased, the risk tolerance capability is that in the investment period is 5 years, an asset should be configured", at this time, the system firstly identifies that the problem belongs to the asset configuration optimization field, then generates an initial prompt according to a prompt information template corresponding to the field, "please refer to the macroscopic environment of the market, consider the specific target, risk preference and time frame of the client, and provide a proposal scheme of asset configuration", then utilizes the model characteristics (different prompt types or prompt structures of different target model preference sets) of the asset configuration optimization field related target model to adjust the initial prompt, such as a more specific keyword based on a search model, another model generated based on a more coherent narrative prompt, then integrates target elements (such as "steadily increased", "moderately risked", "5 years investment period", "current market environment") in the regulated target prompt to obtain a model input text, finally utilizes the target model to extract keywords (such as a keyword) from the built input text, search vector and then search for a keyword in a financial knowledge vector with a higher degree similar to the first keyword, and then search for a financial knowledge vector is converted to a financial result with a higher threshold.
After the first answer result corresponding to the financial question text is obtained by the financial knowledge question answering system, the financial knowledge question answering system can fuse the first answer results output by a plurality of target models in the same financial research field according to the following method, which comprises the following steps:
Step S2064, the first answer result output from the target model with the highest quality score in the plurality of target models is used as the candidate answer result.
Step S2065, determining the content of the common answer between the remaining answer results other than the candidate answer result and the candidate answer result among the plurality of first answer results. The content of the common answer is an answer segment, in which the text similarity between the rest answer results except the candidate answer results and the candidate answer results in the plurality of first answer results is lower than a preset similarity threshold;
Step S2066, determining the weight of each remaining answer result according to the quality score of the target model to which each remaining answer result belongs.
Step S2067, according to the weight of each residual answer result, fusing other answer contents except the common answer content in each residual answer result into the candidate answer result to obtain a second answer result corresponding to the financial research field.
In the fusion process, the system ensures the correctness and the specialization of the basis by taking the first answer result output by the model with the highest quality score as the candidate answer result, and then, considering that different target models possibly have emphasis when processing the same question, giving higher weight to the model with higher quality score according to the performance of the model in the specific financial research field so as to ensure that the fusion process tends to adopt the output of the model with more possibility of accurate and specialized answer, and simultaneously, fusing other answer contents (namely non-repeated and non-common answer fragments) except common answer contents in each residual answer result into the candidate answer result according to the weight of each residual answer result, thereby avoiding redundant information appearing in the answer, and simultaneously supplementing different visual angles and details so as to more flexibly meet diversified requirements. Compared with the simple combination of the answer results output by all the models, the fusion method emphasizes the complementarity among the models, combines the unique content segments in each residual answer result according to the weights thereof, realizes the accurate fusion of the content, removes repeated information, better integrates the views and information of different models, and provides a more comprehensive, less redundant and more accurate answer result.
Finally, the financial knowledge question-answering system can determine a target answer result corresponding to the financial question text based on the second answer result corresponding to each financial study field according to the number of the financial study fields related to the financial question text, namely:
And under the condition that the domain identification result comprises a financial research domain, directly taking the second answer result corresponding to the financial research domain as the target answer result corresponding to the financial question text.
Under the condition that the domain identification result comprises a plurality of financial research domains, determining the corresponding dependency relationship of each financial research domain according to a preset financial knowledge graph, and splicing the second answer results corresponding to each financial research domain according to the dependency relationship to obtain the target answer result corresponding to the financial question text.
Aiming at the situation of the multi-finance research field, the finance knowledge question-answering system needs to effectively splice second answer results of the multi-research field in a logically continuous mode, and provides a comprehensive analysis view. In the splicing process, the second answer results corresponding to the financial research fields can be spliced according to the natural sequence of the correlation among the financial research fields reflected in the financial knowledge graph, so that the readability and the understanding convenience of the answers are improved, and a user can follow and understand the analysis process of the complex financial questions more easily. That is, the financial knowledge question-answering system can flexibly assemble a plurality of knowledge nodes, provide a stable output structure, and support the execution of repetitive tasks in the face of a logically complex multi-step task scenario.
The financial knowledge graph is constructed by taking a plurality of financial research fields as graph nodes and taking the dependency relationship among the financial research fields as edges. Among them, the dependency includes, but is not limited to:
(1) Causal relationships-changes in one domain directly result in changes in another domain. For example, policy adjustments (e.g., interest rate changes) may directly affect financial market performance (e.g., stock prices, bond profitability).
(2) Influence versus affected relationship-one domain has a significant impact on another domain, but may not directly result in a change. For example, corporate financial health (one of the research areas) may be affected by industry trends, which in turn affect corporate market performance and investment value.
(3) And the two or more fields complement each other when analyzing the specific problems, and form a complete analysis framework together. For example, in analyzing real estate markets, it may be desirable to consider information in multiple areas of demographics, monetary policies, and local economic developments at the same time.
(4) Front-end versus back-end relationship analysis of one domain may be the basis for analysis of another domain when dealing with complex problems. For example, prior to the establishment of a fusion risk management strategy, an economic analysis may be required to understand a large economic environment.
(5) Parallel relation-when analyzing a problem, multiple fields can be considered in parallel, and each field independently but jointly acts on the solution of the problem. For example, in assessing credit risk for a nationwide company, it may be necessary to consider both the world financial market and the company's financial status.
Therefore, by combining the financial knowledge graph, the dependency relationship among different financial research fields can be accurately identified, so that the second answer results of multiple research fields are spliced, and a comprehensive, accurate and comprehensive financial question answer is generated.
It should be noted that, the degree of the dependency relationship between the fields in the financial knowledge graph may be represented by "the weight of the edge", and the size of the weight may be determined based on the data support (i.e., according to the number of instances associated between two fields in the historical data, if a large amount of data indicates that there is a significant correlation between two fields in many cases, the weight of the edge may be set higher), expert evaluation (i.e., the expert or analyst in the financial field may evaluate the dependency relationship between the fields according to their experience and knowledge of the fields, and assign the weight to the corresponding edge), user feedback (by collecting the feedback of the user when using the system, it may be known which of the associations between the fields are more focused by the user, so as to adjust the weight of the corresponding edge), and other factors may be defined. In addition, the construction and optimization of the financial knowledge graph are continuous iterative processes, and the dependency relationship and the weight of edges among all the fields need to be adjusted periodically according to the latest market dynamics, user requirements, expert opinions and the like, so that the timeliness and the effectiveness of the financial knowledge graph are maintained.
Optionally, when the target answer result of the financial question text is fed back to the target object, the reference connection, the analysis process and the reason corresponding to the knowledge source of the answer content can be fed back to the target object, so that the trust of the user on the answer result is enhanced, and the transparency and the interpretability of the system are improved.
Therefore, the financial knowledge question and answer is based on the flow arrangement capability of the large model, and a plurality of services such as plug-in call (namely, a preset model is used as a plug-in), text analysis, knowledge base input, the large model and the like are deeply integrated, so that the flow, intelligent and efficient AI Agent capability is developed. By means of the mainstream open source large model technology, the AI Agent can conduct thinking and actions autonomously and is fused with the financial knowledge database deeply, and the AI Agent has the capabilities of understanding user intention, task planning, decomposing and the like, so that diversified business tasks are completed. Meanwhile, the AI Agent can inherit and expand the existing banking business capability and promote the precipitation and promotion of basic skills and business skills, so that the efficiency of large-model service development is improved, and the function development of the financial business platform is more agile. In addition, the financial knowledge question-answering system can carry out omnibearing management on an accessed large model through a model management function, and comprises model monitoring, log management, authority management, calculation power optimization and the like.
In addition, the user can use basic functions such as writing a document, generating codes, asking and answering the knowledge, and the like of the financial knowledge asking and answering system, and can also execute RPA (robot process automation) tasks, query enterprise information and call system functions through dialogue interaction with the financial knowledge asking and answering system, so that the application range of a large model is greatly expanded.
Therefore, compared with the existing question-answering method, the financial knowledge question-answering method provided by the embodiment of the application has the following advantages:
(1) The financial knowledge database and the financial knowledge map are updated in real time by carrying out warehousing processing on a large amount of financial knowledge, so that the efficiency and the systematicness of financial knowledge management are improved;
(2) The universal large model is finely adjusted by utilizing the financial knowledge database updated in real time, so that the performance of the model in a specific financial scene is remarkably improved under the condition that the consumption of computing resources is not greatly increased, the adjusted model can intelligently answer financial questions, and the specialization and pertinence of generating financial question answers by the model are greatly improved;
(3) The method comprises the steps of carrying out field identification on financial questions, analyzing the financial questions from a plurality of models corresponding to each financial research field related to the financial questions to obtain a plurality of answer results analyzed under different angles, and carrying out intelligent fusion on the answer results under the same angle to ensure the correctness and the speciality of the answer results under the single financial research field, and supplementing different visual angles and details at the same time, so that the answer results under the single financial research field contain wider information, and the problems of users are solved at multiple angles;
(4) According to the dependency relationship among the financial research fields, the answer results in different angles are spliced, so that the answer results in different fields are spliced in a logically coherent mode, the readability and understanding convenience of the answer are improved, and a user can follow and understand the analysis process of the complex financial problem more easily.
Example 2
Based on embodiment 1 of the present application, there is also provided an embodiment of a financial knowledge question-answering system that executes the above-mentioned financial knowledge question-answering method of the above-mentioned embodiment when running. Fig. 3 is a schematic structural diagram of an optional financial knowledge question-answering system according to an embodiment of the present application, and as shown in fig. 3, the financial knowledge question-answering system at least includes a semantic parsing module 32, an identifying module 34, a question-answering module 36 and a determining module 38, where:
The semantic analysis module 32 is configured to convert the financial problem text input by the target object into a vector form, so as to obtain a financial problem vector;
the recognition module 34 is configured to analyze the financial problem vector by using a pre-trained large language model to obtain a domain recognition result corresponding to the financial problem text, where the domain recognition result includes the number and type of financial research domains related to the financial problem text;
The question and answer module 36 is configured to, for each financial research domain, analyze the financial question vector by using a plurality of target models corresponding to the financial research domain in a plurality of preset models, respectively, to obtain first answer results output by each target model;
A determining module 38, configured to determine a target answer result of the financial question text according to the second answer results corresponding to each financial research domain;
the plurality of preset models are obtained by fine tuning different large language models by utilizing a pre-constructed financial knowledge database, and the financial knowledge database comprises financial knowledge vectors of a plurality of financial knowledge in a plurality of financial research fields.
It should be noted that each module in the above-mentioned financial knowledge question-answering system may be a program module (for example, a set of program instructions for implementing a specific function), or may be a hardware module, and for the latter, it may be expressed in a form, but not limited to, that each module is expressed in a form of one processor, or the functions of each module are implemented by one processor.
Example 3
According to an embodiment of the present application, there is also provided a nonvolatile storage medium having a program stored therein, wherein the apparatus in which the nonvolatile storage medium is controlled to execute the financial knowledge question-answering method in embodiment 1 when the program runs.
The method comprises the steps of obtaining a financial question vector by converting a financial question text input by a target object into a vector form, analyzing the financial question vector by using a large language model, obtaining a domain identification result corresponding to the financial question text, wherein the domain identification result comprises at least one financial research domain related to the financial question text, analyzing the financial question vector by using a plurality of target models corresponding to the financial research domain in a plurality of preset models for each financial research domain respectively, obtaining a first answer result output by each target model respectively, fusing the first answer results output by each target model, obtaining a second answer result corresponding to the financial research domain, determining the target answer result of the financial question text according to the second answer result corresponding to each financial research domain, and fine-tuning different large language models by using a pre-built financial knowledge database which comprises a plurality of financial knowledge vectors in the financial research domain.
According to an embodiment of the present application, there is also provided a computer program product including a stored computer program, wherein the computer program, when executed by a processor, implements the financial knowledge question-answering method in embodiment 1.
The method comprises the steps of converting a financial question text input by a target object into a vector form to obtain a financial question vector, analyzing the financial question vector by using a large language model to obtain a domain identification result corresponding to the financial question text, wherein the domain identification result comprises at least one financial research domain related to the financial question text, analyzing the financial question vector by using a plurality of target models corresponding to the financial research domain in a plurality of preset models for each financial research domain to obtain a first answer result output by each target model, fusing the first answer results output by each target model to obtain a second answer result corresponding to the financial research domain, and determining the target answer result of the financial question text according to the second answer result corresponding to each financial research domain, wherein the plurality of preset models are all obtained by fine tuning different large language models by using a pre-built financial knowledge database, and the financial knowledge database comprises financial knowledge vectors of a plurality of financial knowledge in the financial research domain.
According to an embodiment of the present application, there is also provided a processor for running a program, wherein the program executes the financial knowledge question-answering method in embodiment 1 when running.
Optionally, the program is executed to perform the steps of converting a financial question text input by a target object into a vector form to obtain a financial question vector, analyzing the financial question vector by using a large language model to obtain a domain identification result corresponding to the financial question text, wherein the domain identification result comprises at least one financial research domain related to the financial question text, analyzing the financial question vector by using a plurality of target models corresponding to the financial research domain in a plurality of preset models for each financial research domain respectively to obtain a first answer result output by each target model, fusing the first answer results output by each target model to obtain a second answer result corresponding to the financial research domain, and determining the target answer result of the financial question text according to the second answer result corresponding to each financial research domain, wherein the plurality of preset models are all obtained by fine tuning different large language models by using a pre-built financial knowledge database, and the financial knowledge database comprises financial vectors of a plurality of financial knowledge domains.
There is further provided an electronic device according to an embodiment of the present application, where fig. 4 is a schematic structural diagram of an alternative electronic device according to an embodiment of the present application, and as shown in fig. 4, the electronic device includes one or more processors, and a memory for storing one or more programs, where the one or more programs, when executed by the one or more processors, cause the one or more processors to implement a method for running the programs, and where the programs are configured to execute the financial knowledge question-answering method in embodiment 1.
Optionally, the processor is configured to convert a financial question text input by a target object into a vector form to obtain a financial question vector, analyze the financial question vector by using a large language model to obtain a domain identification result corresponding to the financial question text, wherein the domain identification result comprises at least one financial research domain related to the financial question text, analyze the financial question vector by using a plurality of target models corresponding to the financial research domain in a plurality of preset models for each financial research domain respectively to obtain a first answer result output by each target model, fuse the first answer results output by each target model to obtain a second answer result corresponding to the financial research domain, and determine the target answer result of the financial question text according to the second answer result corresponding to each financial research domain, wherein the plurality of preset models are obtained by fine tuning different large language models by using a pre-constructed financial knowledge database and comprise a plurality of financial knowledge vectors in the financial knowledge database.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of units may be a logic function division, and there may be another division manner in actual implementation, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be essentially or a part contributing to the related art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of the embodiments of the present application. The storage medium includes a U disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, etc. which can store the program code.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.

Claims (10)

1.一种金融知识问答方法,其特征在于,包括:1. A financial knowledge question-answering method, characterized by comprising: 将目标对象输入的金融问题文本转化为向量形式,得到金融问题向量;Convert the financial problem text input by the target object into a vector form to obtain a financial problem vector; 利用大语言模型对所述金融问题向量进行分析,得到所述金融问题文本对应的领域识别结果,其中,所述领域识别结果包括:所述金融问题文本涉及的至少一个金融研究领域;Analyzing the financial question vector using a large language model to obtain a field recognition result corresponding to the financial question text, wherein the field recognition result includes: at least one financial research field involved in the financial question text; 对于每个所述金融研究领域,利用多个预设模型内与所述金融研究领域对应的多个目标模型分别对所述金融问题向量进行分析,分别得到各个所述目标模型输出的第一回答结果;对各个所述目标模型输出的第一回答结果进行融合,得到所述金融研究领域对应的第二回答结果;For each of the financial research fields, the financial problem vectors are analyzed respectively using multiple target models corresponding to the financial research fields in multiple preset models to obtain first answer results output by each of the target models; the first answer results output by each of the target models are merged to obtain a second answer result corresponding to the financial research field; 依据各个所述金融研究领域对应的第二回答结果确定所述金融问题文本的目标回答结果;Determining a target answer result for the financial question text according to the second answer results corresponding to each of the financial research fields; 其中,所述多个预设模型均是利用预先构建的金融知识数据库对不同的大语言模型进行微调所得,且所述金融知识数据库内包括多个金融研究领域内的多个金融知识的金融知识向量。Among them, the multiple preset models are all obtained by fine-tuning different large language models using a pre-built financial knowledge database, and the financial knowledge database includes financial knowledge vectors of multiple financial knowledge in multiple financial research fields. 2.根据权利要求1所述的方法,其特征在于,在将目标对象输入的金融问题文本转化为向量形式,得到金融问题向量之前,所述方法还包括:2. The method according to claim 1, characterized in that before converting the financial problem text input by the target object into a vector form to obtain the financial problem vector, the method further comprises: 获取所述目标对象输入的初始问题文本;Obtaining an initial question text input by the target object; 利用预先构建的金融词库对所述初始问题文本进行修正,以将所述初始问题文本内的错误词语转换为正确的金融词语,得到所述金融问题文本,其中,所述金融词库内包括根据金融知识标准化后的词语以及真实金融语料。The initial question text is corrected using a pre-built financial vocabulary to convert incorrect words in the initial question text into correct financial words to obtain the financial question text, wherein the financial vocabulary includes words standardized according to financial knowledge and real financial corpus. 3.根据权利要求1所述的方法,其特征在于,将目标对象输入的金融问题文本转化为向量形式,得到金融问题向量,包括:3. The method according to claim 1, characterized in that converting the financial problem text input by the target object into a vector form to obtain the financial problem vector comprises: 利用预训练的文本要素提取模型对所述金融问题文本进行要素提取,得到所述金融问题文本内的多个目标要素,其中,所述文本要素提取模型是利用多组训练样本数据迭代训练所得,且所述训练样本数据内包括问题文本集中的文本以及所述文本内的要素标签,所述要素标签的类型包括以下至少之一:金融主体、金融业务、时间、地点、经济指标;Extracting elements from the financial problem text using a pre-trained text element extraction model to obtain a plurality of target elements in the financial problem text, wherein the text element extraction model is obtained by iterative training using a plurality of sets of training sample data, and the training sample data includes text in a problem text set and element labels in the text, and the type of the element label includes at least one of the following: financial subject, financial business, time, place, and economic indicator; 将各个所述目标要素转换为对应的词向量,并按照各个所述目标要素在所述金融问题文本内的先后顺序,依次将各个所述目标要素对应的词向量进行拼接,得到所述金融问题向量。Each of the target elements is converted into a corresponding word vector, and the word vectors corresponding to each of the target elements are sequentially concatenated according to the sequence of the target elements in the financial question text to obtain the financial question vector. 4.根据权利要求1所述的方法,其特征在于,在利用多个预设模型内与当前金融研究领域对应的多个目标模型分别对所述金融问题向量进行分析之前,所述方法还包括:4. The method according to claim 1, characterized in that before using a plurality of target models corresponding to the current financial research field in a plurality of preset models to analyze the financial problem vector respectively, the method further comprises: 对于每个所述金融研究领域,获取所述多个预设模型内每个预设模型在所述金融研究领域的质量得分,其中,所述金融研究领域质量得分用于反映多个用户对所述预设模型处理所述金融研究领域的历史金融问题文本所给出的历史回答结果的满意程度;For each of the financial research fields, obtaining a quality score of each preset model in the plurality of preset models in the financial research field, wherein the quality score of the financial research field is used to reflect the satisfaction of multiple users with the historical answer results given by the preset model in processing the historical financial problem texts in the financial research field; 将所述质量得分高于预设的门限值的预设模型作为所述金融研究领域的目标模型。The preset model with the quality score higher than the preset threshold value is used as the target model in the financial research field. 5.根据权利要求4所述的方法,其特征在于,利用多个预设模型内与当前金融研究领域对应的多个目标模型分别对所述金融问题向量进行分析,分别得到各个所述目标模型输出的第一回答结果,包括:5. The method according to claim 4 is characterized in that the financial problem vector is analyzed respectively by using multiple target models corresponding to the current financial research field in multiple preset models to obtain the first answer results output by each of the target models, including: 依据所述金融研究领域确定所述金融问题向量对应的初始输入提示信息模板;Determining an initial input prompt information template corresponding to the financial problem vector according to the financial research field; 依据各个所述目标模型的模型特性对所述初始输入提示信息模板进行调整,以得到各个所述目标模型对应的目标输入提示信息模板;Adjusting the initial input prompt information template according to the model characteristics of each of the target models to obtain a target input prompt information template corresponding to each of the target models; 对于每个所述目标模型,将所述金融问题文本内的多个目标要素整合至所述目标输入提示信息模板,得到所述目标模型的输入文本;利用所述目标模型提取所述输入文本内的关键词对应的关键词向量,并从所述金融知识数据库内确定与各个所述关键词向量之间的相似度大于预设的相似度阈值的目标金融知识向量,并将所述目标金融知识向量作为所述目标模型输出的第一回答结果。For each of the target models, multiple target elements in the financial question text are integrated into the target input prompt information template to obtain the input text of the target model; the keyword vectors corresponding to the keywords in the input text are extracted using the target model, and a target financial knowledge vector whose similarity with each of the keyword vectors is greater than a preset similarity threshold is determined from the financial knowledge database, and the target financial knowledge vector is used as the first answer result output by the target model. 6.根据权利要求5所述的方法,其特征在于,对所述多个目标模型输出的多个第一回答结果进行融合处理,得到所述金融研究领域对应的第二回答结果,包括:6. The method according to claim 5, characterized in that the multiple first answer results output by the multiple target models are fused to obtain the second answer result corresponding to the financial research field, comprising: 将所述多个目标模型内质量得分最高的目标模型输出的第一回答结果作为候选回答结果;Taking the first answer result output by the target model with the highest quality score among the multiple target models as the candidate answer result; 确定所述多个第一回答结果内除所述候选回答结果之外的剩余回答结果与所述候选回答结果之间的共同答案内容,其中,所述共同答案内容为所述多个第一回答结果内除所述候选回答结果之外的剩余回答结果与所述候选回答结果之间的文本相似度低于预设的相似度阈值的答案片段;Determine the common answer content between the remaining answer results in the multiple first answer results except the candidate answer result and the candidate answer result, wherein the common answer content is an answer fragment whose text similarity between the remaining answer results in the multiple first answer results except the candidate answer result and the candidate answer result is lower than a preset similarity threshold; 依据各个所述剩余回答结果所属的所述目标模型的质量得分,确定各个所述剩余回答结果的权重;Determining the weight of each of the remaining answer results according to the quality score of the target model to which each of the remaining answer results belongs; 依据各个所述剩余回答结果的权重,将各个所述剩余回答结果内除所述共同答案内容之外的其他答案内容融合至所述候选回答结果中,得到所述金融研究领域对应的第二回答结果。According to the weight of each of the remaining answer results, other answer contents in each of the remaining answer results except the common answer content are integrated into the candidate answer results to obtain a second answer result corresponding to the financial research field. 7.根据权利要求1所述的方法,其特征在于,依据各个所述金融研究领域对应的第二回答结果确定所述金融问题文本的目标回答结果,包括:7. The method according to claim 1, characterized in that determining the target answer result of the financial question text according to the second answer result corresponding to each of the financial research fields comprises: 在所述领域识别结果内包括一个所述金融研究领域的情况下,将所述金融研究领域对应的第二回答结果作为所述金融问题文本对应的目标回答结果;In the case where the field identification result includes the financial research field, taking the second answer result corresponding to the financial research field as the target answer result corresponding to the financial question text; 在所述领域识别结果内包括多个所述金融研究领域的情况下,依据预设的金融知识图谱确定各个所述金融研究领域对应的依赖关系,并依据所述依赖关系将各个所述金融研究领域对应的第二回答结果进行拼接,得到所述金融问题文本对应的目标回答结果,其中,所述金融知识图谱是以多个金融研究领域为图节点,并以各个所述金融研究领域之间的依赖关系为边所构建。In the case where the field identification result includes multiple financial research fields, the dependency relationships corresponding to each of the financial research fields are determined based on a preset financial knowledge graph, and the second answer results corresponding to each of the financial research fields are spliced based on the dependency relationships to obtain a target answer result corresponding to the financial question text, wherein the financial knowledge graph is constructed with multiple financial research fields as graph nodes and the dependency relationships between the financial research fields as edges. 8.根据权利要求1所述的方法,其特征在于,所述多个预设模型内的各个预设模型的训练过程包括:8. The method according to claim 1, characterized in that the training process of each preset model in the plurality of preset models comprises: 获取所述大语言模型利用预设的语料库进行训练所得的第一模型参数集和第二模型参数集,其中,所述第一模型参数集内包含的模型参数的数量多于所述第二模型参数集内包含的模型参数的数量;Obtaining a first model parameter set and a second model parameter set obtained by training the large language model using a preset corpus, wherein the number of model parameters included in the first model parameter set is greater than the number of model parameters included in the second model parameter set; 在所述大语言模型的训练过程中,利用所述金融知识数据库对所述第二模型参数集内的各个模型参数进行调整;During the training of the large language model, adjusting each model parameter in the second model parameter set using the financial knowledge database; 依据所述第一模型参数集和调整后的所述第二模型参数集确定所述预设模型的模型参数。The model parameters of the preset model are determined according to the first model parameter set and the adjusted second model parameter set. 9.一种金融知识问答系统,其特征在于,包括:9. A financial knowledge question-answering system, characterized by comprising: 语义解析模块,用于将目标对象输入的金融问题文本转化为向量形式,得到金融问题向量;The semantic parsing module is used to convert the financial question text input by the target object into a vector form to obtain a financial question vector; 识别模块,用于利用预训练的大语言模型对所述金融问题向量进行分析,得到所述金融问题文本对应的领域识别结果,其中,所述领域识别结果包括:所述金融问题文本涉及的金融研究领域的数量和类型;A recognition module, used to analyze the financial question vector using a pre-trained large language model to obtain a field recognition result corresponding to the financial question text, wherein the field recognition result includes: the number and type of financial research fields involved in the financial question text; 问答模块,用于对于每个所述金融研究领域,利用多个预设模型内与所述金融研究领域对应的多个目标模型分别对所述金融问题向量进行分析,分别得到各个所述目标模型输出的第一回答结果;对所述多个目标模型分别输出的多个第一回答结果进行融合处理,得到所述金融研究领域对应的第二回答结果;A question-answering module is used to analyze the financial question vector for each of the financial research fields using multiple target models corresponding to the financial research fields in multiple preset models to obtain first answer results output by each of the target models; and to fuse multiple first answer results output by the multiple target models to obtain a second answer result corresponding to the financial research field; 确定模块,用于依据各个所述金融研究领域对应的第二回答结果确定所述金融问题文本的目标回答结果;A determination module, used for determining a target answer result of the financial question text according to the second answer results corresponding to each of the financial research fields; 其中,所述多个预设模型均是利用预先构建的金融知识数据库对不同的大语言模型进行微调所得,且所述金融知识数据库内包括多个金融研究领域内的多个金融知识的金融知识向量。Among them, the multiple preset models are all obtained by fine-tuning different large language models using a pre-built financial knowledge database, and the financial knowledge database includes financial knowledge vectors of multiple financial knowledge in multiple financial research fields. 10.一种非易失性存储介质,其特征在于,所述非易失性存储介质中存储有计算机程序,其中,所述非易失性存储介质所在设备通过运行所述计算机程序执行权利要求1至8中任意一项所述的金融知识问答方法。10. A non-volatile storage medium, characterized in that a computer program is stored in the non-volatile storage medium, wherein a device where the non-volatile storage medium is located executes the financial knowledge question-and-answer method described in any one of claims 1 to 8 by running the computer program.
CN202411879683.2A 2024-12-19 2024-12-19 Financial knowledge question answering method and system, and storage medium Pending CN119336887A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411879683.2A CN119336887A (en) 2024-12-19 2024-12-19 Financial knowledge question answering method and system, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411879683.2A CN119336887A (en) 2024-12-19 2024-12-19 Financial knowledge question answering method and system, and storage medium

Publications (1)

Publication Number Publication Date
CN119336887A true CN119336887A (en) 2025-01-21

Family

ID=94265398

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411879683.2A Pending CN119336887A (en) 2024-12-19 2024-12-19 Financial knowledge question answering method and system, and storage medium

Country Status (1)

Country Link
CN (1) CN119336887A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119782491A (en) * 2025-03-11 2025-04-08 华安证券股份有限公司 Intelligent question-answering implementation method and device for securities compliance
CN120297241A (en) * 2025-06-11 2025-07-11 中国中金财富证券有限公司 Content automatic generation method, computer device, medium and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120077178A1 (en) * 2008-05-14 2012-03-29 International Business Machines Corporation System and method for domain adaptation in question answering
US9720981B1 (en) * 2016-02-25 2017-08-01 International Business Machines Corporation Multiple instance machine learning for question answering systems
CN115221306A (en) * 2022-09-21 2022-10-21 北京云迹科技股份有限公司 Automatic response evaluation method and device
CN117149982A (en) * 2023-10-27 2023-12-01 腾讯科技(深圳)有限公司 Question-answering processing method, device, equipment and storage medium based on artificial intelligence
CN117725170A (en) * 2023-11-29 2024-03-19 数字重庆大数据应用发展有限公司 Policy question and answer method and system based on large language model and knowledge graph technology
CN117875292A (en) * 2023-12-27 2024-04-12 深圳价值在线信息科技股份有限公司 Financial knowledge intelligent question-answering method, system, terminal equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120077178A1 (en) * 2008-05-14 2012-03-29 International Business Machines Corporation System and method for domain adaptation in question answering
US9720981B1 (en) * 2016-02-25 2017-08-01 International Business Machines Corporation Multiple instance machine learning for question answering systems
CN115221306A (en) * 2022-09-21 2022-10-21 北京云迹科技股份有限公司 Automatic response evaluation method and device
CN117149982A (en) * 2023-10-27 2023-12-01 腾讯科技(深圳)有限公司 Question-answering processing method, device, equipment and storage medium based on artificial intelligence
CN117725170A (en) * 2023-11-29 2024-03-19 数字重庆大数据应用发展有限公司 Policy question and answer method and system based on large language model and knowledge graph technology
CN117875292A (en) * 2023-12-27 2024-04-12 深圳价值在线信息科技股份有限公司 Financial knowledge intelligent question-answering method, system, terminal equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
荣光辉;黄震华;: "基于深度学习的问答匹配方法", 计算机应用, no. 10, 10 October 2017 (2017-10-10) *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119782491A (en) * 2025-03-11 2025-04-08 华安证券股份有限公司 Intelligent question-answering implementation method and device for securities compliance
CN119782491B (en) * 2025-03-11 2025-06-27 华安证券股份有限公司 Intelligent question-answering implementation method and device for securities compliance
CN120297241A (en) * 2025-06-11 2025-07-11 中国中金财富证券有限公司 Content automatic generation method, computer device, medium and system
CN120297241B (en) * 2025-06-11 2025-09-30 中国中金财富证券有限公司 Content automatic generation method, computer device, medium and system

Similar Documents

Publication Publication Date Title
CN112307215B (en) Data processing method, device and computer readable storage medium
WO2024178435A1 (en) Systems and methods for providing adaptive ai-driven conversational agents
CN114090755B (en) Reply sentence determining method and device based on knowledge graph and electronic equipment
US12231380B1 (en) Trigger-based transfer of conversations from a chatbot to a human agent
WO2020114269A1 (en) Robo-advisor implementation method and system
CN119336887A (en) Financial knowledge question answering method and system, and storage medium
CN119311843B (en) Solution matching method and system for artificial intelligence large model
CN110399473B (en) Method and apparatus for determining answers to user questions
WO2022018676A1 (en) Natural language enrichment using action explanations
CN120256647B (en) Financial information query method and system based on graph analysis
CN119202214A (en) Financial knowledge intelligent question answering method, device, storage medium and program product
Madasamy et al. The evolution of chatbots: Cloud and AI synergy in banking customer interactions
CN119226501A (en) Data processing method and device, non-volatile storage medium, and electronic device
CN119294440A (en) Model training method, data processing method, electronic device, computer-readable storage medium, and computer program product
CN116541517A (en) Text information processing method, apparatus, device, software program, and storage medium
US20200202074A1 (en) Semsantic parsing
KR20180042763A (en) Chatting type financial robot and method for providing financial service using the same
CN120492602A (en) Intention analysis and strategy generation method, device, equipment and medium
CN115114281A (en) Query statement generation method and device, storage medium and electronic equipment
CN119807387A (en) Method for generating response statement and related device
CN118093839A (en) Knowledge operation question-answer dialogue processing method and system based on deep learning
CN118170869A (en) Man-machine interaction optimization method, device, equipment and medium
CN118364923A (en) Task processing method, credit approval decision method, target decision model training method, information processing method based on target decision model and model training platform
CN117688160A (en) Question-answer pair construction method and device, electronic equipment and storage medium
CN120234032B (en) Automatic software product line feature model generation method based on use case enhancement

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20250121

RJ01 Rejection of invention patent application after publication