Parameter extraction method and device, storage medium and program product

By building a corpus, recalling the filtering conditions using vector models and iterating the training of the base model, the problem of low efficiency and accuracy of parameter extraction of domain problems is solved, efficient and accurate information extraction is achieved, and the effectiveness and user experience of specific domain questions and answers are improved.

CN119597892APending Publication Date: 2025-03-11CHINA MERCHANTS BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411728171.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

Before the large-scale model was widely used, parameter extraction of domain problems mainly relied on sequence labeling models and a large amount of labeling data, and it was impossible to quickly understand specific knowledge in specific fields, user problems, and efficiently handle complex conditional relationships, resulting in low accuracy and efficiency of information extraction.

Method used

The pre-constructed corpus obtains the conditional question for user questions, uses the pre-trained vector model to analyze the conditional question, recalls the filter conditions for user questions, and iteratively trains the conditional question and filter conditions through the base model, updates the corpus and obtains the domain conditional extraction model, and generates the extraction result.

Benefits of technology

It realizes efficient conversion from user problems in specific fields to precise extraction conditions, improves the accuracy and efficiency of information extraction, especially in specific fields Q&A scenarios, and improves the effect and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597892A_ABST
    Figure CN119597892A_ABST
Patent Text Reader

Abstract

The invention discloses a parameter extraction method and device, a storage medium and a program product, and relates to the technical field of natural language processing, and the parameter extraction method comprises the steps that conditional questions of user questions are acquired according to a pre-constructed corpus; analyzing the conditional question through a pre-trained vector model, and recalling a screening condition of the user question; performing iterative training on the conditional question and the screening condition through a base model, updating the corpus, and obtaining a domain condition extraction model; and generating an extraction result according to the domain condition extraction model. According to the method, the conditions in the user questions are efficiently, accurately and flexibly extracted by constructing the cue words, constructing the training data and adjusting the field large model to construct the field condition extraction model, so that efficient conversion from the user questions in the specific field to the accurate extraction conditions is realized, and the accuracy and efficiency of information extraction are improved; and particularly, the effect of question-answering scenes in specific fields and the user experience are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of natural language processing technology, and in particular to a parameter extraction method, device, storage medium and program product. Background Art

[0002] Before large models were widely used, the common method for extracting the parameters required by the interface from domain problems was to train a sequence annotation model. This method first requires the collection of a large amount of annotated corpus, which contains the tags of the required slot information in the sentence, usually represented by BIO (Begin, Inside, Outside) tags, and then uses these annotated data to train the sequence annotation model so that the required parameters can be extracted from the text.

[0003] When using a general large model for conditional extraction, a large amount of domain knowledge needs to be stitched together to help the model understand the meaning of the problem. This domain knowledge can be explanations of specific terms, domain rules, common phrases, etc., which help the model better understand problems in a specific field and extract relevant information from it.

[0004] In general, before the widespread use of large models, parameter extraction of domain problems mainly relied on sequence labeling models and a large amount of labeled data. It was impossible to quickly understand the specific knowledge of a specific field, user problems, and the need to efficiently handle complex conditional relationships, and the accuracy and efficiency of information extraction were low.

[0005] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0006] The main purpose of this application is to provide a parameter extraction method, device, storage medium and program product, aiming to solve the technical problems of the inability to quickly understand specific knowledge in a specific field and the need to efficiently process complex conditional relationships, and the low accuracy and efficiency of information extraction.

[0007] To achieve the above object, the present application proposes a parameter extraction method, which comprises:

[0008] Obtain conditional sentences of user questions based on a pre-built corpus;

[0009] Analyze the conditional question using a pre-trained vector model to retrieve the screening conditions of the user's question;

[0010] Iteratively training the conditional questions and screening conditions through a base model, updating the corpus and obtaining a domain condition extraction model;

[0011] The extraction model generates extraction results according to the domain conditions.

[0012] In one embodiment, the step of obtaining the conditional question sentence of the user's question according to the pre-built corpus includes:

[0013] Single conditional questions that manually mark all conditions of the user's question;

[0014] Analyze the logical relationship between the single conditional questions;

[0015] Combining the single conditional question into multiple conditional questions using the large model according to the logical relationship;

[0016] Write regular expressions to identify and eliminate illogical compound questions;

[0017] A corpus is constructed according to the synthetic questions and single conditional questions.

[0018] In one embodiment, the step of analyzing the conditional question sentence by using a pre-trained vector model to recall the screening conditions of the user's question includes:

