Method for processing financial question and answer text and related product
By converting financial question-and-answer text into formal knowledge representations and processing them with an inference engine, the problem of high computational cost and resource consumption of large language models in the financial field is solved, achieving more efficient and accurate financial calculations and meeting the needs of the digital finance field.
Patent Information
- Application Number
- CN202410919060.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2026-01-13
AI Technical Summary
Large language models are computationally expensive and resource-intensive in the financial field, making it difficult to perform accurate financial calculations, especially in tasks such as portfolio management, risk management, and financial derivatives pricing, where they are prone to calculation errors and inaccuracies.
Financial question-and-answer texts are transformed into formalized knowledge representations and processed using an inference engine. Financial computation is then performed by combining a large language model with the inference engine.
It improves the accuracy and efficiency of financial calculations, enhances the breadth and reliability of artificial intelligence systems in the financial field, and provides more reliable and accurate financial information and decision support.
Smart Images

Figure CN121327064A_ABST
Abstract
Description
Technical Field
[0001] This application generally relates to the field of artificial intelligence technology. More specifically, this application relates to a method for processing financial question-and-answer text, as well as an electronic device and a computer-readable storage medium for performing the aforementioned method. Background Technology
[0002] In recent years, large language models have made significant progress in the field of artificial intelligence. With continuous development and improvement, their performance on various tasks has become increasingly outstanding. These large language models learn from massive amounts of data, acquiring and utilizing this knowledge for reasoning and decision-making. They are capable of performing diverse tasks such as language generation and image recognition, demonstrating remarkable performance. Their high-dimensional abstract representations and powerful generalization capabilities make them important tools in the field of artificial intelligence. However, these large language models still have limitations when dealing with tasks requiring precise computation. Due to their large number of parameters and complex network structures, these models are computationally expensive and resource-intensive, which is particularly evident in resource-constrained environments. Especially in the financial sector, precise numerical computation is crucial. Financial tasks such as portfolio management, risk management, and financial derivatives pricing not only require models to understand complex economic contexts but also necessitate extensive mathematical and statistical calculations. In this process, large language models are prone to computational errors and inaccuracies.
[0003] In view of this, there is an urgent need to provide a solution for processing financial question-and-answer texts so as to enable accurate calculations of complex issues in the financial field. Summary of the Invention
[0004] In order to at least address one or more of the technical problems mentioned above, this application proposes a scheme for processing financial question-and-answer text in several aspects.
[0005] In a first aspect, this application provides a method for processing financial question-and-answer text, comprising: acquiring financial question-and-answer text to be processed; converting the financial question-and-answer text into a formal knowledge representation; and processing the formal knowledge representation based on a reasoning engine associated with the financial question-and-answer text to obtain the answer to the financial question-and-answer text.
[0006] In some embodiments, converting the financial question-and-answer text into a formal knowledge representation includes: performing a formal transformation process on the financial question-and-answer text using a large language model to obtain the formal knowledge representation.
[0007] In some embodiments, using a large language model to perform formal transformation processing on the financial question-and-answer text includes: using prompt words to guide the large language model to perform formal transformation processing on the financial question-and-answer text according to pre-set ontology and semantic rules.
[0008] In some embodiments, processing the formal knowledge representation based on an inference engine associated with the financial question-and-answer text includes: obtaining target data related to the formal knowledge representation from a target database; and performing calculations on the formal knowledge representation and the target data based on the inference engine.
[0009] In some embodiments, the formal knowledge representation includes premises and conclusions, wherein both the premises and the conclusions include several knowledge equations, wherein each knowledge equation is constructed by an operator and an equation consisting of an operator and concepts that are input and output variables of the operator.
[0010] In some embodiments, obtaining target data related to the formalized knowledge representation from the target database includes: extracting the required retrieval information from the premises of the formalized knowledge representation; and using the retrieval information to obtain the target data from the target database.
[0011] In some embodiments, calculating the formal knowledge representation and the target data based on the inference engine includes: determining the data required for the premises in the formal knowledge representation based on the target data; and calculating the value required for the conclusion in the formal knowledge representation based on the data required for the premises in the formal knowledge representation.
[0012] In some embodiments, the method further includes: in response to the failure to obtain the target data from the target database, outputting an alarm prompt based on the inference engine.
[0013] In a second aspect, this disclosure provides an electronic device comprising: a processor; and a memory having stored computer program instructions thereon for processing financial question-and-answer text, wherein when the computer program instructions are executed by the processor, any of the methods described in the first aspect of this disclosure are implemented.
[0014] In a third aspect, this disclosure provides a computer-readable storage medium including computer program instructions for processing financial question-and-answer text, which, when executed by a processor, cause any of the methods described in the first aspect of this disclosure to be implemented.
[0015] Through the method and related products for processing financial question-and-answer text provided above, embodiments of this application convert financial question-and-answer text into formalized knowledge representations and then process these formalized knowledge representations using an inference engine to obtain responses to the financial question-and-answer text. Thus, by introducing an inference engine to better adapt to various financial computing scenarios, reliable financial computing is provided, overcoming the computational challenges faced by artificial intelligence in the financial field, thereby providing users with more reliable and accurate financial information and decision support. Furthermore, in some embodiments, a large language model is used to convert financial question-and-answer text into formalized knowledge representations, and the inference engine is further used to process these formalized knowledge representations. This combination of the large language model and the inference engine provides a more accurate and efficient financial computing solution, addressing the shortcomings of large language models in financial computing and meeting the growing needs of the digital finance sector. In this way, the disclosed solution not only improves the accuracy and efficiency of computation but also enhances the breadth and reliability of artificial intelligence systems in the financial field. Attached Figure Description
[0016] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of this application are illustrated by way of example and not limitation, and the same or corresponding reference numerals denote the same or corresponding parts, wherein:
[0017] Figure 1 The following is a flowchart illustrating a method for processing financial question-and-answer text according to some embodiments of this application;
[0018] Figure 2 The following are flowchart examples illustrating methods for processing financial question-and-answer text according to other embodiments of this application;
[0019] Figure 3 Flowcharts illustrating methods for processing financial question-and-answer text according to further embodiments of this application are shown; and
[0020] Figure 4 A schematic block diagram of an electronic device according to some embodiments of this application is shown. Detailed Implementation
[0021] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0022] It should be understood that the terms "comprising" and "including" used in the specification and claims of this application indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0023] It should also be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application. As used in this specification and claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this specification and claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations.
[0024] As used in this specification and claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."
[0025] Exemplary application scenarios
[0026] In the financial field, digital computing is indispensable. Tasks such as portfolio management, risk management, and pricing of financial derivatives require extensive digital computation. For example, calculating portfolio returns based on historical data or assessing the risk level of a financial instrument using a risk model necessitates complex calculations on large amounts of data. While large language models excel in natural language processing, they have limitations in handling question-answering tasks involving precise calculations. Specifically, when dealing with complex financial calculation problems, large language models may struggle to provide highly accurate and efficient answers, especially for problems requiring a deep understanding of the underlying meaning of financial data and calculating unknown data based on existing data in a database. For instance, suppose a database only contains two indicators: "net profit" and "operating revenue," but not "net profit margin." The system receives the question "What is the net profit margin?" It needs to first retrieve the corresponding "net profit" and "operating revenue," and then determine the "net profit margin" based on their ratio. In this process, large language models are prone to calculation errors.
[0027] To address the problems in the aforementioned scenarios, the inventors proposed a solution for processing financial question-and-answer text. This involves converting the financial question-and-answer text into a formalized knowledge representation, and then processing this formalized knowledge representation using an inference engine to obtain the responses to the financial question-and-answer text. By introducing an inference engine, this approach better adapts to various financial computing scenarios, providing reliable financial computation and overcoming the computational challenges faced by artificial intelligence in the financial field. Ultimately, it enables the provision of more reliable and accurate financial information and decision support to users.
[0028] The specific embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0029] Figure 1 The following is a flowchart illustrating a method 100 for processing financial question-and-answer text according to some embodiments of this application.
[0030] like Figure 1 As shown, in step S101, the text of the financial Q&A to be processed can be obtained. In practical applications, the text of the financial Q&A can be obtained in various ways. For example, when a user has a question or answer requirement in the financial field, they can upload financial Q&A information through voice input, text input, or other human-computer interaction methods, and the text of the financial Q&A can be determined based on the information uploaded by the user. If the financial Q&A information is in non-text form, such as voice, speech recognition technology can be used to convert the financial Q&A information into text form to obtain the financial Q&A text. If the financial Q&A information is in text form, it can be directly used as the financial Q&A text, or it can be obtained after formatting adjustments. It should be noted that the description of the specific process of obtaining the financial Q&A text here is only an illustrative example, and the solution disclosed herein is not limited to this; it can be set and adjusted according to the application scenario.
[0031] In step S102, the financial question-and-answer text can be converted into a formalized knowledge representation. An inference engine is a technique that employs symbolic reasoning. By establishing precise mathematical models, it achieves accurate calculations, giving it a natural advantage in handling complex computational problems in the financial field. Since financial question-and-answer text cannot be directly received and understood by the inference engine, it is necessary to convert it into a formalized knowledge representation that the inference engine can understand, enabling it to process it effectively.
[0032] In some embodiments, the formal transformation of financial question-and-answer text can be achieved in various ways. For example, a prompt-guided large language model can be used to transform financial question-and-answer text into a formalized knowledge representation. Alternatively, some commonly used deep learning models can be pre-trained to enable them to transform text into formalized knowledge representations. It should be noted that the description of the formal transformation of financial question-and-answer text here is merely illustrative, and the disclosed solution is not limited thereto.
[0033] In step S103, the formal knowledge representation can be processed based on the reasoning engine related to the financial question-and-answer text to obtain the answer to the financial question-and-answer text.
[0034] By transforming financial question-and-answer text into a formalized knowledge representation and processing this formalized knowledge representation using an inference engine, responses to the financial question-and-answer text can be obtained. Thus, by introducing an inference engine, it better adapts to various financial computing scenarios, provides reliable financial computation, overcomes the computational challenges faced by artificial intelligence in the financial field, and ultimately provides users with more reliable and accurate financial information and decision support.
[0035] Figure 2 A flowchart illustrating a method 200 for processing financial question-and-answer text according to other embodiments of this application is shown. It should be noted that... Figure 2 Method 200 can be understood as a further extension or supplement to Method 100. Therefore, in conjunction with the preceding text... Figure 1 The relevant descriptions also apply to the following text.
[0036] like Figure 2 As shown, in step S201, the financial Q&A text to be processed can be obtained. As mentioned above, financial Q&A information entered by the user through text input or other interactive forms can be obtained, and the financial Q&A text can be determined based on this information. The financial Q&A information can be a single question related to the financial field or a dialogue fragment in an AI dialogue scenario. It should be noted that the description of financial Q&A information and financial Q&A text here is only illustrative, and the disclosed solution does not limit the specific content or acquisition method of the financial Q&A information and financial Q&A text. For example, the financial Q&A information and financial Q&A text may contain content requiring mathematical calculations.
[0037] In step S202, a large language model can be used to perform formal transformation processing on the aforementioned financial question-and-answer text to obtain a formalized knowledge representation. In this example, any general-purpose large language model can be used; the disclosed solution does not limit the specific type of large language model. In practical applications, the formal transformation processing of financial question-and-answer text can be achieved through a combination of prompt words and a large language model. Alternatively, some general-purpose large language models can be pre-trained to enable them to transform financial question-and-answer text into a formalized knowledge representation.
[0038] Preferably, prompt words can be used to guide a large language model to perform formal transformation processing on financial question-and-answer text according to pre-defined ontology and semantic rules. To achieve formalization of the question-and-answer text, it is necessary to rely on pre-established ontology and semantic rules. An ontology typically consists of operators and concepts. Operators are used to perform calculations between concepts; each operator can be a function (e.g., addition, subtraction, multiplication, division, or more complex logical or statistical functions), while concepts serve as the input and output variables of the operators. The input and output of an operator can both be several concepts from a concept set. Through calculations using operators and concepts, new concepts can be obtained. A concept is a set composed of different instances, and formalized knowledge representation includes two parts: premises and conclusions. Premises and conclusions consist of several knowledge equations, each of which is an equation composed of concepts and operators. From a premise of a knowledge, the conclusion of that knowledge can be derived.
[0039] As an example, suppose the financial question-and-answer text is "What is the net profit margin of Company X in year Y?", and its corresponding formal knowledge representation is "Cal_NetProfitMargin(Company:X, Year:Y, Value)". Here, "Cal_NetProfitMargin" is the operator, while "Company" and "Year" are concepts, and "X" and "Y" are concrete instances of "Company" and "Year". This formal transformation process can be achieved by using prompt words to guide a large language model to process the financial question-and-answer text based on pre-constructed ontology and semantic rules.
[0040] After obtaining the formalized knowledge representation, in step S203, target data related to the formalized knowledge representation can be retrieved from the target database. In this example, the target database may include a database storing financial data information; the financial data information in the database can be stored in any form, and there are no restrictions here.
[0041] As mentioned earlier, formal knowledge representation can include premises and conclusions, each of which comprises several knowledge equations. Each knowledge equation is constructed from an operator and an equation consisting of the concepts of input and output variables of the operator. In some embodiments, the required retrieval information can be extracted from the premises of the aforementioned formal knowledge representation. For example, retrieval information such as functions and variables can be extracted from the premises of the formal knowledge representation. Then, the retrieval information is used to obtain target data from the target database. For example, if the data in the target database is stored in tabular form, the retrieval information can be used to perform a query operation to match the table headers in the database, thereby retrieving the required data as the target data.
[0042] Furthermore, in some embodiments, if the required target data cannot be obtained from the target database, an alarm prompt can be output based on the inference engine. For example, the inference engine can directly provide prompts such as "target data is empty" or "calculation cannot be performed," or it can be combined with voice or other forms of alarm prompts to enable users to obtain relevant information in a timely manner.
[0043] In step S204, the formal knowledge representation and the target data can be computed based on the inference engine. In some embodiments, the data required for the premises in the formal knowledge representation can be determined based on the target data, and the value of the solution required for the conclusion in the formal knowledge representation can be calculated based on the data required for the premises in the formal knowledge representation.
[0044] As an example, suppose the financial question-and-answer text is "What is the net profit margin of Company X in year Y?", and its corresponding formal knowledge expression is "Cal_NetProfitMargin(Company:X, Year:Y, Value)". The inference engine will pre-construct knowledge about net profit margin, such as "Cal_NetProfitMargin(Company:X, Year:Y, Value): Cal_NetProfit(Company:X, Year:Y, V1); Cal_OperatingRevenue(Company:X, Year:Y, V2); Value = V1 / V2". In this formal knowledge expression, "Cal_NetProfitMargin(Company:X, Year:Y, Value)" represents the "conclusion" of this knowledge, and "Cal_NetProfit(Company:X, Year:Y, V1)" and "Cal_OperatingRevenue(Company:X, Year:Y, V2)" represent "net profit" and "operating revenue" respectively, which are the premises of this knowledge. Once the data required for the "prerequisites" (such as "net profit" V1 and "operating revenue" V2) is obtained from the target database, the Value (net profit margin) in the "conclusion" can be calculated by the ratio of the two.
[0045] Therefore, by utilizing a large language model to transform financial question-and-answer text into a formal knowledge representation, and then combining it with an inference engine to further process the formal knowledge representation, a more accurate and efficient financial computing solution can be provided by combining the large language model and the inference engine. This addresses the shortcomings of the large language model in financial computing and meets the growing needs of the digital finance sector.
[0046] Figure 3 A flowchart illustrating a method 300 for processing financial question-and-answer text, according to some embodiments of this application, is shown. It should be noted that... Figure 3 Method 300 in the text can be understood as a specific technical implementation of method 100 or method 200. Therefore, in conjunction with the preceding text... Figure 1 and Figure 2 The relevant descriptions also apply to the following text.
[0047] like Figure 3As shown, in step S301, the user can input financial Q&A text. For example, the user can input "What is the net profit margin of Company X in year Y?" through text input, voice input, or other interactive methods. If the user inputs financial Q&A information through voice, images, or other non-text methods, relevant speech recognition or image recognition technologies can be used to convert the speech or image financial Q&A information into text form.
[0048] In step S302, a large language model can be used to transform the financial question-and-answer text into a formalized knowledge representation. For example,
[0049] As an example, a large language model combined with prompt words can be used to transform financial question-and-answer text into a formal format. For instance, a user's financial question can be obtained, and this question can be filled into a preset prompt word template to obtain target prompt words. Then, the target prompt words guide the large language model to generate a formalized knowledge representation. The preset prompt word template is used to convert the user's natural language question into a format that the large language model can understand. This preset prompt word template has a series of pre-set fill-in items based on different types of query questions. Users can use these fill-in items to input specific query content, thus forming a complete query command. Of course, it is also possible to identify and extract key information from the user's input question, such as company name, time, and financial indicators, to convert the natural language question into a format that the large language model can process. Target prompt words not only serve as part of the query but also help the large language model focus on specific computational or query tasks. For example, when processing the question "What is the net profit margin of Company X in year Y?", the preset prompt word template can be used to locate key concepts such as "Company X," "year Y," and "net profit margin," and then fill them into the template. In one embodiment, when the input is a financial question such as "What is the net profit margin of Company X in year Y?", combined with relevant prompt words, the large language model will output a formalized knowledge representation of "Cal_NetProfitMargin(Company:X, Year:Y, Value)", where "Value" is the net profit margin to be solved.
[0050] In step S303, the inference engine constructs the required knowledge based on formal knowledge representation and performs calculations in conjunction with the database.
[0051] As an example, after obtaining a formalized knowledge representation such as "Cal_NetProfitMargin(Company:X, Year:Y, Value)", the inference engine can build knowledge about the net profit margin. This knowledge can be specifically in the form of "Cal_NetProfitMargin(Company:X, Year:Y, Value): Cal_NetProfit(Company:X, Year:Y, V1); Cal_OperatingRevenue(Company:X, Year:Y, V2); Value = V1 / V2". Here, "Cal_NetProfitMargin(Company:X, Year:Y, Value)" represents the net profit margin to be calculated, Cal_NetProfit(Company:X, Year:Y, V1) and Cal_OperatingRevenue(Company:X, Year:Y, V2) represent the net profit and operating revenue, respectively, and the value (net profit margin) is the ratio of the two.
[0052] Next, the formalized knowledge can be linked to data. For example, specific terms representing the formalized knowledge (e.g., "Company", "Year", and "NetProfit") can be matched with corresponding table headers in the database. For instance, "Cal_NetProfitMargin(Company:X, Year:Y, Value)" represents the "conclusion" of the formalized knowledge, while "Cal_NetProfit(Company:X, Year:Y, V1)" and "Cal_OperatingRevenue(Company:X, Year:Y, V2)" represent "net profit" and "operating revenue" respectively, which are the premises of the formalized knowledge. Specific terms in the "premise", such as functions and variables (e.g., "NetProfit" and "Company"), can be matched with response table headers in the database to retrieve the data required for the "premise".
[0053] In some embodiments, a database query language (such as SQL) can be used to perform data query operations. Specifically, based on the preconditions in the knowledge, a corresponding query statement is constructed to select data that meets the conditions from the database, thereby obtaining the data required in the "preconditions".
[0054] Then, using the knowledge about net profit margin in the inference engine, and the queries V1 and V2, the net profit margin is calculated. Specifically, when V1 (net profit) and V2 (operating revenue) in the "Premise" are obtained, the Value (net profit margin) in the "Conclusion" is calculated by the ratio of the two.
[0055] After obtaining the value of Value, in step S304, the calculated Value (net profit margin) can be passed to the user to complete the question and answer process. For example, the user can be informed that "Company X's net profit margin in year Y is Value".
[0056] Therefore, combining large language models and inference engines can provide more accurate and efficient financial computing solutions to meet the growing demands of the digital finance sector. By introducing an inference engine, scenarios such as the aforementioned "net profit margin" calculation can be better handled, ensuring reliable financial calculations even when missing indicators are present in the database. The solution disclosed here overcomes the computational challenges faced by large language models in the financial field, providing users with more reliable and accurate financial information and decision support.
[0057] Figure 4 A schematic block diagram of an electronic device 400 according to an embodiment of the present disclosure is shown. Figure 4 As shown, the electronic device 400 may include a processor 401 and a memory 402. The memory 402 stores computer instructions for processing financial question-and-answer text. When the computer instructions are executed by the processor 401, the electronic device 400 performs the following actions: acquiring the financial question-and-answer text to be processed; converting the financial question-and-answer text into a formalized knowledge representation; and processing the formalized knowledge representation based on a reasoning engine associated with the financial question-and-answer text to obtain the answer to the financial question-and-answer text.
[0058] Preferably, converting the financial question-and-answer text into formal knowledge includes: performing formal transformation processing on the financial question-and-answer text using a large language model to obtain the formal knowledge expression.
[0059] Preferably, the formal transformation processing of the financial question-and-answer text using a large language model includes: using prompt words to guide the large language model to perform formal transformation processing of the financial question-and-answer text according to pre-set ontology and semantic rules.
[0060] Preferably, processing the formal knowledge representation based on an inference engine related to the financial question-and-answer text includes: obtaining target data related to the formal knowledge representation from a target database; and performing calculations on the formal knowledge representation and the target data based on the inference engine.
[0061] Preferably, the formal knowledge representation includes premises and conclusions, wherein both the premises and the conclusions include several knowledge equations, wherein each knowledge equation is constructed by an operator and an equation consisting of an operator and concepts that are the input and output variables of the operator.
[0062] Preferably, obtaining target data related to the formalized knowledge representation from the target database includes: extracting the required retrieval information from the premises of the formalized knowledge representation; and using the retrieval information to obtain the target data from the target database.
[0063] Preferably, the calculation of the formal knowledge representation and the target data based on the inference engine includes: determining the data required for the premises in the formal knowledge representation based on the target data; and calculating the value of the solution required for the conclusion in the formal knowledge representation based on the data required for the premises in the formal knowledge representation.
[0064] Preferably, the method further includes: in response to the failure to obtain the target data from the target database, outputting an alarm prompt based on the inference engine.
[0065] Through the above implementation methods, electronic devices, by introducing an inference engine, better adapt to various financial computing scenarios, providing reliable financial computing and overcoming the computational challenges faced by artificial intelligence in the financial field. This enables them to provide users with more reliable and accurate financial information and decision support. Furthermore, in some embodiments, large language models are used to convert financial question-and-answer text into formalized knowledge representations, which are then further processed using an inference engine. This combination of large language models and inference engines provides a more accurate and efficient financial computing solution, addressing the shortcomings of large language models in financial computing and meeting the ever-growing needs of the digital finance sector.
[0066] It should be noted that the specific details of the operating method and steps of this electronic device are combined with the foregoing. Figures 1-3 The specific implementation methods for processing financial question-and-answer texts described herein are the same or similar, and therefore will not be elaborated upon here.
[0067] In addition, this disclosure also provides a computer-readable storage medium storing program instructions configured to execute at runtime. Figures 1-3 The method shown is for processing financial question-and-answer text.
[0068] Specifically, in this embodiment, the storage medium may include, but is not limited to, USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks, and other media capable of storing computer programs.
[0069] While numerous embodiments of this application have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will arise for those skilled in the art without departing from the spirit and intent of this application. It should be understood that various alternatives to the embodiments of this application described herein may be employed in the practice of this application. The appended claims are intended to define the scope of protection of this application and therefore cover equivalents or alternatives within the scope of these claims.
[0070] The collection and acquisition of various data in this application comply with relevant laws and regulations and are authorized by the data providers. Any organization or individual that needs to obtain external data shall obtain authorization in accordance with the law and ensure data security, and shall not illegally collect, use, process, or transmit unauthorized or unprotected data, nor shall it illegally buy, sell, provide, or disclose unauthorized or unprotected data.
Claims
1. A method for processing financial question-and-answer text, characterized in that, include: Obtain the text of the financial Q&A to be processed; The financial Q&A text is transformed into a formal knowledge representation; The formalized knowledge representation is processed using a reasoning engine associated with the financial question-and-answer text to obtain the answer to the financial question-and-answer text.
2. The method according to claim 1, characterized in that, Transforming the aforementioned financial question-and-answer text into a formal knowledge representation includes: The financial question-and-answer text is formally transformed using a large language model to obtain the formalized knowledge representation.
3. The method according to claim 2, characterized in that, The formal transformation of the financial question-and-answer text using a large language model includes: The large language model is guided by prompt words to perform formal transformation processing on the financial question-and-answer text in accordance with pre-set ontology and semantic rules.
4. The method according to claim 1, characterized in that, The processing of the formalized knowledge representation based on the inference engine associated with the financial question-and-answer text includes: Retrieve target data related to the formalized knowledge representation from the target database; and The inference engine is used to perform calculations on the formalized knowledge representation and the target data.
5. The method according to claim 4, characterized in that, The formal knowledge representation includes premises and conclusions, each of which includes several knowledge equations, wherein each knowledge equation is constructed by an operator and an equation consisting of the concepts of the operator's input and output variables.
6. The method according to claim 5, characterized in that, Retrieving target data related to the formalized knowledge representation from the target database includes: Extract the required retrieval information from the premises of the formalized knowledge representation; and The target data is obtained from the target database using the search information.
7. The method according to claim 5, characterized in that, The calculations based on the formalized knowledge representation and the target data using the inference engine include: Based on the target data, determine the data required for the premises in the formalized knowledge representation; and Based on the data required for the premises in the formalized knowledge representation, calculate the value of the solution required for the conclusion in the formalized knowledge representation.
8. The method according to claim 4, characterized in that, The method further includes: In response to the failure to obtain the target data from the target database, an alarm message is output based on the inference engine.
9. An electronic device, characterized in that, include: processor; A memory having stored computer program instructions for processing financial question-and-answer text, which, when executed by the processor, cause the method according to any one of claims 1-8 to be implemented.
10. A computer-readable storage medium, characterized in that, It includes computer program instructions for processing financial question-and-answer text, which, when executed by a processor, cause the method according to any one of claims 1-8 to be implemented.