Question and answer processing method and device, storage medium and program product
By obtaining the user's natural language problem statements, using standard indicator information and large language models to extract indicator information and association relationships, we generate target problem structures, and solve the problem of insufficient processing capabilities of input form limitations and complex conditions in the existing technology, achieving high Accurate question-and-answer processing.
Patent Information
- Application Number
- CN202411420018.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-10-12
AI Technical Summary
The prior art has limitations in the processing of natural language question questions, inability to effectively deal with complex conditional relationships and poor flexibility, resulting in low accuracy.
By obtaining the user's natural language problem statements, using pre-stored standard indicator information and large language models, extracting indicator information, determining the indicator relationship, and generating the target problem structure based on standardized strategies, and performing answer query.
It realizes flexible processing of arbitrary natural language questions, adapts to complex conditional relationships, and improves the flexibility of question-and-answer processing and the accuracy of answer information.
Smart Images

Figure CN118939780A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of natural language processing, and in particular to a question-answering processing method, device, storage medium, and program product. Background Art
[0002] With the continuous development of technologies such as big data and artificial intelligence, these technologies can be used for intelligent data processing. For example, in the financial field, these technologies can be used to help users perform intelligent data screening and recommendation, such as stock and fund screening.
[0003] Taking fund screening as an example, in the existing technology, a large language model (LLM) is usually used in combination with a retrieval-augmented generation (RAG) strategy to identify the user's natural language description, match the required information from a pre-defined or constructed knowledge base, and return it to the user in a friendly form.
[0004] However, this screening method has limitations and constraints on the input form of the user's natural language questions, and it is difficult to ensure that any natural language questions of the user can be processed. It is also unable to deal with problems such as complex conditional relationships, poor flexibility and low accuracy. Summary of the invention
[0005] The purpose of this application is to provide a question-answering processing method, device, storage medium and program product to address the deficiencies in the above-mentioned prior art, so as to solve the problems in the prior art that it is difficult to ensure that any natural language question of the user can be processed when performing natural language processing, and it is unable to deal with complex conditional relationships, has poor flexibility and low accuracy.
[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows: In a first aspect, an embodiment of the present application provides a question-answering processing method, the method comprising: Obtain a question sentence input by the user in natural language; Determine, according to the question statement, pre-stored standard indicator information and a large language model, a plurality of indicator information extraction results corresponding to the question statement, wherein the standard indicator information is used to indicate a mapping relationship between a standard indicator name, an indicator type and a time, and each of the indicator information extraction results includes: an indicator identifier, an indicator condition and a time information; Determine indicator association information according to the plurality of indicator information extraction results, the standard indicator information and the large language model, wherein the indicator association information is used to characterize the association relationship between the indicator information extraction results, and the association relationship includes: or, and and includes; Based on a preset standardization strategy, the indicator association information and the extraction results of the multiple indicator information are standardized to generate a target question structure corresponding to the question statement, and the answer information corresponding to the question statement is queried based on the target question structure.
[0007] In a second aspect, another embodiment of the present application provides a question-answer processing device, the device comprising: An acquisition module, used to acquire a question statement input by a user in a natural language; An indicator information extraction module is used to determine a plurality of indicator information extraction results corresponding to the question statement according to the question statement, pre-stored standard indicator information and a large language model, wherein the standard indicator information is used to indicate a mapping relationship between a standard indicator name, an indicator type and a time, and each of the indicator information extraction results includes: an indicator identifier, an indicator condition and a time information; An indicator association information determination module, used to determine indicator association information according to the plurality of indicator information extraction results, the standard indicator information and the large language model, wherein the indicator association information is used to characterize the association relationship between the indicator information extraction results, and the association relationship includes: or, and and includes; A standardized output module is used to standardize the indicator association information and the extraction results of the multiple indicator information based on a preset standardization strategy, generate a target question structure corresponding to the question statement, and query the answer information corresponding to the question statement based on the target question structure.
[0008] In the third aspect, another embodiment of the present application provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of any method described in the first aspect above.
[0009] In a fourth aspect, another embodiment of the present application provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any method described in the first aspect are executed.
[0010] In the fifth aspect, another embodiment of the present application provides a computer program product, which includes a computer program code. When the computer program code is executed by a computing device, the computing device executes the steps of any method described in the first aspect above.
[0011] The beneficial effects of the present application are as follows: by obtaining a question statement input by a user in a natural language, and determining multiple indicator information extraction results corresponding to the question statement based on the question statement, pre-stored standard indicator information and a large language model, multiple indicator information extraction results of the question statement are extracted, so that indicator association information can be determined based on multiple indicator information extraction results, standard indicator information and a large language model, and the association relationship between multiple indicator information extraction results is determined, and based on a preset standardization strategy, the indicator association information and multiple indicator information extraction results are standardized to generate a target question structure corresponding to the question statement, the question statement can be characterized by the target question structure, and the answer information corresponding to the question statement can be queried based on the target question structure, and the answer information can be directly filtered out from any question statement of the user, and there is no restriction or constraint on the input form of the user's question statement, so that the question and answer processing process is more flexible and more compatible and adaptable. At the same time, by determining the extraction results of multiple indicator information and the correlation between indicators, intelligent question and answer processing can be achieved under any complex conditional relationship expression and the proprietary expression of each business scenario, and it is possible to deal with complex conditional relationships during question and answer processing. While improving the flexibility of question and answer processing, it can also ensure the accuracy of the answer information obtained.
[0012] In addition, when querying the answer information corresponding to the question statement based on the target question structure, it does not rely on the implementation of the application layer, so that any system that has a demand for question and answer processing can access the question and answer processing method provided by the embodiment of the present application. For any system that has a demand for question and answer processing, it helps to quickly implement the intelligent data screening function in the form of natural language question and answer. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0014] Figure 1 A flow chart of the question-answering processing method provided in an embodiment of the present application; Figure 2 A schematic diagram of a module of a fund screening system provided in an embodiment of the present application; Figure 3 A schematic diagram of a module of an indicator information extraction module in a fund screening system provided in an embodiment of the present application; Figure 4 A flow chart for determining the extraction results of multiple indicator information corresponding to a question statement in the question-answering processing method provided in an embodiment of the present application; Figure 5 A flow chart for obtaining indicator association information in the question and answer processing method provided in an embodiment of the present application; Figure 6 A flow chart for generating a target question structure corresponding to a question statement in the question-answering processing method provided in an embodiment of the present application; Figure 7 A schematic diagram of a module of an indicator condition standardization module in a fund screening system provided in an embodiment of the present application; Figure 8 A flow chart for determining a first standardized result in the question-answer processing method provided in an embodiment of the present application; Fig. 9 A schematic diagram of a module of an identification standardization module in a fund screening system provided in an embodiment of the present application; Fig.10 A schematic diagram of a module of a condition standardization module in a fund screening system provided in an embodiment of the present application; Fig.11 A flow chart for generating a standard identifier triple corresponding to an indicator identifier in the question-answer processing method provided in an embodiment of the present application; Fig.12 A flow chart for obtaining a second standardized result corresponding to indicator association information in the question-answer processing method provided in an embodiment of the present application; Fig.13 A schematic diagram of a fund screening system provided in an embodiment of the present application; Fig.14 A schematic diagram of a question-and-answer processing device provided in an embodiment of the present application; Fig.15 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0015] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme 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. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0016] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0017] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0018] With the continuous development of technologies such as big data and artificial intelligence, these technologies can be used for intelligent data processing. For example, in the financial field, such as investment research, investment consulting, risk control, etc., these technologies can be used to help users perform intelligent data screening and recommendation, such as stock and fund screening.
[0019] Taking fund screening as an example, the fund screening method or fund screening system in the prior art can generally be divided into the following four modes to provide users with fund screening functions and services.
[0020] The first type is the conditional fund selection system. Specifically, the user manually selects the screening indicators and screening conditions on the front-end interface, and the fund screening system selects the target funds according to the indicators and conditions manually selected by the user and sends them to the user.
[0021] The second type is the screening subsystem. Specifically, the fund screening system exists as a subsystem of a large system (such as an intelligent investment advisory system, an asset allocation system, an intelligent recommendation system, etc.). The fund screening system receives and reads data provided or transmitted by the upstream (such as asset data, position data, customer risk data, behavioral preference data, return target data, etc.), and adaptively builds a fund screening algorithm model based on the manually defined model framework. Then, the algorithm model is used to solve and sort the entire fund data set, screen out the target funds, and send them to the user.
[0022] The third type is the rule matching system. Specifically, using the rule matching method, the user enters a fund screening question, and the fund screening system uses string matching to determine the inclusion relationship and extract the indicators and conditions, and then searches for the corresponding fund results based on these indicators and conditions and sends them to the user.
[0023] The fourth type is the combination of a large language model and a retrieval-augmented generation strategy. Specifically, a large language model (LLM) is used in combination with a retrieval-augmented generation strategy (RAG) to identify the user's natural language description, match the required information from a pre-defined or constructed knowledge base, and return it to the user in a friendly form.
[0024] However, the above four fund screening methods or fund screening systems all have restrictions and constraints on the input form of the user's natural language questions, and it is difficult to ensure that any natural language questions of the user can be processed.
[0025] Specifically, the conditional fund selection system requires users to manually select fund screening conditions and indicators to obtain fund screening results. The rule matching system needs to maintain a large number of synonym lists, which is costly and not intelligent enough, and cannot solve the problems of polysemy and conflict. The large language model is combined with the retrieval enhancement generation strategy. Since there is no suitable financial information source in the fund field, and the solution itself depends on the quality, coverage and completeness of the information source, it has great uncertainty factors and is therefore not suitable for specific scenario tasks in the financial field.
[0026] When implementing a fund screening method or a fund screening system based on a large language model combined with a search enhancement generation strategy, the prior art also provides some common features and technical means, including random coefficients, plug-ins (referred to as Plugins), function calls (referred to as FunctionCalls), etc. Specifically, in some common scenarios, using Plugins, FunctionCalls, etc., it is possible to quickly convert the user's natural language to the application layer interface call parameters (Application ProgrammingInterface, referred to as API), providing a convenient way for the LLM model to connect to the application layer to empower and implement it.
[0027] For example, taking FunctionCall as an example, the basic process of FunctionCall includes: a) Users raise questions.
[0028] b) The system receives the question and checks if there is an available function to call.
[0029] c) If yes, the system will generate a tool call request (ToolCall for short) and send it to the application.
[0030] d) The application executes the requested function and returns the result.
[0031] e) The system sends the function's response (ToolCallResponse for short) back to the LLM model.
[0032] f) The LLM model uses this response to generate the final user response.
[0033] However, the way of applying FunctionCall in the fund screening method or fund screening system with a large language model combined with a search enhancement generation strategy has the following problems: 1. When the application layer API has too many parameters, the volume is too large, and there are parameters with similar meanings, FunctionCall cannot convert accurate parameter information. For example, for similar indicators such as fund yield and fund annualized yield, fund Golden Bull Award winning situation and fund manager winning situation, current fund manager name and former fund manager name, etc., the parameters converted by FunctionCall often have confusion and errors.
[0034] 2. When the interface parameter design of the application layer API is not semantic, FunctionCall cannot convert the correct interface parameters. For example, each index of fund screening will have a time range limit. If the parameters of the API interface design are called time interval 1 and time interval 2, corresponding to the time parameters of the index number, or called time interval left interval and time interval right interval, corresponding to the lower and upper limits of the interval, and similar definitions, FunctionCall will not be able to effectively handle this situation.
[0035] 3. When the user's natural language question contains complex conditional relationships, FunctionCall cannot accurately parse this conditional relationship and convert it into corresponding parameters. For example, a user asks: "Funds whose Sharpe ratio ranking has reached the top 2% in the past five consecutive quarters and whose yield in the past month is less than 2% or higher than 95%." This describes a relationship similar to A and (B or C), which has parentheses. When converting parameters, FunctionCall cannot effectively map this conditional relationship to the parameter arrangement relationship.
[0036] 4. FunctionCall cannot process when the user's natural language question has special descriptions of indicator values. For example, when a user asks: "Funds that hold all company A's stocks" you actually need to screen for funds that hold 100% of company A's stocks. Another example is when a user asks: "Funds with the most stable drawdown since its establishment" you actually need to screen for a fund with the lowest maximum drawdown indicator value, and the time range is since its establishment. FunctionCall cannot effectively process these special question descriptions.
[0037] Obviously, since the FunctionCall method encapsulates the steps of converting user natural language questions into application layer parameters, there will be two major problems in actual application. One is that it relies on the reasonable and standardized design of the application layer, and the other is that it cannot handle the complex conditional relationships and proprietary language descriptions in specific fields.
[0038] Therefore, in the scenario of fund screening, the application effect of LLM tool features such as FunctionCall is relatively poor. There are problems such as over-reliance on the application layer, business coupling, inability to cope with complex conditional relationships, inability to cope with proprietary descriptions in the fund screening field, and poor flexibility.
[0039] In summary, the data screening and recommendation methods in the prior art all have limitations and constraints on the input form of the user's natural language questions, and it is difficult to ensure that any natural language questions of the user can be processed, and they are unable to deal with complex conditional relationships, poor flexibility and low accuracy.
[0040] Based on the above problems, the embodiment of the present application proposes a question-answering processing method, which obtains a question sentence input by a user in natural language, and determines multiple indicator information extraction results corresponding to the question sentence according to the question sentence, pre-stored standard indicator information and a large language model, so as to extract multiple indicator information extraction results of the question sentence, thereby being able to determine indicator association information according to multiple indicator information extraction results, standard indicator information and a large language model, and to determine the association relationship between multiple indicator information extraction results, and based on a preset standardization strategy, standardize the indicator association information and multiple indicator information extraction results, generate a target question structure corresponding to the question sentence, and be able to characterize the question sentence through the target question structure, and query the answer information corresponding to the question sentence based on the target question structure, and be able to directly filter out the answer information from any question sentence of the user, and there is no restriction or constraint on the input form of the user's question sentence, so as to truly realize intelligent question-answering processing. At the same time, by determining multiple indicator information extraction results and indicator association relationships, it is possible to deal with complex conditional relationships during question-answering processing, improve the flexibility during question-answering processing, and ensure the accuracy of the obtained answer information.
[0041] First, the relevant scenarios involved in the question and answer processing method provided in the embodiment of the present application are explained.
[0042] It is worth noting that the question-answering processing method provided in the embodiment of the present application can be applied to the scenario of providing financial data services or any other data services to specific users. In this scenario, network information related to or concerned by specific users is collected in a compliant and legal manner, and these network information are used as raw data. These raw data are sequentially subjected to data processing steps such as data cleaning, data conversion, and data mining, so as to analyze and mine indicators, conclusions, and suggestions useful to specific users. By using the question-answering processing method of the embodiment of the present application, it is possible to not limit or constrain the input form of the user's question statement, truly realize intelligent question-answering processing, and ensure that the results provided to specific users are accurate and reliable.
[0043] It should be noted that the scheme involved in this application must obtain the user's consent in an explicit form before the personal information and important data collected and generated during the execution process can be applied to the scheme of this application. The personal information and important data collected and generated during the execution process must comply with the principles of legality, legitimacy, and necessity, publicize the collection and use rules, and clearly state the purpose, method, and scope of collecting and using information. The relevant data involved in this application does not include personal information that is not related to the relevant services involved in this application.
[0044] Specifically, the question-answer processing method provided in the embodiment of the present application is applied to the scenario of responding to the natural language input by the user. Exemplarily, the question-answer processing method provided in the embodiment of the present application can be implemented via specific program code and presented to the user in the form of a question-answer processing system, or it can be provided to the external application layer in the form of a calling interface after encapsulation for the user to use. Among them, when the question-answer processing method provided in the embodiment of the present application is encapsulated, it can be connected to any external application layer that requires the question-answer processing function.
[0045] It should be understood that the following embodiments of the present application are described using the fund screening sub-field in the financial field as an example. The question and answer processing method provided in the embodiments of the present application is not limited to the fund screening sub-field, but can also be applied to other sub-fields of financial data services or any other fields involving data services.
[0046] The question and answer processing method provided in the embodiments of the present application is described in detail below in combination with multiple embodiments.
[0047] Figure 1 A flowchart of the question-answering processing method provided in the embodiment of the present application, referring to Figure 1 As shown, the execution subject of the method can be any electronic device with processing capabilities, such as the above-mentioned question-answering processing system, and the method includes: S101: Obtain a question sentence input by a user in natural language.
[0048] Optionally, the user can input question statements that need to be processed in natural language on the front-end interface or interactive terminal (web page, personal computer (PC), application (App), WeChat public account, and mini-program, etc.), where the question statement explicitly or implicitly includes the user's specific question and answer screening requirements.
[0049] For example, a user can use an input method tool to input natural language text, or use a voice transmission tool to input voice. After receiving the question, the electronic device or question-answering processing system will recognize and judge the form of the question input, access the unified technical middleware, and convert the question into a natural language text form question to enter the subsequent processing flow. The unified technical middleware may include a text receiving component, a voice-to-text component, etc.
[0050] For example, taking fund screening as an example, the question statement input by the user can be: "What are the award-winning positive return funds managed by M company in the past two years? Recommend some to me." The question statement input by the user can also be "What are the five funds managed by Manager C and Manager D that have a yield of less than 10% in the past three years, have been established for more than 2 years, and have the lowest drawdown? Recommend some to me."
[0051] For example, taking fund screening as an example, the above question-answering processing system may be a fund screening system. Figure 2 A schematic diagram of a module of the fund screening system provided in the embodiment of the present application, referring to Figure 2 As shown, as a possible implementation method, the processing of this step can be implemented through the question statement input module in the fund screening system.
[0052] S102: Determine a plurality of indicator information extraction results corresponding to the question statement according to the question statement, pre-stored standard indicator information and the large language model.
[0053] It can be understood that after obtaining the question statement, the question statement contains the user's question and answer processing requirements. Therefore, the keywords in the question statement can be extracted to extract some keywords related to the answer information in the question statement, where these keywords can be understood as keywords in the question statement that are related to a specific scenario and can be used to determine the answer information corresponding to the question statement.
[0054] Optionally, indicator information may be extracted from the question sentence based on pre-stored standard indicator information and a large language model, thereby determining a plurality of indicator information extraction results corresponding to the question sentence.
[0055] For example, in a certain business scenario, data processing can be performed on the indicators involved in the business scenario to generate standard indicator information for the specific business scenario and store it. After obtaining the question statement, indicator information can be extracted from the question statement based on the question statement, pre-stored standard indicator information and a large language model (LLM) to determine multiple indicator information extraction results corresponding to the question statement.
[0056] The pre-stored standard indicator information is used to indicate the mapping relationship between the standard indicator name, indicator type and time information. For example, taking a standard indicator as an example, the standard indicator information may include the indicator name of the standard indicator, the indicator number (abbreviated as ID) of the standard indicator, the indicator type to which the standard indicator belongs, the indicator classification to which the standard indicator belongs, the time dimension of the standard indicator and the indicator description of the standard indicator.
[0057] Among them, each indicator information extraction result includes: indicator identification, indicator conditions and time information, that is, each indicator information extraction result can be understood as multiple groups of keywords in the question statement that can be used to determine the answer information corresponding to the question statement, and each group of keywords includes indicator identification, indicator conditions and time information. One indicator information extraction result can uniquely determine one indicator information, and this indicator information is used to identify a set of screening conditions in the question statement. Multiple indicator information extraction results can be a collection or combination of multiple indicator information extraction results.
[0058] Specifically, the indicator identifier is used to indicate the indicator identifiers contained or may be contained in the question statement, which may include the indicator name, indicator number and indicator type. The indicator condition can be used to indicate the conditional values of some indicators contained or may be contained in the question statement. The time information can be used to indicate the time attributes of some indicators in the question statement.
[0059] For example, the indicator information extraction result conditions can be expressed as: "conditions":[{ "indexId":"Index number", "indexName":"Indicator name", "conditionValue": "Condition Value", "timeValue": "time attribute"}, ...].
[0060] For example, continuing to take fund screening as an example, when the user inputs the question sentence "Among the funds managed by managers C and D, which have a return rate of less than 10% in the past three years, have been established for more than two years, and have the lowest drawdown, which are the five funds? Recommend some to me", the determined indicator condition extraction result conditions can be expressed as: "conditions":[{"indexId":"fund_30","indexName":"Fund Manager","conditionValue":"Manager C","timeValue":""}, {"indexId":"fund_30","indexName":"Fund Manager","conditionValue":"Manager D","timeValue":""}, {"indexId":"fund_10","indexName":"yield","conditionValue":"less than 10%","timeValue":"nearly 3 years"}, {"indexId":"fund_04","indexName":"Establishment time","conditionValue":"More than 2 years","timeValue":"More than 2 years"}, {"indexId":"fund_19","indexName":"Maximum Drawdown","conditionValue":"The lowest 5","timeValue":""}] For example, continue to refer to Figure 2 As shown, as a possible implementation method, the processing of this step can be implemented through the indicator information extraction module in the fund screening system.
[0061] S103: Determine indicator association information according to the extraction results of multiple indicator information, standard indicator information and the large language model.
[0062] It can be understood that after obtaining multiple indicator information extraction results, the multiple indicator information extraction results can characterize the keywords related to question and answer processing in the question sentence. On this basis, it is also necessary to determine the relationship between the multiple indicator information extraction results, that is, it is necessary to determine the relationship between the multiple indicator information extraction results so as to better perform question and answer processing.
[0063] Optionally, the indicator association information of multiple indicator information extraction results can be determined based on the pre-stored standard indicator information and the large language model, so as to determine the indicator association information between the multiple indicator information extraction results. The indicator association information is used to characterize the association relationship between the indicator information extraction results, and the association relationship includes: or, and and contains, and the indicator association information can be represented by a string, a logical expression or a graph.
[0064] Exemplarily, the indicator association information can be expressed as: "relations": "(condition1 or condition2) and condition3 ... ...".
[0065] Among them, "relations" represents the relationship between the results of the indicator information extraction, which is described by "or", "and" and brackets, and "conditionX" represents the Xth condition in the indicator condition extraction result conditions, where X refers to the order of the indicator condition extraction results.
[0066] For example, continuing to take fund screening as an example, when the user inputs the question sentence "Among the funds managed by managers C and D, which have a return rate of less than 10% in the past three years, have been established for more than two years, and have the lowest drawdown, which five funds are there? Recommend some to me", the determined indicator association information relations can be expressed as: "relations": "(condition1 or condition2) and condition3 andcondition4 and condition5".
[0067] For example, continue to refer to Figure 2 As shown, as a possible implementation method, the processing of this step can be implemented through the conditional relationship parsing module in the fund screening system.
[0068] S104. Based on a preset standardization strategy, the indicator association information and the multiple indicator information extraction results are standardized to generate a target question structure corresponding to the question statement, and the answer information corresponding to the question statement is queried based on the target question structure.
[0069] It can be understood that after obtaining multiple indicator information extraction results and indicator association information, since the indicator information extraction results and indicator association information are obtained through a large language model, and the output results of the large language model are affected by the question sentence, that is, the indicator information extraction results may contain non-standard terms in the question sentence, and the indicator association information does not have the characteristics of being universally readable, therefore, the indicator information extraction results and indicator association information may have format problems or non-standard expression problems, making it difficult to use the indicator information extraction results and indicator association information to query the answer information corresponding to the question sentence. Therefore, it is necessary to standardize the multiple indicator information extraction results and indicator association information to generate the target question structure corresponding to the question sentence.
[0070] Optionally, the indicator association information and the multiple indicator information extraction results may be standardized based on a preset standardization strategy, so as to generate a target question structure corresponding to the question statement.
[0071] Among them, the preset standardization strategy may include standardization strategies related to the extraction results of each indicator information, and standardization strategies related to indicator association information, specifically, it may include standardization strategies related to indicator identification, indicator conditions, time information and indicator association relationship.
[0072] Among them, the target question structure is used to standardize the representation of the query conditions corresponding to the question statement. That is to say, the target question structure can be understood as the standard structure composed of the query conditions involved when querying the question statement. The target question structure can be used to accurately query the answer information corresponding to the question statement.
[0073] Exemplarily, based on a preset standardization strategy, the indicator association information and the results of multiple indicator information extraction can be standardized, and the indicator association information and the results of multiple indicator information extraction can be uniformly converted into a standard specific data exchange format (JSON structure for short) to fully describe the indicator association information and the results of multiple indicator information extraction, and the standard JSON data structure can be used as the target problem structure so that any application layer program can directly read the target problem structure, thereby receiving the indicator association information and the information of multiple indicator information extraction results contained therein. Exemplarily, the indicator association information and the results of multiple indicator information extraction can also be uniformly converted into a standard Extensible Markup Language (XML for short).
[0074] It can be understood that after obtaining the target question structure corresponding to the question statement, that is, after accurately determining the query condition corresponding to the question statement, the target question structure can be used as a query condition and connected to the application layer, so that the electronic device can query the answer information corresponding to the question statement based on the target question structure in the application layer and output it to the user. Alternatively, the target question structure can be used as a query condition so that the question-answering processing system can query the answer information corresponding to the question statement from the database based on the target question structure and output it to the user.
[0075] This means that after obtaining the target question structure, the target question structure can be used to query the answer information corresponding to the question statement. When querying the answer information based on the target question structure, since the target question structure can represent the standard query conditions corresponding to the question statement, the query does not rely on the implementation of the application layer. In other words, any system that has a demand for question and answer processing can access the question and answer processing method provided by the embodiment of the present application, so as to implement question and answer processing through the question and answer processing method provided by the embodiment of the present application and accurately obtain the answer information required by the user. At the same time, since the question and answer processing method provided by the embodiment of the present application provides a standardized solution for application layer access, it can also keep the application layer and the question and answer processing method provided by the embodiment of the present application separated and do not interact. For any system that has a demand for question and answer processing, it is helpful to quickly implement the intelligent data screening function in the form of natural language question and answer.
[0076] Optionally, the electronic device can query the answer information corresponding to the question statement based on the target question structure in the application layer. Specifically, it can read the indicator information extraction results and indicator association information from the target question structure in the application layer, and convert the indicator information extraction results and indicator association information into parameter forms supported by the application layer, thereby realizing the query of the answer information corresponding to the question statement.
[0077] Exemplarily, taking fund screening as an example, a conditional fund selection application can be deployed in the application layer, where the conditional fund selection application refers to various general ways or methods of querying and screening funds according to specific conditions, such as structured query language (SQL) statement query or application programming interface (API) query, but not limited to this. For example, when querying funds using SQL statements, the information contained in the target question structure can be converted into the where condition and select field in the SQL statement; when querying funds using API, the information contained in the target question structure can be converted into the input parameter of the API interface, and other methods are similar, and this application does not elaborate on this.
[0078] Optionally, after obtaining the answer information corresponding to the question statement, it can be output to the user in a specific form, such as interface output, text output, chart output, component output, message push, etc.
[0079] For example, continue to refer to Figure 2 As shown, as a possible implementation method, the processing process of this step can be implemented through the indicator condition standardization module, application layer conversion module and result output module in the fund screening system.
[0080] In this embodiment, a question sentence input by a user in a natural language is obtained, and multiple indicator information extraction results corresponding to the question sentence are determined according to the question sentence, pre-stored standard indicator information and a large language model, so as to extract multiple indicator information extraction results of the question sentence, thereby being able to determine indicator association information according to multiple indicator information extraction results, standard indicator information and a large language model, and to determine the association relationship between multiple indicator information extraction results, and based on a preset standardization strategy, the indicator association information and multiple indicator information extraction results are standardized to generate a target question structure corresponding to the question sentence, and the question sentence can be characterized by the target question structure, and the answer information corresponding to the question sentence can be queried based on the target question structure, and the answer information can be directly filtered out from any question sentence of the user, and there is no restriction or constraint on the input form of the user's question sentence, so that the question and answer processing process is more flexible and has higher compatibility and adaptability. At the same time, by determining the extraction results of multiple indicator information and the correlation between indicators, intelligent question and answer processing can be achieved under any complex conditional relationship expression and the proprietary expression of each business scenario, and it is possible to deal with complex conditional relationships during question and answer processing. While improving the flexibility of question and answer processing, it can also ensure the accuracy of the answer information obtained.
[0081] In addition, when querying the answer information corresponding to the question statement based on the target question structure, it does not rely on the implementation of the application layer, so that any system that has a demand for question and answer processing can access the question and answer processing method provided by the embodiment of the present application. For any system that has a demand for question and answer processing, it helps to quickly implement the intelligent data screening function in the form of natural language question and answer.
[0082] In a possible implementation, a process of determining a plurality of indicator information extraction results corresponding to a question statement according to the question statement, pre-stored standard indicator information, and a large language model is exemplarily described. Specifically, the above step S102 includes: According to the question statement, the standard indicator information, the pre-built first question template and the large language model, multiple indicator information extraction results corresponding to the question statement are determined.
[0083] It can be understood that when determining multiple indicator information extraction results corresponding to the question statement, a first question template can be pre-constructed according to different business scenarios, and indicator information can be extracted from the question statement based on the question statement, standard indicator information, the pre-constructed first question template and the large language model to determine multiple indicator information extraction results corresponding to the question statement.
[0084] Optionally, indicator information can be extracted from the question statement based on the question statement, standard indicator information, a pre-built first question template and a large language model, and then keywords in the question statement that are relevant to the specific scenario and can be used to determine answer information corresponding to the question statement are extracted as the indicator information extraction result corresponding to the question statement.
[0085] Optionally, when extracting indicator information from the question statement, the indicator identifier, indicator condition and time information in the question statement can be identified and analyzed respectively. Specifically, indicator identifier extraction can be performed on the question statement to identify and analyze the indicator identifier in the question statement, indicator condition extraction can be performed on the question statement to identify and analyze the indicator condition in the question statement, and time information extraction can be performed on the question statement to identify and analyze the time information in the question statement.
[0086] Optionally, when extracting indicator identifiers from the question statement to identify and parse the indicator identifiers in the question statement, it may include extracting indicator numbers and extracting indicator names from the question statement to identify and parse the indicator numbers and indicator names in the question statement.
[0087] Optionally, when extracting indicator conditions from question statements to identify and parse the indicator conditions in the question statements, it may include extracting numerical condition values, degree condition values, ranking condition values, and special condition values from the question statements to identify and parse the indicator conditions in the question statements.
[0088] Optionally, when extracting time information from the question statement to identify and parse the time information in the question statement, it can include extracting range-type time attributes, point-type time attributes, and continuous time attributes from the question statement to identify and parse the time information in the question statement.
[0089] Exemplarily, taking fund screening as an example, the pre-stored standard indicator information may include the indicator name of the standard indicator, the indicator number (abbreviated as ID) of the standard indicator, the indicator type to which the standard indicator belongs, the indicator category to which the standard indicator belongs, the time dimension of the standard indicator, and the indicator description of the standard indicator, as shown in Table 1 below: Table 1
[0090] Exemplarily, a first question template for extracting indicator information can be constructed in advance according to the business scenario, and a slot for a question statement can be reserved in the first question template. After obtaining the question statement, the question statement can be inserted into the first question template, and the large language model can be called to generate multiple indicator information extraction results corresponding to the question statement.
[0091] For example, Figure 3 A schematic diagram of a module for extracting index information in a fund screening system provided in an embodiment of the present application, referring to Figure 3 As shown, as a possible implementation method, the processing process of this step can be implemented through the indicator identification extraction module, the indicator condition extraction module and the time information extraction module in the indicator information extraction module.
[0092] Through the question statement, standard indicator information, the pre-constructed first question template and the large language model, multiple indicator information extraction results corresponding to the question statement are determined, which can utilize the large parameter amount advantage of the large language model and give full play to the super text reasoning ability of the large language model to quickly and accurately generate multiple indicator information extraction results corresponding to the question statement. At the same time, the generalization ability of the large language model can be utilized to greatly improve and enhance the compatibility and adaptability of the user's natural language questions and descriptions, thereby improving the intelligence of the question and answer processing method provided in the embodiment of the present application, and also lowering the usage threshold and improving scalability.
[0093] It can be understood that when determining the multiple indicator information extraction results corresponding to the question statement based on the question statement, standard indicator information, the pre-built first question template and the large language model, the large language model used can be selected according to the actual situation. Depending on the different large language models used, different processing steps can be followed, which is exemplified below.
[0094] In a possible implementation, the large language model is a large language model pre-trained using standard indicator information.
[0095] Optionally, the large language model obtained by pre-training with standard indicator information can be understood as taking the standard indicator information and some exemplary corpora related to the standard indicator information as input samples of the large language model, inputting the large language model for pre-training and fine-tuning, and obtaining the large language model obtained by pre-training with standard indicator information.
[0096] In a possible implementation, based on a large language model pre-trained by standard indicator information, an exemplary description is given of determining multiple indicator information extraction results corresponding to a question statement according to the question statement, the standard indicator information, the pre-constructed first question template, and the large language model, specifically including: The question statement and the pre-built first question template are input into the large language model, the indicator answer is extracted from the question statement, and a plurality of indicator information extraction results corresponding to the question statement are generated.
[0097] Optionally, the question statement and the pre-constructed first question template may be input into a large language model pre-trained with standard indicator information, indicator answers may be extracted from the question statement, and multiple indicator information extraction results corresponding to the question statement may be generated.
[0098] Exemplarily, the pre-constructed first question template can be a template of a pre-constructed first prompt statement (Prompt statement for short). Taking fund screening as an example, the question statement input by the user and the fund screening scenario can be filled in the first question template, and the filled-in first question template is input into the large language model pre-trained with standard indicator information to extract indicator answers for the question statement, and generate multiple indicator information extraction results corresponding to the question statement.
[0099] For example, continuing to take fund screening as an example, the pre-built first question template can be expressed as: "You are a professional financial question-answering assistant. Your task is to extract the indicator name, condition description, and time attribute of all the base selection indicators in the input question. If the condition description of a base selection indicator is empty, the indicator will not be extracted. The time attribute represents the time range parameter acting on the condition, or the time description of the time-type indicator; The final result is required to be returned in a specific data exchange format (JSON structure for short), and no text description should be output; The "conditions" array represents specific indicator conditions, where "indexName" is the indicator name. When you identify a synonym for an indicator name or a synonym for an indicator in a financial business scenario, you must map it to the indicator name and assign it to "indexName". "conditionValue" represents the condition value, and "timeValue" represents the time attribute. For time-related indicators, the time attribute is the time description. For other types of indicators, the time attribute must be the time range parameter acting on the indicator condition. However, you must pay special attention to the fact that a time range parameter in the input question may act on multiple indicator conditions at the same time. You must analyze and identify it in combination with the context semantics, and convert the Chinese numerals into Arabic numerals. Any indicator of any value type, especially numerical indicators, can be assigned a degree description as "conditionValue", such as: most, least, first few, last few, yes, no, etc. Now enter the question as follows: "{question statement}", please output your return result?" By inputting the question sentence and the pre-constructed first question template into the large language model pre-trained by standard indicator information, the indicator answer is extracted for the question sentence, and multiple indicator information extraction results corresponding to the question sentence are generated, so that the large language model can accurately understand the question sentence and generate more natural, professional and accurate indicator information extraction results. At the same time, it can also enable the large language model to fully consider the context relationship when generating the indicator information extraction results, thereby improving the coherence and diversity of the obtained indicator information extraction results.
[0100] The above is an exemplary description of the process of generating multiple indicator information extraction results corresponding to question sentences by using a large language model pre-trained with standard indicator information. The following is an exemplary description of the process of generating multiple indicator information extraction results corresponding to question sentences by using a general large language model.
[0101] In a possible implementation, the large language model is a universal large language model.
[0102] Optionally, the general large language model may be a general large language model with generation capability, for example, it may be a trained large language model disclosed by any third party, or it may be a large language model including unsupervised training tasks.
[0103] In one possible implementation, Figure 4 A flowchart for determining the extraction results of multiple indicator information corresponding to the question statement in the question-answering processing method provided in the embodiment of the present application, referring to Figure 4 As shown, an exemplary description is given of determining a plurality of indicator information extraction results corresponding to a question statement according to the question statement, the standard indicator information, the pre-built first question template and the large language model, specifically including: S401. Generate a first target statement according to standard indicator information and a pre-constructed first question template.
[0104] Optionally, when the large language model is a universal large language model, a first target sentence that can carry standard indicator information can be generated based on standard indicator information and a pre-built first question template, so that the first target sentence can be input into the large language model to generate multiple indicator information extraction results corresponding to the question sentence.
[0105] Exemplarily, the pre-constructed first question template may be a template of a pre-constructed first prompt statement (Prompt statement for short). Taking fund screening as an example, the question statement, fund screening scenario and standard indicator information input by the user may be added to the first question template to obtain a first target statement.
[0106] Exemplarily, continuing to take fund screening as an example, the generated first target statement can be expressed as: "{Standard indicator information to be inserted}; You are a professional financial question-answering assistant. Your task is to extract the indicator name, condition description, and time attribute of all the base selection indicators in the input question. If the condition description of a base selection indicator is empty, the indicator will not be extracted. The time attribute represents the time range parameter acting on the condition, or the time description of the time-type indicator. The final result is required to be returned in a specific data exchange format (JSON structure for short), and no text description should be output; The "conditions" array represents specific indicator conditions, where "indexName" is the indicator name. When you identify a synonym for an indicator name or a synonym for an indicator in a financial business scenario, you must map it to the indicator name and assign it to "indexName". "conditionValue" represents the condition value, and "timeValue" represents the time attribute. For time-related indicators, the time attribute is the time description. For other types of indicators, the time attribute must be the time range parameter acting on the indicator condition. However, you must pay special attention to the fact that a time range parameter in the input question may act on multiple indicator conditions at the same time. You must analyze and identify it in combination with the context semantics, and convert the Chinese numerals into Arabic numerals. Any indicator of any value type, especially numerical indicators, can be assigned a degree description as "conditionValue", such as: most, least, first few, last few, yes, no, etc. Now enter the question as follows: "{question statement}", please output your return result?" S402: Input the question sentence and the first target sentence into the large language model, extract the indicator answer for the question sentence, and generate multiple indicator information extraction results corresponding to the question sentence.
[0107] Optionally, after obtaining the first target sentence, the question sentence and the first target sentence may be input into a large language model, and indicator answers may be extracted from the question sentence to generate multiple indicator information extraction results corresponding to the question sentence.
[0108] Exemplarily, the question sentence is filled into the corresponding position of the first target sentence, and the filled first target sentence is input into the general large language model, and the indicator answer is extracted from the question sentence to generate multiple indicator information extraction results corresponding to the question sentence.
[0109] A first target sentence is generated through standard indicator information and a pre-constructed first question template, and the question sentence and the first target sentence are input into a large language model to extract indicator answers from the question sentence, thereby generating multiple indicator information extraction results corresponding to the question sentence. This can save a large amount of computing resources and time costs, and reduce the complexity and uncertainty of the large language model during the training process. At the same time, since there is no need for additional training of the model, the user can instantly construct or modify the first question template and immediately obtain a response from the large language model, thereby improving the instant responsiveness when generating multiple indicator information extraction results, and also has the advantages of easy deployment and improved question and answer processing efficiency.
[0110] The above is an exemplary description of the process of determining the extraction results of multiple indicator information corresponding to the question statement, and the following is an exemplary description of the process of determining the indicator association information.
[0111] In a possible implementation, determining indicator association information according to multiple indicator information extraction results, standard indicator information and a large language model is exemplarily described. Specifically, the above step S103 includes: Indicator association information is determined based on multiple indicator information extraction results, standard indicator information, a large language model, and a pre-built second question template.
[0112] It can be understood that when performing relationship analysis on multiple indicator information extraction results to obtain indicator correlation information, a second question template can be pre-constructed according to different business scenarios, and based on standard indicator information, a large language model and the pre-constructed second question template, relationship analysis can be performed on multiple indicator information extraction results to obtain indicator correlation information of multiple indicator information extraction results.
[0113] Optionally, the logical relationship between multiple indicator information extraction results can be analyzed and described based on standard indicator information, a large language model and a pre-constructed second question template to obtain indicator association information of the multiple indicator information extraction results.
[0114] Optionally, the logical relationship between multiple indicator information extraction results can be analyzed and described based on the question statement, standard indicator information, large language model and a pre-constructed second question template to obtain indicator association information of multiple indicator information extraction results to improve the accuracy of the obtained indicator association information.
[0115] By determining indicator association information through multiple indicator information extraction results, standard indicator information, a large language model and a pre-constructed second question template, it is possible to utilize the large parameter amount advantage of the large language model and the super text reasoning ability of the large language model to quickly and accurately generate indicator association information of multiple indicator information extraction results. At the same time, it is also possible to utilize the generalization ability of the large language model to greatly improve and enhance the compatibility and adaptability of user natural language questions and descriptions, thereby improving the intelligence of the question and answer processing method provided in the embodiment of the present application, and also lowering the usage threshold and improving scalability.
[0116] It can be understood that when determining indicator-related information based on multiple indicator information extraction results, standard indicator information, a large language model and a pre-constructed second question template, the large language model used can be selected according to actual conditions. Depending on the different large language models used, different processing steps can be followed, which are exemplified below.
[0117] In a possible implementation, the large language model is a large language model pre-trained using standard indicator information.
[0118] Optionally, the large language model obtained by pre-training with standard indicator information can be understood as taking the standard indicator information and some exemplary corpora related to the standard indicator information as input samples of the large language model, inputting the large language model for pre-training and fine-tuning, and obtaining the large language model obtained by pre-training with standard indicator information.
[0119] In a possible implementation, based on a large language model pre-trained by standard indicator information, a process of determining indicator association information according to multiple indicator information extraction results, standard indicator information, a large language model, and a pre-constructed second question template is exemplarily described, specifically including: The multiple indicator information extraction results and the pre-built second question template are input into the large language model, and the relationship between the multiple indicator information extraction results is analyzed to obtain indicator association information.
[0120] Optionally, multiple indicator information extraction results and a pre-constructed second question template may be input into a large language model pre-trained with standard indicator information, and relationship analysis may be performed on the multiple indicator information extraction results to obtain indicator association information.
[0121] Exemplarily, the pre-constructed second question template can be a template of a pre-constructed second prompt statement (Prompt statement for short). Taking fund screening as an example, the question statement input by the user and the fund screening scenario can be filled in the second question template, and the filled-in second question template is input into the large language model pre-trained with standard indicator information, and the relationship between multiple indicator information extraction results is analyzed to obtain indicator correlation information.
[0122] For example, continuing to take fund screening as an example, the pre-built second question template may be: “{The results of extracting multiple indicator information that need to be inserted}; You are a professional financial question-answering assistant. Your task is to use "or", "and" and brackets to describe the relationship between the various indicator conditions in the results of indicator condition extraction; Requires the final result to be returned in JSON structure, without outputting any text description; "relations" indicates the relationship between the index conditions, which is described by "or", "and", and brackets, and "conditionX" is used to indicate the Xth condition. The number of "conditionX" is the size of the "conditions" array, without omissions; For example, if the input question is: "{Pharmaceutical and technology funds under Y company with a fund size of no less than 45.5 billion yuan in the past five months or funds managed by fund managers under Z fund with a management volume of 8 to 12 funds and a growth rate of no more than 15% in the past three months}", your return result should be: "relations": "(condition1 and condition2 and (condition3 orcondition4)) or (condition5 and condition6 and condition7) Now enter the question as follows: "{question statement}", please output your return result?" By inputting multiple indicator information extraction results and a pre-built second question template into a large language model pre-trained with standard indicator information, the relationship between the multiple indicator information extraction results is analyzed to obtain indicator association information, so that the large language model can accurately understand the question statement and the multiple indicator information extraction results, and can generate more natural, professional and accurate indicator association information. The above is an exemplary description of the process of generating indicator association information by using a large language model pre-trained with standard indicator information. The following is an exemplary description of the process of generating indicator association information by using a general large language model.
[0123] In a possible implementation, the large language model is a universal large language model.
[0124] Optionally, the general large language model may be a general large language model with generation capability, for example, it may be a trained large language model disclosed by any third party, or it may be a large language model including unsupervised training tasks.
[0125] In one possible implementation, Figure 5 A flowchart for obtaining indicator association information in the question-answer processing method provided in the embodiment of the present application, referring to Figure 5 As shown, the process of determining indicator association information according to multiple indicator information extraction results, standard indicator information, a large language model and a pre-built second question template is exemplarily described, specifically including: S501. Generate a second target statement according to standard indicator information and a pre-constructed second question template.
[0126] Optionally, when the large language model is a universal large language model, a second target sentence that can carry standard indicator information can be generated based on standard indicator information and a pre-constructed second question template, so that the second target sentence can be input into the large language model to generate indicator association information.
[0127] Exemplarily, the pre-constructed second question template may be a template for a pre-constructed second prompt statement (Prompt statement for short). Taking fund screening as an example, the question statement, fund screening scenario and standard indicator information input by the user may be added to the second question template to obtain a second target statement.
[0128] For example, continuing to take fund screening as an example, the generated second target statement may be: "{Standard indicator information to be inserted}; {The extraction results of multiple indicator information that need to be inserted}; You are a professional financial question-answering assistant. Your task is to use "or", "and" and brackets to describe the relationship between the various indicator conditions in the results of indicator condition extraction; Requires the final result to be returned in JSON structure, without outputting any text description; "relations" indicates the relationship between the index conditions, which is described by "or", "and", and brackets, and "conditionX" is used to indicate the Xth condition. The number of "conditionX" is the size of the "conditions" array, without omissions; For example, if the input question is: "{Pharmaceutical and technology funds under Y company with a fund size of no less than 45.5 billion yuan in the past five months or funds managed by fund managers under Z fund with a management volume of 8 to 12 funds and a growth rate of no more than 15% in the past three months}", your return result should be: "relations": "(condition1 and condition2 and (condition3 orcondition4)) or (condition5 and condition6 and condition7) Now enter the question as follows: "{question statement}", please output your return result?" S502: Input the multiple indicator information extraction results and the second target sentence into the large language model, perform relationship analysis on the multiple indicator information extraction results, and obtain indicator association information.
[0129] Optionally, after obtaining the second target sentence, the multiple indicator information extraction results and the second target sentence may be input into a large language model, and the relationship between the multiple indicator information extraction results may be analyzed to obtain indicator association information.
[0130] Exemplarily, the plurality of indicator information extraction results may be filled into corresponding positions of the second target sentence, and the filled second target sentence may be input into a universal large language model, and the relationship between the plurality of indicator information extraction results may be analyzed to generate indicator association information.
[0131] Through standard indicator information and a pre-constructed second question template, a second target sentence is generated, and multiple indicator information extraction results and the second target sentence are input into a large language model, and the relationship between the multiple indicator information extraction results is analyzed to obtain indicator association information, which can save a lot of computing resources and time costs, and reduce the complexity and uncertainty of the large language model in the training process. At the same time, since there is no need for additional training of the model, the user can instantly construct or modify the second question template and immediately obtain the response of the large language model, which improves the instant responsiveness when generating multiple indicator association information, and also has the advantages of easy deployment and improved question and answer processing efficiency.
[0132] The above is an exemplary description of the process of determining multiple indicator information extraction results and determining indicator association information. It is worth noting that in the question and answer processing method provided in the embodiment of the present application, the above step S102 and the above step S103 can be combined as a whole for execution. Specifically, the first question template and the second question template can be merged to obtain a target question template, and based on the target question template, combined with the question statement, standard indicator information and the large language model, the two steps of determining the indicator information extraction result and determining the indicator association information are performed at one time, thereby obtaining a combination result of multiple indicator information extraction results and indicator association information.
[0133] For example, continue to take fund screening as an example. When the user inputs the question sentence: "Among the funds managed by managers C and D, which have a return rate of less than 10% in the past three years, have been established for more than two years, and have the lowest drawdown, which five funds are there? Please recommend some to me", the combined result of the determined multiple indicator information extraction results and indicator association information can be expressed as: {"conditions":[{"indexId":"fund_30","indexName":"Fund Manager","conditionValue":"Manager C","timeValue":""},{"indexId":"fund_30","indexName":"Fund Manager","conditionValue":"Manager D","timeValue":""},{"indexId":"fund_10","indexName":"Return of Return","conditionValue":"Less than 10%","timeValue":"In the past 3 years"},{"indexId":"fund_04","indexName":"Establishment Time","conditionValue":"More than 2 years","timeValue":"More than 2 years"},{"indexId":"fund_19","indexName":"Maximum Drawdown","conditionValue":"The lowest 5","timeValue":""}],"relations":"(condition1 orcondition2) and condition3 and condition4 and condition5","conditionSize":5}.
[0134] Among them, conditionSize represents the size of the "conditions" array of the indicator information extraction result, which is used as an auxiliary field. The merged result is directly presented in Json format to facilitate the standardization of the indicator information extraction results and indicator-related information in subsequent steps.
[0135] The above describes the process of determining multiple indicator information extraction results and determining indicator association information. After obtaining multiple indicator information extraction results and indicator association information, since multiple indicator information extraction results and indicator association information may have format problems or non-standard expressions, the multiple indicator information extraction results and indicator association information can be standardized, as exemplified below.
[0136] In a possible implementation, the standardization strategy includes: an indicator information standardization strategy and an association relationship standardization strategy.
[0137] It can be understood that since the indicator information extraction results and indicator association information are used to represent different information in the question statement, when standardizing, the indicator information extraction results and indicator association relationships can be standardized separately to improve the accuracy of the obtained target question structure.
[0138] Optionally, the indicator information standardization strategy is used to standardize the indicator information extraction results, and the association relationship standardization strategy is used to standardize the indicator association information.
[0139] In one possible implementation, Figure 6 A flowchart for generating a target question structure corresponding to a question statement in the question-answering processing method provided in an embodiment of the present application, referring to Figure 6 As shown, the process of performing standardization processing on the indicator association information and the extraction results of multiple indicator information based on the preset standardization strategy to generate the target question structure corresponding to the question statement is exemplarily described. Specifically, the above step S104 includes: S601. Perform standardization processing on multiple indicator information extraction results according to the indicator information standardization strategy to obtain first standardized results corresponding to the multiple indicator information extraction results.
[0140] Optionally, according to the indicator information standardization strategy, the indicator identifiers, indicator conditions and time information in the multiple indicator information extraction results can be standardized respectively to obtain the first standardized results corresponding to the multiple indicator information extraction results. The first standardized result is a set of multiple standardized indicator information extraction results obtained after the multiple indicator information extraction results are standardized.
[0141] S602: Perform standardization processing on the indicator association information according to the association relationship standardization strategy to obtain a second standardization result corresponding to the indicator association information.
[0142] Optionally, the indicator association information may be standardized according to the association relationship standardization strategy to obtain a second standardized result corresponding to the indicator association information, wherein the second standardized result is standardized indicator association information obtained after the indicator association information is standardized.
[0143] S603: Fusing the first normalization result and the second normalization result to obtain a target question structure corresponding to the question statement.
[0144] Optionally, after obtaining the first standardized result and the second standardized result, the first standardized result and the second standardized result can be fused and converted into a standard specific data exchange format (JSON structure for short) so that all indicator information extraction results and indicator-related information can be fully described through a standard JSON structure. Moreover, since the JSON structure also has the characteristics of universal identifiability, any application layer can read the JSON structure for query.
[0145] For example, continuing to take fund screening as an example, when the question sentence input by the user is "Among the funds managed by managers C and D, which have a return rate of less than 10% in the past three years, have been established for more than two years, and have the lowest drawdown, which are the five funds? Recommend some to me", the target question structure corresponding to the question sentence can be: {"mode":"multiple","multipleCondition":{"fundConditionList":[{"mode":"multiple","multipleCondition":{"fundConditionList":[{"mode":"single","singleCondition":{"indexUnit":{"indexId":"fund_30","indexName":"Manager Name","indexType":1,"indexValueCondition":{"enumValue":"Manager C"}}}},{"mode":"single","singleCondition":{"indexUnit":{"indexId":"fund_30","indexName":"Manager Name","indexType":1,"indexValueCondition":{"enumValue":"Manager D"}}}}],"relation":"or"}},{"mode":"single","singleCondition":{"indexUnit":{"indexId":"fund_10","indexName":"Yield Rate","indexType":4,"indexValueCondition":{"dictId":"smcon_unit_percent_01","dictValue":"%","maxValue":10,"maxValueInclude":false},"timeCondition":{"norTimeCondition":{"dictId":"smcon_unit_time_15","dictValue":"In the recent X years","maxValue":3.0,"maxValueInclude":true,"minValue":3.0,"minValueInclude":true},"stdTimeCondition":{"beginTime":"2021-05-09 20:52:28","beginTimeInclude":true,"endTime":"2024-05-09 20:52:28","endTimeInclude":true}}}}},{"mode":"single","singleCondition":{"indexUnit":{"indexId":"fund_04","indexName":"Establishment Time","indexTyp e":5,"indexValueCondition":{"dictId":"smcon_unit_time_07","dictValue":"year","minValue":2,"minValueInclude":false}}}}],"relation":"and"}}. .
[0146] For example, Figure 7 A schematic diagram of a module of the index condition standardization module in the fund screening system provided in the embodiment of the present application, referring to Figure 7 As shown, the processing process of this step can be implemented through the indicator information standardization module and the association relationship standardization module in the indicator condition standardization module.
[0147] Through the indicator information standardization strategy, multiple indicator information extraction results are standardized to obtain the first standardized result corresponding to the multiple indicator information extraction results, and through the association relationship standardization strategy, the indicator association information is standardized to obtain the second standardized result corresponding to the indicator association information, and the first standardized result and the second standardized result are fused to obtain the target question structure corresponding to the question statement, which can improve the accuracy and universality of the obtained target question structure.
[0148] The following is an exemplary description of the standardization process of the indicator information extraction results.
[0149] In a possible implementation, the indicator information standardization strategy includes: an identification standardization strategy, a condition standardization strategy, and a time standardization strategy.
[0150] Optionally, the identification standardization strategy is used to standardize the indicator identification in the indicator information extraction result, the condition standardization strategy is used to standardize the indicator conditions in the indicator information extraction result, and the time standardization strategy is used to standardize the time information in the indicator information extraction result.
[0151] In one possible implementation, Figure 8 A flowchart for determining the first standardized result in the question-answer processing method provided in the embodiment of the present application, referring to Figure 8 As shown, the process of performing standardization processing on multiple indicator information extraction results according to the indicator information standardization strategy to obtain the first standardized results corresponding to the multiple indicator information extraction results is exemplarily described. Specifically, the above step S601 includes: S801. According to the identifier standardization strategy, the indicator identifier in the indicator information extraction result is standardized to generate a standard identifier triple corresponding to the indicator identifier.
[0152] It is understandable that when generating the indicator information extraction result, the indicator information extraction result is affected by the large language model, the question sentence and the standard indicator information. The indicator information extraction result may have several situations: First, the indicator information extraction result output by the large language model is the content in the standard indicator information. Then the indicator information extraction result at this time is the standard indicator information extraction result. Then, based on the indicator information extraction result at this time, you can directly query from the standard indicator information to obtain the standard identifier triple corresponding to the indicator identifier.
[0153] The second type is that due to the influence of the question statement, the indicator information extraction result output by the large language model is not the content in the standard indicator information. In this case, the indicator information extraction result needs to be processed. According to different business scenarios, an entity standard file can be pre-built to store the synonym / synonym list of the indicator name in the entity standard file to replace the indicator information extraction result in this case, so that the standard indicator information can be queried according to the replaced indicator name to obtain the standard identifier triple corresponding to the indicator identifier.
[0154] Optionally, in the second case, the identification standardization strategy may include standardization of indicator numbers, standardization of indicator names, and standardization of indicator types. According to the identification standardization strategy, the indicator identification in the indicator information extraction result is standardized, and generating a standard identification triplet corresponding to the indicator identification may include standardizing the indicator name, indicator number, and indicator type in the indicator identification.
[0155] The standard identification triplet includes an indicator number, an indicator name, and an indicator type. The indicator identification in the standard identification triplet may include the indicator name, indicator number (abbreviated as ID), and indicator type in the standard indicator information.
[0156] For example, Fig. 9 A schematic diagram of a module of the identification standardization module in the fund screening system provided in the embodiment of the present application, referring to Fig. 9 As shown, the processing process of this step can be implemented by identifying the indicator number standardization module, the indicator name standardization module and the indicator type standardization module in the standardization module.
[0157] S802: According to the condition standardization strategy, the indicator conditions in the indicator information extraction result are standardized to generate a standard condition seven-tuple corresponding to the indicator conditions.
[0158] Optionally, in order to make the obtained indicator conditions in a unified form, the indicator conditions in the indicator information extraction results can be standardized according to the condition standardization strategy to generate a standard condition seven-tuple corresponding to the indicator conditions. The standard condition seven-tuple includes the minimum value, whether the minimum value is included, the maximum value, whether the maximum value is included, the unit, the sorting method, and the number of filters.
[0159] Exemplarily, the condition standardization strategy may include different types of indicator conditions, and an indicator condition description database for different types of indicator conditions may be pre-constructed to store the mapping relationship between the indicator conditions and the standard condition seven-tuples of the indicator conditions. After obtaining the indicator conditions, the indicator conditions may be matched with the indicator condition description database, and the indicator conditions may be standardized based on the matching results to generate the standard condition seven-tuples corresponding to the indicator conditions.
[0160] For example, taking fund screening as an example, the indicator conditions involved in the fund screening scenario can be summarized in advance to obtain six value types of indicator conditions in the fund screening scenario, namely: enumeration value (for example: fund type), text value (for example: fund company name), amount value (for example: fund size), hundredth / thousandth value (for example: fund yield), general time value (for example: establishment time) and pure value (for example: fund manager's years of experience).
[0161] For example, after obtaining six value types of indicator conditions in the fund screening scenario, the six value types are analyzed to determine that the indicator conditions of enumeration values and text values can be fixedly regarded as strings, and the indicator conditions of the remaining four value types are defined.
[0162] Exemplarily, the definition of the remaining four types of index conditions can be obtained: numerical index conditions, degree index conditions, ranking index conditions and special index conditions.
[0163] For example, after obtaining the indicator condition, the indicator condition can be matched to which value type it belongs to. If the indicator condition belongs to a numerical indicator condition, the first intermediate format [minimum value, whether the minimum value is included, maximum value, whether the maximum value is included, unit] can be used to convert the indicator condition. For example, if the question statement is "the establishment time must be greater than 2 years", and the indicator condition obtained is "greater than 2 years", then the indicator condition can be converted to [2, false, null, false, "year"].
[0164] For example, if the indicator condition belongs to the degree indicator condition, the second intermediate format [sorting method, screening quantity] can be used to convert the indicator condition. For example, if the question statement is "the rate of return is good", the indicator condition obtained is "good", then the indicator condition can be converted to ["desc", 10].
[0165] For example, if the indicator condition belongs to the ranking indicator condition, the third intermediate format [sorting method, screening quantity] can be used to convert the indicator condition. For example, if the question statement is "the 5 funds with the lowest drawdown", and the indicator condition obtained is "the lowest 5", then the indicator condition can be converted to ["asc", 5].
[0166] For example, if the indicator condition belongs to a special indicator condition, the indicator condition can be converted by mapping it to a standard condition according to the actual situation. For example, if the question statement is "the fund of company X is fully invested", the indicator condition obtained is "fully invested", which actually means that the position of company X accounts for 100%, then the indicator condition can be converted to [100, true, 100, true, "%"].
[0167] Exemplarily, the six value types of the above indicator conditions are merged to confirm that the result of the standardized indicator condition value can be expressed using the standard condition seven-tuple [minimum value, whether the minimum value is included, maximum value, whether the maximum value is included, unit, sorting method, and number of filters].
[0168] For example, Fig.10 A schematic diagram of a condition standardization module in the fund screening system provided in the embodiment of the present application, referring to Fig.10 As shown, the processing process of this step can be implemented through the numerical indicator condition standardization module, the degree indicator condition standardization module, the ranking indicator condition standardization module, the indicator name standardization module and the special indicator condition standardization module in the condition standardization module.
[0169] S803: According to the time standardization strategy, the time information in the indicator information extraction result is standardized to generate a standard time quintuple corresponding to the time information.
[0170] Optionally, in order to make the obtained time information in a unified form, the time information in the indicator information extraction result may be standardized according to a time standardization strategy to generate a standard time quintuple corresponding to the time information.
[0171] The standard time quintuple can be in two forms. You can choose any one of them when standardizing. The first form can include five elements: minimum value, whether the minimum value is included, maximum value, whether the maximum value is included, and unit. The second form can include four elements: start time, whether the start time is included, end time, and whether the end time is included.
[0172] Exemplarily, a time information description database for time information can be pre-constructed to store the mapping relationship between time information and the standard time quintuple of time information. After obtaining the time information, the time information can be matched with the time information description database, and then the time information can be standardized based on the matching results to generate a standard time quintuple corresponding to the time information.
[0173] Exemplarily, taking fund screening as an example, when the time information obtained is "since establishment", the time information can be converted to [null, false, null, false, "since establishment"]; when the time information obtained is "in the past 3 years", the time information can be converted to [3, true, 3, true, "in the past X years"].
[0174] Exemplarily, taking fund screening as an example, assuming that today's date is "2024-05-01", when the time information obtained is "recent 3 years", the time information can also be converted to ["2021-05-01", true, "2024-05-01", true,].
[0175] S804: Generate a first standardized result corresponding to multiple indicator information extraction results according to the standard identification triplet, the standard condition septet and the standard time quintuple.
[0176] Optionally, after obtaining a standard identifier triplet, a standard condition septet and a standard time quintuple of an indicator information extraction result, the standard identifier triplet, the standard condition septet and the standard time quintuple can be fused to generate a first intermediate standardized result corresponding to the indicator information extraction result.
[0177] Optionally, after obtaining a plurality of first intermediate standardization results, the plurality of first intermediate standardization results may be combined to generate a plurality of first standardization results corresponding to the indicator information extraction results.
[0178] For example, the composition structure of the first intermediate normalization result (indicator BU for short) may be as shown in Table 2 below: Table 2
[0179] For example, continuing to take fund screening as an example, when the question sentence entered by the user is "Among the funds managed by Manager C and Manager D, which have a return rate of less than 10% in the past three years, have been established for more than two years, and have the lowest drawdown, which are the five funds? Recommend some to me", the first standardized result corresponding to the multiple indicator information extraction results can be expressed as: {"indexUnit":{"indexId":"fund_19","indexName":"Maximum retracement ranking","indexType":4,"indexValueCondition":{"maxValue":4,"maxValueInclude":false,"dictId":"smcon_unit_percent_01","dictValue":"%"},"timeCondi tion":{"norTimeCondition":{"minValue":3,"minValueInclude":true,"maxValue":3,"maxValueInclude":true,"dictId":"smcon_unit_time_13","dictValue":"Last X months"},"stdTimeCondition":{"beginTime":"2023-07-30 00:00:00","beginTimeInclude":true,"endTime":"2023-10-30 00:00:00","endTimeInclude":true}}}}.
[0180] Through the identification standardization strategy, the indicator identification in the indicator information extraction result is standardized to generate a standard identification triplet corresponding to the indicator identification; through the condition standardization strategy, the indicator conditions in the indicator information extraction result are standardized to generate a standard condition septet corresponding to the indicator conditions; through the time standardization strategy, the time information in the indicator information extraction result is standardized to generate a standard time quintuple corresponding to the time information; and through the standard identification triplet, standard condition septet and standard time quintuple, a first standardized result corresponding to multiple indicator information extraction results is generated, which can improve the accuracy and universality of the obtained first standardized result, thereby improving the accuracy and universality of the obtained target question structure, making the question and answer processing method provided in the embodiment of the present application more accurate, and can also make the accuracy of the final answer information independent of the design method and design form of the application layer, ensuring that the application layer and the question and answer processing method provided in the embodiment of the present application remain separated and do not interact.
[0181] In one possible implementation, Fig.11 A flowchart for generating a standard identifier triple corresponding to an indicator identifier in the question-answer processing method provided in an embodiment of the present application, referring to Fig.11 As shown, the process of standardizing the indicator identifier in the indicator information extraction result according to the identifier standardization strategy and generating a standard identifier triple corresponding to the indicator identifier is exemplarily described. Specifically, the above step S802 includes: S1101. Search for indicator identifiers from pre-built entity standard files.
[0182] Optionally, an entity standard file may be pre-built according to different business scenarios to store synonyms or near-synonyms of indicator names.
[0183] Optionally, when the indicator identifier is standardized, the indicator name in the indicator identifier may be looked up from a pre-built entity standard file.
[0184] S1102. If there is an indicator identifier in the entity standard file, determine the target indicator identifier according to the entity standard file and the standard indicator information, and replace the indicator identifier according to the target indicator identifier to generate a standard identifier triple corresponding to the indicator identifier.
[0185] Optionally, if the indicator name in the indicator identifier exists in the entity standard file, it can be determined that the indicator identifier at this time is a non-standard indicator identifier and needs to be replaced. The replaced indicator name corresponding to the indicator name can be determined from the entity standard file, and based on the replaced indicator name, the replaced indicator identifier, that is, the target indicator identifier, can be determined from the standard indicator information, and the non-standard indicator identifier can be replaced based on the target indicator identifier to generate a standard identifier triple corresponding to the indicator identifier.
[0186] By searching for the indicator identifier from a pre-built entity standard file, if the indicator identifier exists in the entity standard file, the target indicator identifier is determined based on the entity standard file and the standard indicator information, and the indicator identifier is replaced based on the target indicator identifier to generate a standard identifier triple corresponding to the indicator identifier, thereby improving the accuracy of the obtained standard indicator identifier triple.
[0187] The above is an exemplary description of the standardization process of the indicator information extraction results. It can be understood that after the indicator information extraction results are standardized, the indicator association information also needs to be standardized. The following is an exemplary description.
[0188] In a possible implementation, the indicator association information is represented by a character string.
[0189] Optionally, the indicator association information can be understood as a logical relationship expression string containing three logical operators: "and", "or", and brackets.
[0190] In one possible implementation, Fig.12 A flowchart for obtaining a second standardized result corresponding to the indicator association information in the question-answer processing method provided in the embodiment of the present application, referring to Fig.12 As shown, the process of performing standardization processing on the indicator association information according to the association relationship standardization strategy to obtain the second standardization result corresponding to the indicator association information is exemplarily described. Specifically, the above step S602 includes: S1201. Starting from the first character of the string, parse the characters in the string one by one.
[0191] It can be understood that the process of standardizing indicator-related information is the process of parsing and converting strings. Since the string contains three logical operators, "and", "or", and brackets, when parsing and converting the string, the string needs to be converted into a JSON data structure with a nested hierarchical relationship. Therefore, each character needs to be parsed one by one, and the string needs to be parsed through data structures (such as trees, stacks) and algorithms (such as recursive algorithms and planning algorithms) according to the pre-built standard base selection conditions.
[0192] Optionally, the character string representing the indicator association information is parsed one by one starting from the first character.
[0193] For example, the composition structure of the standard base selection conditions can be shown in Table 3 below: Table 3
[0194] For example, the composition structure of the standard base selection conditions can be shown in Table 4 below: Table 4
[0195] S1202: Generate a second standardized result having a nested hierarchical relationship corresponding to the indicator association information according to the positions of the characters used to represent the association relationship and the values of the characters not used to represent the association relationship.
[0196] Optionally, each character in the string may be read first, and parsed to determine whether the character is a character used to represent the association relationship or a character not used to represent the association relationship, and then a second standardized result having a nested hierarchical relationship corresponding to the indicator association information may be generated based on the position of the character.
[0197] The above is a detailed description of the execution process of the question and answer processing method provided in the embodiment of the present application.
[0198] It can be understood that the present application also verifies the execution results of the question and answer processing method provided in the embodiment of the present application.
[0199] For example, Fig.13 A schematic diagram of a fund screening system provided in an embodiment of the present application, referring to Fig.13 As shown, this application uses the version of gpt-3.5-turbo as the base LLM large language model, and subdivides it from several major dimensions such as basic information, profitability, risk control capabilities, position characteristics, fund managers, and fund companies in the business scenario. It sorts out more than 40 commonly used indicator conditions in the fund screening scenario, and clearly defines the indicator number, indicator name, indicator type, time information and other elements of each indicator to form a standard indicator letter. Technically, a customized question template is developed for this standard indicator letter, and the question statement input module, indicator information extraction module, conditional relationship parsing module, indicator condition standardization module, application layer conversion module and result output module of the fund screening system are developed and implemented.
[0200] For example, this application also sorted out 100 real fund screening questions as a test set based on the actual application scenario of fund screening, and used these test sets to run the fund screening system and conduct tests, and obtained the following conclusions: 1. The accuracy of the target question structure generated by the question-answering processing method provided in the embodiment of the present application reaches 92%.
[0201] 2. By connecting to the existing developed and designed conditional fund selection standard function component at the application layer, the fund screening result can be directly obtained by calling the conditional fund selection standard component. It can be determined that the accuracy of the fund screening result given by the question and answer processing method provided in the embodiment of the present application has reached 81%.
[0202] Based on the same inventive concept, a question and answer processing device corresponding to the question and answer processing method is also provided in the embodiment of the present application. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the above-mentioned question and answer processing method in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0203] Fig.14 A schematic diagram of a question-answer processing device provided in an embodiment of the present application, referring to Fig.14 As shown, the device includes: an acquisition module 1401, an indicator information extraction module 1402, an indicator association information determination module 1403 and a standardized output module 1404. An acquisition module 1401 is used to acquire a question sentence input by a user in a natural language; The indicator information extraction module 1402 is used to determine multiple indicator information extraction results corresponding to the question statement according to the question statement, pre-stored standard indicator information and the large language model, the standard indicator information is used to indicate the mapping relationship between the standard indicator name, indicator type and time, and each indicator information extraction result includes: indicator identification, indicator condition and time information; The indicator association information determination module 1403 is used to determine the indicator association information according to the multiple indicator information extraction results, the standard indicator information and the large language model. The indicator association information is used to characterize the association relationship between the indicator information extraction results. The association relationship includes: or, and and includes; The standardized output module 1404 is used to standardize the indicator association information and multiple indicator information extraction results based on a preset standardized strategy, generate a target question structure corresponding to the question statement, and query the answer information corresponding to the question statement based on the target question structure.
[0204] In a possible implementation, the indicator information extraction module 1402 is specifically configured to: According to the question statement, the standard indicator information, the pre-built first question template and the large language model, multiple indicator information extraction results corresponding to the question statement are determined.
[0205] In a possible implementation, the large language model is a large language model pre-trained by standard indicator information; the indicator information extraction module 1402 is specifically used to: The question statement and the pre-built first question template are input into the large language model, the indicator answer is extracted from the question statement, and a plurality of indicator information extraction results corresponding to the question statement are generated.
[0206] In a possible implementation, the large language model is a general large language model; the indicator information extraction module 1402 is specifically used to: Generate a first target statement according to the standard indicator information and a pre-constructed first question template; The question sentence and the first target sentence are input into the large language model, the indicator answer is extracted for the question sentence, and multiple indicator information extraction results corresponding to the question sentence are generated.
[0207] In a possible implementation, the indicator association information determination module 1403 is specifically configured to: Indicator association information is determined based on multiple indicator information extraction results, standard indicator information, a large language model, and a pre-built second question template.
[0208] In a possible implementation, the large language model is a large language model pre-trained by standard indicator information; the indicator association information determination module 1403 is specifically used to: The multiple indicator information extraction results and the pre-built second question template are input into the large language model, and the relationship between the multiple indicator information extraction results is analyzed to obtain indicator association information.
[0209] In a possible implementation, the large language model is a general large language model; the indicator association information determination module 1403 is specifically used to: Generate a second target statement based on the standard indicator information and a pre-constructed second question template; The multiple indicator information extraction results and the second target sentence are input into the large language model, and the relationship between the multiple indicator information extraction results is analyzed to obtain indicator association information.
[0210] In a possible implementation, the standardization strategy includes: an indicator information standardization strategy and an association relationship standardization strategy; the standardization output module 1404 is specifically used to: According to the indicator information standardization strategy, multiple indicator information extraction results are standardized to obtain first standardized results corresponding to the multiple indicator information extraction results; According to the association relationship standardization strategy, the indicator association information is standardized to obtain a second standardized result corresponding to the indicator association information; The first normalization result and the second normalization result are fused to obtain a target question structure corresponding to the question statement.
[0211] In a possible implementation, the indicator information standardization strategy includes: an identification standardization strategy, a condition standardization strategy, and a time standardization strategy; the standardization output module 1404 is specifically used to: According to the identification standardization strategy, the indicator identification in the indicator information extraction result is standardized to generate a standard identification triple corresponding to the indicator identification, and the standard identification triple includes the indicator number, indicator name and indicator type; According to the condition standardization strategy, the indicator conditions in the indicator information extraction results are standardized to generate a standard condition seven-tuple corresponding to the indicator conditions. The standard condition seven-tuple includes the minimum value, whether the minimum value is included, the maximum value, whether the maximum value is included, the unit, the sorting method, and the number of filters. According to the time standardization strategy, the time information in the indicator information extraction results is standardized to generate a standard time quintuple corresponding to the time information; According to the standard identification triplet, the standard condition septet and the standard time quintuple, a first standardized result corresponding to the plurality of indicator information extraction results is generated.
[0212] In a possible implementation, the standardized output module 1404 is specifically configured to: Find indicator identifiers from pre-built entity standard files; If there is an indicator identifier in the entity standard file, the target indicator identifier is determined according to the entity standard file and the standard indicator information, and the indicator identifier is replaced according to the target indicator identifier to generate a standard identifier triple corresponding to the indicator identifier.
[0213] In a possible implementation, the indicator association information is represented by a character string; the standardized output module 1404 is specifically used to: Starting from the first character of the string, parse the characters in the string one by one; A second standardized result having a nested hierarchical relationship corresponding to the indicator association information is generated according to the positions of the characters used to represent the association relationship and the values of the characters not used to represent the association relationship.
[0214] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0215] The present application embodiment also provides an electronic device 1500, such as Fig.15 As shown, Fig.15The structural diagram of the electronic device provided in the embodiment of the present application includes: a processor 1501, a memory 1502, and optionally, a bus 1503. The memory 1502 stores machine-readable instructions executable by the processor 1501 (for example, Fig.14 The device acquires the execution instructions corresponding to the module 1401, the indicator information extraction module 1402, the indicator association information determination module 1403 and the standardized output module 1404, etc.), when the electronic device 1500 is running, the processor 1501 communicates with the memory 1502 through the bus 1503, and the steps of the above-mentioned question and answer processing method are executed by the processor 1501.
[0216] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned question and answer processing method are executed.
[0217] An embodiment of the present application also provides a computer program product, which includes a computer program code. When the computer program code is executed by a computing device, the computing device executes the steps of the above-mentioned data access processing method.
[0218] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules 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 communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0219] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the function 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 invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program code.
[0220] The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.
Claims
1. A question-answering processing method, characterized in that: include: Obtain a question sentence input by the user in natural language; Determine, according to the question statement, pre-stored standard indicator information and a large language model, a plurality of indicator information extraction results corresponding to the question statement, wherein the standard indicator information is used to indicate a mapping relationship between a standard indicator name, an indicator type and a time, and each of the indicator information extraction results includes: an indicator identifier, an indicator condition and a time information; Determine indicator association information according to the plurality of indicator information extraction results, the standard indicator information and the large language model, wherein the indicator association information is used to characterize the association relationship between the indicator information extraction results, and the association relationship includes: or, and and includes; Based on a preset standardization strategy, the indicator association information and the extraction results of the multiple indicator information are standardized to generate a target question structure corresponding to the question statement, and the answer information corresponding to the question statement is queried based on the target question structure.
2. The question-answer processing method according to claim 1, characterized in that: The step of determining, based on the question statement, pre-stored standard indicator information, and the large language model, a plurality of indicator information extraction results corresponding to the question statement includes: According to the question statement, the standard indicator information, a pre-constructed first question template and a large language model, a plurality of indicator information extraction results corresponding to the question statement are determined.
3. The question-answer processing method according to claim 2, characterized in that: The large language model is a large language model pre-trained by the standard indicator information; The step of determining, based on the question statement, the standard indicator information, the pre-built first question template, and the large language model, a plurality of indicator information extraction results corresponding to the question statement includes: The question statement and the pre-constructed first question template are input into the large language model, and indicator answers are extracted from the question statement to generate a plurality of indicator information extraction results corresponding to the question statement.
4. The question-answer processing method according to claim 2, characterized in that: The large language model is a general large language model; The step of determining, based on the question statement, the standard indicator information, the pre-built first question template, and the large language model, a plurality of indicator information extraction results corresponding to the question statement includes: Generate a first target statement according to the standard indicator information and the pre-constructed first question template; The question sentence and the first target sentence are input into the large language model, and indicator answers are extracted from the question sentence to generate a plurality of indicator information extraction results corresponding to the question sentence.
5. The question-answer processing method according to claim 1, characterized in that: The step of determining indicator association information according to the plurality of indicator information extraction results, the standard indicator information and the large language model includes: The indicator association information is determined according to the plurality of indicator information extraction results, the standard indicator information, the large language model and a pre-constructed second question template.
6. The question-answer processing method according to claim 5, characterized in that: The large language model is a large language model pre-trained by the standard indicator information; The step of determining the indicator association information according to the plurality of indicator information extraction results, the standard indicator information, the large language model, and the pre-constructed second question template includes: The plurality of indicator information extraction results and the pre-constructed second question template are input into the large language model, and the relationship between the plurality of indicator information extraction results is analyzed to obtain the indicator association information.
7. The question-answer processing method according to claim 5, characterized in that: The large language model is a general large language model; The step of determining the indicator association information according to the plurality of indicator information extraction results, the standard indicator information, the large language model, and the pre-constructed second question template includes: Generate a second target statement according to the standard indicator information and the pre-constructed second question template; The plurality of indicator information extraction results and the second target sentence are input into the large language model, and relationship analysis is performed on the plurality of indicator information extraction results to obtain the indicator association information.
8. The question-answer processing method according to claim 1, characterized in that: The standardization strategy includes: indicator information standardization strategy and association relationship standardization strategy; The method of performing standardization processing on the indicator association information and the plurality of indicator information extraction results based on a preset standardization strategy to generate a target question structure corresponding to the question statement includes: According to the indicator information standardization strategy, the plurality of indicator information extraction results are standardized to obtain first standardized results corresponding to the plurality of indicator information extraction results; According to the association relationship standardization strategy, the indicator association information is standardized to obtain a second standardized result corresponding to the indicator association information; The first standardized result and the second standardized result are fused to obtain a target question structure corresponding to the question sentence.
9. The question-answer processing method according to claim 8, characterized in that: The indicator information standardization strategy includes: identification standardization strategy, condition standardization strategy and time standardization strategy; The step of performing standardization processing on the plurality of indicator information extraction results according to the indicator information standardization strategy to obtain first standardized results corresponding to the plurality of indicator information extraction results includes: According to the identification standardization strategy, the indicator identification in the indicator information extraction result is standardized to generate a standard identification triple corresponding to the indicator identification, wherein the standard identification triple includes an indicator number, an indicator name, and an indicator type; According to the condition standardization strategy, the indicator conditions in the indicator information extraction result are standardized to generate a standard condition seven-tuple corresponding to the indicator condition, wherein the standard condition seven-tuple includes a minimum value, whether the minimum value is included, a maximum value, whether the maximum value is included, a unit, a sorting method, and a screening quantity; According to the time standardization strategy, the time information in the indicator information extraction result is standardized to generate a standard time quintuple corresponding to the time information; A first standardized result corresponding to the plurality of indicator information extraction results is generated according to the standard identification triplet, the standard condition seven-tuple and the standard time five-tuple.
10. The question-answer processing method according to claim 9, characterized in that: The step of performing standardization processing on the indicator identifier in the indicator information extraction result according to the identifier standardization strategy to generate a standard identifier triple corresponding to the indicator identifier includes: Find the indicator identifier from a pre-built entity standard file; If the indicator identifier exists in the entity standard file, the target indicator identifier is determined according to the entity standard file and the standard indicator information, and the indicator identifier is replaced according to the target indicator identifier to generate a standard identifier triple corresponding to the indicator identifier.
11. The question-answer processing method according to claim 8, characterized in that: The indicator association information is represented by a character string; The step of performing standardization processing on the indicator association information according to the association relationship standardization strategy to obtain a second standardization result corresponding to the indicator association information includes: Starting from the first character of the string, parse the characters in the string one by one; The second standardized result having a nested hierarchical relationship corresponding to the indicator association information is generated according to the positions of the characters used to represent the association relationship and the values of the characters not used to represent the association relationship.
12. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor executes the machine-readable instructions to perform the steps of the question-answering processing method as described in any one of claims 1 to 11.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the question-answering processing method as described in any one of claims 1 to 11 are executed.
14. A computer program product, characterized in that The computer program product includes computer program code. When the computer program code is executed by a computing device, the computing device executes the steps of the question and answer processing method described in any one of claims 1 to 11.
Citation Information
Patent Citations
Stock question and answer method
CN116467347A
Knowledge question-answering method, device and product based on space-time semantic constraint
CN117332097A
Document question-answering method, document question-answering device and readable storage medium
CN117668180A
Intelligent question and answer method and device, electronic equipment and storage medium
CN117932022A
Cited By
Logical reasoning question answering method, related device, equipment and storage medium
CN119917609A
Visual data processing method and device based on large language model, equipment and medium
CN119938855A
Text processing method and system based on large language model
CN120104781A
A text processing method and system based on large language model
CN120104781B
Question and answer query method and device based on large model
CN120910222A