[0019] Use the pre-trained vector model to encode the conditional sentences and filter conditions of the user's questions and convert them into conditional sentence vectors and filter condition vectors;

[0020] Through the vector search engine, all conditional questions are traversed from the vector library to recall several screening condition vectors with high similarity;

[0021] The correctly recalled filter conditions are used as positive examples, and the incorrectly recalled filter conditions are used as negative examples to adjust the vector model;

[0022] The adjusted vector model is used to sample some user questions for vector recall, and the similarity and ranking of the recalled vectors are calculated;

[0023] The similarity and ranking of the recalled vectors are screened according to a preset similarity threshold and topk value, and the screening conditions of all user questions are re-recalled from the vector library.

[0024] In one embodiment, the conditional question and screening conditions of the user question further include:

[0025] Constructing an answer in JSON format, wherein the JSON format includes a conditional sentence of the user's question, a screening condition, and a logical relationship;

[0026] The logical relationship is used to express the logical relationship between the various screening conditions in the conditional question;

[0027] Prompt words are constructed according to the screening conditions and logical relationships, and the prompt words contain indicative phrases for use in large models for conditional extraction and result return.

[0028] In one embodiment, the base model is a small-size large model within a preset number of parameters, and the step of iteratively training the conditional questions and screening conditions through the base model, updating the pre-corpus and obtaining the domain condition extraction model includes:

[0029] Combine user questions, recall conditions, and answers into QA pairs;

[0030] Adjusting the base model on the mixed open domain corpus through the QA;

[0031] Use the adjusted base model to filter out the wrong examples in the training set;

[0032] Determine whether there are any wrong examples in the training set;

[0033] If there are wrong examples, the adjusted base model is returned, otherwise the updated pre-built corpus is output and the domain conditional extraction model is obtained.

[0034] In one embodiment, the generating of extraction results according to the domain condition extraction model further comprises: a hot matching library, the hot matching library comprising pre-set questions and extraction results for quickly matching user questions;

[0035] Perform hot matching on the input user questions through the hot matching library;

[0036] Determine whether the thermal matching is successful;

[0037] If the hot match is successful, the operation of the domain condition extraction model is interrupted and the matching result is returned directly; otherwise, the domain condition extraction model is waited for to generate the extraction result.

[0038] In one embodiment, the step of generating an extraction result according to the domain condition extraction model further includes:

[0039] Post-processing the extraction results generated by the domain condition extraction model;

[0040] Check whether the generation conditions of the domain condition extraction model are logically and semantically consistent;

[0041] If it is in compliance, the extraction result is formatted into a processing format of a backend system;

[0042] The processed format of the extraction results is returned to the back-end system for conditional query to ensure that the back-end system can accurately obtain answers to user questions.

[0043] In addition, to achieve the above purpose, the present application also proposes a parameter extraction device, the parameter extraction device comprising:

[0044] A training corpus management module is used to obtain conditional questions of user questions based on a pre-built corpus;

[0045] A conditional recall module, used to analyze the conditional question sentence of the user question through a pre-trained vector model, and recall the screening conditions of the user question;

[0046] A base model training module, used for iteratively training the conditional questions and screening conditions through a base model, updating the corpus and obtaining a domain condition extraction model;

[0047] The conditional extraction module is used to generate extraction results according to the domain conditional extraction model.

[0048] In addition, to achieve the above-mentioned purpose, the present application also proposes a parameter extraction device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the parameter extraction method described above.

[0049] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the parameter extraction method described above are implemented.

[0050] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the parameter extraction method described above are implemented.

[0051] One or more technical solutions proposed in this application have at least the following technical effects:

[0052] According to the pre-built corpus, the conditional sentences of user questions are obtained, without the need to manually annotate a large number of question types in advance; the conditional sentences are analyzed by the pre-trained vector model, the screening conditions of the user questions are recalled, and the length of the prompt words is reduced; the conditional sentences and screening conditions are iteratively trained by the base model, the corpus is updated and the domain condition extraction model is obtained, reducing the difficulty of model extraction conditions; the extraction results are generated according to the domain condition extraction model, reducing the post-processing encoding work. Compared with the existing technology, it can efficiently, accurately and flexibly extract the conditions in user questions, realize the efficient conversion from user questions in specific fields to precise extraction conditions, improve the accuracy and efficiency of information extraction, and especially improve the effect and user experience of question-and-answer scenarios in specific fields. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0054] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0055] Figure 1 A flow chart of the first embodiment of the parameter extraction method of the present application;

