Financial knowledge question and answer method and system and storage medium
By converting financial question text into vector form and using multiple preset models for analysis and fusion, it solves the problem of insufficient accuracy of existing financial question and answer systems in handling problems in the financial field, and achieves accurate understanding and professional answers to financial questions. , improving system accuracy and user trust.
Patent Information
- Application Number
- CN202411879683.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-01-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing financial question and answer system has low accuracy when dealing with problems in the financial field. Especially when interpreting financial terms and complex problems, the interpretation of the model is not accurate enough, and lacks special optimization and training for financial scenarios, which cannot fully meet users. In-depth demand for professional knowledge.
By converting financial issues into vector forms, analysis of large language models, identifying the field of financial research, and using multiple preset models to analyze financial issues, integrate the output results of each model, and generate the final answer results. These preset models are fine -tuned to large language models by using pre -constructed financial knowledge databases to ensure their professionalism and accuracy in the financial field.
The accurate understanding of financial issues and professional answers have been realized, and the accuracy and user trust of the Q & A system can be improved, which can more effectively meet users' in -depth needs for financial professional knowledge.
Smart Images

Figure CN119336887A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of financial data processing, and in particular, to a financial knowledge question-answering method and system, and a storage medium. Background Art
[0002] At present, financial institutions will integrate big language models into existing business processes and service platforms to obtain financial question-and-answer systems, such as intelligent customer service systems, investment advisory platforms, etc. Among them, big language models are implemented using natural language processing and machine learning technologies. Natural language processing can understand and generate human language to have natural and fluent conversations with customers; while machine learning technology learns financial knowledge through a large amount of historical data. As a result, the financial question-and-answer system can greatly improve overall operational efficiency and customer experience.
[0003] However, large language models still expose some limitations when dealing with problems in the financial field. For example, the model often does not accurately interpret financial terms and complex issues, and has a weak grasp of the context of multiple rounds of dialogue. This leads to users often encountering vague answers and incoherent logic when using financial question-answering systems, which affects users' trust in the system. In addition, most existing large models are general-purpose and lack special optimization and training for financial scenarios, and cannot fully meet users' in-depth needs for professional knowledge. At the same time, existing large models are all based on the corpus during their training and cannot be updated in real time, which means that when faced with rapidly changing fields (such as scientific research, policies and regulations, etc.), the model may not be able to reflect the latest information and dynamics, resulting in outdated or inaccurate answers.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a financial knowledge question-and-answer method and system, and a storage medium, to at least solve the technical problem that the relevant question-and-answer system lacks adaptation to financial field knowledge, resulting in low accuracy when answering financial questions.
[0006] According to one aspect of an embodiment of the present application, a financial knowledge question-answering method is provided, comprising: 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 using a large language model to obtain a field identification result corresponding to the financial question text, wherein the field identification result includes: at least one financial research field involved in the financial question text; for each financial research field, analyzing the financial question vector respectively using multiple target models corresponding to the financial research field in multiple preset models to obtain first answer results 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 field; determining a target answer result of the financial question text based on the second answer results corresponding to each financial research field; wherein the multiple preset models are obtained by fine-tuning different large language models using a pre-constructed financial knowledge database, and the financial knowledge database includes financial knowledge vectors of multiple financial knowledge in multiple financial research fields.
[0007] Optionally, before converting the financial question text input by the target object into a vector form to obtain the financial question vector, the method also includes: obtaining an initial question text input by the target object; using a pre-built financial vocabulary to correct the initial question text to convert erroneous 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.
[0008] Optionally, the financial problem text input by the target object is converted into a vector form to obtain a financial problem vector, including: using a pre-trained text element extraction model to extract elements from the financial problem text to obtain multiple target elements in the financial problem text, wherein the text element extraction model is obtained by iterative training using multiple groups 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 element label includes at least one of the following: financial subject, financial business, time, place, economic indicator; each target element is converted into a corresponding word vector, and the word vectors corresponding to each target element are sequentially spliced according to the order of each target element in the financial problem text to obtain the financial problem vector.
[0009] Optionally, before using multiple target models corresponding to the current financial research field in multiple preset models to analyze the financial problem vector respectively, the method also includes: for each financial research field, obtaining the quality score of each preset model in the financial research field in the multiple preset models, 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 models to process historical financial problem texts in the financial research field; and using the preset model with a quality score higher than a preset threshold value as the target model of the financial research field.
[0010] Optionally, multiple target models corresponding to the current financial research field in multiple preset models are used to analyze the financial question vector respectively, and the first answer results output by each target model are obtained respectively, including: determining the initial input prompt information template corresponding to the financial question vector according to the financial research field; adjusting the initial input prompt information template according to the model characteristics of each target model to obtain the target input prompt information template corresponding to each target model; for each target model, integrating multiple target elements in the financial question text into the target input prompt information template to obtain the input text of the target model; using the target model to extract keyword vectors corresponding to the keywords in the input text, and determining the target financial knowledge vectors whose similarity with each keyword vector is greater than the preset similarity threshold from the financial knowledge database, and using the target financial knowledge vector as the first answer result output by the target model.
[0011] Optionally, multiple first answer results output by multiple target models are fused to obtain a second answer result corresponding to the field of financial research, including: taking the first answer result output by the target model with the highest quality score among the multiple target models as a candidate answer result; determining the common answer content between the remaining answer results excluding the candidate answer results among the multiple first answer results and the candidate answer results, wherein the common answer content is an answer fragment whose text similarity between the remaining answer results excluding the candidate answer results among the multiple first answer results and the candidate answer results is lower than a preset similarity threshold; determining the weight of each remaining answer result based on the quality score of the target model to which each remaining answer result belongs; and based on the weight of each remaining answer result, fusing the other answer content in each remaining answer result excluding the common answer content into the candidate answer result to obtain the second answer result corresponding to the field of financial research.
[0012] Optionally, a target answer result for the financial question text is determined based on the second answer results corresponding to each financial research field, including: when the field identification result includes one financial research field, the second answer result corresponding to the financial research field is used as the target answer result corresponding to the financial question text; when the field identification result includes multiple financial research fields, the dependency relationships corresponding to each financial research field are determined based on a preset financial knowledge graph, and the second answer results corresponding to each financial research field are spliced based on the dependency relationships to obtain the 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 each financial research field as edges.
[0013] Optionally, the training process of each preset model within the multiple preset models includes: obtaining a first model parameter set and a second model parameter set obtained by training a 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 process of the large language model, adjusting each model parameter in the second model parameter set using a financial knowledge database; and determining the model parameters of the preset model based on the first model parameter set and the adjusted second model parameter set.
[0014] According to another aspect of an embodiment of the present application, a financial knowledge question-and-answer system is also provided, including: a semantic parsing module, which is used to convert a financial question text input by a target object into a vector form to obtain a financial question vector; an identification module, which is used to analyze the financial question vector using a pre-trained large language model to obtain a field identification result corresponding to the financial question text, wherein the field identification result includes: the number and type of financial research fields involved in the financial question text; a question-and-answer module, which is used to analyze the financial question vector for each financial research field using multiple target models corresponding to the financial research field in multiple preset models to obtain a first answer result output by each target model; 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; and a determination module, which is used to determine the target answer result of the financial question text based on the second answer result corresponding to each financial research field; wherein the multiple preset models are obtained by fine-tuning different large language models using a pre-constructed financial knowledge database, and the financial knowledge database includes financial knowledge vectors of multiple financial knowledge in multiple financial research fields.
[0015] According to another aspect of an embodiment of the present application, a non-volatile storage medium is also provided, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-mentioned financial knowledge question and answer method by running the computer program.
[0016] In the embodiment of the present application, the financial knowledge question-answering system analyzes the number and type of financial research fields involved in the financial question text input by the target object, and analyzes the financial question text in coordination with multiple models related to each financial research field, thereby obtaining the final answer result of the financial question text, wherein the multiple target models corresponding to each financial research field are obtained by fine-tuning different large language models using the financial knowledge database, so each target model can provide professional answers to relevant questions in the financial field. Through the technical solution of the embodiment of the present application, the intelligent question-answering system can accurately understand the problems in the financial field, and efficiently, accurately and quickly reply to the financial field problems input by the user, thereby solving the technical problem that the relevant question-answering system lacks adaptation to the knowledge in the financial field, resulting in low accuracy when answering financial professional knowledge. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 is a hardware structure block diagram of an optional computer terminal (or mobile device) according to an embodiment of the present application;
[0019] Figure 2 is a flowchart of an optional financial knowledge question-answering method according to an embodiment of the present application;
[0020] Figure 3 is a schematic diagram of the structure of an optional financial knowledge question-answering system according to an embodiment of the present application;
[0021] Figure 4 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0024] In addition, the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. For example, an interface is set up between this system and the relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.
[0025] Example 1
[0026] At present, large language models can understand and generate complex natural language texts by learning from large-scale corpora through deep learning technology. Therefore, when processing unstructured data containing a large amount of knowledge (industry research reports, policy documents, academic articles, news releases, etc.), it can not only handle the diverse problems input by users, but also perform semantic search and information extraction in massive unstructured data to generate high-quality answers. Therefore, large language models are widely used in many fields such as finance, medical care, law, and academic research. Although existing large language models have made significant progress worldwide, there are still some important challenges and limitations in practical applications, as follows:
[0027] (1) Most existing large models are general large models. Therefore, when dealing with professional problems in specific fields, they cannot accurately understand the professional questions raised by users and are prone to semantic understanding deviations, resulting in poor accuracy of the answers to the questions.
[0028] (2) The performance of general-purpose large models is highly dependent on the quality and quantity of training data. Therefore, when dealing with emerging fields or rare languages, general-purpose large models may not be able to generate high-quality answers due to the lack of sufficient data support. In addition, the bias problem of the model is also closely related to the bias of the training data, which may lead to ethical and fairness issues in certain application scenarios.
[0029] (3) Although general large models have a huge knowledge reserve, this knowledge is based on the corpus during its training and cannot be updated in real time. This means that when faced with rapidly changing fields (such as scientific research, policies and regulations, etc.), the model may not be able to reflect the latest information and dynamics, resulting in outdated or inaccurate answers.
[0030] In order to solve the above problems, the embodiments of the present application provide relevant solutions, which are described in detail below. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.
[0031] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 The hardware structure block diagram of a computer terminal (or mobile device) for implementing the financial knowledge question-answering method and the financial knowledge question-answering system is shown. Figure 1 As shown, the computer terminal 10 (or mobile device 10) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: 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 can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0032] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As involved in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0033] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the financial knowledge question and answer method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the financial knowledge question and answer method of the above-mentioned application is realized. The memory 104 may include a high-speed random access memory, and may also include a 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 a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0034] The transmission device 106 is used to receive or send data via a network. The specific example of the above network 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), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0035] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0036] In the above operating environment, Figure 2 is a flowchart of an optional financial knowledge question-answering method according to an embodiment of the present application, such as Figure 2 As shown, the method at least includes steps S202-S208, wherein:
[0037] Step S202: convert the financial question text input by the target object into a vector form to obtain a financial question vector.
[0038] In the technical solution provided in step S202, the financial knowledge question answering system can first obtain the user (ie, the "target object") input content (ie, the financial question text). In order to facilitate subsequent model analysis, the financial question text can be semantically parsed to convert it into a vector form to obtain a financial question vector.
[0039] Step S204: Analyze the financial question vector using the large language model to obtain a domain recognition result corresponding to the financial question text.
[0040] In the technical solution provided in step S204, the financial knowledge question-answering system uses a large language model (such as GPT-3, GPT-4, etc.) to analyze the financial question vector to identify the financial research fields involved in the financial question text and determine the number of financial research fields. Therefore, the above-mentioned field identification results include: at least one financial research field involved in the financial question text. Among them, the above-mentioned financial research fields include: economic finance, industry topics, key customer groups, benchmarking comparisons and other financial research fields, such as: economic forms, blockchain finance, Internet of Things finance, new energy vehicles, big data applications, financial investment, etc.
[0041] Specifically, the above-mentioned identification of the financial research field can be achieved by using a small sample prompt method. The small sample prompt is to add a few-shot (small sample) guide or example in the prompt, and the idea of a small sample has been used to allow the large language model to identify. That is to say, a sample library containing financial problems and field labels in multiple financial research fields is pre-built; then, the financial problems and field labels are arranged in a pre-set prompt template in a specific format (such as Markdown or JSON); when the user enters a financial problem, the example financial problem and example field label related to the financial problem in the sample library are combined with the financial problem to build a corresponding prompt, and the prompt is input as input text to the large language model. The model will analyze the information in the financial problem and the example to identify the financial research field to which the financial problem belongs. In this way, a small number of high-quality examples are used to guide the model to understand specific field problems, which not only reduces the need for large-scale labeled data, but also improves the learning speed and adaptability of the model when dealing with new field problems.
[0042] In addition, when performing identification, a single financial research field can be obtained for simple financial problems, while multiple financial research fields can be obtained for complex financial problems.
[0043] For example, if the input financial problem text is "How to evaluate the investment potential of the new energy vehicle industry and formulate corresponding investment strategies", then by using the large language model to analyze the financial problem vector corresponding to the financial problem text, it can be determined that the financial problem text includes two areas: "new energy vehicles" and "financial investment".
[0044] Step S206: For each financial research field, the financial problem vector is analyzed respectively using multiple target models corresponding to the financial research field in multiple preset models to obtain first answer results output by each target model; the first answer results output by each target model are integrated to obtain a second answer result corresponding to the financial research field.
[0045] In the technical solution provided in step S206, it is considered that the processing of complex financial problems often requires cross-domain expertise and multi-source data support. To this end, the financial knowledge question system can analyze the identified financial research fields in turn as follows: use multiple target models corresponding to the financial research field to analyze the financial problem vector respectively to obtain the first answer result output by each target model. At the same time, considering that each model has its own specific deviations and strengths and weaknesses, a single model may not be able to cover all relevant aspects due to the limitations of the information source, resulting in the first answer result output by each target model being difficult to give a complete answer. To this end, the financial knowledge question system can analyze the identified financial research fields in turn as follows: fuse the first answer results output by each target model to obtain the second answer result corresponding to the financial research field to improve the accuracy and reliability of the answer result.
[0046] Step S208, determining a target answer result for the financial question text according to the second answer results corresponding to each financial research field.
[0047] In the technical solution provided in step S208, the financial knowledge question system can determine the target answer result corresponding to the financial question text from the second answer results corresponding to various financial research fields according to the complexity of the financial question text, so as to improve the comprehensiveness of the answer result.
[0048] Based on the scheme defined in the above steps S202 to S208, it can be learned that, in an embodiment, the financial knowledge question and answer system analyzes the number and types of financial research fields involved in the financial question text input by the target object, and coordinates multiple models related to each financial research field to analyze the financial question text, thereby obtaining the final answer result of the financial question text, wherein the multiple target models corresponding to each financial research field are obtained by fine-tuning different large language models using the financial knowledge database, so each target model can provide professional answers to relevant questions in the financial field.
[0049] It can be seen that through the technical solution of the embodiment of the present application, the intelligent question and answer system can accurately understand financial field issues, and respond to financial field issues input by users efficiently, accurately and quickly, thereby solving the technical problem that the relevant question and answer system lacks adaptation to financial field knowledge, resulting in low accuracy when answering financial professional knowledge.
[0050] The following is a detailed introduction to the financial knowledge question and answer method in steps S202 to S208 of the embodiment of the present application.
[0051] First, the application scenario of the present application is introduced. The application scenario can be specifically a question-and-answer interaction of financial knowledge between a financial customer and an intelligent device (such as an intelligent robot) integrated with a financial knowledge question-and-answer system. In the process of communication between the target object and the intelligent device integrated with the financial knowledge question-and-answer system, the target object can wake up the voice assistant of the financial knowledge question-and-answer system through a "wake-up word" or a touch screen operation. The voice assistant can display the text data corresponding to the voice data on its interface and interact with the target object. Therefore, the intelligent device can collect the voice data of the financial questions raised by the target object. However, since some users have accent problems, their financial question voice data is converted into text data, and there may be conversion errors in the obtained financial question text. For example, when a user asks by voice: "I want to check my account balance", the system may misidentify "account" as other words due to the deviation of voice recognition, resulting in system misunderstanding.
[0052] In addition, during the communication between the target object and the smart device integrated with the financial knowledge question and answer system, the target object can also directly wake up the smart device through touch screen operation, and click the "financial knowledge question and answer text input box" on the visual display screen of the smart device to enter the text of the financial question in text form. However, some users may select the wrong text or misunderstand the financial professional terms when entering the text box for some reason, resulting in errors in the input financial question text. For example: when the user's original intention was to ask "Has the price of gold recently exceeded 1,800 US dollars per ounce?", the question was mistakenly written as "Has the price of gold exceeded 1,800 yuan per pound?" This not only changed the currency unit, but also changed the weight unit, causing the system to be unable to correctly understand the meaning of the question.
[0053] In view of the above two situations, before the financial knowledge question-answering system performs semantic analysis on the financial question text, the question text can also be revised to avoid the situation where the financial question text does not match the user's actual needs due to external factors.
[0054] As an optional implementation, the financial knowledge question and answer system can revise the financial question text by the following method, including: obtaining the initial question text input by the target object; using a pre-built financial vocabulary to correct the initial question text to convert erroneous words in the initial question text into correct financial words to obtain the financial question text.
[0055] The financial word library includes standardized words based on financial knowledge and real financial corpus. Therefore, the financial words included in the financial word library are all verified entities, that is, the meaning and form of each financial word are correct. Therefore, the initial question text obtained (that is, the text data directly input by the user in the visual interface or the user's financial question voice data directly converted into text data) is corrected according to the financial word library to modify the wrong words in the text data into correct financial words.
[0056] Furthermore, the financial knowledge question answering system performs semantic analysis on the corrected financial question text to obtain the corresponding financial question vector, including:
[0057] Step S2021, using the pre-trained text element extraction model to extract elements from the financial problem text, to obtain multiple target elements in the financial problem text.
[0058] Step S2022, converting each target element into a corresponding phrase vector, and sequentially concatenating the phrase vectors corresponding to each target element according to the sequence of each target element in the financial question text to obtain a financial question vector.
[0059] Specifically, the text element extraction model provided in the above step S2021 includes Word2vec as an embedding layer, a nested stacked recurrent neural network, and a conditional random field model as a supervised model of the output layer of the multi-classification task. The training process of the text element extraction model includes:
[0060] Step 1: Divide multiple groups of sample data into training sets and validation sets according to preset ratios.
[0061] The training set includes multiple sets of training sample data, and the training sample data includes the text in the question text set and the element labels in the text, while the validation set includes multiple sets of validation sample data, and the validation sample data uniformly includes the text in the question text set and the element labels in the text. In addition, the types of the element labels include but are not limited to: financial entities (such as "company", "bank", etc.), financial services or products (such as loans, investments, insurance, etc.), time, virtual trading locations or virtual trading markets, and economic indicators.
[0062] Step 2: Use multiple sets of training sample data in the training set to train the pre-built initial model, use the validation set to validate the initial model every preset period, and use multiple sets of validation sample data in the validation set to validate the extraction accuracy of the text element extraction model;
[0063] Step 3: When the extraction accuracy of the text element extraction model is greater than a preset threshold value, the training ends to obtain the text element extraction model.
[0064] Among them, the above preset ratio can be 5:1, the preset period can be 500 iterations, and the extraction accuracy can be 98%. The settings of the above preset ratio, preset period, and extraction accuracy are only used as examples for explanation. They can be set according to actual application scenarios, and this application does not impose specific restrictions on this.
[0065] After using the above-mentioned text element extraction model to extract the target elements in the financial question text, the financial knowledge question answering system can continue to use pre-trained models (such as BERT, Word2Vec) to convert each target element into a corresponding word vector, and superimpose the word vectors corresponding to each target element in sequence according to the order of each target element in the financial question text to obtain the financial question vector corresponding to the financial question text.
[0066] When faced with complex financial problems, the analysis of complex financial problems using only a single model often cannot cover all the complexities of the problem. Therefore, in the embodiment of this application, each financial research field involved in the financial problem text will be analyzed one by one, and a multi-model collaborative approach will be adopted during the analysis process, so that each model can analyze and answer the same problem from multiple angles based on its unique algorithm and training data, thereby providing a comprehensive solution, greatly improving customer satisfaction and the accuracy of problem solving.
[0067] However, since the existing general large model lacks a deep understanding of professional knowledge in a specific financial field, when using the general large model to analyze complex financial problems, its interpretation of financial terms and complex problems is often not accurate enough. To this end, the embodiment of the present application proposes to fine-tune the general large model using the linear residual adjustment (LoRA) technology. The essence of the LoRA mechanism is that it does not touch the main structure and massive parameters of the large-scale pre-trained model, but cleverly introduces a set of small, learnable low-rank matrices, and only fine-tunes the key weights in the model. This approach is equivalent to adding a layer of "knowledge enhancement filter" specifically for the financial field on the basis of the original capabilities of the general large model, which not only avoids the dilution of the original capabilities of the general large model, but also significantly enhances the accuracy and response speed of the general large model when dealing with specific financial problems, while retaining the general capabilities of the model. Therefore, by fine-tuning the general large model through the LoRA mechanism, the general large model can not only better understand and respond to complex financial-related consultations, but also deepen its understanding of the unique terminology, business processes and compliance requirements in the financial field while maintaining the model's ability to respond to a wide range of topics.
[0068] Optionally, the financial knowledge question-answering system can use the pre-built financial knowledge database to fine-tune different large language models to obtain multiple preset models. Since the algorithms and training data used by these preset models are different, they will provide different insights when analyzing the same financial problem, allowing users to compare and select from multiple dimensions.
[0069] The above-mentioned different large language models can be large language models of different manufacturers, different versions and different functions. Each model has its own advantages in natural language processing, data analysis and intelligent recommendation, and can be accurately matched according to the specific needs of users. In addition, the above-mentioned financial knowledge database includes knowledge vectors of multiple knowledge points in multiple financial research fields.
[0070] Specifically, the financial knowledge question-and-answer system can train each preset model according to the following method, including: first, obtaining a first model parameter set and a second model parameter set obtained by training a 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, so the first model parameter set includes most of the model parameters of the large language model, while the second model parameter set includes only a small part of the model parameters of the large language model. Then, during the training process of the large language model, the financial knowledge database is used to adjust each model parameter in the second model parameter set, wherein the financial knowledge database includes: financial knowledge vectors corresponding to multiple financial knowledge under multiple financial research fields; finally, the model parameters of the preset model are determined based on the first model parameter set and the adjusted second model parameter set.
[0071] That is to say, during the fine-tuning process of the large language model, most of its original model parameters are kept unchanged to protect the extensive language understanding and generation capabilities of the original large language model; at the same time, the general large model is iteratively trained using the financial knowledge database to adjust a small part of the model parameters; finally, the first model parameter set and the adjusted second model parameter set are used as model parameters of the preset model to obtain the preset model, so that the preset model not only maintains general language capabilities while acquiring professional knowledge in the financial field, so as to conduct in-depth analysis of financial problems and generate professional answers, thereby demonstrating higher accuracy and professionalism in handling complex financial problems.
[0072] In addition, the above-mentioned financial knowledge database can be pre-constructed by the financial knowledge question and answer system in the following manner: taking "Economic Finance", "Industry Topics", "Key Customer Groups" and "Benchmark Comparison" as first-level directories; subdividing each first-level directory to obtain multiple second-level directories, and subdividing each second-level target into multiple third-level directories (financial research fields), and each third-level directory can include financial knowledge from historical asset allocation cases, market analysis reports, investment strategy guides, etc.
[0073] Taking the above-mentioned "industry topics" as an example, it can be subdivided into multiple secondary directories such as "technology industry", "financial industry", "construction industry", "consumer industry", "medical industry", and "manufacturing industry". The "technology industry" can be further subdivided into "information technology industry", "biotechnology industry", "intelligent technology industry", etc.; the "financial industry" can be further subdivided into "banking", "funds", etc.; the "construction industry" can be further subdivided into "infrastructure construction", "intelligent construction", "assembly construction", etc.; the "consumer industry" can be further subdivided into "culture and entertainment", "food and beverage", "home appliances and digital products", etc.; the "medical industry" can be further subdivided into "medical services", "medical devices", "chemical pharmaceuticals", etc.; the "manufacturing industry" can be further subdivided into "food manufacturing", "automobile manufacturing", "machinery manufacturing", etc.
[0074] The financial knowledge text data related to various financial research fields are systematically collected, organized and structured, and embedding models such as Word2Vec and BERT are introduced to convert various financial knowledge text data into machine-understandable vector forms to obtain a financial knowledge database. In other words, the financial knowledge question-and-answer system integrates multiple vectorization models such as BGE and multilingual-e5-large to independently build and update the business knowledge base to ensure the effective accumulation of business data.
[0075] It should be noted that the financial knowledge database can update the knowledge content regularly or in real time to ensure the timeliness and comprehensiveness of the knowledge content. Among them, regular updates can be to obtain the latest financial knowledge text data from multiple data sources periodically according to a pre-set time, and after pre-processing operations, classify, standardize and convert it into vector form for storage; while real-time updates can directly collect the latest financial knowledge text data when key policies are released or market dynamics change, and after pre-processing operations, classify, standardize and convert it into vector form for storage to ensure the timeliness of the data.
[0076] Furthermore, since the trained preset models have different focuses when analyzing different financial research fields, the model performance capabilities of each preset model in different financial research fields are also different. In order to accurately analyze complex financial problems, the embodiment of the present application needs to determine multiple target models from multiple preset models that best handle relevant problems in each financial research field.
[0077] Optionally, for each financial research field, the financial knowledge question and answer system can determine multiple target models corresponding to the financial research field according to the following method, including: first, obtaining the quality score of each preset model in the financial research field among multiple preset models, wherein the financial research field quality score is used to reflect the satisfaction of multiple users with the historical answer results given by the preset model in processing historical financial question texts in the financial research field; and taking the preset model with a financial research field quality score higher than a preset threshold value as the target model.
[0078] That is to say, the financial knowledge question-answering system feeds back the historical answer results obtained by analyzing the historical financial question texts related to the financial research field input by multiple preset models to the target object, and obtains the satisfaction of each user feedback on the historical answer results output by the preset model, wherein the satisfaction can be quantified by scoring or reflected by text evaluation; finally, the average of the satisfaction of multiple users on the multiple historical answer results output by the preset model is determined as the quality score of the preset model in the financial research field. Since the quality scores of different preset models in different financial research fields are different, the preset model with a quality score higher than the preset threshold value in the financial research field can be used as the target model. In other words, the above model determination scheme is to establish a mechanism using user feedback to dynamically evaluate and select models through quality scores, thereby ensuring that the model can continue to provide high-level services in the ever-changing financial environment, and over time, the system can adjust the threshold value according to the user's new feedback and the performance of the model, further optimize the model selection strategy, and improve the overall level of intelligence of financial research and decision support.
[0079] For example, in the field of risk management, after processing 100 risk management issues, model A obtained an average user satisfaction score of 4.2; model B processed 80 issues with an average score of 4.5; model C processed 120 issues with an average score of 3.8. The preset model with a quality score higher than 4.0 can be used as the target model in the field of risk management.
[0080] Furthermore, after determining the various target models related to the financial research field, the financial knowledge question answering system can answer the financial question text in the following ways, including:
[0081] Step S2061, determining an initial input prompt information template corresponding to the financial problem vector according to the financial research field.
[0082] In the technical solution provided in the above step S2061, since the keywords involved in different financial research fields are different, the financial knowledge question and answer system can select a predefined prompt information template based on the identified financial research field, and the template usually includes field-related guide words and question structures, aiming to help the model focus on specific financial field knowledge.
[0083] Step S2062: adjusting the initial input prompt information template according to the model characteristics of each target model to obtain a target input prompt information template corresponding to each target model.
[0084] In the technical solution provided in the above step S2062, considering that different models have different architectures, preferences and advantages, the financial knowledge question-and-answer system can adjust the initial prompt information template according to the model characteristics of each target model to adapt to the characteristics of each target model. Among them, the content of the adjustment may include but is not limited to: adjusting the length, complexity, structure and vocabulary selection of the prompt. This not only clearly indicates the content that the model needs to pay attention to, but also provides sufficient context so that the model can generate more accurate and professional answers. For example, for a more detail-oriented model, it may be necessary to add more specific background information to the prompt; for a model that is better at generalization, more abstract and open prompts may be used.
[0085] Step S2063, for each target model, 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 target model is used to extract the keyword vector corresponding to the keyword in the input text, and the target financial knowledge vector whose similarity with each keyword vector 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.
[0086] In other words, the financial knowledge question-and-answer system uses technologies such as intent recognition, semantic retrieval, and prompt engineering to independently develop a large model plug-in framework, breaking down the data, process, and institutional barriers between systems, and reshaping the system process and user experience.
[0087] It should be noted that the financial knowledge question and answer system can feed back the first answer results output by each target model related to the financial research field to the target object, and obtain the target object's satisfaction with each first answer result; use the satisfaction level of the first answer results output by each target model to adjust the quality score of the target model in the financial research field, so as to ensure that the answer results generated subsequently using the target model are closer to user needs.
[0088] For example, the target object inputs a financial question: "Based on the current market environment, the client's investment goal is steady growth, the risk tolerance is medium, and the investment period is 5 years. How should assets be allocated?" At this time, the system first identifies that the problem belongs to the field of asset allocation optimization, and then generates an initial prompt based on the prompt information template corresponding to this field: "Please provide a recommended asset allocation plan based on the macro environment of the market, considering the client's specific goals, risk preferences and time frame"; then, using the model characteristics of the target model related to the field of asset allocation optimization (different target model preferences have different prompt types or prompt structures), the above initial prompts are adjusted, such as a search-based model More specific key information may be required, while another generation-based model may require a coherent narrative prompt; then, the target elements in the question (such as "steady growth", "medium risk", "5-year investment period", "current market environment") are integrated into the adjusted target prompt to obtain the model input text; finally, the system uses the target model to extract keywords (such as "steady growth", "medium risk", etc.) from the constructed input text and convert them into keyword vectors, and then searches the financial knowledge database for target financial knowledge vectors whose similarity with these keyword vectors is greater than a preset threshold, so as to use the target financial knowledge vector as the first answer result output by the target model.
[0089] After obtaining the first answer result corresponding to the above financial question text, the financial knowledge question answering system can also fuse the first answer results output by multiple target models belonging to the same financial research field according to the following method, including:
[0090] Step S2064: The first answer result output by the target model with the highest quality score among the multiple target models is used as the candidate answer result.
[0091] Step S2065, determining the common answer content between the remaining answer results excluding the candidate answer results in the multiple first answer results and the candidate answer results. The common answer content is the answer fragments whose text similarity between the remaining answer results excluding the candidate answer results in the multiple first answer results and the candidate answer results is lower than a preset similarity threshold;
[0092] 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.
[0093] Step S2067, based on the weights of the remaining answer results, other answer contents in the remaining answer results except for the common answer content are integrated into the candidate answer results to obtain a second answer result corresponding to the financial research field.
[0094] In the above fusion process, the system uses the first answer output by the model with the highest quality score as the candidate answer result to ensure the basic correctness and professionalism; then, considering that different target models may have different focuses when dealing with the same problem, the model with higher quality score is given a higher weight according to the performance of the model in a specific financial research field, so as to ensure that the fusion process tends to adopt the output of models that are more likely to answer accurately and professionally. At the same time, according to the weight of each remaining answer result, the other answer content (i.e., non-repetitive and uncommon answer fragments) in each remaining answer result except the common answer content is fused into the candidate answer result, avoiding redundant information in the answer, and supplementing different perspectives and details to meet diverse needs more flexibly. Compared with simply merging the answer results output by all models, the above fusion method emphasizes the complementarity between models, and only merges the unique content fragments in each remaining answer result according to their weights, achieving accurate fusion of content, while removing duplicate information, so as to better integrate the views and information of different models and provide a more comprehensive, less redundant and more accurate answer result.
[0095] Finally, the financial knowledge question answering system can determine the target answer result corresponding to the financial question text based on the number of financial research fields involved in the financial question text and the second answer results corresponding to each financial research field, that is:
[0096] When the domain identification result includes a financial research domain, the second answer result corresponding to the financial research domain is directly used as the target answer result corresponding to the financial question text.
[0097] When the field identification results include multiple financial research fields, the dependency relationships corresponding to each financial research field are determined based on the preset financial knowledge graph, and the second answer results corresponding to each financial research field are spliced based on the dependency relationships to obtain the target answer result corresponding to the financial question text.
[0098] In view of the above-mentioned situation of multiple financial research fields, the financial knowledge question-answering system needs to effectively stitch together the second answer results of multiple research fields in a logically coherent manner to provide a comprehensive and integrated analysis perspective. In the splicing process, the natural order of the associations between the various financial research fields reflected in the financial knowledge graph can be followed to splice the second answer results corresponding to each financial research field, thereby improving the readability and ease of understanding of the answers, allowing users to more easily follow up and understand the analysis process of complex financial problems. In other words, when faced with logically complex multi-step task scenarios, the financial knowledge question-answering system can flexibly assemble multiple knowledge nodes, provide a stable output structure, and support the execution of repetitive tasks.
[0099] The above financial knowledge graph is constructed with multiple financial research fields as graph nodes and the dependency relationships between various financial research fields as edges. The dependency relationships include but are not limited to:
[0100] (1) Causation: Changes in one area directly lead to changes in another area. For example, policy adjustments (such as interest rate changes) may directly affect the performance of financial markets (such as stock prices and bond yields).
[0101] (2) Influence-affected relationship: One area has a significant impact on another area, but may not directly lead to change. For example, the financial health of a company (one of the research areas) may be affected by industry trends, which in turn affects the company's market performance and investment value.
[0102] (3) Mutually complementary relationship: Two or more fields complement each other when analyzing a specific problem and together form a complete analytical framework. For example, when analyzing the real estate market, it may be necessary to consider information from multiple fields such as demography, monetary policy, and local economic development at the same time.
[0103] (4) Pre- and post-processing relationships: When dealing with complex issues, analysis in one area may be the basis for analysis in another area. For example, before formulating a financial risk management strategy, it may be necessary to conduct an economic analysis to understand the broader economic environment.
[0104] (5) Parallel relationships: When analyzing a problem, multiple areas can be considered in parallel. They are independent but work together to solve the problem. For example, when assessing the credit risk of a multinational company, it may be necessary to consider areas such as international financial markets and the company's financial status at the same time.
[0105] Therefore, by combining the above-mentioned financial knowledge graph, the dependencies between different financial research fields can be accurately identified, so as to splice the second answer results of multiple research fields and generate a comprehensive, accurate and integrated answer to financial questions.
[0106] It should be noted that the degree of dependency between various fields in the above-mentioned financial knowledge graph can be expressed by the "edge weight", and the size of the weight can be defined based on factors such as data support (i.e., determined according to the number of instances of association between two fields in historical data. If a large amount of data shows that there is a significant correlation between the two fields in many cases, then the edge weight can be set higher), expert evaluation (i.e., experts or analysts in the financial field can evaluate the dependency between fields based on their experience and domain knowledge, and assign weights to the corresponding edges), and user feedback (by collecting feedback from users when using the system, it can be understood which associations between fields are more concerned by users, so as to adjust the weights of the corresponding edges). In addition, the construction and optimization of the above-mentioned financial knowledge graph is a continuous iterative process, and it is necessary to regularly adjust the dependency between various fields and the edge weights according to the latest market trends, user needs and expert opinions, so as to maintain the timeliness and effectiveness of the financial knowledge graph.
[0107] Optionally, when feeding back the target answer result of the financial question text to the target object, the reference connection, analysis process and reasons corresponding to the knowledge source of the answer content can be fed back to the target object to enhance the user's trust in the answer result and improve the transparency and explainability of the system.
[0108] Therefore, based on the process orchestration capabilities of the big model, the financial knowledge question and answer system deeply integrates multiple services such as plug-in calls (i.e., using a preset model as a plug-in), text parsing, knowledge base entry, and big models, and develops a process-based, intelligent, and efficient AI Agent capability. Relying on mainstream open source big model technology, AI Agent can think and act autonomously, and deeply integrate with the financial knowledge database. It has the ability to understand user intentions, task planning and decomposition, and thus complete a variety of business tasks. At the same time, AI Agent can also inherit and expand existing banking business capabilities, promote the precipitation and improvement of basic skills and business skills, thereby improving the efficiency of big model service development and making the functional development of financial business platforms more agile. In addition, the financial knowledge question and answer system can manage the connected big models in an all-round way through the model management function, including model monitoring, log management, permission management, and computing power optimization.
[0109] In addition, by interacting with the financial knowledge question and answer system through dialogue, users can not only use the basic functions of the financial knowledge question and answer system, such as copywriting, code generation, knowledge question and answer, but also perform RPA (robotic process automation) tasks, query corporate information and call system functions, greatly expanding the application scope of the big model.
[0110] Therefore, the financial knowledge question-answering method provided in the embodiment of the present application has the following advantages over the existing question-answering method:
[0111] (1) By storing a large amount of financial knowledge in the database and updating the financial knowledge database and financial knowledge graph in real time, the efficiency and systematicness of financial knowledge management are improved;
[0112] (2) Use the real-time updated financial knowledge database to fine-tune the general large model, so as to significantly improve the performance of the model in specific financial scenarios without significantly increasing the consumption of computing resources. This allows the adjusted model to provide intelligent answers to financial questions, greatly improving the professionalism and pertinence of the answers generated by the model to financial questions.
[0113] (3) Perform domain identification for financial problems and analyze them from multiple models corresponding to the various financial research fields involved in the financial problems, obtain multiple answers from different perspectives, and intelligently integrate multiple answers from the same perspective to ensure the correctness and professionalism of the answers in a single financial research field. At the same time, different perspectives and details are added, so that the answers in a single financial research field contain more extensive information and answer users' questions from multiple perspectives.
[0114] (4) The answers from different perspectives are spliced together based on the dependencies between various financial research fields, so that the answers from different fields can be spliced together in a logically coherent manner, which improves the readability and ease of understanding of the answers, allowing users to more easily follow and understand the analysis process of complex financial problems.
[0115] Example 2
[0116] Based on Embodiment 1 of the present application, an embodiment of a financial knowledge question-answering system is also provided, and the financial knowledge question-answering method of the above embodiment is executed when the system is running. Figure 3 is a schematic diagram of the structure of an optional financial knowledge question-answering system according to an embodiment of the present application, such as Figure 3 As shown, the financial knowledge question-answering system at least includes a semantic parsing module 32, a recognition module 34, a question-answering module 36 and a determination module 38, wherein:
[0117] A semantic analysis module 32, used to convert the financial question text input by the target object into a vector form to obtain a financial question vector;
[0118] The recognition module 34 is used to analyze the financial question vector using the 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;
[0119] The question-answering module 36 is used to analyze the financial question vectors for each financial research field using multiple target models corresponding to the financial research field in multiple preset models to obtain first answer results output by each target model; 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;
[0120] A determination module 38, for determining a target answer result of the financial question text according to the second answer results corresponding to each financial research field;
[0121] Among them, multiple preset models are 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.
[0122] It should be noted that the various modules in the above-mentioned financial knowledge question and answer system can be program modules (for example, a set of program instructions that implement a certain specific function) or hardware modules. For the latter, it can be expressed in the following forms, but is not limited to this: the expression form of each of the above-mentioned modules is a processor, or the functions of each of the above-mentioned modules are implemented by a processor.
[0123] Example 3
[0124] According to an embodiment of the present application, a non-volatile storage medium is also provided, in which a program is stored, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the financial knowledge question and answer method in Example 1.
[0125] Optionally, the device where the non-volatile storage medium is located implements the following steps by running the program: converting the financial question text input by the target object into a vector form to obtain a financial question vector; using a large language model to analyze the financial question vector 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 financial research field, using multiple target models corresponding to the financial research field in multiple preset models to analyze the financial question vector respectively, and obtain first answer results output by each target model respectively; fusing the first answer results output by each target model to obtain a second answer result corresponding to the financial research field; determining the target answer result of the financial question text based on the second answer results corresponding to each financial research field; wherein the multiple preset models are obtained by fine-tuning different large language models using a pre-constructed financial knowledge database, and the financial knowledge database includes financial knowledge vectors of multiple financial knowledge in multiple financial research fields.
[0126] According to an embodiment of the present application, a computer program product is also provided, which includes a stored computer program, wherein when the computer program is executed by a processor, the financial knowledge question and answer method in Example 1 is implemented.
[0127] Optionally, the computer program executes the following steps: converting the financial question text input by the target object into a vector form to obtain a financial question vector; using a large language model to analyze the financial question vector to obtain a field identification result corresponding to the financial question text, wherein the field identification result includes: at least one financial research field involved in the financial question text; for each financial research field, using multiple target models corresponding to the financial research field in multiple preset models to analyze the financial question vector respectively, and obtain first answer results output by each target model respectively; fusing the first answer results output by each target model to obtain a second answer result corresponding to the financial research field; determining the target answer result of the financial question text based on the second answer results corresponding to each financial research field; wherein the multiple preset models are obtained by fine-tuning different large language models using a pre-constructed financial knowledge database, and the financial knowledge database includes financial knowledge vectors of multiple financial knowledge in multiple financial research fields.
[0128] According to an embodiment of the present application, a processor is also provided, which is used to run a program, wherein the financial knowledge question and answer method in Example 1 is executed when the program is running.
[0129] Optionally, the following steps are executed when the program is run: converting the financial question text input by the target object into a vector form to obtain a financial question vector; using a large language model to analyze the financial question vector 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 financial research field, using multiple target models corresponding to the financial research field in multiple preset models to analyze the financial question vector respectively, and obtain first answer results output by each target model respectively; fusing the first answer results output by each target model to obtain a second answer result corresponding to the financial research field; determining the target answer result of the financial question text based on the second answer results corresponding to each financial research field; wherein the multiple preset models are obtained by fine-tuning different large language models using a pre-constructed financial knowledge database, and the financial knowledge database includes financial knowledge vectors of multiple financial knowledge in multiple financial research fields.
[0130] According to an embodiment of the present application, an electronic device is also provided, wherein: Figure 4 is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application, such as Figure 4As shown, the electronic device includes one or more processors; a memory for storing one or more programs, which, when the one or more programs are executed by the one or more processors, enables the one or more processors to run the programs, wherein the programs are configured to execute the financial knowledge question and answer method in the above-mentioned embodiment 1 when running.
[0131] Optionally, the processor is configured to execute the following steps through a computer program: converting the financial question text input by the target object into a vector form to obtain a financial question vector; using a large language model to analyze the financial question vector to obtain a field identification result corresponding to the financial question text, wherein the field identification result includes: at least one financial research field involved in the financial question text; for each financial research field, using multiple target models corresponding to the financial research field in multiple preset models to analyze the financial question vector respectively, and obtain first answer results output by each target model respectively; fusing the first answer results output by each target model to obtain a second answer result corresponding to the financial research field; determining the target answer result of the financial question text based on the second answer results corresponding to each financial research field; wherein the multiple preset models are obtained by fine-tuning different large language models using a pre-constructed financial knowledge database, and the financial knowledge database includes financial knowledge vectors of multiple financial knowledge in multiple financial research fields.
[0132] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0133] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0134] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0135] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0136] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0137] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the relevant technology or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0138] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A financial knowledge question-answering method, characterized in that: include: 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. 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 includes: 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. The method according to claim 1, characterized in that The financial problem text input by the target object is converted into a vector form to obtain a financial problem vector, including: 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. The method according to claim 1, characterized in that: Before analyzing the financial problem vectors respectively using a plurality of target models corresponding to the current financial research field in a plurality of preset models, the method further includes: 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. The method according to claim 4, characterized in that The financial problem vector is analyzed respectively using multiple target models corresponding to the current financial research field in multiple preset models to obtain first answer results output by each target model, 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. The method according to claim 5, characterized in that The multiple first answer results output by the multiple target models are fused to obtain a second answer result corresponding to the financial research field, including: 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. 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 includes: 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. The method according to claim 1, characterized in that: The training process of each preset model in the plurality of preset models includes: 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. A financial knowledge question-answering system, characterized in that: include: 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, configured to determine 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.
10. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, wherein the 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.
Citation Information
Patent Citations
Automatic response evaluation method and device
CN115221306A
Question and answer processing method, device and equipment based on artificial intelligence and storage medium
CN117149982A
Policy question and answer method and system based on large language model and knowledge graph technology
CN117725170A
Financial knowledge intelligent question and answer method and system, terminal equipment and storage medium
CN117875292A
System and method for domain adaptation in question answering
US20120077178A1
Cited By
Security compliance-oriented intelligent question and answer implementation method and device
CN119782491A
Intelligent Question Answering Implementation Method and Device for Securities Compliance
CN119782491B
Automatic content generation method, computer equipment, medium and system
CN120297241A