A dialog-based instruction response method, device, equipment and medium
Patent Information
- Application Number
- CN202611445024.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-17
- Publication Date
- 2026-11-27
Smart Images

Figure CN123178568A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the interdisciplinary fields of artificial intelligence, natural language processing, and financial technology, and in particular to a dialogue-based instruction response method, apparatus, device, and medium. Background Technology
[0002] As the digital transformation of finance continues to deepen, intelligent question-and-answer technology in banks is constantly developing. Within internal banking operations, staff can use conversational interactive systems to complete tasks such as data queries and information verification.
[0003] The basic process of existing conversational instruction response systems used internally by banks is as follows: after receiving user input, an intent classification model is used to classify and determine the input. Based on the classification result, the corresponding interface or business component is directly matched and invoked to execute the response. However, due to the highly specialized input habits of bank personnel, who often use industry abbreviations, business codes, or omit modifiers, the single intent model is prone to misjudgment due to a lack of additional information. When the input instruction is brief, it may lead to incorrect intent classification results, resulting in matching the wrong interface or component, ultimately outputting irrelevant data or directly returning an error message. Summary of the Invention
[0004] This invention provides a dialogue-based command response method, apparatus, device, and medium that can improve the accuracy and success rate of responding to initial commands.
[0005] According to one aspect of the present invention, embodiments of the present invention provide a dialogue-based instruction response method, the method comprising: The initial instruction input by the user is classified into a first intent to obtain the first intent and classification confidence of the initial instruction, wherein the initial instruction is the instruction input by the user in the human-computer interaction dialogue; When the classification confidence level is less than the confidence threshold, related dialogue data that is associated with the initial instruction is determined in the human-computer interaction dialogue; Based on the associated dialogue data, the initial instruction is modified by word replacement and information supplementation to generate a reconstructed instruction for the initial instruction; The reconstruction instruction is classified into a second intent to obtain a second intent of the reconstruction instruction; the classification granularity of the first intent classification is greater than that of the second intent classification. The target component corresponding to the second intent is invoked to obtain the target data corresponding to the reconstruction instruction, and the initial instruction is responded to according to the target data; the target component includes: multiple database interfaces.
[0006] According to another aspect of the present invention, embodiments of the present invention also provide a dialogue-based instruction response device, the device comprising: The first intent classification module is used to classify the initial instruction input by the user into a first intent, and obtain the first intent and classification confidence of the initial instruction, wherein the initial instruction is the instruction input by the user in the human-computer interaction dialogue; The associated dialogue determination module is used to determine associated dialogue data in the human-computer interaction dialogue that is associated with the initial instruction when the classification confidence is less than the confidence threshold. The instruction reconstruction module is used to perform word replacement and information supplementation on the initial instruction based on the associated dialogue data, and generate a reconstructed instruction for the initial instruction; The second intent classification module is used to classify the reconstruction instruction into a second intent to obtain the second intent of the reconstruction instruction; the classification granularity of the first intent classification is greater than the classification granularity of the second intent classification. The query response module is used to call the target component corresponding to the second intent, obtain the target data corresponding to the reconstruction instruction, and respond to the initial instruction according to the target data; the target component includes: multiple database interfaces.
[0007] According to another aspect of the present invention, embodiments of the present invention also provide a dialogue-based command response device, the dialogue-based command response device comprising: At least one processor; and A memory that is communicatively connected to at least one processor; wherein, The memory stores a computer program that can be executed by at least one processor, such that the at least one processor is able to execute the dialogue-based instruction response method of any embodiment of the present invention.
[0008] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement a dialogue-based instruction response method according to any embodiment of the present invention.
[0009] According to another aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the dialogue-based instruction response method described in any embodiment of the present invention.
[0010] The technical solution of this invention obtains the intent and classification confidence of the initial instruction through a first intent classification. When the confidence is below a threshold, it utilizes associated dialogue data related to the initial instruction in the human-computer interaction dialogue to perform word replacement and information supplementation on the initial instruction, generating a reconstructed instruction. Since the reconstructed instruction supplements contextual information, it can be classified with a finer granularity as a second intent, thereby more accurately determining the user's true intent. Then, it calls the target component corresponding to the second intent, which includes multiple database interfaces, to obtain the target data corresponding to the reconstructed instruction in response to the initial instruction, improving the accuracy and success rate of responding to the initial instruction when its intent is unclear.
[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 This is a flowchart of a dialogue-based instruction response method provided according to an embodiment of the present invention; Figure 2 This is a flowchart of another dialogue-based instruction response method provided according to an embodiment of the present invention; Figure 3 This is a structural diagram of a dialogue-based instruction response device provided according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a dialogue-based command response device provided in an embodiment of the present invention. Detailed Implementation
[0014] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0015] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0016] The acquisition, storage, and application of transaction data involved in the technical solutions of this invention comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0017] Figure 1 This is a flowchart illustrating a dialogue-based command response method provided in an embodiment of the present invention. This embodiment is applicable to situations where data is queried and feedback is provided in response to commands in a dialogue. The method can be executed by a dialogue-based command response device, which can be implemented in hardware and / or software. This dialogue-based command response device can be configured in a server.
[0018] See Figure 1 The dialogue-based instruction response method shown includes: S101. Perform a first intent classification on the initial instruction input by the user to obtain the first intent and classification confidence of the initial instruction, wherein the initial instruction is the instruction input by the user in the human-computer interaction dialogue.
[0019] In this context, "user" refers to the person engaging in the interactive dialogue. Human-computer interaction (HCI) is the communication process where the user inputs instructions and receives responses. HCI includes multi-turn dialogues. The initial instruction is the original instruction input by the user in the HCI. First intent classification is the process of determining the first intent of the initial instruction. The first intent is the intent obtained by classifying the initial instruction into its first intent. Classification confidence is the reliability of the first intent determination.
[0020] Receive initial instructions from the user, where the initial instructions may be voice instructions in natural language form.
[0021] The initial instruction is input into the first intent classification model for initial intent classification. The first intent classification model adopts a model structure of "pre-trained language model encoder + business intent label classification head", and outputs the first intent and classification confidence.
[0022] S102. When the classification confidence level is less than the confidence level threshold, determine the associated dialogue data that is related to the initial instruction in the human-computer interaction dialogue.
[0023] The confidence threshold is a preset lower limit for confidence. Related dialogue data refers to dialogues in human-computer interaction conversations that are relevant to the initial command.
[0024] When the classification confidence level is lower than the preset confidence threshold, the initial instruction is marked as an instruction to be reconstructed. The process then proceeds to the accurate reconstruction stage.
[0025] Retrieve the most recent multi-turn dialogue records from the current human-computer interaction dialogue history cache. Calculate the semantic similarity between the initial command and each dialogue record using a sliding window approach. Optionally, the semantic similarity can be calculated using a pre-trained sentence vector model to calculate the cosine similarity between the initial command and the dialogue record. When the semantic similarity between the initial command and the dialogue record exceeds a preset semantic similarity threshold, it is determined that the initial command and the dialogue record are associated. Dialogue records where each initial command is associated with a dialogue record are identified as associated dialogue data related to the initial command.
[0026] In one specific embodiment, a sliding window can be used to divide the dialogue data when acquiring the target number of dialogue records. For example, a window can contain 5 dialogue records. The semantic similarity between the initial command and each dialogue record in each window is calculated. When the semantic similarity of a dialogue record in a certain window is higher than a preset similarity threshold, the dialogue records contained in that window, as well as dialogue records that occurred after the occurrence time of the dialogue records in that window, are identified as associated dialogue data related to the initial command.
[0027] S103. Based on the associated dialogue data, perform word replacement and information supplementation on the initial instruction to generate a reconstructed instruction for the initial instruction.
[0028] Word replacement involves replacing words in the initial instruction with other words. Information supplementation involves adding missing information to the initial instruction. The reconstructed instruction is the instruction generated after word replacement and information supplementation of the initial instruction.
[0029] Adjust the words in the initial instructions based on the associated dialogue data and fill in any missing information. This makes the initial instructions more complete and explicit, generating reconstructed instructions for the initial instructions.
[0030] Optionally, the refactoring instruction for generating the initial instruction further includes: replacing colloquial expressions in the initial instruction with standard business terms using a pre-built banking business synonym mapping table. For example, the mapping relationship between colloquial expressions and standard business terms includes: mapping "large amount change" to "large amount of fund movement".
[0031] S104. Perform a second intent classification on the reconstruction instruction to obtain a second intent of the reconstruction instruction; the classification granularity of the first intent classification is greater than the classification granularity of the second intent classification.
[0032] The second intent classification is a secondary classification of intents. The second intent is the intent derived through this classification. Classification granularity refers to the level of refinement in the classification. The first intent classification distinguishes broad categories, belonging to coarse classification. The second intent classification distinguishes smaller categories, belonging to fine classification.
[0033] When the classification confidence score of the first intent indicates that the first intent is unreliable, it means that the results of coarse classification using the initial instruction are also unreliable. Therefore, the initial instruction cannot be directly used for second intent classification; instead, the initial instruction should be reconstructed to obtain a reconstructed instruction. The reconstructed instruction is then used for second intent classification.
[0034] In one specific embodiment, the reconstruction instruction is input into the second intent classification model. The second intent classification model adopts a "intent classification + key slot extraction" model structure. Intent classification yields a fine-grained second intent. Key slot extraction includes element slots such as enterprise entity slots, time slots, and product slots, extracting key information from the reconstruction instruction. Based on the second intent and the key information extracted from the key slots, it is matched with a preset intent number to obtain a unique intent number. The corresponding processing link is triggered based on the task type to which the intent number belongs.
[0035] S105. Invoke the target component corresponding to the second intent, obtain the target data corresponding to the reconstruction instruction, and respond to the initial instruction according to the target data; the target component includes: multiple database interfaces.
[0036] The target component can be a component that acquires and processes data. The target data can be the data that needs to be acquired in response to a command.
[0037] Different intents require different data. Each component integrates interfaces to different databases, allowing access to data from those databases. Based on the second intent, the corresponding target component is invoked. The data query scope is determined through refactoring instructions, and a data query statement is generated. This query statement is input into the database interface corresponding to the target component to retrieve the target data. The retrieved target data is then organized into structured data to respond to the initial instruction.
[0038] In an optional embodiment, before invoking the target component corresponding to the second intent to obtain the target data corresponding to the reconstruction instruction, the method further includes: extracting at least one initial query enterprise from the reconstruction instruction; filtering each of the initial query enterprises according to the user's user permissions to determine at least one target enterprise; invoking the target component corresponding to the second intent to obtain the target data corresponding to the reconstruction instruction includes: determining the target component according to the second intent and the enterprise type of the target enterprise; the enterprise type is determined by the enterprise's service objects; invoking the target component to obtain the target data of each target enterprise.
[0039] The initial query companies are those extracted from the command. User permissions can limit the scope of the user's query. The target companies are those determined after filtering by user permissions. The company type is a classification of companies based on their service recipients. Service recipients can be categorized into public service recipients and non-public service recipients. For example, company types can include: commercial companies and public service companies.
[0040] Using keywords related to enterprise entities extracted from instructions as input, the system performs fuzzy searches and similarity rankings in the industry knowledge database to generate an initial list of query enterprises.
[0041] The initial query companies are validated based on user permissions. Each candidate initial query company is compared against the user's permission list, and companies that the current user does not have permission to view are deleted, retaining only those within the user's permission scope. Optionally, when retrieving data for the target company, only data corresponding to the user's permissions is retrieved.
[0042] The initially selected companies can be identified as target companies. In some embodiments, if it is necessary to identify a target company, the list of initially selected companies can be pushed to the front-end interactive interface. The system temporarily suspends the human-computer interaction dialogue and enters a listening state. It listens for interaction information with the front-end interactive interface, and upon receiving a confirmation signal from the user for selecting a single company, it locks onto the target company and determines its unique internal identifier.
[0043] In some specific scenarios, the keywords entered by the user might be the abbreviation of the company, rather than the full name used in standard company registration. For example, the user input might retrieve "Company A." However, industry knowledge databases might contain entries like "Company A Display Technology Co., Ltd.", "Company A Optoelectronic Technology Co., Ltd.", or "Company A Display Technology Co., Ltd." Therefore, multiple initial query companies can be found by extracting company-related keywords from the input.
[0044] After identifying the target company, its company tags are retrieved, and the company type is determined based on a pre-defined classification rule base and the company tags. Specifically, the company tags are matched with pre-configured business service object determination rules to determine the company type.
[0045] Different types of enterprises access different databases, thus requiring different target components. For example, when querying whether large-scale fund changes are abnormal, public medical institutions need public funding data, while ordinary science and technology enterprises need industry market data.
[0046] In one specific embodiment, a standardized query statement is generated based on the reconstruction instruction. A target task is generated based on the standardized query statement, the intent number corresponding to the second intent, and the unique internal identity of the target enterprise. The target task is sent to the intelligent agent corresponding to the enterprise type of the target enterprise. The intelligent agent, based on the intent number corresponding to the second intent, invokes the target component to obtain the target data of the target enterprise based on the unique internal identity of the target enterprise and the standardized query statement.
[0047] As can be seen, by extracting the initial query enterprise from the reconstruction instruction, filtering and determining the target enterprise based on user permissions, and then determining the target component based on the second intent and the enterprise type of the target enterprise, the target component is then invoked to obtain the target data. This makes the selection of target components more closely match the actual attributes of the enterprise, avoiding data redundancy and permission overreach caused by uniform components. This improves the accuracy of data acquisition and enhances the security and compliance of the query process.
[0048] In an optional embodiment, the second intent includes: identifying transaction anomalies; the target component includes: an anomaly detection component; the step of invoking the target component to obtain target data for each target enterprise includes: invoking the anomaly detection component corresponding to the transaction anomaly detection; retrieving transaction data of the target enterprise within a target time period through the transaction database interface of the anomaly detection component; retrieving publicly available enterprise development information of the target enterprise within the target time period through the public information database interface of the anomaly detection component; the enterprise development information includes: development strategy information and project bidding information; and determining the transaction data and the enterprise development information as target data.
[0049] The "Transaction Anomaly Insight" feature is used to determine if there are any abnormal transaction queries in a company's financial transactions. The "Anomaly Insight" component is a data retrieval component used to obtain company transaction data and company development information. The "Transaction Database Interface" is used to retrieve company transaction data. The "Public Information Database Interface" is used to retrieve publicly available company information. Transaction data refers to the financial transactions of the target company within a target time period. Company development information refers to the publicly disclosed business development information of the target company within the target time period. Development strategy information reflects the target company's business direction and operational plans. Project bidding information reflects the target company's procurement and project activities. Target data is the dataset used to support the judgment of transaction anomalies.
[0050] First, after determining that the second intent is to detect transaction anomalies, the specific anomaly detection component to be invoked is determined. The transaction database interface of this component is used to retrieve the target company's transaction data for the target time period. Then, the public information database interface of the same component is used to retrieve publicly available corporate development information from the target company within the target time period. Development strategy information and project bidding information from this retrieved information are extracted together. The retrieved transaction data and the retrieved corporate development information are then combined to define the target data.
[0051] By combining transaction data and enterprise development information, a basis for identifying transaction anomalies is provided. Transaction data reflects the actual occurrence of fund transfers, while enterprise development information reflects the corresponding business background. This combination allows for anomaly detection to move beyond relying solely on single fund flows and instead verify against publicly available business activities. The target data includes information from both the funding and business sides, making the input for anomaly detection more complete. Since both transaction data and enterprise development information are limited to a target time period, the two types of data correspond to each other in the time dimension, allowing for direct establishment of temporal relationships during subsequent comparisons.
[0052] It is evident that by invoking the anomaly detection component corresponding to the anomaly detection function, retrieving transaction data within the target time period via the transaction database interface, and searching for publicly available enterprise development information within the same time period via the public information database interface, and jointly identifying the transaction data and enterprise development information as the target data, two types of evidence—funding and business—can be provided simultaneously for judging enterprise transaction anomalies. This allows the transaction data to be compared with the publicly available development strategy information and project bidding information of the target enterprise. Furthermore, because the two types of data are within the same target time period, they are easy to align and compare by time, improving the completeness of the target data and the relevance and verifiability of the basis for judging transaction anomalies.
[0053] In an optional embodiment, responding to the initial instruction based on the target data includes: filling a preset prompt word template corresponding to the second intent with the target data to generate a business prompt word; the preset prompt word template is used to desensitize and structurally adjust the target data; inputting the business prompt word into a large language model to obtain model analysis results; and responding to the initial instruction with the model analysis results.
[0054] The system consists of several parts: a preset prompt template (used to carry target data and constrain the input format of the large language model), a business prompt (obtained after filling in the target data), and an input prompt for the large language model. Anonymization involves processing information in the target data that is not suitable for direct presentation. Structure adjustment organizes the target data according to the fields and order specified in the template. The large language model is a model containing an agent that analyzes the input prompts and outputs results. The model analysis result is the output content obtained after the model analyzes the business prompts.
[0055] First, a preset prompt template corresponding to the second intent is obtained. The preset prompt template includes: template content, information extraction rules, and conversion / filling rules. The conversion / filling rules are used to de-identify sensitive information in the target data. The target data is then filled into the preset prompt template. During the filling process, the target data undergoes de-identification processing and structural adjustments to generate business prompts. Subsequently, the business prompts are input into a large language model. The model analysis results output by the large language model are then received. These model analysis results are used as the response content to the initial instruction.
[0056] The target data is transformed into an input format that can be directly processed by a large language model. The target data originates from different interfaces, with inconsistent formats and sensitivities; directly inputting it into the model would affect the analysis results and introduce the risk of information exposure. Anonymization and structural adjustments are performed using preset prompt templates, ensuring that the input retains the necessary information while removing unsuitable parts, and organizing it into a format easily understood by the model. The model's analysis results are built upon standardized and anonymized input; the initial command yields the analysis results output by the model, not the original data itself.
[0057] As can be seen, by filling the preset prompt word template corresponding to the second intent according to the target data, generating business prompt words, and inputting the business prompt words into the large language model to obtain the model analysis results, and responding to the initial command with the model analysis results, the target data from different sources and with different formats can be unified into an input form that the model can process after desensitization and structuring adjustment. This avoids the original data being directly exposed to the model input, and makes the model analysis results based on standardized and desensitized data. Thus, the model output analysis results, rather than the original data itself, respond to the user's initial command, improving the security of data use and the standardization of model analysis results.
[0058] In an optional embodiment, the first intent includes: account insight class, material generation class, and knowledge consulting class; the second intent includes: subcategories of account insight class, subcategories of material generation class, and subcategories of knowledge consulting class.
[0059] The Account Insight category is for querying enterprise accounts and transaction information. The Material Generation category is for generating business materials and text content. The Knowledge Consultation category is for obtaining business knowledge and rule answers. Secondary intents are subcategories further divided under the primary intent categories. Subcategories of Account Insights are specific intents for querying specific details of enterprise accounts. Subcategories of Material Generation are specific intents for generating different types of materials. Subcategories of Knowledge Consultation are specific intents for answering different knowledge-related questions.
[0060] Establishing a correspondence between the first and second intentions, and setting the second intention as a subcategory of the first intention, allows for verification of the second intention based on the first intention when the first intention is reliable. This ensures the accuracy of intention classification. For specific banking business scenarios, the first intentions include: account insight, document generation, and knowledge consultation, which can encompass most commonly used human-computer dialogue interaction functions.
[0061] It is evident that by limiting the first intent to account insight, material generation, and knowledge consultation, the functions achievable through human-computer interaction in the banking industry can be highly summarized. Limiting the second intent to a subcategory of the first intent allows for verification of the second intent based on the first intent, ensuring the accuracy of intent classification, even when the first intent is reliable.
[0062] The technical solution of this invention obtains the intent and classification confidence of the initial instruction through a first intent classification. When the confidence is below a threshold, it utilizes associated dialogue data related to the initial instruction in the human-computer interaction dialogue to perform word replacement and information supplementation on the initial instruction, generating a reconstructed instruction. Since the reconstructed instruction supplements contextual information, it can be classified with a finer granularity as a second intent, thereby more accurately determining the user's true intent. Then, it calls the target component corresponding to the second intent, which includes multiple database interfaces, to obtain the target data corresponding to the reconstructed instruction in response to the initial instruction, improving the accuracy and success rate of responding to the initial instruction when its intent is unclear.
[0063] Figure 2This is a flowchart illustrating a dialogue-based instruction response method provided by an embodiment of the present invention. Based on the above embodiments, this embodiment of the present invention further defines the step of performing word replacement and information supplementation on the initial instruction according to the associated dialogue data to generate a reconstructed instruction for the initial instruction as follows: Based on the associated dialogue data, determine the referents corresponding to each pronoun in the initial instruction; replace each pronoun in the initial instruction with its corresponding referent to obtain an intermediate instruction; extract query element information from the associated dialogue data, add the query element information to the intermediate instruction, and obtain the reconstructed instruction; the query element information is information that limits the query scope.
[0064] It should be noted that for parts not described in detail in the embodiments of the present invention, please refer to the descriptions in other embodiments.
[0065] See Figure 2 The dialogue-based instruction response method shown includes: S201. Perform a first intent classification on the initial instruction input by the user to obtain the first intent and classification confidence of the initial instruction, wherein the initial instruction is the instruction input by the user in the human-computer interaction dialogue.
[0066] S202. When the classification confidence level is less than the confidence level threshold, determine the associated dialogue data that is related to the initial instruction in the human-computer interaction dialogue.
[0067] In an optional embodiment, when the classification confidence is greater than or equal to a confidence threshold, the initial instruction is classified into a second intent to obtain the second intent of the initial instruction; it is determined whether the second intent of the initial instruction is a subcategory of the first intent category of the initial instruction; if yes, the target component corresponding to the second intent is invoked to obtain target data; if no, associated dialogue data related to the initial instruction is determined in the human-computer interaction dialogue; based on the associated dialogue data, word replacement and information supplementation are performed on the initial instruction to generate a reconstructed instruction of the initial instruction.
[0068] Among them, the first intent category subcategory is a specific intent that is divided under the first intent category.
[0069] When the classification confidence level meets the requirements, it indicates that the initial instruction content is relatively rich, and the next step of intent classification can be performed directly. Therefore, the initial instruction is used directly for the second intent classification, resulting in the second intent of the initial instruction. However, further verification of the classified second intent is still required. It is determined whether the obtained second intent belongs to a subcategory under the first intent category. If it does, it means that the two-level intent classification results are consistent, and the target component can be directly called to obtain the target data; if it does not, it means that the fine-grained intent and coarse-grained intent of the initial instruction do not match, and the initial instruction still needs to be reconstructed using associated dialogue data before further processing.
[0070] As can be seen, by classifying the initial instruction into a second intent when the classification confidence is greater than or equal to the confidence threshold, and then determining whether this second intent belongs to a subcategory of the first intent category of the initial instruction, further verification of the fine-grained intent can be performed even when the coarse-grained classification result is reliable. When the second intent does not belong to a subcategory of the first intent category, the initial instruction is reconstructed by replacing words and supplementing information using associated dialogue data. This avoids the situation where the target component is directly called due to inconsistencies between the fine-grained and coarse-grained intents, thereby improving the accuracy of intent recognition and the targeting of target data acquisition.
[0071] S203. Based on the associated dialogue data, determine the referents of each pronoun in the initial instruction.
[0072] In this context, pronouns are words used in the initialization command to represent specific objects. The referent is the actual object that each pronoun in the initialization command points to.
[0073] Identify indicative expressions such as pronouns and omitted subjects in the initial instructions, including expressions like "this company" or "this enterprise." Extract a candidate referential entity set E = {e1, e2, …, e} from the associated dialogue data. k Entity extraction employs sequence labeling to identify enterprise entities, business product entities, and time entities. Combining the position of the referent entity in the associated dialogue data with the semantic relevance between the referent entity and the initial instruction, a score is determined for each candidate referent entity. The referent entity with the highest score is selected to replace the pronoun.
[0074] S204. Replace each pronoun in the initial instruction with its corresponding referent to obtain the intermediate instruction.
[0075] Intermediate instructions are instructions obtained by replacing each pronoun in the initial instructions with its corresponding referent.
[0076] Eliminate the semantic uncertainty of pronouns in initial instructions. Initial instructions are input commands in human-computer interaction dialogues and often contain pronouns. The specific meaning of these pronouns can only be determined by combining them with associated dialogue data. By determining the referents of each pronoun through associated dialogue data, the actual object that the initial instruction points to can be clearly identified. After determining the referent, substitution is used to transform the expression of the initial instruction from a referential form to a definite form.
[0077] S205. Extract query element information from the associated dialogue data, add the query element information to the intermediate instruction, and obtain a reconstruction instruction; the query element information is information that limits the query scope.
[0078] Among them, query element information is information used to limit the query scope in the associated dialogue data.
[0079] Multiple query elements can be preset, resulting in a list of query elements. This list distinguishes between optional and required query elements. Based on the preset list, it identifies any missing required query elements from the initial command, such as the query object, time range, or business dimension. It then completes the query elements by inheriting information already confirmed in the associated dialogue data.
[0080] Optionally, for necessary query elements that cannot be inherited from associated dialogue data, the value of the element is determined and populated according to the business default rules. At the same time, the element is marked when outputting the refactoring instruction to indicate that the element comes from the business default rules rather than the associated dialogue data.
[0081] S206. Perform a second intent classification on the reconstruction instruction to obtain a second intent of the reconstruction instruction; the classification granularity of the first intent classification is greater than the classification granularity of the second intent classification.
[0082] S207. Invoke the target component corresponding to the second intent, obtain the target data corresponding to the reconstruction instruction, and respond to the initial instruction according to the target data; the target component includes: multiple database interfaces.
[0083] The technical solution of this invention divides the generation of reconstruction instructions into two steps: first, determining the referent object, then replacing it, and finally extracting and adding query element information. The first step addresses the semantic uncertainty of pronouns in the initial instruction, transforming referential expressions that originally depended on the dialogue context into definite expressions. The second step addresses the incomplete query scope in the initial instruction, adding limiting conditions that have appeared in the dialogue but were not written into the instruction. These two steps correspond to semantic determination and query scope completion, respectively, ensuring that the generated reconstruction instruction has complete input conditions at both the semantic and scope levels. This provides a more accurate basis for subsequent second intent classification and target data acquisition.
[0084] In one specific implementation, the bank manager asks a question in natural language through the system's front-end interactive interface: "Are there any anomalies in the recent large-scale changes in this company?"
[0085] After receiving a question, the system inputs the question text into an intent classification model. The model outputs a coarse-grained intent category, "Account Insight," with a confidence level below the confidence threshold τ1, marking it as a question requiring reconstruction. Simultaneously, the system retrieves the most recent 5 rounds of historical data from the current session. The current question and each round's historical question are input into a sentence vector model to calculate cosine similarity. The system detects that the similarity to the previous round's inquiry about deposit services at a certain medical institution exceeds the similarity threshold τ2, indicating a strong contextual association. This round and subsequent dialogue records are then extracted as related dialogue data.
[0086] The question text and related dialogue data are concatenated according to a preset template and then input into a large language model to perform question reconstruction: In the disambiguation stage, the model identifies the pronoun "this company" in the current question as the disambiguation term using sequence labeling. It extracts a set of candidate referent entities from the associated dialogue data, and combines the weight of the referent's position with the semantic relevance score to determine that the referent is company A, thus completing the pronoun replacement.
[0087] Semantic completion stage: Identify missing time range elements and business dimension elements in the question. Inherit business dimension elements from related dialogue data and complete the time range to "last 30 days" according to the business default rules.
[0088] Terminology standardization phase: Standardize "large amount change" to "large amount of fund change" through a business synonym mapping table.
[0089] Output the following question: "In the past 30 days, has [Company A] had any significant fund changes in its account funds or transactions?"
[0090] Subsequently, a second precise intent classification was performed on the reconstruction problem, resulting in the fine-grained intent "Intelligent Insight into Enterprise Fund Changes" and a unique intent number was matched. At the same time, the enterprise entity slot extraction was completed, and the core enterprise entity "Enterprise A" was extracted.
[0091] The system automatically activates the enterprise selection sub-agent based on the intent number. The enterprise selection sub-agent performs a fuzzy search in the authorized database using enterprise entity keywords, returning several related candidate enterprises with the same name, hereinafter referred to as candidate enterprises A-1, A-2, and A-3. The target enterprise determined by the receiving manager is: A-1.
[0092] Retrieve the enterprise tag data corresponding to A-1, identify that the enterprise tag matches the keyword set "Institutional Class - Health System" in the public service business judgment rules, and determine that it belongs to the institutional business service category. According to the preset multi-level routing rules, the identified second intent, reconstruction question, and target enterprise identity identifier are simultaneously distributed to the institutional sub-agent representing the public service business enterprise type.
[0093] After receiving the second intent, the sub-agent of the organization parses the task attributes corresponding to the intent number and determines that the current task is the enterprise fund change intelligent insight task; it retrieves the internal component registry and performs mapping matching with the triple of "business scenario identifier - intent number - function tag" to accurately distribute the current enterprise fund change intelligent insight task to the account dimension insight component intelligent agent corresponding to the enterprise fund change intelligent insight task.
[0094] The account-level insight component's intelligent agent automatically generates standardized tool invocation instructions based on templates, enabling collaborative invocation of multiple tools: first, it invokes the core transaction system plugin to retrieve structured transaction data for the target company over the past 30 days; second, it invokes the public opinion search plugin to search online for unstructured public opinion information such as recent publicly available industry news, project tenders, and policy adjustments related to the company. The results of both types of invocations are aggregated and cached using a unified data exchange format.
[0095] The account-level insight component intelligently organizes structured transaction data and unstructured public opinion summaries according to preset templates, adds exclusive prompts corresponding to secondary intents and enterprise types, and inputs them together into a large language model.
[0096] The large language model performs data integration and logical reasoning to generate analysis results, including: identifying recent large-scale fund disbursements to the enterprise and linking them to public channels for new project bidding dynamics, determining that the enterprise's demand for fund settlement and project-related financial services has increased; and outputting a preliminary judgment that there are no abnormalities in the large-scale fund changes.
[0097] The generated analysis results are visualized and displayed through the front-end interface for managers' reference.
[0098] Figure 3 This is a schematic diagram of a dialogue-based instruction response device provided in an embodiment of the present invention. The embodiment of the present invention is applicable to situations where data is queried and feedback is provided in response to instructions in a dialogue. This device can execute a dialogue-based instruction response method and can be implemented in hardware and / or software.
[0099] See Figure 3 The dialogue-based command response device shown includes: The first intent classification module 301 is used to classify the initial instruction input by the user into a first intent, and obtain the first intent and classification confidence of the initial instruction, wherein the initial instruction is the instruction input by the user in the human-computer interaction dialogue. The associated dialogue determination module 302 is used to determine associated dialogue data in the human-computer interaction dialogue that is associated with the initial instruction when the classification confidence is less than the confidence threshold. The instruction reconstruction module 303 is used to perform word replacement and information supplementation on the initial instruction based on the associated dialogue data, and generate a reconstructed instruction for the initial instruction; The second intent classification module 304 is used to classify the reconstruction instruction into a second intent to obtain the second intent of the reconstruction instruction; the classification granularity of the first intent classification is greater than the classification granularity of the second intent classification. The query response module 305 is used to call the target component corresponding to the second intent, obtain the target data corresponding to the reconstruction instruction, and respond to the initial instruction according to the target data; the target component includes: multiple database interfaces.
[0100] The technical solution of this invention obtains the intent and classification confidence of the initial instruction through a first intent classification. When the confidence is below a threshold, it utilizes associated dialogue data related to the initial instruction in the human-computer interaction dialogue to perform word replacement and information supplementation on the initial instruction, generating a reconstructed instruction. Since the reconstructed instruction supplements contextual information, it can be classified with a finer granularity as a second intent, thereby more accurately determining the user's true intent. Then, it calls the target component corresponding to the second intent, which includes multiple database interfaces, to obtain the target data corresponding to the reconstructed instruction in response to the initial instruction, improving the accuracy and success rate of responding to the initial instruction when its intent is unclear.
[0101] In an optional embodiment, the instruction refactoring module 303 includes: The referential determination unit is used to determine the referential object corresponding to each referential word in the initial instruction based on the associated dialogue data; The pronoun replacement unit is used to replace each pronoun in the initial instruction with its corresponding pronoun object to obtain the intermediate instruction. The element supplementation unit is used to extract query element information from the associated dialogue data, add the query element information to the intermediate instruction, and obtain the reconstruction instruction; the query element information is information that limits the query scope.
[0102] In an optional embodiment, it further includes: The enterprise extraction unit is used to extract at least one initial query enterprise from the reconstruction instruction; The permission filtering unit is used to filter each of the initial query enterprises according to the user's user permissions, and determine at least one target enterprise; Query response module 305 includes: The component determination unit is used to determine the target component based on the second intent and the enterprise type of the target enterprise; the enterprise type is determined by the enterprise's service objects; The data acquisition unit is used to invoke the target component to acquire the target data of each of the target enterprises.
[0103] In an optional embodiment, the second intent includes: identifying transaction anomalies; the target component includes: an anomaly detection component; The data acquisition unit includes: The component invocation subunit is used to invoke the Insight Anomaly component corresponding to the Insight Transaction Anomaly; The data retrieval subunit is used to retrieve transaction data of the target enterprise within a target time period through the transaction database interface of the anomaly insight component; and to retrieve publicly available enterprise development information of the target enterprise within the target time period through the public information database interface of the anomaly insight component; the enterprise development information includes: development strategy information and project bidding information; The data determination subunit is used to determine the transaction data and the enterprise development information as target data.
[0104] In an optional embodiment, it further includes: an intent determination module; The intent determination module includes: An intent classification unit is used to perform a second intent classification on the initial instruction when the classification confidence level is greater than or equal to a confidence threshold, thereby obtaining a second intent of the initial instruction. An intent determination unit is used to determine whether the second intent of the initial instruction is a sub-category of the first intent category of the initial instruction; The first response unit is used to, if yes, invoke the target component corresponding to the second intent to obtain the target data; A dialogue association unit is used to determine, if not, associated dialogue data in the human-computer interaction dialogue that is associated with the initial instruction; The instruction reconstruction unit is used to perform word replacement and information supplementation on the initial instruction based on the associated dialogue data, and generate a reconstructed instruction for the initial instruction.
[0105] In an optional embodiment, the query response module 305 includes: The prompt word generation unit is used to fill in the preset prompt word template corresponding to the second intent according to the target data to generate business prompt words; the preset prompt word template is used to de-identify and structurally adjust the target data; The model analysis unit is used to input the business prompt words into the large language model and obtain the model analysis results; The result response unit is used to respond to the initial instruction with the model analysis result.
[0106] In an optional embodiment, the first intent includes: account insight class, material generation class, and knowledge consulting class; the second intent includes: subcategories of account insight class, subcategories of material generation class, and subcategories of knowledge consulting class.
[0107] The dialogue-based command response device provided in this embodiment of the invention can execute the dialogue-based command response method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the dialogue-based command response method.
[0108] Figure 4 A schematic diagram of the structure of a dialogue-based instruction response device 400 that can be used to implement embodiments of the present invention is shown.
[0109] like Figure 4 As shown, the dialogue-based instruction response device 400 includes at least one processor 401 and a memory, such as a read-only memory 402 or a random access memory 403, communicatively connected to the at least one processor 401. The memory stores computer programs executable by the at least one processor. The processor 401 can perform various appropriate actions and processes based on the computer program stored in the read-only memory 402 or loaded from storage unit 408 into the random access memory 403. The random access memory 403 may also store various programs and data required for the operation of the dialogue-based instruction response device 400. The processor 401, read-only memory 402, and random access memory 403 are interconnected via a bus 404. An input / output interface 405 is also connected to the bus 404.
[0110] Multiple components in the dialogue-based command response device 400 are connected to the input / output interface 405, including: an input unit 406, such as a keyboard, mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a disk, optical disk, etc.; and a communication unit 409, such as a network interface card, modem, wireless transceiver, etc. The communication unit 409 allows the dialogue-based command response device 400 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0111] Processor 401 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 401 include, but are not limited to, central processing units, graphics processing units, various special-purpose artificial intelligence computing chips, various processors running machine learning model algorithms, digital signal processors, and any suitable processor, controller, microcontroller, etc. Processor 401 performs the various methods and processes described above, such as dialogue-based instruction response methods.
[0112] In some embodiments, the dialogue-based instruction response method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed onto the dialogue-based instruction response device 400 via read-only memory 402 and / or communication unit 409. When the computer program is loaded into random access memory 403 and executed by processor 401, one or more steps of the dialogue-based instruction response method described above may be performed. Alternatively, in other embodiments, processor 401 may be configured to execute the dialogue-based instruction response method by any other suitable means (e.g., by means of firmware).
[0113] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays, application-specific integrated circuits (ASICs), application-specific standard products (ASICs), systems-on-a-chip (SoCs), complex programmable logic devices, computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0114] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0115] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory, flash memory, optical fiber, portable compact disk read-only memory, optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0116] To provide interaction with the user, the systems and techniques described herein can be implemented on an operational detection device. This dialogue-based command response device includes: a display device (e.g., a cathode ray tube or liquid crystal display monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the dialogue-based command response device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including voice input, speech input, or tactile input).
[0117] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0118] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product within the cloud computing service system. This addresses the shortcomings of traditional physical hosts and virtual private servers, such as high management difficulty and weak business scalability.
[0119] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0120] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A dialogue-based instruction response method, characterized in that, The method includes: The initial instruction input by the user is classified into a first intent to obtain the first intent and classification confidence of the initial instruction, wherein the initial instruction is the instruction input by the user in the human-computer interaction dialogue; When the classification confidence level is less than the confidence threshold, related dialogue data that is associated with the initial instruction is determined in the human-computer interaction dialogue; Based on the associated dialogue data, the initial instruction is modified by word replacement and information supplementation to generate a reconstructed instruction for the initial instruction; The reconstruction instruction is classified into a second intent to obtain a second intent of the reconstruction instruction; the classification granularity of the first intent classification is greater than that of the second intent classification. The target component corresponding to the second intent is invoked to obtain the target data corresponding to the reconstruction instruction, and the initial instruction is responded to according to the target data; the target component includes: multiple database interfaces.
2. The method according to claim 1, characterized in that, The step of performing word replacement and information supplementation on the initial instruction based on the associated dialogue data to generate a reconstructed instruction for the initial instruction includes: Based on the associated dialogue data, determine the referents of each pronoun in the initial instruction; Replace each pronoun in the initial instruction with its corresponding referent to obtain the intermediate instruction; Extract query element information from the associated dialogue data, add the query element information to the intermediate instruction to obtain the reconstruction instruction; the query element information is information that limits the query scope.
3. The method according to claim 1, characterized in that, Before invoking the target component corresponding to the second intent and obtaining the target data corresponding to the reconstruction instruction, the method further includes: Extract at least one initial query enterprise from the reconstruction instruction; Based on the user's user permissions, each of the initial query companies is filtered to determine at least one target company; The step of invoking the target component corresponding to the second intent and obtaining the target data corresponding to the refactoring instruction includes: The target component is determined based on the second intent and the enterprise type of the target enterprise; the enterprise type is determined by the enterprise's service targets. The target component is invoked to obtain the target data of each target enterprise.
4. The method according to claim 3, characterized in that, The second intent includes: identifying transaction anomalies; the target component includes: an anomaly detection component; The step of invoking the target component to obtain the target data of each target enterprise includes: Invoke the Insight Anomaly component corresponding to the Insight Transaction Anomaly; The transaction database interface of the anomaly detection component is used to retrieve transaction data of the target company within a target time period; the public information database interface of the anomaly detection component is used to retrieve publicly available corporate development information of the target company within the target time period; the corporate development information includes: development strategy information and project bidding information. The transaction data and the enterprise development information are identified as target data.
5. The method according to claim 1, characterized in that, Also includes: When the classification confidence level is greater than or equal to the confidence threshold, the initial instruction is classified into a second intent to obtain the second intent of the initial instruction; Determine whether the second intent of the initial instruction is a subcategory of the first intent category of the initial instruction; If so, invoke the target component corresponding to the second intent to obtain the target data; If not, determine the associated dialogue data that is related to the initial instruction in the human-computer interaction dialogue; Based on the associated dialogue data, the initial instruction is modified by word replacement and information supplementation to generate a reconstructed instruction for the initial instruction.
6. The method according to claim 1, characterized in that, The step of responding to the initial instruction based on the target data includes: Based on the target data, a preset prompt word template corresponding to the second intent is filled in to generate a business prompt word; the preset prompt word template is used to de-identify and structurally adjust the target data; The business prompt words are input into the large language model to obtain the model analysis results; The initial command is responded to with the results of the model analysis.
7. The method according to claim 1, characterized in that, The first intent includes: Account Insights, Material Generation, and Knowledge Consulting; the second intent includes: subcategories of Account Insights, Material Generation, and Knowledge Consulting.
8. A dialogue-based command response device, characterized in that, The device includes: The first intent classification module is used to classify the initial instruction input by the user into a first intent, and obtain the first intent and classification confidence of the initial instruction, wherein the initial instruction is the instruction input by the user in the human-computer interaction dialogue; The associated dialogue determination module is used to determine associated dialogue data in the human-computer interaction dialogue that is associated with the initial instruction when the classification confidence is less than the confidence threshold. The instruction reconstruction module is used to perform word replacement and information supplementation on the initial instruction based on the associated dialogue data, and generate a reconstructed instruction for the initial instruction; The second intent classification module is used to classify the reconstruction instruction into a second intent to obtain the second intent of the reconstruction instruction; the classification granularity of the first intent classification is greater than the classification granularity of the second intent classification. The query response module is used to call the target component corresponding to the second intent, obtain the target data corresponding to the reconstruction instruction, and respond to the initial instruction according to the target data; the target component includes: multiple database interfaces.
9. A dialogue-based command response device, characterized in that, The dialogue-based command response device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor to enable the at least one processor to perform the dialogue-based instruction response method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the dialogue-based instruction response method according to any one of claims 1-7.