[0056] Figure 2 A flow chart of the second embodiment of the parameter extraction method of the present application is provided;

[0057] Figure 3 A flow chart of the third embodiment of the parameter extraction method of the present application;

[0058] Figure 4 A schematic diagram provided for Embodiment 4 of the parameter extraction method of the present application;

[0059] Figure 5 A flow chart of the fifth embodiment of the parameter extraction method of the present application is provided;

[0060] Figure 6 A flow chart of the sixth embodiment of the parameter extraction method of the present application is provided;

[0061] Figure 7 A flow chart of the seventh embodiment of the parameter extraction method of the present application;

[0062] Figure 8 This is a schematic diagram of the module structure of the parameter extraction device according to an embodiment of the present application;

[0063] Fig. 9 Schematic diagram of the device structure of the hardware operating environment involved in the parameter extraction method in the embodiment of the present application.

[0064] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0065] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0066] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0067] Before the widespread use of large models, the existing technology mainly relied on sequence labeling models and a large amount of labeled data to extract parameters for domain problems. It was unable to quickly understand the specific knowledge of a specific domain, user problems, and the need to efficiently handle complex conditional relationships, resulting in low accuracy and efficiency in information extraction.

[0068] The present application provides a solution, which obtains conditional questions of user questions according to a pre-built corpus; analyzes the conditional questions through a pre-trained vector model, recalls the screening conditions of the user questions, and reduces the length of prompt words; iteratively trains the conditional questions and the screening conditions through a base model, updates the corpus and obtains a domain condition extraction model; generates answers according to the domain condition extraction model, and reduces the post-processing encoding work; compared with the prior art, it can efficiently, accurately and flexibly extract the conditions in user questions, realizes the efficient conversion from user questions in a specific domain to precise answers, improves the accuracy and efficiency of information extraction, and especially improves the effect and user experience of question-and-answer scenarios in specific domains.

[0069] Based on this, the present application embodiment provides a parameter extraction method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the parameter extraction method of the present application.

[0070] In this embodiment, the parameter extraction method includes steps S10 to S40:

[0071] Step S10, obtaining a conditional question sentence of the user's question according to a pre-built corpus;

[0072] It should be noted that the parameters are multi-conditional parameters based on user questions, and the corpus is a collection of natural language texts used for training and testing, which can represent the application scenarios it serves or the usage of the language.

[0073] Specifically, in the fund screening scenario, the pre-built corpus may contain various fund-related queries and descriptions. The model is trained through the pre-built corpus so that it can understand and extract key information in user queries, such as fund type, yield rate and other screening conditions. Based on the user's question, natural language processing (NLP) technology can be used to perform intent recognition and key information extraction to understand the user's original question, and generate relevant conditional questions through pre-built corpus retrieval.

[0074] Step S20, analyzing the conditional question using a pre-trained vector model to retrieve the screening conditions of the user's question;

[0075] Specifically, a vector model pre-trained on a large-scale corpus is used to encode user questions and condition descriptions. The vector model can convert text into a vector representation in a high-dimensional space, thereby capturing the semantic information of the text. The similarity between the user question necklace and each condition description vector is measured by calculating the cosine similarity between them. Based on the similarity calculation results, the conditions most relevant to the user question are recalled, the recalled conditions are ranked, and further screening and processing are performed to remove irrelevant or duplicate conditions.

[0076] Step S30, iteratively training the conditional questions and screening conditions through a base model, updating the corpus and obtaining a domain condition extraction model;

[0077] It should be noted that the base model is a small-size large model within the preset number of parameters, which can reduce the demand for computing resources while still maintaining sufficient model capabilities to handle tasks; the domain condition extraction model is a model for specific domain scenarios; the domain condition extraction model obtained after training is used to process new questions and conditional questions, and new high-quality data is added to the corpus to enrich and update the corpus.

[0078] Specifically, through iterative training, the base model can obtain a conditional extraction model specifically for a specific field, such as a model for fund screening scenarios. This field conditional extraction model can accurately understand user questions in the fund field, screen and extract relevant conditions, and construct logical answers.

[0079] Step S40, generating an extraction result according to the domain condition extraction model;

[0080] It should be noted that the domain condition extraction model belongs to the condition extraction module, which also includes an adjusted vector model, a vector library of known conditions and a hot matching library; after the domain condition extraction model generates the extraction results, post-processing is required. If the back-end system requires data in a specific format, the extraction results are converted into a format that the back-end system can process.

