Task target identification method and device, computer equipment and medium
By using an interactive Bayesian inference mechanism and a professional domain knowledge base, the system addresses the issues of insufficient interaction capabilities, transparency, and controllability of large language models in multi-turn dynamic interaction scenarios. This results in a natural and efficient human-computer dialogue system, improving the interaction capabilities and accuracy in fields such as medical consultation, legal advice, financial services, and e-commerce customer service.
Patent Information
- Application Number
- CN202511669933.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-14
- Publication Date
- 2026-02-13
AI Technical Summary
Existing large language models lack interactive capabilities in multi-turn dynamic interaction scenarios, have opaque reasoning processes, and uncontrollable outputs. They are particularly difficult to replace human services in fields such as medical diagnosis and professional consultation, and there is a risk of generating false information.
An interactive Bayesian inference mechanism is adopted. Through an active inquiry process, task features are selected based on information gain, the candidate target set and probability are dynamically adjusted, and verification prompt text is generated to guide user confirmation. Bayesian updates and feedback information processing are performed using a professional domain knowledge base.
It achieves natural and efficient multi-turn interaction, enhances the transparency of the reasoning process and the controllability of the model output, and improves the interactivity, accuracy and reliability of the human-computer dialogue system.
Smart Images

Figure CN121523897A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of artificial intelligence, and in particular to a task target identification method and device, a computer device and a medium. BACKGROUND
[0002] With the rapid development of artificial intelligence technology, large language models (LLM) have been widely applied in text generation, information query and other fields. However, in actual application, the existing technology still has some limitations, especially in scenarios that require multi-round dynamic interaction, such as intelligent customer service, medical consultation, professional consultation, etc.
[0003] In the existing technology, the interaction mode of the large language model is usually passive, similar to the traditional search engine, which can only output results according to the user's explicit input information, and cannot actively initiate communication or guide the user to provide more information. This mode is particularly inadequate in scenarios that require multi-round interaction, such as customer service, medical consultation, etc., and is difficult to effectively replace human services. In addition, although the large language model performs better than humans in some professional field tests, its application effect in actual production is not ideal. The core problem is that the large language model only has the ability to store and call professional knowledge, and lacks the relevant experience required to solve actual problems, i.e., the ability to dynamically adjust strategies based on scenarios and gradually approach goals. This lack of ability stems from the fact that the large language model is a generative model based on maximum likelihood estimation (MLE), and the core logic is to generate the context with the highest joint probability based on the previous context, lacking macro-level reasoning logic and interaction strategies, and unable to optimize the decision path based on real-time feedback like humans.
[0004] In addition, the large language model also faces two key problems when landing in professional fields. First, the reasoning process of the model is a "black box", and users cannot trace the basis for generating conclusions, nor can they intervene and adjust during reasoning. Second, the model has a "hallucination risk", which may generate false information that does not conform to reality. These two problems may have serious consequences in fields such as medical consultation and professional consultation, which have extremely high requirements for accuracy and reliability, and have become a core obstacle to the landing of large language models.
[0005] In summary, the existing technology has obvious deficiencies in multi-round interaction scenarios, mainly in the lack of interaction ability, the opacity of the reasoning process, and the uncontrollability of the model output. These problems limit the widespread application of large language models in actual production, especially in business scenarios that require high interactivity and high reliability. SUMMARY
[0006] The primary purpose of the present application is to solve at least one of the above problems and provide a task target identification method and device, a computer device and a medium.
[0007] To meet various purposes of the present application, the present application adopts the following technical solutions: A task target recognition method provided to adapt to one of the purposes of the present application, comprising the following steps: Receiving initial information input by a user, determining a plurality of task targets related to the initial information based on a preset professional field knowledge base to form a candidate target set, and setting an initial probability for each task target in the candidate target set; Entering an active inquiry link, determining information gain of each task feature in a selectable feature pool corresponding to all task targets in the current candidate target set based on current probabilities of the task targets, and taking a task feature with the highest information gain as a task feature to be verified; Generating verification prompt text according to the task feature to be verified, and driving a preset active inquiry model to output questioning information for guiding the user to confirm the task feature to be verified by using the verification prompt text; Receiving feedback information submitted by the user, updating the candidate target set and probabilities of each task target in the candidate target set based on task features covered by the feedback information, and adding the covered task features to a verified feature pool; When the probabilities of task targets in the candidate target set meet a preset termination condition, ending the current active inquiry link, setting the task target as a real task target of the user, or returning to the step of entering the active inquiry link to continue iteration.
[0008] A task target recognition device proposed to adapt to the task target recognition method for one of the purposes of the present application, comprising: An initial response module configured to receive initial information input by a user, determine a plurality of task targets related to the initial information based on a preset professional field knowledge base to form a candidate target set, and set an initial probability for each task target in the candidate target set; An interactive polling module configured to enter an active inquiry link, determine information gain of each task feature in a selectable feature pool corresponding to all task targets in the current candidate target set based on current probabilities of the task targets, and take a task feature with the highest information gain as a task feature to be verified; An inquiry execution module configured to generate verification prompt text according to the task feature to be verified, and drive a preset active inquiry model to output questioning information for guiding the user to confirm the task feature to be verified by using the verification prompt text; A feedback updating module configured to receive feedback information submitted by the user, update the candidate target set and probabilities of each task target in the candidate target set based on task features covered by the feedback information, and add the covered task features to a verified feature pool; The iterative decision module is configured to end the current active inquiry phase when the probability of the task target in the candidate target set meets a preset termination condition, and set the task target as the user's actual task target; otherwise, it returns to the step of entering the active inquiry phase to continue iterating.
[0009] In another aspect, a computer device provided for one of the purposes of this application includes a processor and a memory, wherein the processor invokes and runs a computer program in the memory to perform the steps of the task target recognition method.
[0010] On another aspect, a computer-readable storage medium is provided to suit another purpose of this application, which stores in the form of computer-readable instructions a computer program implemented according to the described task target identification method, which, when called by a computer, executes the steps included in the corresponding method.
[0011] Compared to traditional technologies, this application, through an interactive Bayesian inference mechanism, effectively addresses the shortcomings of existing technologies in multi-turn interaction capabilities, inference transparency, and model output controllability, achieving significant technical advantages. Firstly, regarding interaction capabilities, this application can proactively select the task feature with the highest information gain for questioning based on the current probability of the task objective, dynamically adjusting the interaction strategy to achieve natural and efficient multi-turn dialogue, significantly improving the interactivity of the human-computer dialogue system. Secondly, concerning inference transparency, this application monitors the entire inference process through explicit Bayesian updates and information gain calculations, allowing users to clearly understand how the system approximates the true task objective, enhancing user trust. Finally, regarding model output controllability, this application precisely controls the model output by dynamically adjusting the candidate target set and task objective probabilities, avoiding the risk of false information and ensuring focus on the most probable task objective until the true objective is determined, thus improving the system's accuracy and reliability. Attached Figure Description
[0012] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart illustrating a typical embodiment of the task target identification method of this application; Figure 2 This is a schematic block diagram of the target recognition device of this application; Figure 3 This is a schematic diagram of the structure of a computer device used in this application. Detailed Implementation
[0013] The technical solutions of the present application can be deployed in various network architectures, including but not limited to cloud computing platforms, local servers, and distributed systems. These architectures can support large-scale data processing and real-time interaction, ensuring efficient operation of the system, and of course can also be deployed in personal computers, tablets, and smartphones with sufficient performance. Specifically, the task goal recognition method of the present application can be programmed as a computer program and installed in the corresponding computer device to run to provide a human-computer interaction system, so that the front-end user can use the corresponding human-computer dialogue service and help the user determine his real task goal through human-computer interaction.
[0014] In terms of application scenarios, the method of the present application is applicable to various professional fields, such as legal consultation, financial services, medical diagnosis, and e-commerce customer service, etc. In the legal field, the user's legal needs can be identified through interaction with the user, and corresponding legal advice can be provided; in the financial field, the user can be assisted in risk assessment and investment decision-making; in the medical field, through multiple rounds of inquiry, high-reliability auxiliary information can be provided for doctors or patients to quickly diagnose diseases; in the e-commerce customer service field, the user's questions can be automatically answered, and intelligent shopping guide demand analysis and intelligent after-sales problem attribution can be realized, etc., to improve customer satisfaction.
[0015] In order to support the implementation of the present application, a corresponding professional domain knowledge base can be prepared for the corresponding scene and its professional field. The knowledge base needs to be able to support multiple application scenarios, and at the same time can be implemented with flexible data structures to store prior knowledge in different fields. The professional domain knowledge base can be implemented using a relational or non-relational database, as long as the data sufficient for the corresponding call of the technical solutions of the present application is stored according to certain relationships.
[0016] In one embodiment, the professional domain knowledge base can be implemented in the form of a knowledge graph, which contains entity nodes and associated edges, used to represent task goals, task features, and their relationships.
[0017] Specifically, the entity node is used to represent the task goal or the task feature. Each entity node has a unique identifier and descriptive attributes. For example, in the medical field, the entity node can be a disease name as a task goal or a symptom description as a task feature; in the legal consultation field, the entity node can be a legal reason as a task goal or a fact description as a task feature. The associated edge is used to represent the relationship between the entity nodes. Each associated edge can have directionality, indicating that it points from one entity node to another, and has a weight, indicating the strength or probability of the relationship. Each entity node and associated edge can have multiple attributes for storing additional information. For example, the entity node can have descriptive text, frequency statistics, etc. attributes; the associated edge can have probability value, confidence, etc. attributes.
[0018] Taking a medical diagnosis scenario as an example, the knowledge base can store the relationship between diseases and symptoms, where the disease is the task target and the symptom is the task feature. For example, there is an associated edge between the entity nodes “flu” and “cough” with a weight of 0.8, indicating that 80% of flu patients will have a cough. In addition, the association between diseases can also be stored, such as a lower association weight between “flu” and “pneumonia”, indicating that in some cases, flu may coexist with pneumonia. In this way, the knowledge base can support the human-computer dialogue system to gradually narrow down the disease range in multiple rounds of inquiry and ultimately determine the most likely diagnosis result.
[0019] Taking a legal consultation scenario as an example, the knowledge base can store the relationship between relevant legal causes and legal consequences, where the legal consequence can be the task target and the legal cause can be the task feature. For example, there is an associated edge between the entity nodes “contract dispute” and “breach of contract liability” with a weight of 0.7, indicating that 70% of contract dispute cases involve breach of contract liability issues. In addition, the association between different legal provisions can also be stored, such as a higher association weight between “breach of contract liability” and “damages”. In this way, the knowledge base can support the human-computer dialogue system to gradually identify the user's legal needs in the interaction with the user and provide accurate legal advice.
[0020] Taking a financial service scenario as an example, the knowledge base can store the relationship between financial products and user needs, where the financial product can be the task target and the user need can be the task feature. For example, there is an associated edge between the entity nodes “stock investment” and “risk tolerance” with a weight of 0.6, indicating that 60% of stock investors have a higher risk tolerance. In addition, the association between different financial products can also be stored, such as a medium association weight between “stock investment” and “fund investment”. In this way, the knowledge base can support the human-computer dialogue system to gradually understand the user's investment needs in the interaction with the user and provide personalized investment advice.
[0021] As can be seen from the above examples, the professional domain knowledge base can store prior knowledge in different fields in a unified data structure, thereby supporting the efficient operation of the task target recognition method of the present application in any application scenario. This design not only improves the flexibility and scalability of the human-computer dialogue system, but also ensures accurate task target recognition and efficient user interaction in different fields.
[0022] Please refer to Figure 1 In some embodiments, the task target recognition method of the present application can be implemented as an application program running in a computer device, which includes: Step S3100, receiving initial information input by a user, determining a plurality of task targets related to the initial information based on a preset professional field knowledge base to form a candidate target set, and setting an initial probability for each task target in the candidate target set; After the user starts the man-machine dialogue system of the present application, the user first enters the man-machine dialogue interface. The user can input initial information in the interface, which can be the user's question, description or any text related to the task target. For example, in the medical diagnosis scenario, the user can describe his / her symptoms; in the e-commerce customer service scenario, the user can describe the product problem encountered. After receiving the initial information input by the user, the man-machine dialogue system processes it based on the preset professional field knowledge base to determine the candidate target set and set the initial probability of each task target.
[0023] As disclosed above, the professional field knowledge base is a database storing a large amount of prior knowledge, which is implemented in the form of a knowledge graph and contains entity nodes and associated edges. The entity nodes represent task targets or task features, and each entity node has a unique identifier and descriptive attributes.
[0024] To determine the candidate target set, various embodiments can be used. In one embodiment, entity recognition is first performed on the initial information, key words are extracted from the initial information input by the user, and then the key words are converted into a feature vector after forming a key word sequence, and the feature vector is matched with the data of each node in the professional field knowledge base, or the initial information can be directly converted into a feature vector for matching. For example, in the medical diagnosis scenario, the symptom key words such as “cough” and “fever” in the user's description can be recognized by natural language processing technology, and then the disease nodes related to these key words can be found in the knowledge graph, and the corresponding task targets are formed into the candidate target set.
[0025] In another embodiment, rule matching can be performed on the node attribute data in the professional field knowledge base based on the extracted key words, and the task targets matching the key words can be directly retrieved from the knowledge base as the candidate target set. For example, in the legal consultation scenario, the user inputs “contract dispute”, and the task targets corresponding to the legal consequences related to “contract dispute” are directly matched as the candidate target set.
[0026] After determining the candidate target set, an initial probability can be preset for each task target as a prior probability. In one embodiment, the initial probability can be set according to the frequency of the task target in the knowledge base. For example, in the medical diagnosis scenario, if a certain disease appears frequently in the knowledge base, a higher initial probability can be set for it.
[0027] In another embodiment, the initial probability can be set according to the experience of a domain expert or historical data. For example, in a financial service scenario, if a certain financial product is frequently mentioned in past investment cases, a higher initial probability can be set for it. In addition, a uniform distribution method can also be used to set the same initial probability for each task target in the candidate target set, which is suitable for cases where there is not enough prior information.
[0028] Step S3200, entering the active inquiry link, determining the information gain of each task feature in the selectable feature pool corresponding to all task targets in the current candidate target set based on the current probability of the task targets, and taking the task feature with the highest information gain as the to-be-verified task feature; The active inquiry link refers to at least one round of dialogue process in which the human-computer dialogue system actively asks the user questions to guide the user to provide more rich feedback information. In each round of dialogue, the current candidate target set is the result of updating the candidate target set in the previous round of dialogue. The update in the previous round of dialogue can result in an increase or decrease in the task targets in the candidate target set, or the probabilities of the task targets in the candidate target set can be updated.
[0029] For the current candidate target set, a corresponding selectable feature pool can be determined. The determination of the selectable feature pool is based on the data in the professional domain knowledge base. When determining the selectable feature pool, all task features associated with the task targets in the current candidate target set are recalled from the professional domain knowledge base. For example, in a medical diagnosis scenario, the selectable feature pool can include various symptoms related to diseases, such as the word labels “cough” and “fever”.
[0030] After determining the selectable feature pool, the information gain of each task feature can be calculated based on the current probability of each task target in the candidate target set. The current probability refers to the probability value of each task target in the current round of dialogue interaction, reflecting the confidence degree of each task target. In the first round of inquiry, the current probability of the task target refers to its initial probability; in subsequent rounds of inquiry, unless it is a newly added task target, its current probability usually refers to its posterior probability obtained in the previous round of inquiry. The current probability is the basis for information gain calculation.
[0031] The information gain is a measure of the value of a task feature in reducing uncertainty, i.e., selecting the task feature for verification can most effectively reduce the entropy of the candidate target set. Specifically, the information gain can be determined by calculating the difference between the expected posterior entropy of the candidate target set after selecting a certain task feature for verification and the current posterior entropy before considering the task feature. The higher the information gain, the more effectively the selection of the feature for verification can reduce uncertainty, thereby being closer to the user's real task target.
[0032] When determining the information gain, various mature and feasible algorithms can be implemented. In one embodiment, the likelihood of each task feature is first calculated based on the current probability of each task target in the current candidate target set. The likelihood reflects the possibility of the occurrence of a certain task feature under the current task target probability distribution. Then, the expected posterior entropy of each task feature is calculated. The posterior entropy reflects the degree of uncertainty of the candidate target set after obtaining the information of a certain task feature. The expected posterior entropy is the average uncertainty of the candidate target set considering all possible task feature values (such as “yes” or “no”). Finally, the information gain of each task feature is determined by calculating the difference between the posterior entropy and the expected posterior entropy of the current candidate target set.
[0033] After determining the information gain of each optional feature in the optional feature pool in the above manner, the task feature with the highest information gain can be selected as the to-be-tested task feature according to the information gain, which is used to guide the user to confirm the feature, so as to gradually approach the real task target of the user. Various embodiments can be flexibly selected for the decision of the to-be-tested task feature: In one embodiment, after determining the information gain of each task target, the task feature with the highest information gain is directly selected as the to-be-tested task feature. This decision is based on the principle of maximizing the information gain, that is, selecting the feature that can most reduce the uncertainty of the candidate target set, ensuring that the most valuable task feature is selected for verification in each round of interaction, thereby improving the efficiency and accuracy of the interaction.
[0034] In another embodiment, after determining the information gain of each task target, the task feature with an information gain exceeding a preset threshold can be considered. If there are multiple task features with information gains exceeding the preset gain threshold, the task feature with the highest information gain is further selected as the to-be-tested task feature. This way ensures that the feature has sufficient information value while avoiding selecting a feature with too low information gain, thereby improving robustness and reliability. The preset gain threshold can be adjusted according to specific application scenarios and domain knowledge to adapt to different needs and environments.
[0035] In another embodiment, after determining the information gain of each task target, the information gain and other factors such as the verification cost of the task feature or the difficulty of user feedback can be considered comprehensively. Specifically, a comprehensive score is assigned to each task feature, which considers not only the information gain but also other related factors. For example, if the information gain of a certain task feature is high but the verification cost is also high, a task feature with slightly lower information gain but lower verification cost can be selected as the to-be-tested task feature. This way balances the information gain, verification cost, and user interaction convenience, thereby improving the overall performance of the system and user experience.
[0036] In another embodiment, after determining the information gain of each task target, adjustments are made based on historical data or the experience of experts in the field. For example, if a certain task feature is frequently verified in historical data and has good results, this task feature can be prioritized, even if its information gain is not the highest. This way, historical data and domain knowledge are utilized to make decisions that are closer to real-world application scenarios, improving accuracy and reliability. At the same time, decision-making strategies can be dynamically adjusted based on user feedback to adapt to different user needs and interactive environments.
[0037] In step S3300, a verification prompt text is generated according to the task feature to be verified, and the pre-set active inquiry model is driven with the verification prompt text to output questioning information for guiding the user to confirm the task feature to be verified. To achieve high-quality human-computer interaction effects with the help of artificial intelligence technology, the human-computer dialogue system generates a verification prompt text based on the task feature to be verified, trying to ensure that the system can guide the user to provide feedback information in a natural and clear manner.
[0038] To generate the verification prompt text, the template contains inquiry control instruction texts that control the model to generate questioning information according to the expected dialogue strategy. These instruction texts ensure that the generated questioning information can guide the user to confirm the task feature to be verified.
[0039] In addition to the inquiry control instruction texts, the data structure of the verification prompt template can also include multiple parts as needed, such as scene role parameters, emotional temperature parameters, historical dialogue information, and current task feature descriptions. The scene role parameter part is used to clearly define the inquirer role in the dialogue, such as a "medical diagnosis assistant" or a "legal consultation expert." The historical dialogue information is used to summarize the key information in the previous dialogue to provide context for the current questioning. The current task feature description part is used to detail the various task features that the user has already fed back in the current session. The inquiry control instruction part then guides the model to conduct a dialogue with the user in the form of a question.
[0040] To make the questioning information sufficient to guide the user to confirm the task feature to be verified, specifically, the inquiry control instruction texts in the verification prompt template need to clearly indicate how the model generates the question. For example, the inquiry control instruction text can require the model to generate a natural language question that directly targets the task feature to be verified and is presented in a way that is easy for the user to understand and answer. In a medical diagnosis scenario, if the task feature to be verified is "cough," the template can instruct the model to generate a question like "Have you had persistent cough symptoms in the past week?" In an e-commerce customer service scenario, if the task feature to be verified is "product return and exchange issue," the template can instruct the model to generate a question like "Have you encountered any issues related to product return and exchange?"
[0041] The active inquiry model can be a current mature large language model, a model fine-tuned on corresponding training data based on a current mature large language model, or a deep learning model self-built on a model architecture and trained on corresponding training data. These models can generate personalized inquiry information according to the verification prompt template, making the inquiry information more in line with human conversation habits and improving the user's interactive experience. For example, the model can generate inquiry information similar to "Hello, I understand that you have been feeling unwell recently. Would you like to ask further if you have a cough? If so, what color and texture is the sputum?" Not only does it directly target the task characteristics, but it also has an emotional temperature, making the user feel the system's care.
[0042] In step S3400, the feedback information submitted by the user is received, and the candidate target set and the probability of each task target therein are updated based on the task characteristics covered by the feedback information. The covered task characteristics are added to the verified characteristic pool. The inquiry information generated by the active inquiry model is output to the human-computer dialogue interface of the terminal device where the user is located. After the user sees the inquiry information on the interface, he or she can submit feedback information according to his or her actual situation. These feedback information can be a simple "yes" or "no", or a more detailed description. After receiving the feedback information from the user, the human-computer dialogue system can analyze and convert it into a format that the system can understand. For example, in the medical diagnosis scenario, if the system asks the user "Do you have a persistent cough?" and the user answers "yes", this feedback information can be analyzed as the verification result of the "cough" task characteristic being "yes".
[0043] Further, the candidate target set and the probability of each task target therein are updated based on the feedback information of the user. Specifically, the Bayesian update formula can be applied to calculate the new posterior probability by combining the feedback information of the user and the probability of each task target in the current candidate target set. For example, if the user confirms the "cough" symptom, the probability of each disease as the user's real task target is updated according to the association between "cough" and each disease in the knowledge base. If "cough" has a high correlation with "flu", the probability of "flu" as a task target will increase accordingly.
[0044] If the feedback information of the user significantly reduces the probability of certain task targets, for example, below a preset probability threshold, these task targets can be removed from the candidate target set, thereby reducing the size of the candidate target set. Conversely, if the feedback information of the user reveals new clues, i.e., adds task features, new task targets can be introduced through the association relationship of the knowledge graph and added to the candidate target set. For example, in a medical diagnosis scenario, if the user confirms the symptom of “cough”, according to the association relationship of “cough” and “pneumonia” in the knowledge graph, a new task target of “pneumonia” is added to the candidate target set. This dynamic adjustment mechanism ensures that the candidate target set always contains the most likely task target, improving the adaptability and accuracy of the system.
[0045] In addition, in order to implement efficient context management, the task features covered by the user feedback can be added to the verified feature pool. The verified feature pool is used to record the task features that have been verified by the system, avoiding repeated questioning and improving interaction efficiency. In addition, the verification results corresponding to the to-be-verified task features can also be marked according to the reply information of the user, so as to clearly describe the current task features of the user in the current session. For example, if the user confirms the symptom of “cough”, the verification result of the task feature of “cough” is marked as “yes” in the verified feature pool, and the current task feature description of the user is updated, providing context information for subsequent interaction.
[0046] Step S3500, when the probability of the task target in the candidate target set meets a preset termination condition, ending the current active inquiry session, setting the task target as the real task target of the user, otherwise returning to the step of entering the active inquiry session to continue iteration.
[0047] The human-computer dialogue system decides whether to end the current active inquiry session according to whether the probability of the task target in the candidate target set meets the preset termination condition. This termination condition is a key basis for judging whether the user's real task target has been approached enough, ensuring that the human-computer dialogue system can stop interaction at the right time, avoiding unnecessary questioning, while ensuring the accuracy and reliability of the interaction result.
[0048] The termination condition can be flexibly set. Specifically, in one embodiment, the preset termination condition can be that the probability of the task target reaches or exceeds a preset confidence threshold. For example, in a medical diagnosis scenario, if the probability of a certain disease as a task target exceeds 90%, it can be considered that the disease is the real task target of the user, thereby ending the active inquiry session. This termination condition based on the probability threshold can ensure that the decision is made at a high confidence level, improving the accuracy of inferring the real task target and user satisfaction.
[0049] In another embodiment, the preset termination condition can be reaching a maximum number of questioning rounds. In some scenarios, even if the probability of the task goal has not reached a high confidence level, the interaction can be ended after reaching a preset maximum number of questioning rounds in order to control the cost and time of the interaction. For example, in an e-commerce customer service scenario, the current probability of the task goal with the highest probability can be selected as the real task goal of the user after five rounds of questioning, thereby ending the interaction. This approach is suitable for scenarios that require a quick response, ensuring that a reasonable decision is made within a limited number of interactions.
[0050] In another embodiment, the preset termination condition can be that the probability distribution of the task goal tends to be stable. If the probability of the task goal in the candidate target set changes very little, for example, the change rate is lower than a preset value, in consecutive rounds of interaction, it means that it is difficult to obtain more valuable information through further questioning, and the interaction can be ended at this time. For example, in a financial service scenario, if the probability distribution of the task goal changes by less than a certain preset threshold after ten consecutive rounds of interaction, the interaction can be ended, and the current probability of the task goal with the highest probability can be selected as the real task goal of the user. This approach can avoid falling into an ineffective interaction cycle, improving interaction efficiency and user experience.
[0051] When the preset termination condition is met, the current probability of the task goal with the highest probability is set as the real task goal of the user. Conversely, if the preset termination condition is not met, the process returns to step S3200 to re-enter the active inquiry stage, and the iteration continues until the termination condition is met. This iterative mechanism enables the human-computer dialogue system to gradually approach the real task goal of the user.
[0052] After determining the real task goal of the user, the human-computer dialogue system can pass the real task goal and its associated task feature description to the downstream application system to cooperatively complete specific business operations, ensuring that the user's demand can be efficiently converted into actual business results. For reference, the following examples are provided: In a medical diagnosis scenario, when the real task goal of the user is identified as a certain disease, the diagnosis result can be sent to a medical information system. The system can further call an electronic medical record management module to provide detailed diagnosis suggestions and treatment plans for doctors, or even directly book related examination items or arrange expert consultations. For example, if it is determined that the user may have "flu", the flu treatment process in the medical information system can be triggered, including recommending antiviral drugs and arranging necessary blood tests, thereby assisting medical personnel in quickly responding to the patient's condition and improving the efficiency and quality of medical services.
[0053] In the legal consultation scenario, after the human-computer conversation system determines the user's real task goal, it can send relevant legal issues and suggestions to the legal service system. This system can further provide detailed legal provisions interpretation, case reference, and possible legal procedure guidance. For example, if it is identified that the user is facing a "contract dispute", relevant provisions in the legal database can be called to provide specific legal advice to the user, such as the way of assuming liability for breach of contract and the possible scope of compensation. At the same time, it can also assist the user in preparing legal documents or booking legal consultation meetings to ensure that the user can obtain comprehensive legal support and protect their legal rights and interests.
[0054] In the financial service scenario, after the human-computer conversation system determines the user's real task goal, it can work with the financial transaction system or investment consultant platform. For example, if it is identified that the user has a "stock investment" demand, the user's risk preference and investment goal can be sent to the investment consultant platform, which can generate personalized investment portfolio recommendations accordingly and monitor market dynamics in real time to provide investment decision support for the user. In addition, it can also assist the user in completing transaction operations such as stock buying and selling, fund subscription, etc., to ensure that the user's financial needs are responded to in a timely manner and improve the personalization and convenience of financial services.
[0055] In the e-commerce customer service scenario, after the human-computer conversation system determines the user's real task goal, it can work with the e-commerce platform's order management system, after-sales service system, or intelligent recommendation system. For example, if it is identified that the user's real task goal is about "product return and exchange", this information can be sent to the after-sales service system, which can automatically generate a return and exchange application form for the user, provide detailed return and exchange process instructions, and track the return and exchange status to ensure that the user can successfully solve the after-sales problem. At the same time, it can also provide relevant product recommendations for the user through the intelligent recommendation system based on the user's purchase history and current needs, improving the user's shopping experience and the platform's sales conversion rate.
[0056] Through the above-mentioned collaborative mechanism, the human-computer conversation system not only can accurately identify the user's real task goal, but also can seamlessly interface with downstream application systems to ensure that the user's needs can be fully and efficiently met. This collaborative working mode not only improves the operating efficiency of each business system, but also enhances the user experience, providing strong support for the application of intelligent interaction technology in multiple fields.
[0057] As can be seen from the above embodiments, compared with the traditional technology, the present application effectively solves the key problems of insufficient multi-round interaction capability, opaque reasoning process, and uncontrollable model output in the prior art, thereby achieving significant technical advantages and beneficial effects in multiple aspects, including but not limited to: Firstly, in terms of improving the intelligent interaction capability, the application introduces an interactive Bayesian inference mechanism to simulate the dynamic communication mode between people in real scenarios. The human-computer dialogue system can actively select the task feature with the highest information gain as the to-be-tested task feature according to the current probability of the task target in the current candidate target set, and generate a corresponding verification prompt text to control the active inquiry model to output the questioning information for guiding the counter-question to the user. This process not only actively guides the user to confirm the key information, but also dynamically adjusts the interaction strategy according to the user's feedback information, thereby realizing more natural and efficient multi-round interaction. For example, in a medical diagnosis scenario, the user can be actively asked whether there is sputum according to the symptoms such as "cough" and "fever", and the disease range can be further narrowed according to the user's answer. Compared with the passive information retrieval mode in the prior art, the application significantly improves the interaction capability of the human-computer dialogue system, making it better adapt to complex and variable actual application scenarios such as medical diagnosis, legal consultation, financial services and e-commerce customer service, etc.
[0058] Secondly, in terms of the transparency of solving the real task target, the application realizes the whole-process monitoring and tracing of the inference process through the explicit Bayesian updating method and information gain calculation. In each round of dialogue, the candidate target set and the probability of each task target in it can be updated based on the user's feedback information, and these probability changes can be used as the basis for subsequent interaction. For example, in a legal consultation scenario, the probabilities of task targets corresponding to different legal consequences can be updated in real time as the user confirms or denies different legal causes, and the user can clearly see how the system gradually focuses on the most likely legal problem based on their answers. This transparent inference process enables the user to clearly understand how the human-computer dialogue system gradually approaches the real task target, thereby enhancing the user's trust. Compared with the "black box" inference mode in the prior art, the transparency advantage of the application not only helps to improve the reliability of the system, but also provides a more intuitive and easy-to-understand interaction experience for the user, making the user more involved and trusted in the interaction process.
[0059] In addition, in terms of controllability of model output, the application realizes precise control of model output by dynamically adjusting the probability of candidate target set and task target. After each round of interaction, the candidate target set can be re-evaluated according to the feedback information of the user, which not only effectively avoids the risk of false information output by the model, but also ensures that the most possible task target is always focused on until the real task target is finally determined. For example, in the financial service scenario, the probability of each financial product as the user's investment target can be gradually adjusted according to the user's feedback on the interest and risk preference of different financial products, and finally the most suitable financial product can be accurately recommended to the user. Compared with the model output that is difficult to intervene in the prior art, the controllability advantage of the application enables the human-computer interaction system to better adapt to the needs of different users and provide more accurate and reliable solutions, thereby playing a greater value in practical applications.
[0060] As can be seen, the application realizes significant technical advantages in improving intelligent interaction capability, enhancing reasoning process transparency, and improving model output controllability through the innovative task target identification method, providing new ideas and methods for the development of intelligent interaction systems, and having important innovative significance and practical value.
[0061] On the basis of any embodiment of the method of the application, a plurality of task targets related to the initial information are determined based on a preset professional knowledge base to form a candidate target set, and an initial probability is set for each task target in the candidate target set, comprising: Step S3110, converting the initial information into a feature vector, and performing vector matching in the professional knowledge base represented by the knowledge graph to obtain a task target node that meets a preset similarity condition with the feature vector; The initial information input by the user is converted into a feature vector, which aims to convert the natural language description of the user into a numerical form that can be understood and processed by the machine through natural language processing technology. Specifically, a mature text feature extraction model can be used to achieve this. Similarly, in the professional knowledge base represented by the knowledge graph, each task target (such as a disease name) and task feature (such as a symptom description) is also pre-converted into a feature vector for storage using the same text feature extraction model.
[0062] On this basis, the similarity between the initial information feature vector and the vector of each task target node in the knowledge base is calculated through a vector matching algorithm to find a task target node that meets a preset similarity condition. The similarity algorithm can use any data distance algorithm, including but not limited to Euclidean distance, cosine similarity, etc. The preset similarity condition can be a similarity threshold, for example, when the similarity is greater than 0.7, the task target node is considered to be related to the initial information of the user.
[0063] Step S3120, according to the association edges and weights between the entity nodes in the knowledge graph, all task targets directly associated with the task target node or reachable via intermediate nodes are recalled to form the candidate target set; According to the association edges and weights between the entity nodes in the knowledge graph, a preset recall algorithm can be applied to recall all task targets directly associated with the task target node or reachable via intermediate nodes to form the candidate target set. Specifically, the recall algorithm can use various mature graph traversal techniques. Optionally, the graph traversal algorithm includes but is not limited to a breadth-first search algorithm, a depth-first search algorithm, a graph neural network algorithm, and the like.
[0064] The breadth-first search algorithm starts from the initially matched task target node, traverses the nodes in the knowledge graph layer by layer, and expands along the association edges until a preset traversal depth is reached or other termination conditions are met. The depth-first search algorithm starts from the initial node, traverses the knowledge graph in the depth direction, and searches the branches of the graph as deeply as possible. In some application scenarios, the depth-first search algorithm can more effectively discover associated task targets hidden in deeper levels. The recall algorithm based on the graph neural network can learn the embedding representation of the nodes and edges in the knowledge graph, determine the related task targets through graph convolution operations to capture the complex relationships between the nodes, and thus generate a more accurate and personalized candidate target set.
[0065] In actual applications, the selection of the recall algorithm can be adjusted according to specific scenarios and requirements. For example, in an e-commerce customer service scenario with high real-time requirements, a breadth-first search algorithm with higher computational efficiency can be used first; and in a medical diagnosis scenario with extremely high accuracy requirements, the advantages of multiple algorithms can be combined, for example, in one embodiment, a depth-first search algorithm is used for preliminary expansion, and a graph neural network algorithm is used for deep optimization to ensure the quality and diversity of the candidate target set. Step S3130, according to a preset prior probability distribution, set the initial probability of each task target in the candidate target set.
[0066] The prior probability distribution can be preset according to various factors. In one embodiment, the initial probability can be set according to the frequency of the task target in the knowledge base. For example, in a medical diagnosis scenario, if a certain disease appears frequently in the knowledge base, a higher initial probability can be set for it. This approach is based on statistical laws and reflects the universality of the task target in historical data. For example, if the disease of "cold" appears frequently in the knowledge base, a relatively high initial probability, such as 0.3, can be set for "cold" in the initial stage, and other less frequently occurring diseases can be assigned a lower initial probability, such as 0.1.
[0067] In another embodiment, the initial probability can be set according to the experience of domain experts or historical data. For example, in a financial service scenario, if a certain financial product is frequently mentioned in past investment cases, a higher initial probability can be set for it. In this way, the guidance of domain experts' professional knowledge and historical data makes the setting of the initial probability more close to the actual application scenario. For example, if the task goal of "stock investment" is frequently mentioned in past investment cases, a higher initial probability, such as 0.4, can be set for "stock investment", while other less mentioned investment methods can be assigned a lower initial probability, such as 0.2.
[0068] In addition, a uniform distribution method can also be used to set the same initial probability for each task goal in the candidate goal set. This method is suitable for cases where there is not enough prior information, ensuring equal competition among task goals in the initial stage. For example, in a completely new application scenario, the same initial probability, such as 0.25, can be assigned to each candidate task goal, so that these probabilities can be dynamically adjusted according to user feedback in subsequent interactions.
[0069] The above embodiments first convert the initial information into a feature vector and use a vector matching algorithm to quickly find task goal nodes similar to the user input from the knowledge graph, greatly improving the retrieval speed. Subsequently, relevant task goals are recalled according to the associated edges and weights in the knowledge graph, and the candidate goal set is efficiently generated. Finally, the initial probability is flexibly set by the preset prior probability distribution, and reasonable initial probabilities can be quickly assigned to each task goal in the candidate goal set based on frequency of occurrence, domain expert experience or uniform distribution. Accordingly, the whole process from feature extraction to candidate goal set generation to initial probability setting is optimized, improving the efficiency of processing user initial information and enabling quick response and generation of high-quality candidate goal sets.
[0070] On the basis of any embodiment of the method of the present application, the information gain of each task feature in the selectable feature pool corresponding to the total task goals in the current candidate goal set is determined based on the current probability of the total task goals, and the task feature with the highest information gain is taken as the to-be-tested task feature, comprising: Step S3210, recalling all task features associated with each task goal in the candidate goal set from the professional domain knowledge base; Similarly, with the aid of the recall algorithm disclosed above, in the professional domain knowledge base implemented based on the knowledge graph, the task features directly or indirectly related to each task goal in the current candidate goal set can be found by traversing the associated edges in the knowledge graph, forming a comprehensive task feature set.
[0071] Step S3220, filtering out the task features that have been added to the verified feature pool from the total task features, and constructing the optional feature pool from the remaining task features. As disclosed above, the verified feature pool records the task features that have been verified by the human-computer interaction system in previous rounds of dialogue interaction. In order to avoid repeated questioning, these verified features need to be excluded from the current recalled task features, so that the optional feature pool is constructed by filtering out the task features that have been added to the verified feature pool from the total task features. For example, if the user mentions "I have a cough!" in the initial information or other prior feedback information, it indicates that the task feature of "cough" has been verified in the previous dialogue interaction, and in the subsequent task feature selection, it is removed from the total task features recalled, and the remaining part is constructed into the optional feature pool, that is, the verified task feature is excluded from the previous optional feature pool, ensuring that each question can obtain new information.
[0072] Step S3230, calculating the information gain of each task feature in the optional feature pool according to the current probability of each task target in the candidate target set, and determining the task feature with the highest information gain as the task feature to be verified.
[0073] The information gain of each task feature in the optional feature pool is calculated according to the current probability of each task target in the candidate target set, and the task feature with the highest information gain is determined as the task feature to be verified. The information gain measures the degree of uncertainty reduction by selecting a task feature for verification. By calculating the information gain of each task feature, the task feature that can most reduce the uncertainty of the candidate target set is selected. For example, in the medical diagnosis scenario, if the information gain of the feature "fever" is the highest, "fever" is determined as the task feature to be verified, and the corresponding question information is generated in the subsequent steps to guide the user to confirm this feature.
[0074] Through the above embodiments, the human-computer interaction system can dynamically update the task feature set in the optional feature pool, dynamically select the most valuable task feature for verification in each round of interaction, and thus gradually narrow down the candidate target set and finally determine the real task target of the user. Therefore, not only the interaction efficiency of the human-computer dialogue system is improved, the intelligent interaction perception is enhanced, but also the accuracy and reliability are improved.
[0075] On the basis of any embodiment of the method of the present application, the information gain of each task feature in the optional feature pool is calculated according to the current probability of each task target in the candidate target set, and the task feature with the highest information gain is determined as the task feature to be verified, comprising: Step S3231, for each task feature in the optional feature pool, combining the current probability of each task target in the current candidate target set, calculate the current posteriori entropy and expected posteriori entropy corresponding to the entire candidate target set before and after the task feature is covered by the user's feedback information; In this embodiment, the updating formula in the interactive Bayesian inference method is applied for inference, so as to dynamically update the posteriori probability of the task target in the candidate target set based on the observation information obtained in the human-computer interaction process, and realize the step-by-step approximation of the real task target .
[0076] In order to clarify the mathematical logic of the algorithm, first define the following core symbols and initial settings: Suppose a set, that is, a candidate target set, denoted as , wherein represents a task target conclusion to be verified, such as a diagnosis hypothesis "patient has a cold" "patient has pneumonia" in a medical scene, covers all possible conclusions under the current scene; represents a real hypothesis, that is, a real task target, which is unknown in the initial state, but can be approximated and determined through interactive inference.
[0077] The initial probability is the prior probability, denoted as , which represents the initial estimate of the probability that each hypothesis is true without any observation information.
[0078] The feature set is associated with a group of exclusive task features recalled from the knowledge base for each hypothesis , such as the features "whether coughing" "whether fever" associated with the hypothesis "patient has a cold"; The full set of constitutes all observable features under the current scene, that is, the optional feature pool.
[0079] The observed feature set, that is, the verified feature pool, is denoted as , which represents a set of data pairs composed of task features and corresponding values that have been obtained .
[0080] The observation model, that is, the likelihood probability value, is denoted as , which represents the probability of observing the task feature (or feature combination) under the premise that the task target is true; if is multiple independent observations, the probability can be factorized, that is, .
[0081] Furthermore, for user-submitted feedback information, a preset task target inference interface can be invoked, and task features from the selectable feature pool determined based on the feedback information can be input into this interface as the set of features to be queried. Then obtain the observation results returned by the corresponding interface. ,in, It can be a binary (yes / no), a scalar (e.g., body temperature 37.5℃), or a noisy measurement.
[0082] After clarifying the above mathematical definitions, please refer to the following explanation of the deduction process.
[0083] First, calculate the posterior probability of the current observation: Given a set of observed features Each hypothetical task objective The posterior probability is: The denominator is a normalization term, ensuring that the sum of the posterior probabilities of all hypothetical task objectives is 1; the numerator is determined by the "likelihood probability value". Prior probability This combines the current probability of the current dialogue round with observational information to achieve dynamic adjustment of the mission objective probability.
[0084] Then, perform a posterior update based on the new observations: When new observation features are determined based on user feedback (Corresponding to the set of features to be queried) When ), Included in the observed feature set The updated posterior probability is: If the observations satisfy conditional independence, i.e., given the task objective At that time, new observation features With the set of observed features representing historical observations If irrelevant, then ;like It contains multiple independent task features, which can be further factorized into: in Features The corresponding observation results.
[0085] Furthermore, calculate the current posterior entropy: The current posterior entropy measures the uncertainty of the current posterior probability distribution. The lower the entropy value, the clearer the judgment of the task objective. The formula is: The expected posterior entropy represents the expected uncertainty after the query, and the task feature of the candidate query , calculate all possible observations The corresponding expected posterior entropy is: Step S3232, take the difference between the current posterior entropy of the candidate target set and the expected posterior entropy as the information gain of the corresponding task feature, and determine the task feature with the maximum information gain value and exceeding the preset gain threshold as the to-be-tested task feature.
[0086] The information gain is used to measure the task feature of the query The uncertainty that can be reduced, that is, the difference between the current posterior entropy and the expected posterior entropy, The greater the information value of the query, and the formula is: According to the above process, the information gain corresponding to each task feature in the optional feature pool is determined, and accordingly, the to-be-tested task feature can be further determined flexibly according to the scene needs.
[0087] In an embodiment, for a cost-unconstrained scene, the candidate query feature with the maximum information gain is selected as the to-be-tested task feature, and the formula is: Wherein is the set of all candidate query features, that is, all task features in the entire optional feature pool.
[0088] In another embodiment, for a cost-constrained scene, if the query has a cost, such as additional time, user cooperation cost, etc. for inquiring a task feature, a cost coefficient and the query cost The task feature with the maximum comprehensive net benefit of information gain and cost is selected as the to-be-tested task feature, and the formula is: In addition to directly selecting the task feature with the highest information gain, other optimization goals can also be used, such as maximizing the expected increase of posterior probability, minimizing the expected prediction error rate, or minimizing the expected free energy. These alternative goals provide a variety of selection paths through different optimization methods, allowing for flexible adjustment of the selection strategy of the task feature according to specific application scenarios and needs, thereby achieving better interaction effects and higher recognition accuracy in practical applications.
[0089] The above embodiments realize dynamic selection of task features and step-by-step approximation of candidate target sets by introducing an interactive Bayesian inference method combined with information gain calculation. This approach not only dynamically updates the posterior probability of the task target according to user feedback information, but also selects the most valuable task feature for verification by maximizing information gain, thereby efficiently reducing uncertainty in each round of interaction. In addition, by introducing cost constraints and multiple optimization objectives, it can flexibly adapt to different application scenarios and needs, further optimizing interaction effects and improving recognition accuracy. This dynamic and adaptive interaction mechanism significantly improves the intelligence and user experience of human-computer dialogue systems, making them perform well in complex and variable real-world applications.
[0090] On the basis of any embodiment of the method of the present application, a verification prompt text is generated according to the task feature to be verified, and the verification prompt text is used to drive a preset active inquiry model to output questioning information for guiding the user to confirm the task feature to be verified, comprising: Step S3310, adding the task feature to be verified, the preset scene role parameter and the emotional temperature parameter to the preset verification prompt template to obtain a verification prompt text, and inputting the active inquiry model; The task feature to be verified is a key task feature selected by the human-computer interaction system in the current interaction round for verifying the user's demand. For example, in a medical diagnosis scenario, the task feature to be verified may be "whether to have a fever", and in an e-commerce customer service scenario, it may be "whether to need to return or exchange". These features are selected from a pool of optional features according to strategies such as information gain, and are used to guide the user to confirm their demand.
[0091] The preset scene role parameter defines the role of the active inquiry model in the dialogue, such as "medical diagnosis assistant" or "e-commerce customer service officer". These role parameters ensure that the generated questioning information conforms to the communication style and professionalism in a specific scenario. The emotional temperature parameter is used to adjust the tone of the question, making it have an emotional temperature and be more humanized. For example, the question can be asked in a caring tone: "Have you been feeling unwell recently? Is there a fever?" This question with an emotional temperature can enhance the user's experience and make the user feel the care of the human-computer interaction system.
[0092] The verification prompt template can be provided in the manner disclosed above, by combining the task feature to be verified, the scene role parameter, the emotional temperature parameter, and the inquiry control instruction text to generate a specific verification prompt text. In addition, the verification prompt template can be customized according to different application scenarios to ensure that the generated questioning information is both accurate and natural. For example, in a medical diagnosis scenario, the template may generate questioning information such as "Hello, based on your description, I would like to further understand whether you have a fever?"
[0093] Step S3320, generating personalized question information with scene role tone and in line with natural language habits according to the verification prompt text by the active inquiry model; Under the driving of the verification prompt text, the active inquiry model generates personalized question information with scene role tone and in line with natural language habits according to the verification prompt text, ensuring that the question information output by the human-computer interaction system not only accurately conveys the task characteristics to be verified, but also conforms to the communication style and professionalism in a specific scene, while having emotional temperature, enhancing user experience.
[0094] Specifically, the active inquiry model will generate natural language form of questions according to the task characteristics to be verified, scene role parameters and emotional temperature parameters in the verification prompt text, and according to the requirements of the inquiry control instruction text for the interrogative expression. For example, in the medical diagnosis scene, the model may generate the question information "Hello, according to your description, I want to further understand whether you have a fever?" Among them, "Hello" embodies the emotional temperature, "according to your description" conforms to the communication style of medical diagnosis, and "I want to further understand" embodies the professionalism of the scene role "medical diagnosis assistant".
[0095] Step S3330, pushing the question information to the dialogue interface of the terminal device of the user.
[0096] Finally, the human-computer interaction system displays the question information generated by the active inquiry model to the user through the human-computer dialogue interface of the user terminal device. For example, in the medical diagnosis scene, the user can see the question information "Hello, according to your description, I want to further understand whether you have a fever?" In the medical diagnosis application on the mobile phone, the user will be more natural in response to such question information, and provide more effective feedback information.
[0097] The above embodiment improves the flexibility and professionalism of the human-computer interaction system by using the active inquiry model based on the large language model to generate personalized inquiry, rather than relying on it to directly determine the task characteristics to be verified. Specifically, the human-computer interaction system first selects the task characteristics to be verified from the optional feature pool through information gain and other strategies, and completely based on independent reasoning logic and knowledge base, ensuring the accuracy and efficiency of task feature selection. Then, the active inquiry model is only used to convert the task characteristics to be verified into natural language questions that conform to the style and emotional temperature of a specific scene, making the questions more humanized and professional. This clear division of labor design avoids the uncertainty of large language models in complex reasoning, while fully leveraging their advantages in natural language generation, significantly improving user experience and interaction quality.
[0098] On the basis of any embodiment of the method of the present application, please refer to the description of the relevant mathematical formula in the preceding text, update the candidate target set and the probability of each task target therein based on the task characteristics covered by the feedback information, including: Step S3410, parse the feedback information into an observed task characteristic corresponding to the task characteristic to be verified, and add the observed task characteristic to the verified characteristic pool; By a pre-set named entity recognition model or a pre-set rule, extract the task characteristic to be verified and its verification result from the feedback information of the user, so as to determine the observed task characteristic. For example, in a medical diagnosis scenario, if the feedback information of the user is “yes, I have a fever”, the system identifies the task characteristic “fever” and its verification result “yes” by the named entity recognition model, and adds the observed task characteristic and its verification result to the verified characteristic pool, so as to ensure accurate recording of the confirmation or denial of the user to each task characteristic to be verified, or extraction of the data corresponding to the task characteristic to be verified, etc., thereby providing a basis for subsequent probability updating.
[0099] Step S3420, in the professional domain knowledge base represented by the knowledge graph, calculate the likelihood value of each task target for the observed task characteristic according to the association edge and weight between the task target node and the task characteristic node of the observed task characteristic; In the professional domain knowledge base represented by the knowledge graph, calculate the likelihood value of each task target for the observed task characteristic according to the association edge and weight between the task target node and the task characteristic node of the observed task characteristic, i.e. the likelihood probability value disclosed in the preceding text. The likelihood probability value reflects the probability of observing the task characteristic under the premise that each task target is established.
[0100] Step S3430, combine the likelihood value and the current probability of each task target by using the Bayes posterior updating formula to obtain the updated posterior probability of each task target; Please refer to the Bayes posterior updating formula in the preceding text. By using the formula, the calculated likelihood probability value and the current probability of each task target can be combined to obtain the updated posterior probability of each task target. This updating process follows the Bayes theorem, and dynamically adjusts the probability distribution of the task target by considering new observation information. For example, if the current probability of influenza is 0.6 in the previous interaction, and the likelihood probability value of the observed fever symptom is 0.8, then according to the Bayes formula, the posterior probability of influenza will be increased accordingly, so as to be closer to the real demand target of the user.
[0101] Step S3440, update the candidate target set according to the posterior probability to form an updated candidate target set.
[0102] The candidate target set is adjusted according to the updated posterior probability, and an updated candidate target set is formed. When updating, task targets with probabilities lower than a preset threshold can be deleted as needed, or new task targets can be introduced. For example, in a medical diagnosis scenario, if after updating, the probability of pneumonia is significantly lower than that of influenza and is lower than a preset removal threshold, pneumonia can be removed from the candidate target set, thereby simplifying the candidate target set and improving the decision efficiency and accuracy of the system.
[0103] The above embodiments realize dynamic updating of the candidate target set and the probability of each task target by combining user feedback information and prior knowledge in the knowledge graph, significantly improving the accuracy and interaction efficiency of task target recognition. First, the observed task features and their verification results are accurately extracted from user feedback through a named entity recognition model or preset rules, and are added to the verified feature pool, which accurately records user feedback and provides a reliable basis for subsequent probability updating. Then, the likelihood of each task target to the observed task feature is calculated using the associated edges and weights in the knowledge graph, fully considering the internal relationship between the task target and the task feature. Next, the likelihood is combined with the current probability through the Bayesian posterior updating formula to dynamically adjust the probability distribution of the task target, which can update the confidence level of the task target in a timely manner according to new observation information and gradually approach the user's real demand target. Finally, the candidate target set is adjusted according to the updated posterior probability, and low-probability task targets are deleted or new task targets are introduced, which not only simplifies the candidate target set and improves the decision efficiency of the system, but also enhances the adaptability and flexibility of the system, making it better able to cope with complex and variable actual application scenarios. As can be seen, the embodiments realize efficient updating of the candidate target set and the probability of the task target through a series of scientific and reasonable steps, significantly improving the interaction quality and task recognition accuracy of the system.
[0104] On the basis of any embodiment of the method of the application, the candidate target set is updated according to the posterior probability to form an updated candidate target set, comprising: Step S3441, deleting task targets with posterior probabilities lower than a preset removal threshold from the candidate target set to obtain a simplified candidate target set; When the candidate target set is simplified according to the posterior probability, task targets with posterior probabilities lower than a preset removal threshold can be deleted from the candidate target set, so as to remove task targets that are considered less likely at the current interaction stage, thereby reducing the complexity of subsequent interaction. For example, in a medical diagnosis scenario, if the posterior probability of a disease such as "pneumonia" is lower than a set threshold such as 0.1, it is removed from the candidate target set, ensuring that subsequent interaction focuses on more likely task targets.
[0105] Step S3442, update the current probability of the task target retained in the reduced candidate target set according to the posterior probability, and generate a sorted candidate target set in descending order of the updated current probability; When updating the current probability of the task target retained in the reduced candidate target set, the posterior probability can be directly replaced by the original current probability. Then, the entire reduced candidate target set is sorted in descending order according to the new current probability to generate a sorted candidate target set, so that the system can be more explicit about which task target has the highest confidence at the current stage, and provide clear priority for subsequent interaction. For example, in the financial service scenario, if after updating, the posterior probabilities of "stock investment" and "fund investment" are 0.7 and 0.6 respectively, then in the sorted candidate target set, "stock investment" will be placed before "fund investment", indicating that it is more inclined to believe that the user's real demand is "stock investment".
[0106] Step S3443, in the professional domain knowledge base represented by the knowledge graph, taking the task target node with high current probability in the sorted candidate target set as an anchor point, recalling new task targets directly associated with the task target node or reachable via intermediate nodes and not yet existing in the candidate target set, and setting initial probabilities for the new task targets; On the basis of the sorted candidate target set, taking the task target node with high current probability in the sorted candidate target set as an anchor point in the knowledge graph, and according to the recalling manner disclosed above, new task targets directly associated with the task target node or reachable via intermediate nodes are recalled. This recalling process utilizes the structured characteristics of the knowledge graph to find new task targets related to the current high-probability task target through associated edges and weights. For example, in the e-commerce customer service scenario, if the task target with the highest current probability is "product return and exchange", new task targets such as "product quality problem" or "logistics delay" directly associated with "return and exchange" can be recalled, which are not yet in the current candidate target set.
[0107] Step S3444, incorporate the new task targets associated with their prior probabilities into the sorted candidate target set to form an updated candidate target set for the next iteration period of interaction.
[0108] For new task targets, initial probabilities still need to be set for them, and they are incorporated into the sorted candidate target set to form an updated candidate target set for the next iteration period of interaction. Following the manner disclosed above, the setting of initial probabilities can be based on the frequency of occurrence of new task targets in the knowledge graph, the experience of domain experts or historical data, which will not be described in detail.
[0109] The above embodiments significantly improve the accuracy and interaction efficiency of task target recognition by dynamically adjusting the candidate target set, combining posterior probability screening, sorting, and knowledge graph-based new task target recall. First, by deleting low-probability task targets, we can focus on more likely task targets, reducing the complexity of subsequent interactions and improving decision-making efficiency. Second, updating the probabilities of retained task targets and sorting them by confidence can clarify the priorities at the current stage and provide clear directions for subsequent interactions. In addition, recalling new task targets based on the knowledge graph and assigning initial probabilities not only enriches the candidate target set but also ensures adaptability to new clues and avoids missing potential real task targets. This dynamic updating mechanism enables the system to gradually approach the user's real needs in multiple rounds of interaction while maintaining flexibility and adaptability, significantly improving user experience and overall system performance.
[0110] Please refer to Figure 2 , a task target recognition device provided for one of the purposes of the present application, which is a functional embodiment of the task target recognition method of the present application. The device includes an initial response module 3100, an interaction polling module 3200, an inquiry execution module 3300, a feedback update module 3400, and an iterative decision-making module 3500. The initial response module 3100 is configured to receive user input initial information, determine a plurality of task targets related to the initial information based on a pre-set professional knowledge base to form a candidate target set, and set an initial probability for each task target in the candidate target set. The interaction polling module 3200 is configured to enter an active inquiry stage, determine the information gain of each task feature in the selectable feature pool corresponding to all task targets in the current candidate target set based on the current probability of the task targets, and select the task feature with the highest information gain as the task feature to be verified. The inquiry execution module 3300 is configured to generate a verification prompt text based on the task feature to be verified, and use the verification prompt text to drive a pre-set active inquiry model to output questioning information for guiding the user to confirm the task feature to be verified. The feedback update module 3400 is configured to receive feedback information submitted by the user, update the candidate target set and the probability of each task target in the set based on the task feature covered by the feedback information, and add the covered task feature to the verified feature pool. The iterative decision-making module 3500 is configured to end the current active inquiry stage when the probability of the task target in the candidate target set meets a pre-set termination condition, set the task target as the real task target of the user, or return to the step of entering the active inquiry stage for further iteration.
[0111] On the basis of any embodiment of the device of the present application, the initial response module 3100 comprises: a node matching module configured to convert the initial information into a feature vector, perform vector matching in a professional field knowledge base represented by a knowledge graph, and obtain a task target node that meets a preset similarity condition with the feature vector; a target recall module configured to recall all task targets that have a direct association with the task target node or are reachable via an intermediate node according to the associated edges and weights between entity nodes in the knowledge graph, and form the candidate target set; and a probability setting module configured to set the initial probability of each task target in the candidate target set according to a preset prior probability distribution.
[0112] On the basis of any embodiment of the device of the present application, the interaction polling module 3200 comprises: a feature recall module configured to recall all task features associated with each task target in the candidate target set from a professional field knowledge base; a feature filtering module configured to filter out task features that have been added to a verified feature pool from the all task features, and form a selectable feature pool from the remaining task features; and a to-be-verified determination module configured to calculate the information gain of each task feature in the selectable feature pool according to the current probability of each task target in the candidate target set, and determine the task feature with the highest information gain as the to-be-verified task feature.
[0113] On the basis of any embodiment of the device of the present application, the to-be-verified determination module comprises: an entropy value calculation module configured to calculate the current posteriori entropy and the expected posteriori entropy corresponding to the entire candidate target set before and after each task feature in the selectable feature pool is covered by the feedback information of the user, in combination with the current probability of each task target in the current candidate target set; and a gain optimization module configured to take the difference between the current posteriori entropy of the candidate target set and the expected posteriori entropy as the information gain of the corresponding task feature, and determine the task feature with the maximum information gain value and exceeding a preset gain threshold as the to-be-verified task feature.
[0114] On the basis of any embodiment of the device of the present application, the inquiry execution module 3300 comprises: a prompt construction module configured to add the to-be-verified task feature, a preset scene role parameter, and an emotional temperature parameter to a preset verification prompt template to obtain a verification prompt text, and input the active inquiry model; an inference generation module configured to generate personalized question information with a scene role tone and in line with natural language habits from the active inquiry model according to the verification prompt text; and a question output module configured to push the question information to a dialogue interface of a terminal device of the user.
[0115] On the basis of any embodiment of the device of the present application, the feedback updating module 3400 comprises: a feedback analysis module configured to analyze the feedback information into an observed task feature corresponding to a to-be-tested task feature, and add the observed task feature into a tested feature pool; a likelihood calculation module configured to calculate, in a professional domain knowledge base represented by a knowledge graph, a likelihood value of each task target corresponding to the observed task feature according to an associated edge and weight between the task target node and the task feature node of the observed task feature; a posterior calculation module configured to combine the likelihood value and a current probability of each task target by using a Bayesian posterior updating formula to obtain an updated posterior probability of each task target; and a candidate updating module configured to update the candidate target set according to the posterior probability to form an updated candidate target set.
[0116] On the basis of any embodiment of the device of the present application, the candidate updating module comprises: a set refining module configured to delete a task target with a posterior probability lower than a preset elimination threshold from the candidate target set to obtain a refined candidate target set; a posterior updating module configured to update a current probability of a task target retained in the refined candidate target set by using a posterior probability, and generate a sorted candidate target set in descending order of the updated current probability; an expansion retrieval module configured to take a task target node with a high current probability in the sorted candidate target set as an anchor point in a professional domain knowledge base represented by a knowledge graph, recall new task targets directly associated with the task target node or reachable via an intermediate node and not yet existing in the candidate target set, and set an initial probability for the new task targets; and a target adding module configured to associate the new task targets with their prior probabilities and incorporate the new task targets into the sorted candidate target set to form an updated candidate target set for interaction in a next iteration cycle.
[0117] To solve the above technical problems, the embodiments of the present application further provide a computer device. As shown in the Figure 3 internal structure diagram of the computer device. The computer device comprises a processor, a computer readable storage medium, a memory, a network interface and various communication components connected through a system bus. The computer readable storage medium of the computer device stores an operating system, a database and computer readable instructions. The database can store a control information sequence. When the computer readable instructions are executed by the processor, the processor can implement a task target identification method. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device can store computer readable instructions. When the computer readable instructions are executed by the processor, the processor can execute the task target identification method of the present application. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art can understand that Figure 3The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0118] The processor in the embodiment is configured to execute the specific functions of each module and the sub-modules thereof in the above embodiment, and the memory stores the program codes and various data required for executing the above modules or sub-modules. The network interface is configured to transmit data between the user terminal and the server. The memory in the embodiment stores the program codes and data required for executing all the modules / sub-modules in the task target identification device of the present application, and the server can call the program codes and data of the server to execute the functions of all the sub-modules. Figure 2
[0119] The present application also provides a storage medium storing computer readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the task target identification method of any embodiment of the present application.
[0120] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments of the present application can be completed by a computer program instructing related hardware. The computer program can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments of each method. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0121] Those skilled in the art can understand that the steps, measures, and schemes in the various operations, methods, and processes discussed in the present application can be alternated, changed, combined, or deleted. Further, other steps, measures, and schemes in the various operations, methods, and processes discussed in the present application can also be alternated, changed, rearranged, decomposed, combined, or deleted. Further, the steps, measures, and schemes in the prior art with the various operations, methods, and processes disclosed in the present application can also be alternated, changed, rearranged, decomposed, combined, or deleted.
[0122] The above is only some embodiments of the present application. It should be noted that for those skilled in the art, without departing from the principles of the present application, several improvements and refinements can be made, and these improvements and refinements should also be considered as falling within the scope of protection of the present application.
Claims
1. A task goal recognition method, characterized by, Comprise: Receiving initial information of user input, determining a plurality of task targets related to the initial information based on a preset professional knowledge base to form a candidate target set, and setting an initial probability for each task target in the candidate target set; Enter the active inquiry link, determine the information gain of each task feature in the selectable feature pool corresponding to all task targets in the current candidate target set based on the current probability of the task targets, and take the task feature with the highest information gain as the task feature to be verified; Generate a verification prompt text according to the task feature to be verified, and drive the preset active inquiry model to output the questioning information for guiding the user to confirm the task feature to be verified with the verification prompt text; Receive the feedback information submitted by the user, update the candidate target set and the probability of each task target in the candidate target set based on the task feature covered by the feedback information, and add the covered task feature to the verified feature pool; When the probability of the task target in the candidate target set meets the preset termination condition, end the current active inquiry link, and set the task target as the real task target of the user, otherwise return to the step of entering the active inquiry link to continue iteration.
2. The task goal recognition method of claim 1, wherein, Determine a plurality of task targets related to the initial information based on a preset professional knowledge base to form a candidate target set, and set an initial probability for each task target in the candidate target set, comprising: Convert the initial information into a feature vector, perform vector matching in a professional knowledge base represented by a knowledge graph, and obtain task target nodes that satisfy a preset similarity condition with the feature vector; Recall all task targets that have direct association with the task target nodes or are reachable via intermediate nodes according to the association edges and weights between entity nodes in the knowledge graph, and form the candidate target set; Set the initial probability of each task target in the candidate target set according to a preset prior probability distribution.
3. The task goal recognition method of claim 1, wherein, Determine the information gain of each task feature in the selectable feature pool corresponding to all task targets in the current candidate target set based on the current probability of the task targets, and take the task feature with the highest information gain as the task feature to be verified, comprising: Recall all task features associated with each task target in the candidate target set from the professional knowledge base; Filter out the task features that have been added to the verified feature pool from the all task features, and form a selectable feature pool from the remaining task features; Calculate the information gain of each task feature in the selectable feature pool according to the current probability of each task target in the candidate target set, and determine the task feature with the highest information gain as the task feature to be verified.
4. The task goal recognition method of claim 3, wherein, Calculate the information gain of each task feature in the selectable feature pool according to the current probability of each task target in the candidate target set, and determine the task feature with the highest information gain as the task feature to be verified, comprising: For each task feature in the selectable feature pool, calculate the current and expected posteriori entropy corresponding to the entire candidate target set before and after the task feature is covered by the feedback information of the user in combination with the current probability of each task target in the current candidate target set; The difference between the current posterior entropy and the expected posterior entropy of the candidate target set is used as the information gain of the corresponding task feature. The task feature with the largest information gain value that exceeds the preset gain threshold is determined as the task feature to be verified.
5. The task goal recognition method of claim 1, wherein, Based on the characteristics of the task to be verified, a verification prompt text is generated. This verification prompt text drives a preset proactive inquiry model to output question information to guide the user to confirm the characteristics of the task to be verified, including: The characteristics of the task to be tested, the preset scene role parameters, and the emotional temperature parameters are added to the preset verification prompt template to obtain the verification prompt text, which is then input into the active inquiry model. The proactive inquiry model generates personalized question information that is in the tone of the scene character and conforms to natural language habits based on the verification prompt text; The question information is pushed to the user's terminal device's dialog interface.
6. The task goal recognition method according to any one of claims 1 to 5, characterized in that, Updating the candidate target set and the probability of each task target within it based on the task features covered by the feedback information includes: The feedback information is parsed into observation task features corresponding to the features of the task to be verified, and the observation task features are added to the verified feature pool. In a professional domain knowledge base represented by a knowledge graph, the likelihood value of each task target corresponding to the observed task feature is calculated based on the association edges and weights between the task target node and the task feature node according to the observed task features. By using the Bayesian posterior update formula, the likelihood value is combined with the current probability of each task objective to obtain the updated posterior probability of each task objective. The candidate target set is updated based on the posterior probability to form an updated candidate target set.
7. The task goal recognition method of claim 6, wherein, The candidate target set is updated based on the posterior probability to form an updated candidate target set, including: Task targets with a posterior probability lower than a preset elimination threshold are removed from the candidate target set to obtain a simplified candidate target set. The current probabilities of the task targets retained in the simplified candidate target set are updated with a posteriori probabilities, and the candidate targets are sorted in descending order according to the updated current probabilities to generate a sorted candidate target set. In a professional domain knowledge base represented by a knowledge graph, the task target node with the highest current probability in the ranked candidate target set is used as the anchor point to recall new task targets that are directly related to the task target node or reachable through intermediate nodes and do not yet exist in the candidate target set, and an initial probability is set for the new task targets. The newly added task target is associated with its prior probability and incorporated into the sorted candidate target set to form an updated candidate target set for interaction in the next iteration cycle.
8. A task target recognition apparatus characterized by comprising: include: The initial response module is configured to receive initial information input by the user, determine multiple task targets related to the initial information based on a preset professional domain knowledge base to form a candidate target set, and set an initial probability for each task target in the candidate target set; The interactive polling module is set to enter the active inquiry stage, determine the information gain of each task feature in the optional feature pool corresponding to all task targets based on the current probability of all task targets in the current candidate target set, and take the task feature with the highest information gain as the task feature to be tested. The inquiry execution module is configured to generate a verification prompt text according to the to-be-verified task feature, and drive a preset active inquiry model to output questioning information for guiding the user to confirm the to-be-verified task feature according to the verification prompt text; The feedback updating module is configured to receive the feedback information submitted by the user, update the candidate target set and the probability of each task target in the candidate target set based on a task feature covered by the feedback information, and add the task feature covered to a verified feature pool; The iterative decision module is configured to end the current active inquiry link when the probability of a task target in the candidate target set meets a preset termination condition, set the task target as the real task target of the user, or return to the step of entering the active inquiry link for continuous iteration. 9.A computer device, comprising a processor and a memory, wherein the computer device is configured to perform the method according to any one of claims 1-8. The processor invokes a computer program in the memory to execute the steps of the task target identification method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer readable instructions store a computer program implemented according to the method of any one of claims 1 to 7, and the computer program is invoked by a computer to execute the steps included in the corresponding method when running.