[0081] Specifically, by loading the previously trained domain condition extraction model, the questions raised by the user are preprocessed, such as word segmentation, removal of stop words, etc., and the domain condition extraction model is used to analyze the user's questions, extract the key conditions and parameters in the questions, and generate answers to the user's questions based on the extracted conditions and parameters, such as recommending fund products in fund screening scenarios, providing investment advice, etc. The generated extraction results are optimized, such as grammar checking, semantic consistency checking, etc., and the generated extraction results are post-processed.

[0082] This embodiment provides a parameter extraction method, which obtains conditional questions of user questions according to a pre-built corpus; analyzes the conditional questions through a pre-trained vector model to recall the screening conditions of the user questions; iteratively trains the conditional questions and the screening conditions through a base model, updates the corpus and obtains a domain condition extraction model; generates extraction results according to the domain condition extraction model; solves the technical problems that before the widespread use of large models, the parameter extraction of domain problems mainly relies on sequence annotation models and a large amount of annotation data, cannot quickly understand the specific knowledge of a specific domain, user problems and the needs of efficiently processing complex conditional relationships, and the accuracy and efficiency of information extraction are low, and realizes efficient conversion from user problems in a specific domain to precise answers, improves the accuracy and efficiency of information extraction, and especially improves the effect and user experience of question-and-answer scenarios in specific domains.

[0083] Further, refer to Figure 2 The second embodiment of the parameter extraction method of the present application provides a flow chart based on the above Figure 2 The illustrated embodiment further refines the step of "obtaining conditional question sentences of user questions according to a pre-built corpus" in step S10, including steps A201 to A205:

[0084] Step A201, manually marking a single conditional question with all conditions of the user's question;

[0085] It should be noted that the annotation should include the attribute name, relationship and attribute value of the question to ensure the stability of the single conditional question.

[0086] Specifically, in the fund screening scenario, for example, the risk level condition can have values ​​of R1, R2, or low risk, medium risk, and high risk. All different condition descriptions of user questions should be covered. At the same time, for situations where the rate of return exceeds a certain value, is equal to a certain value, or is lower than a certain value, the relevant single-condition questions must also be fully listed.

[0087] Step A202, analyzing the logical relationship between the single conditional questions;

[0088] It should be noted that the logical relationship between single conditional questions is "and", "or", etc.

[0089] Step A203, combining the single conditional question into a multi-conditional question using a large model according to the logical relationship;

[0090] It should be noted that by analyzing the logical relationship between single-conditional questions, the large model is used to synthesize two-conditional and-or relationship questions based on the single-conditional questions, and then the three-conditional questions are combined with the two-conditional and single-conditional questions. This can be repeated to analyze whether to synthesize four-condition or even more-conditional questions based on the actual situation.

[0091] Step A204, writing a regular expression to identify and exclude illogical compound questions;

[0092] It should be noted that the regular expression is used for pattern matching and searching. It is a formal language for describing string matching patterns. It can check whether a string contains a certain substring, extract a substring that meets a certain pattern from a string, etc. By writing relevant regular filtering methods, incorrect questions in the synthetic questions are preliminarily filtered out.

[0093] Specifically, when the original condition in the fund screening scenario is "exceeds (greater than)", the synthesized question sentence becomes a sentence of other relations, or the original condition is "debt fund", but the synthesized question sentence does not contain the corresponding keywords, these illogical statements are excluded.

[0094] Step A205, constructing a corpus according to the synthetic questions and single conditional questions;

[0095] It should be noted that the corpus can also add irrelevant corpus, such as other financial problems, or non-financial problems. These problems do not extract any conditions, which can increase the robustness of the model and improve the rejection ability.

[0096] This embodiment constructs a corpus by marking single conditional questions, analyzing the logical relationship between the single conditional questions, synthesizing multi-conditional questions, identifying and eliminating erroneous questions in the synthesized questions, and thus obtaining a stable, comprehensive and adaptable domain-specific corpus to provide support for natural language processing tasks in specific domain scenarios.

[0097] Further, refer to Figure 3 The third embodiment of the parameter extraction method of the present application provides a flow chart based on the above Figure 3 In the illustrated embodiment, the step of "analyzing the conditional question sentence by using a pre-trained vector model to recall the screening conditions of the user's question" in step S20 is further refined, including steps A301 to A305:

[0098] Step A301, using a pre-trained vector model to encode the conditional question sentence and screening condition of the user's question, and convert them into a conditional question sentence vector and a screening condition vector;

[0099] It should be noted that the correlation between the user question vector and each condition description vector is measured by calculating the cosine similarity between them;

[0100] Step A302, traversing all conditional questions from the vector library through a vector search engine to retrieve a number of screening condition vectors with high similarity;

[0101] It should be noted that using a vector search engine (such as Faiss) to search for conditional question vectors similar to user question vectors in the vector library can efficiently process and compare high-dimensional vectors, thereby quickly recalling screening conditions related to user questions.

[0102] Step A303, taking the correctly recalled screening conditions as positive examples and the incorrectly recalled screening conditions as negative examples to adjust the vector model;

[0103] It should be noted that due to the high similarity between screening conditions in specific fields, the initial vector model may find it difficult to distinguish the screening conditions. The previously constructed questions and related conditions can be used to adjust the model by constructing positive and negative examples to improve the model's ability to distinguish between relevant and irrelevant conditions.

[0104] Step A304, sampling some user questions through the adjusted vector model to perform vector recall, and calculating the similarity and ranking of the recalled vectors;

[0105] Step A305, screening the similarity and ranking of the recalled vectors according to a preset similarity threshold and topk value, and re-recalling the screening conditions of all user questions from the vector library;

[0106] It should be noted that the topk refers to the top k most relevant, most frequent or most important items selected from a series of data. In this embodiment, the topk value is used to determine how many most similar conditions should be returned during the vector recall process.

[0107] Specifically, when a vector search engine (such as Faiss) is used to retrieve condition vectors similar to the user's question vector from the vector library, the system will sort these conditions according to their similarity, and then according to the set topk value, the system will select the top k conditions with the highest relevance to the user's question as the recall results and return them.

[0108] In this embodiment, a pre-trained vector model is used to recall several screening condition vectors with high similarity in the vector library through a vector search engine, the vector model is adjusted to adapt to the screening conditions in a specific field, and the conditional questions of the user's questions are analyzed through the adjusted vector model. The similarity and ranking of the recalled vectors are calculated, and the screening conditions with the highest relevance to the user's questions are obtained according to a preset threshold, thereby improving the accuracy and efficiency of information retrieval.

[0109] In a possible embodiment, Figure 4 As shown, the conditional question and screening conditions of the user question also include:

[0110] Constructing an answer in JSON format, wherein the JSON format includes a conditional sentence of the user's question, a screening condition, and a logical relationship;

[0111] The logical relationship is used to express the logical relationship between the various screening conditions in the conditional question;

[0112] Prompt words are constructed according to the screening conditions and logical relationships, and the prompt words contain indicative phrases for use in large models for conditional extraction and result return.

[0113] Specifically, when constructing the answer in JSON format, "is_fund" is the obtained conditional question, that is, "Is it a fund screening question?", "condition" is the screening condition, each screening condition can contain three characters: attribute name, relationship, and attribute value, "relation" is the logical relationship, and the description statement can refer to the Python syntax format. If there are less than two screening conditions, the value of the logical relationship is an empty string.

[0114] Further, refer to Figure 5 The fifth embodiment of the parameter extraction method of the present application provides a flow chart based on the above Figure 5 In the illustrated embodiment, the step of "iteratively training the conditional question and the screening condition through the base model, updating the corpus and obtaining the domain condition extraction model" in step S30 is further refined, and the base model is a small-size large model within a preset number of parameters, including steps A501 to A505:

[0115] Step A501, forming a QA pair with the user's question, the recall condition and the answer;

[0116] It should be noted that the QA pairs help the large model understand the relationship between user questions and answers.

[0117] Step A502, adjusting the base model on the mixed open domain corpus through the QA;

[0118] It should be noted that the open domain corpus can provide rich background knowledge. By combining the original QA pairs with the open domain corpus, new training samples are created to further expand the training set. At the same time, since the open domain corpus can be updated regularly and contains the latest information and trends, it helps to maintain the timeliness of the base model.

[0119] Step A503, using the adjusted base model to filter out the wrong examples in the training set;

[0120] It should be noted that identifying and filtering erroneous examples in the training set is a key step to help improve model performance and accuracy, such as removing duplicate content, correcting errors, and unifying formats.

[0121] Step A504, determining whether there are any wrong examples in the training set;

[0122] It should be noted that by checking whether there are still erroneous examples in the filtered training set, it can be determined whether repeated iterations are needed to improve the performance and accuracy of the system. For example, when using the adjusted base model to predict the samples in the training set, the prediction results can be compared with the true labels to identify inconsistent samples. For anomaly detection with low discrimination, yellow marking or other types of marking can be performed, and suspected erroneous examples predicted by the model can be manually reviewed and confirmed by domain experts or labelers.

[0123] Step A505, if there are wrong examples, return to adjust the base model, otherwise output the updated pre-built corpus and obtain the domain condition extraction model.

[0124] It should be noted that questions raised by users, model recall conditions and answers are collected to form QA pairs, these QA pairs are formed into a data set, the QA pairs are mixed with other data in the open domain corpus, the mixed data set is used to train and adjust the base model, the adjusted base model is used to process the training set, and the wrong examples are identified and filtered. The wrong examples are questions and conditions that the model cannot correctly identify or process well. Check whether there are wrong examples in the training set. If there are no wrong examples in the training set, it means that the model can accurately process the training data, and output the updated pre-built corpus and domain condition extraction model.

[0125] This embodiment constructs QA pairs to perform error detection on the base model, continuously optimizes the base model, realizes the update and iteration of the corpus and the training and generation of the domain condition extraction model, and improves the accuracy and efficiency of question and answering in specific fields.

[0126] Further, refer to Figure 6 The sixth embodiment of the parameter extraction method of the present application provides a flow chart based on the above Figure 6 In the illustrated embodiment, the step S40 of "generating an extraction result according to the domain condition extraction model" further includes steps A601 to A603:

[0127] A hot matching library, which contains pre-set questions and extraction results for quickly matching user questions;

[0128] It should be noted that the pre-set questions and extraction results cover common user queries and corresponding correct extraction results.

[0129] Step A601, performing hot matching on the input user question through a hot matching library;

[0130] It should be noted that a text similarity algorithm, such as cosine similarity, can be used to measure the similarity between two questions.

[0131] Step A602, determining whether the thermal matching is successful;

[0132] It should be noted that by comparing the user's question with the questions in the hot matching library, it is determined whether a highly similar question is found, and the similarity is compared with a preset threshold.

[0133] Step A603, if the hot match is successful, the operation of the domain condition extraction model is interrupted and the matching result is directly returned, otherwise wait for the domain condition extraction model to generate the extraction result.

[0134] Specifically, when a user enters a query: "Please recommend some stock funds with a return of more than 10% in the past year.", in the matching library, there is a preset question: "Which stock funds have a return of more than X% in the past year?" and the corresponding extraction result: "The return of fund type = stock in the past year is greater than X%"; the input user question is matched with the preset question in the hot matching library, and the cosine similarity algorithm is used to calculate the similarity of the two questions. The similarity exceeds the preset threshold, so the hot matching is judged to be successful. At this time, the operation of the domain condition extraction model is interrupted, and the corresponding extraction result in the hot matching library is directly returned.

[0135] When a user asks a question about financial product screening, such as "Please recommend some stock funds with a risk level of R2." The system converts this question into a conditional question based on the pre-built corpus, uses the pre-trained vector model to analyze the conditional question, and recalls the relevant screening conditions. The vector model identifies relevant conditions such as "risk level" and "fund type". When the user question fails to be hot matched, the domain condition extraction model is used to extract the conditions and values ​​of the user's question, that is, risk level = R2, fund type = stock.

[0136] In this implementation, user questions are first matched through the hot matching library, so that the system can quickly respond to user queries. At the same time, when hot matching fails, the domain condition extraction model can still be used to extract accurate conditions. This hybrid method improves the efficiency and accuracy of the system.

[0137] Further, refer to Figure 7 The seventh embodiment of the parameter extraction method of the present application provides a flow chart based on the above Figure 7 The embodiment shown further includes steps A701 to A704 after the step of "generating extraction results according to the domain condition extraction model" in step S40:

[0138] Step A701, post-processing the generated extraction results of the domain condition extraction model;

[0139] It should be noted that the post-processing at least includes the analysis of the logical relationship of the extraction results and the regularization of the conditional values.

[0140] Step A702, checking whether the generation conditions of the domain condition extraction model are logically and semantically consistent;

[0141] It should be noted that by checking the generation conditions, error signals caused by logical or semantic errors can be reduced. For example, when querying funds with a risk level of R5, if the generation extraction result of the model domain conditional extraction model is "risk level = R6", R6 here is a risk level that does not exist, and the condition should be deleted.

[0142] Step A703, if it meets the requirements, formatting the extraction result into a processing format of the backend system;

[0143] It should be noted that if the backend system uses SQL query, the extraction results generated by the domain condition extraction model can be converted into SQL-style where statements; or the format can be adjusted according to the requirements of the backend system.

[0144] Step A704, returning the processed format of the extraction results to the backend system for conditional query, to ensure that the backend system can accurately obtain the answer to the user's question.

[0145] Specifically, the user question input is "Recommend the best performing stock fund", and the extraction result generated by the domain conditional extraction model is "the best performing stock fund". The obtained extraction result is post-processed to check whether there are grammatical errors in the answer, eliminate ambiguity, and clarify what standards "best performance" is based on, such as yield, Sharpe ratio, etc., and then perform logical and semantic checks. For example, "stock fund" refers to the type of fund invested in the stock market. The back-end system uses SQL query to convert the generated extraction result into an SQL-style where statement, such as: "SELECT*FROM funds WHERE fund_type='stock type'AND performance_rank<=10;", and returns the formatted answer to the back-end system for conditional query to generate an accurate answer.

[0146] In this embodiment, by post-processing the extraction results generated by the domain condition extraction model, it can be ensured that the generated extraction results not only comply with logical and semantic rules, but also can be effectively processed by the back-end system, thereby providing accurate and reliable answers.

[0147] In addition, this application also provides a parameter extraction device, please refer to Figure 8 , the parameter extraction device comprises:

[0148] Step 10: training a corpus management module to obtain conditional sentences of user questions based on a pre-built corpus;

[0149] Step 20: a conditional recall module, used to analyze the conditional question sentence of the user's question through a pre-trained vector model, and recall the screening conditions of the user's question;

[0150] Step 30: a base model training module, used to iteratively train the conditional questions and screening conditions through the base model, update the corpus and obtain a domain condition extraction model;

[0151] Step 40: A conditional extraction module is used to generate extraction results according to the domain conditional extraction model.

[0152] The parameter extraction device provided by the present application adopts the parameter extraction method in the above embodiment, which can solve the technical problems that before the widespread use of large models, the parameter extraction of domain problems mainly relies on sequence annotation models and a large amount of annotation data, and cannot quickly understand the specific knowledge of specific fields, user problems and the needs of efficiently processing complex conditional relationships, and the accuracy and efficiency of information extraction are low. Compared with the prior art, the beneficial effects of the parameter extraction device provided by the present application are the same as the beneficial effects of the parameter extraction method provided by the above embodiment, and the other technical features in the parameter extraction device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0153] In addition, the present application also provides a parameter extraction device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the parameter extraction method in the above-mentioned embodiment one.

[0154] Reference below Fig. 9 , which shows a schematic diagram of the structure of a parameter extraction device suitable for implementing the embodiment of the present application. The parameter extraction device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig. 9 The parameter extraction device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0155] like Fig. 9As shown, the parameter extraction device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the parameter extraction device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the parameter extraction device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a parameter extraction device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0156] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0157] The parameter extraction device provided by the present application adopts the parameter extraction method in the above embodiment, which can solve the technical problems that before the widespread use of large models, the parameter extraction of domain problems mainly relies on sequence annotation models and a large amount of annotation data, and cannot quickly understand the specific knowledge of a specific field, user problems and the needs of efficiently processing complex conditional relationships, and the accuracy and efficiency of information extraction are low. Compared with the prior art, the beneficial effects of the parameter extraction device provided by the present application are the same as the beneficial effects of the parameter extraction method provided in the above embodiment, and the other technical features in the parameter extraction device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0158] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0159] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0160] In addition, the present application also provides a computer-readable storage medium having computer-readable program instructions (ie, computer program) stored thereon, and the computer-readable program instructions are used to execute the parameter extraction method in the above embodiment.

[0161] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0162] The computer-readable storage medium may be included in the parameter extraction device; or may exist independently without being assembled into the parameter extraction device.

[0163] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the parameter extraction device, the parameter extraction device: obtains conditional sentences of user questions based on a pre-constructed corpus; analyzes the conditional sentences through a pre-trained vector model and recalls the screening conditions of the user questions; iteratively trains the conditional sentences and screening conditions through a base model, updates the corpus and obtains a domain condition extraction model; and generates answers based on the domain condition extraction model.

[0164] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0165] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0166] The modules involved in the embodiments of the present application may be implemented by software or hardware, wherein the name of the module does not limit the unit itself in some cases.

[0167] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned parameter extraction method, and can solve the technical problems that before the widespread use of large models, the parameter extraction of domain problems mainly relies on sequence annotation models and a large amount of annotation data, and cannot quickly understand the specific knowledge of specific fields, user problems, and the need to efficiently handle complex conditional relationships, and the accuracy and efficiency of information extraction are low. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the parameter extraction method provided by the above-mentioned embodiment, and will not be repeated here.

[0168] In addition, the present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the parameter extraction method as described above are implemented.

[0169] The computer program product provided by this application can solve the technical problems that before the large model is widely used, the parameter extraction of domain problems mainly relies on sequence annotation models and a large amount of annotation data, and cannot quickly understand the specific knowledge of a specific field, user problems, and the need to efficiently handle complex conditional relationships, and the accuracy and efficiency of information extraction are low. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the parameter extraction method provided in the above embodiment, which will not be repeated here.

[0170] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A parameter extraction method, characterized in that: The method comprises: Obtain conditional sentences of user questions based on a pre-built corpus; Analyze the conditional question using a pre-trained vector model to retrieve the screening conditions of the user's question; Iteratively training the conditional questions and screening conditions through a base model, updating the corpus and obtaining a domain condition extraction model; The extraction model generates extraction results according to the domain conditions.

2. The method according to claim 1, characterized in that The step of obtaining the conditional question sentence of the user's question according to the pre-built corpus includes: Single conditional questions that manually mark all conditions of the user's question; Analyze the logical relationship between the single conditional questions; Combining the single conditional question into multiple conditional questions using the large model according to the logical relationship; Write regular expressions to identify and eliminate illogical compound questions; A corpus is constructed according to the synthetic questions and single conditional questions.

3. The method according to claim 2, characterized in that The step of analyzing the conditional question sentence by using the pre-trained vector model and recalling the screening conditions of the user's question comprises: Use the pre-trained vector model to encode the conditional sentences and filter conditions of the user's questions and convert them into conditional sentence vectors and filter condition vectors; Through the vector search engine, all conditional questions are traversed from the vector library to recall several screening condition vectors with high similarity; The correctly recalled filter conditions are used as positive examples, and the incorrectly recalled filter conditions are used as negative examples to adjust the vector model; The adjusted vector model is used to sample some user questions for vector recall, and the similarity and ranking of the recalled vectors are calculated; The similarity and ranking of the recalled vectors are screened according to a preset similarity threshold and topk value, and the screening conditions of all user questions are re-recalled from the vector library.

4. The method according to claim 3, characterized in that The conditional questions and screening conditions of the user questions also include: Constructing an answer in JSON format, wherein the JSON format includes a conditional sentence of the user's question, a screening condition, and a logical relationship; The logical relationship is used to express the logical relationship between the various screening conditions in the conditional question; Prompt words are constructed according to the screening conditions and logical relationships, and the prompt words contain indicative phrases for use in large models for conditional extraction and result return.

5. The method according to claim 4, characterized in that The base model is a small-size large model within a preset number of parameters, and the step of iteratively training the conditional questions and screening conditions through the base model, updating the corpus and obtaining the domain condition extraction model includes: Combine user questions, recall conditions, and answers into QA pairs; Adjusting the base model on the mixed open domain corpus through the QA; Use the adjusted base model to filter out the wrong examples in the training set; Determine whether there are any wrong examples in the training set; If there are wrong examples, the adjusted base model is returned, otherwise the updated pre-built corpus is output and the domain conditional extraction model is obtained.

6. The method according to claim 5, characterized in that The generating of extraction results according to the domain condition extraction model also includes: a hot matching library, the hot matching library containing pre-set questions and extraction results for quickly matching user questions; Perform hot matching on the input user questions through the hot matching library; Determine whether the thermal matching is successful; If the hot match is successful, the operation of the domain condition extraction model is interrupted and the matching result is returned directly; otherwise, the domain condition extraction model is waited for to generate the extraction result.

7. The method according to claim 6, characterized in that After the step of generating the extraction result according to the domain condition extraction model, the step further includes: Post-processing the extraction results generated by the domain conditional extraction model; Check whether the generation conditions of the domain condition extraction model are logically and semantically consistent; If it is in compliance, the extraction result is formatted into a processing format of a backend system; The processed format of the extraction results is returned to the back-end system for conditional query to ensure that the back-end system can accurately obtain answers to user questions.

8. A parameter extraction device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the parameter extraction method according to any one of claims 1 to 7.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the parameter extraction method according to any one of claims 1 to 7 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the parameter extraction method according to any one of claims 1 to 7 are implemented.