An interaction method, system, electronic device, and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING CHINA POWER INFORMATION TECH
- Filing Date
- 2026-01-14
- Publication Date
- 2026-06-05
AI Technical Summary
Existing digital humans in the power industry cannot accurately distinguish the meaning of terms under different user roles, resulting in inaccurate semantic understanding, low interaction efficiency and poor user experience. They also lack the ability to comprehensively analyze user roles, historical behavior and industry knowledge.
By introducing user role condition information, historical interaction behavior, and knowledge graph structure, a unified role-aware semantic understanding model is constructed to realize multi-factor scoring and semantic calibration of candidate concepts. A role condition prior model and knowledge graph reasoning mechanism are designed to adaptively select the most matching concept and generate an interpretable answer.
It improves the semantic understanding accuracy and interaction consistency in multi-role scenarios, enhances the digital human's ability to perceive user intent and the naturalness of interaction, and achieves high accuracy and adaptability.
Smart Images

Figure CN122154856A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to an interaction method, system, electronic device, and storage medium. Background Technology
[0002] With the development of artificial intelligence technology, digital humans are being applied in the power industry. However, existing digital humans have significant shortcomings in semantic understanding, particularly in accurately distinguishing the meanings of terms under different user roles, leading to biased answers or semantic ambiguity. For example, in the power industry, when a user asks a question as a "customer service representative," the term "load" may have multiple interpretations, such as "user load," "distribution load," and "planned load." Existing systems typically rely on keyword matching or contextual text to generate fixed answers, lacking the ability to comprehensively analyze user roles, historical behavior, and industry knowledge. This makes it difficult to meet the precise interaction needs of digital humans in multiple roles and scenarios, resulting in low interaction efficiency, information misunderstanding, and poor user experience.
[0003] It should be noted that the above description of the technical background is only for the purpose of providing a clear and complete explanation of the technical solutions of the present invention and facilitating understanding by those skilled in the art. It should not be assumed that the above technical solutions are known to those skilled in the art simply because they have been described in the background section of this invention. Summary of the Invention
[0004] In view of the above, the purpose of one or more embodiments of this disclosure is to provide an interaction method, system, electronic device and storage medium to solve the problems raised in the background art.
[0005] To achieve the above objectives, this disclosure provides an interaction method, the method comprising: The user's role label is determined based on session metadata and user input. The input content is parsed based on the knowledge graph to obtain a set of candidate concepts; Based on the role tags and the knowledge graph, each candidate concept in the candidate concept set is evaluated to obtain a comprehensive relevance score for each candidate concept; Based on the comprehensive relevance score, the target concept is determined from the candidate concept set, and a calibration description corresponding to the target concept is generated; Based on the target concept, an answer corresponding to the input content is generated.
[0006] Furthermore, the method also includes: Record the user's confirmation, correction, or rejection of the answer; Based on the records, the weight parameters of the comprehensive relevance score are updated, thereby updating and providing feedback on the answer; The update process for the weight parameters of the comprehensive relevance score is as follows:
[0007] in, For the first The weight value after the interaction. For learning rate, This is the adjustment amount calculated based on user feedback.
[0008] Based on the same inventive concept, this disclosure also provides an interactive system, the system comprising: The determination module is configured to determine the user's role label based on session metadata and user input. The parsing module is configured to parse the input content based on the knowledge graph to obtain a set of candidate concepts; The evaluation module is configured to evaluate each candidate concept in the candidate concept set based on the role tags and the knowledge graph, and obtain a comprehensive relevance score for each candidate concept. The generation module is configured to determine a target concept from the candidate concept set based on the comprehensive relevance score, and generate a calibration description corresponding to the target concept. The answer module is configured to generate an answer corresponding to the input content based on the target concept.
[0009] Based on the same inventive concept, this disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement an interaction method as described in any of the preceding claims.
[0010] Based on the same inventive concept, this disclosure also provides a non-transitory computer-readable storage medium that stores computer instructions for causing the computer to execute any of the above-described interactive methods.
[0011] Based on the same inventive concept, this disclosure also provides a computer program product, including one or more computer programs, which, when executed by one or more processors, implement any of the above-described interactive methods.
[0012] As can be seen from the above, the interaction method provided in this disclosure, by introducing user role condition information, historical interaction behavior and knowledge graph structure, realizes multi-factor scoring and semantic calibration of candidate concepts, and constructs a unified role perception semantic understanding model; at the same time, it designs a role condition prior model and a knowledge graph reasoning mechanism, which can adaptively select the most matching concept and generate an interpretable answer, thereby improving the semantic understanding accuracy and interaction consistency in multi-role scenarios. Attached Figure Description
[0013] To more clearly illustrate the technical solutions in one or more embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings described below are only one or more embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1 A flowchart illustrating an interaction method provided in an embodiment of this disclosure; Figure 2 An interactive flowchart provided for an embodiment of this disclosure; Figure 3 This is a schematic diagram of the structure of an interactive system provided in an embodiment of the present disclosure; Figure 4 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0015] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.
[0016] It should be noted that, unless otherwise defined, the technical or scientific terms used in one or more embodiments of this disclosure should have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms "first," "second," and similar words used in one or more embodiments of this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0017] Explanation of relevant terms: User role: refers to a user's identity attribute in a specific system or scenario, such as "customer service", "regular user", "administrator", etc. Different roles may have different focuses on the same concept.
[0018] Semantic candidate entity: Concept nodes that may be related to the query intent extracted from user input, used for subsequent relevance scoring and selection.
[0019] Automatic Calibration: This refers to the digital human system automatically selecting the most relevant concepts based on multiple factors (such as user roles, semantic similarity, and graph relationships) and reflecting the selection logic and basis in the answer.
[0020] Digital human semantic calibration has always been a key research area in the power sector. Numerous scholars and practitioners have conducted in-depth analyses of intelligent electricity billing from different perspectives, achieving fruitful research results. The research has gone through three stages of development: (1) Rule-based and template-based digital human semantic understanding stage In the early stages of digital human technology development, semantic understanding primarily relied on manually defined rules, keyword matching, and pre-set question-and-answer templates. Systems typically completed interactive responses by manually mapping business questions to standard answers or through simple keyword-triggered mechanisms. At this stage, digital humans could implement basic question-and-answer functions in scenarios with relatively fixed business processes and standardized question expressions. However, their semantic processing capabilities were highly dependent on the scope of rule coverage, lacking effective recognition capabilities for user role differences, semantic ambiguity, and complex expressions. System scalability and maintenance costs gradually became apparent.
[0021] (2) Semantic generation stage based on context understanding and general language model With the development of natural language processing technology, digital human systems have gradually incorporated statistical learning methods and general language models to achieve semantic understanding and response generation by modeling contextual text information. Digital humans at this stage possess stronger natural language interaction capabilities, able to process unstructured input and generate relatively fluent responses. However, their semantic judgment process is primarily based on text probability distributions, lacking explicit constraints on industry expertise and user role attributes. When faced with business scenarios involving ambiguous terminology or highly specialized contexts, semantic biases are prone to occur, making it difficult to guarantee the accuracy and consistency of responses.
[0022] (3) Question answering system combined with knowledge graph With the development of knowledge engineering and semantic technology, some digital human systems have begun to incorporate knowledge graphs to support industry-specific question answering and information retrieval. The implementation at this stage typically involves constructing domain-specific knowledge graphs to structurally represent business concepts, attributes, and their relationships. Based on this, semantic similarity calculations or graph structure traversal are used to achieve question matching and answer retrieval. While these systems improve their ability to handle specialized terminology and knowledge associations to some extent, their semantic decision-making process still primarily relies on concept similarity or static graph relationships, failing to fully integrate user role information or historical interaction behavior for comprehensive analysis. This makes it difficult to achieve accurate semantic discrimination and personalized responses in multi-role, multi-context scenarios.
[0023] Therefore, the purpose of this disclosure is to solve the technical problems of inaccurate semantic understanding, biased responses, and insufficient system adaptability of digital humans in the power industry under multiple roles and contexts.
[0024] Based on some implementations of this disclosure, an interaction method is provided. In this method, by introducing user role condition information, historical interaction behavior, and a knowledge graph structure, multi-factor scoring and semantic calibration of candidate concepts are achieved, constructing a unified role-aware semantic understanding model. Simultaneously, a role-conditional prior model and a knowledge graph reasoning mechanism are designed, enabling the system to adaptively select the most matching concept and generate interpretable answers, thereby improving the semantic understanding accuracy and interaction consistency in multi-role scenarios. Furthermore, an online learning mechanism continuously optimizes the scoring weights and role semantic model, achieving high accuracy, scalability, and adaptability in complex business scenarios, thus significantly enhancing the digital human's ability to perceive user intent and the naturalness of interaction.
[0025] refer to Figure 1 The present disclosure provides an interactive method comprising the following steps: Step S101: Determine the user's role label based on session metadata and user input.
[0026] In this step, the roles of the interacting users are first automatically identified to provide prior constraints for subsequent semantic understanding and concept disambiguation.
[0027] In some embodiments, determining the user's role label based on session metadata and user input specifically includes: Obtain session metadata, which includes structured information such as the user's login identity, job type, and system origin.
[0028] In this embodiment, the login identity refers to the "identity" by which the current user logs into the system in the current session.
[0029] In this embodiment, the job type refers to the functional role or job category to which the current user belongs in the organizational structure.
[0030] In this embodiment, the system source refers to the specific entry point or client environment initiated by the current user session.
[0031] Based on the session metadata and the input content, a feature vector is constructed; the feature vector is input into the role recognition model to obtain the probability distribution and corresponding confidence value of the user under each predefined role; the predefined role with the highest probability is selected as the role label of the user. Among them, each of the aforementioned user roles The probability is expressed as:
[0032] in, The feature vector is constructed based on the session metadata and the input content. For a predefined set of roles, For the first in the predefined set of roles The probability of a predefined role. The discriminant function represents each of the predefined roles. With the feature vector The strength of the association.
[0033] In this embodiment, the confidence value is used to weight and constrain the prior probability of roles in the subsequent semantic scoring process, thereby reducing the probability of cross-role semantic ambiguity.
[0034] In this embodiment, the role recognition model includes, but is not limited to, logistic regression model, gradient boosting tree model, and lightweight pre-trained language model.
[0035] The role recognition model outputs the following role recognition result:
[0036] in, For each of the predefined roles The probability, To make the probability The role that takes the maximum value .
[0037] In this embodiment, the cross-modal attention fusion algorithm proposed in this disclosure can dynamically adjust the weights of each modal feature based on contextual information, capturing the semantic correlation between modalities. In this way, when there is noise or missing information in a certain modality, the system can rely on other modalities to maintain the stability and accuracy of intent recognition, improving the accuracy of intent recognition and enhancing the adaptive ability of digital humans in complex scenarios.
[0038] Step S102: Parse the input content based on the knowledge graph to obtain a set of candidate concepts. In some embodiments, the input content is parsed based on a knowledge graph to obtain a candidate concept set, specifically: After completing the user's role identification, the domain ontology and corresponding knowledge graph are determined based on the input content.
[0039] In this embodiment, the domain ontology uniformly defines concept classes, attributes, and their semantic relationships, providing standardized semantic constraints for entity recognition and concept disambiguation.
[0040] In this embodiment, the knowledge graph is a semantic network that describes the objective world using a graph structure (composed of nodes and edges). Essentially, it is a knowledge base that describes concepts, entities, and their relationships.
[0041] In this embodiment, the entity is a "basic fact unit" in knowledge graphs and semantic understanding, which can be understood as a "concrete thing in the world" or a "key object in a dialogue".
[0042] Based on the named entity recognition model, the input content is identified to obtain a set of entity phrases.
[0043] Each entity phrase in the entity phrase set is mapped to a concept class or instance node defined in the domain ontology, thereby ensuring that the entity extraction result is consistent with the ontology semantics.
[0044] Based on the entity mapping, the mapping results are semantically extended to generate a candidate concept set. The identified entities are semantically extended using equivalence relations, synonym relations, and hierarchical relations defined in the domain ontology to generate a candidate concept set semantically related to the input content. The generation process is as follows:
[0045] in, For the set of entity phrases; The domain ontology is a formalized semantic model that includes concept classes, attributes, semantic relations, axiomatic constraints, etc. For semantic expansion functions; For ontology mapping functions; This represents the set of candidate concepts generated by the entity extraction and semantic expansion stages.
[0046] Subsequently, each entity in the candidate concept set is mapped to a knowledge graph node to determine the candidate concept node. Specifically, each entity in the candidate concept set is mapped to a knowledge graph node formed by instantiating the domain ontology. Taking into account both the concept hierarchy and semantic constraints, candidate concept nodes that fit the current context are selected as input for subsequent relevance scoring.
[0047] This disclosure analyzes the abstract hierarchy and structural consistency of candidate concepts through hierarchical relationships such as "is-a" in the ontology, filtering out concept nodes that are semantically mismatched, overly generalized, or overly granular with the current context. Simultaneously, based on type constraints, attribute constraints, and relational constraints defined in the ontology, the semantic legitimacy and consistency of the candidate concept set are verified, eliminating nodes that fail to meet contextual semantic requirements or cause semantic conflicts. Through the synergistic effect of concept hierarchy structural constraints and semantic constraints, a set of candidate concept nodes that highly match the current context and have strong semantic interpretability is ultimately obtained, serving as input for subsequent relevance scoring and inference calculations.
[0048] Step S103: Based on the role tags and the knowledge graph, evaluate each candidate concept in the candidate concept set to obtain a comprehensive relevance score for each candidate concept.
[0049] In this step, this disclosure comprehensively and quantitatively evaluates the candidate concept set from four dimensions: role prior, semantic similarity, knowledge graph structural relationships, and historical usage behavior.
[0050] In some embodiments, evaluating each candidate concept in the candidate concept set based on the role tags and the knowledge graph to obtain a comprehensive relevance score for each candidate concept includes: Based on the prior dimension of roles, the candidate concept set is quantitatively evaluated, specifically as follows: Based on historical interaction data, the usage of various concepts under specific roles is statistically analyzed. Then, through smoothing processing, the prior probability of each candidate concept in the candidate concept set under the current role's conditions is calculated, thereby characterizing the differences in concept usage preferences among different roles. The role's prior probability can be expressed as:
[0051] in, A candidate concept is a set of candidate concepts. A specific candidate concept in the text; This represents the user roles in the predefined set of roles; Indicates user roles in historical interactions Using candidate concepts The number of times; For smoothing coefficients; This indicates the size of the candidate concept set.
[0052] The candidate concept set is quantitatively evaluated based on semantic similarity, specifically as follows: The current dialogue context and the semantic descriptions of the candidate concepts are mapped to a unified vector space, and the semantic consistency between the current dialogue context and the candidate concepts is measured by the cosine similarity between the vectors. The semantic similarity dimension is calculated as follows:
[0053] in, Indicates the context of the dialogue. Representing candidate concepts Definition or description text, This represents the semantic encoding model used to generate vector representations. This represents the semantic similarity dimension.
[0054] In some embodiments, during the knowledge graph structure relationship modeling process, the core business objects implicit in the session metadata are first semantically parsed based on the current dialogue context and the results of role recognition, and the semantic focus of the session is determined by combining role prior constraints. Then, it is anchored to the corresponding object node in the knowledge graph. This node serves as the user object node of the current session and is used for subsequent structural association calculations.
[0055] The candidate concept set is quantitatively evaluated based on the knowledge graph structure and relationship dimension, specifically as follows: The quantitative evaluation of the candidate concept set based on the knowledge graph structure relationship dimension includes: Based on the role tags and dialogue context, user object nodes are determined; the shortest path length between the user object nodes and the candidate concept nodes in the knowledge graph is calculated, and the shortest path length is mapped to a topology score using an exponential decay function.
[0056] In some embodiments, this disclosure uses the user object node and the candidate concept node as the starting and ending points, and calculates the shortest path length between them as a structural distance metric to measure their structural relevance. The shortest path length is typically obtained using a breadth-first search algorithm under the unweighted graph assumption, with the number of edges traversed in the path used as the distance; in the case of relational weights, a weighted distance is calculated using shortest path algorithms such as Dijkstra's algorithm.
[0057] The shortest path length is mapped to a continuous structural relevance score using an exponential decay function, thereby quantifying the degree of association between the candidate concept and the semantic center of the current session at the knowledge structure level. The expression is as follows:
[0058] in, This represents the shortest path length between the user object node and the candidate concept node in the knowledge graph. This is the path decay coefficient, used to control the degree of influence of path length on the scoring results; Representing candidate concepts Scoring based on the structural relationship dimension of the knowledge graph.
[0059] The candidate concept set is quantitatively evaluated based on historical usage behavior, specifically as follows: By statistically analyzing the actual frequency of candidate concepts used by the current user role in historical interactions, the long-term semantic preferences of the user are reflected. The actual frequency of use is defined as:
[0060] in, Represents roles in historical interactions Using candidate concepts The number of times; Indicates a candidate concept; Indicates role Candidate concepts in historical interactions The actual frequency of use.
[0061] In some embodiments, based on the prior role dimension, the semantic similarity dimension, the knowledge graph structure relationship dimension, and the historical usage behavior dimension, a comprehensive relevance score for candidate concepts is calculated using a weighted fusion function, specifically expressed as follows:
[0062] in, Representing candidate concepts The overall relevance score under the current session conditions. The weight parameters represent the prior dimensions of the role. The weight parameters represent the semantic similarity dimension. The weight parameters represent the relational dimension of the knowledge graph structure. This represents the weighting parameter for the historical behavior dimension, used to adjust the influence ratio of different features in the final score.
[0063] This invention improves the accuracy of concept selection by designing a multi-factor comprehensive scoring algorithm. The algorithm weights and fuses factors such as prior role scores, semantic similarity, knowledge graph topological distance, and historical usage frequency to form a unified comprehensive scoring index. This multi-dimensional fusion method ensures semantic rationality while also considering concept relevance and user behavior characteristics, thus significantly improving the robustness and accuracy of concept selection.
[0064] Step S104: Based on the comprehensive relevance score, determine the target concept from the candidate concept set and generate the calibration description corresponding to the target concept.
[0065] In some embodiments, determining the target concept from the candidate concept set based on the comprehensive relevance score and generating a calibration description corresponding to the target concept specifically involves: After obtaining the comprehensive relevance score of each candidate concept in the candidate concept set, based on the maximization principle, the highest-scoring concept is determined from the candidate concept set as the target concept for the final semantic orientation in the current interaction scenario, thereby achieving precise disambiguation of polysemous concepts or semantically ambiguous expressions. The selection of the target concept can be expressed as:
[0066] in, This indicates the final selected target concept. This represents the set of candidate concepts generated by the entity extraction and semantic expansion stages. Representing candidate concepts The comprehensive relevance score under the current session conditions is calculated by weighting multiple features such as role prior, semantic similarity, knowledge graph topology, and historical usage behavior.
[0067] After the target concept is determined, a semantic calibration description for that target concept is generated simultaneously. This semantic calibration description explains the reasons for selecting the target concept in the current context, and its generation process comprehensively considers the scoring results of the final selected target concept and the contribution of each scoring dimension to those results. The semantic calibration description can be expressed as:
[0068] in, This refers to the generated semantic calibration description text. This indicates the calibration specification generation function. This represents the user roles in the predefined set of roles. Indicates the context of the dialogue. This indicates the relative influence of the role prior dimension, semantic similarity dimension, knowledge graph structure relationship dimension, and historical usage behavior dimension on the target concept, thereby supporting an interpretable expression of the selection criteria for the target concept.
[0069] For example, the calibration description is "Based on your common queries as a sales customer service representative, 'load' here refers to user load" to enhance the understandability of the interaction.
[0070] Step S105: Based on the target concept, generate an answer corresponding to the input content.
[0071] In some embodiments, generating the answer corresponding to the input content based on the target concept specifically includes: After completing the target concept calibration, the final selected target concept is introduced as a strong constraint into the answer generation stage. In templated scenarios, rules are directly filled based on the parameters of the target concept; in generative scenarios, the target concept and its calibration instructions are injected into the prompts of the large language model to ensure that the generated content is semantically consistent with the selected target concept, thereby effectively avoiding the concept drift problem. The constraint can be expressed as:
[0072] in, This indicates a problem with the user's input. This indicates the final selected target concept. This represents the response generation function constrained by the target concept.
[0073] Step S106: Update and provide feedback on the answer based on the incremental learning mechanism.
[0074] In some embodiments, to enable continuous system evolution, user confirmation, correction, or rejection behaviors during the interaction process are recorded and used as online learning signals to dynamically update the weight parameters of prior role probabilities, historical usage frequency, and comprehensive relevance scores.
[0075] In some embodiments, updating and providing feedback on the answer based on the incremental learning mechanism includes: Record the user's confirmation, correction, or rejection of the answer; Based on the records, the weight parameters of the comprehensive relevance score are updated, thereby updating and providing feedback on the answer; wherein, the update process of the weight parameters of the comprehensive relevance score is as follows:
[0076] in, For the first The weight value after the interaction. For learning rate, This is the adjustment amount calculated based on user feedback.
[0077] In some embodiments, this disclosure uses an incremental learning mechanism to gradually adapt to changes in the semantic preferences of different roles and form a stable understanding of newly introduced concepts, thereby constructing a closed-loop optimization system that combines semantic understanding and feedback learning.
[0078] In some embodiments, this invention constructs an interpretable concept calibration and answer generation mechanism that explicitly displays the basis for concept selection during the answer generation process. It not only outputs the answer but also provides the underlying concept scoring and selection logic, enabling users to understand the source and rationale behind the recommendations or answers. This mechanism enhances the system's credibility and transparency, helping users accept and trust the system's output, while providing traceable data support for subsequent optimization and feedback.
[0079] It is understandable that this method can be executed by any device, equipment, platform, or cluster of devices with computing and processing capabilities.
[0080] It should be noted that the methods of one or more embodiments of this disclosure can be executed by a single device, such as a computer or server. The methods of this embodiment can also be applied in a distributed scenario, where multiple devices cooperate to complete the process. In such a distributed scenario, one of these devices may execute only one or more steps of the methods of one or more embodiments of this disclosure, and the multiple devices will interact with each other to complete the method described.
[0081] It should be noted that the above description pertains to specific embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in a different order than those shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0082] Figure 2 An interactive flowchart is provided for an embodiment of this disclosure, such as Figure 2 As shown, this disclosure first uses the input information Role recognition is performed using a probability model. Determine the most likely role The next step is the candidate entity extraction stage, which uses ontology knowledge to expand and map entities, constructing a candidate concept set. Next, a comprehensive relevance score is performed, which integrates the conditional probabilities of the roles. Semantic similarity dimension and comprehensive relevance score Candidate entities are sorted and filtered. In the concept selection and calibration phase, the target concept is determined. and through calibration function Combined with the role Input statement and calibration parameters Generate the final semantic representation This is used to generate answers. Finally, online learning feedback is provided based on the interaction results, and the model weights are dynamically updated. This will enable continuous enhancement of semantic understanding capabilities.
[0083] Based on the same inventive concept, corresponding to any of the methods in the above embodiments, this disclosure also provides an interactive system. For example... Figure 3 As shown, the above system includes: The determination module 301 is configured to determine the user's role label based on session metadata and user input. The parsing module 302 is configured to parse the input content based on the knowledge graph to obtain a set of candidate concepts; Evaluation module 303 is configured to evaluate each candidate concept in the candidate concept set based on the role tags and the knowledge graph, and obtain a comprehensive relevance score for each candidate concept. The generation module 304 is configured to determine a target concept from the candidate concept set based on the comprehensive relevance score, and generate a calibration description corresponding to the target concept. The answer module 305 is configured to generate an answer corresponding to the input content based on the target concept.
[0084] This invention employs a user role-based concept prioritization scoring mechanism. By identifying user roles, it maps the preferences and needs of different roles to concept priorities, achieving dynamic concept scoring. This method fully utilizes user role information, helping the system to adjust concept ranking in a multi-role environment. For example, for business expert users, the system tends to prioritize professional concepts; for ordinary users, it prioritizes easily understood concepts. This mechanism effectively solves the problem of traditional concept selection ignoring user differences, improving the relevance and accuracy of personalized recommendations and answers.
[0085] This invention is based on a multi-factor comprehensive scoring algorithm that weights and fuses multi-dimensional information such as role prior, semantic similarity, knowledge graph topological distance, and historical usage frequency to form a unified concept scoring index. This method utilizes the complementary relationships between multiple factors, enabling the system to simultaneously consider semantic rationality, concept relevance, and user behavior characteristics when selecting concepts. For example, when semantic similarity is high but user historical usage frequency is low, the algorithm can still adjust the score through weighted fusion to ensure the selection of the most suitable concept. This solves the problem of concept selection bias caused by a single scoring dimension, improving the system's accuracy and robustness.
[0086] This invention is based on an interpretable concept calibration and response generation mechanism. It explicitly reflects the basis for concept selection during the response generation process, enabling users to understand the logic behind the system's output. By visualizing concept scores, role priors, and knowledge graph relationship information, the system not only provides answers but also reveals the underlying reasoning process. For example, when the system selects a concept as the basis for an answer, it displays the concept's contribution weight in multi-factor scoring and its role relevance. This mechanism solves the problem of traditional black-box response systems being difficult to interpret, improves users' understanding of the credibility of responses, and provides data support for subsequent optimization and feedback.
[0087] For ease of description, the above system is described by dividing it into various modules based on their functions. Of course, when implementing one or more embodiments of this disclosure, the functions of each module can be implemented in one or more software and / or hardware.
[0088] The system described above is used to implement the corresponding methods in the foregoing embodiments and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0089] Figure 4 This embodiment illustrates a more specific hardware structure of an electronic device, which may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.
[0090] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this disclosure.
[0091] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this disclosure are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.
[0092] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.
[0093] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0094] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.
[0095] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this disclosure, and not necessarily all the components shown in the figures.
[0096] The electronic devices described above are used to implement the corresponding methods in the foregoing embodiments and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0097] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0098] Based on the same inventive concept, corresponding to the interaction method in any of the above embodiments, this disclosure also provides a computer program product, which includes one or more computer programs. In some embodiments, the one or more computer programs are executable by one or more processors to cause the one or more processors to perform the interaction method. Corresponding to the execution entity for each step in various embodiments of the interaction method, the processor executing the corresponding step may belong to the corresponding execution entity. The computer program product of the above embodiments is used to cause the processor to execute the interaction method as described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0099] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this disclosure (including the claims) is limited to these examples; within the framework of this disclosure, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of one or more embodiments of this disclosure as described above, which are not provided in detail for the sake of brevity.
[0100] Additionally, to simplify the description and discussion, and to avoid obscuring one or more embodiments of this disclosure, the provided drawings may or may not show well-known power / ground connections to integrated circuit (IC) chips and other components. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring one or more embodiments of this disclosure, and this also takes into account the fact that the details of implementation of these block diagram apparatuses are highly dependent on the platform on which one or more embodiments of this disclosure will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuitry) are set forth to describe exemplary embodiments of this disclosure, it will be apparent to those skilled in the art that one or more embodiments of this disclosure may be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0101] Although this disclosure has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0102] This disclosure includes one or more embodiments intended to cover all such substitutions, modifications, and variations falling within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. An interaction method, characterized in that, The method includes: The user's role label is determined based on session metadata and user input. The input content is parsed based on the knowledge graph to obtain a set of candidate concepts; Based on the role tags and the knowledge graph, each candidate concept in the candidate concept set is evaluated to obtain a comprehensive relevance score for each candidate concept; Based on the comprehensive relevance score, the target concept is determined from the candidate concept set, and a calibration description corresponding to the target concept is generated; Based on the target concept, an answer corresponding to the input content is generated.
2. The method according to claim 1, characterized in that, The method further includes: Record the user's confirmation, correction, or rejection of the answer; Based on the records, the weight parameters of the comprehensive relevance score are updated, thereby updating and providing feedback on the answer; The update process for the weight parameters of the comprehensive relevance score is as follows: in, For the first The weight value after the interaction. For learning rate, This is the adjustment amount calculated based on user feedback.
3. The method according to claim 1, characterized in that, The process of determining the user's role label based on session metadata and user input includes: Obtain session metadata, which includes the user's login identity, job type, and system source; Based on the session metadata and the input content, a feature vector is constructed; The feature vector is input into the role recognition model to obtain the probability distribution and corresponding confidence value of the user under each predefined role. Select the predefined role with the highest probability as the role label for the user; Among them, each of the predefined roles The probability is expressed as: in, The feature vector is constructed based on the session metadata and the input content. For a predefined set of roles, For the first in the predefined set of roles The probability of a predefined role. The discriminant function represents each of the predefined roles. With the feature vector The strength of the association; The role recognition model outputs the following role recognition result: in, For each of the predefined roles The probability, To make the probability The role that takes the maximum value .
4. The method according to claim 1, characterized in that, The step of parsing the input content based on a knowledge graph to obtain a set of candidate concepts includes: Based on the input content, the domain ontology and the corresponding knowledge graph are determined; Based on the named entity recognition model, the input content is identified to obtain a set of entity phrases; Based on the domain ontology, semantic mapping and semantic expansion are performed on each entity phrase in the entity phrase set to generate a candidate concept set. The generation process is as follows: in, For the set of entity phrases; For the domain ontology; For semantic expansion functions; For ontology mapping functions; This represents the set of candidate concepts generated by the entity extraction and semantic expansion stages; The candidate concept set is mapped to the knowledge graph to determine the candidate concept nodes.
5. The method according to claim 4, characterized in that, Based on the role tags and the knowledge graph, each candidate concept in the candidate concept set is evaluated to obtain a comprehensive relevance score for each candidate concept, including: Based on the prior dimension of roles, the candidate concept set is quantitatively evaluated, and the prior probability of roles can be expressed as: in, A candidate concept is a set of candidate concepts. A specific candidate concept in the text; This represents the user roles in the predefined set of roles; Indicates user roles in historical interactions Using candidate concepts The number of times; For smoothing coefficients; Indicates the size of the candidate concept set; The candidate concept set is quantitatively evaluated based on semantic similarity, and the calculation method is as follows: in, Indicates the context of the dialogue. Representing candidate concepts Definition or description text, This represents the semantic encoding model used to generate vector representations. Semantic similarity dimension; The candidate concept set is quantitatively evaluated based on the knowledge graph structure and relationship dimension. The quantitative evaluation of the candidate concept set based on the knowledge graph structure relationship dimension includes: Based on the role tags and dialogue context, the user object node is determined; Calculate the shortest path length between the user object node and the candidate concept node in the knowledge graph, and map the shortest path length to a topological score using an exponential decay function, expressed as: in, This represents the shortest path length between the user object node and the candidate concept node in the knowledge graph. This is the path decay coefficient, used to control the degree of influence of path length on the scoring results; The candidate concept set is quantitatively evaluated based on historical usage behavior, as expressed by: in, Indicates user roles in historical interactions Using candidate concepts The number of times; Indicates a candidate concept; User roles Candidate concepts in historical interactions The actual frequency of use; Based on the aforementioned role prior dimension, semantic similarity dimension, knowledge graph structure relationship dimension, and historical usage behavior dimension, a comprehensive relevance score for candidate concepts is calculated using a weighted fusion function, specifically expressed as follows: in, Representing candidate concepts The overall relevance score under the current session conditions. The weight parameters represent the prior dimensions of the role. The weight parameters represent the semantic similarity dimension. The weight parameters represent the relational dimension of the knowledge graph structure. This represents the weighting parameter for the historical usage behavior dimension.
6. The method according to claim 1, characterized in that, The step of determining the target concept from the candidate concept set based on the comprehensive relevance score and generating a calibration description corresponding to the target concept includes: Based on the principle of maximization, a target concept is determined from the candidate concept set, and a semantic calibration description corresponding to the target concept is generated; The selection of the target concept can be expressed as follows: in, This indicates the final selected target concept. This represents the set of candidate concepts generated by the entity extraction and semantic expansion stages. Representing candidate concepts A comprehensive relevance score under the current session conditions; The semantic calibration description can be expressed as: in, This refers to the generated semantic calibration description text. This indicates the calibration specification generation function. This represents the user roles in the predefined set of roles. Indicates the context of the dialogue. This indicates the relative influence of the role prior dimension, semantic similarity dimension, knowledge graph structure relationship dimension, and historical usage behavior dimension on the target concept.
7. The method according to claim 1, characterized in that, The step of generating an answer corresponding to the input content based on the target concept includes: Introducing the target concept as a constraint into the response generation stage, the constraint can be expressed as follows: in, This indicates a problem with the user's input. This indicates the final selected target concept. This represents the response generation function constrained by the target concept.
8. An interactive system, characterized in that, The system includes: The determination module is configured to determine the user's role label based on session metadata and user input. The parsing module is configured to parse the input content based on the knowledge graph to obtain a set of candidate concepts; The evaluation module is configured to evaluate each candidate concept in the candidate concept set based on the role tags and the knowledge graph, and obtain a comprehensive relevance score for each candidate concept. The generation module is configured to determine a target concept from the candidate concept set based on the comprehensive relevance score, and generate a calibration description corresponding to the target concept. The answer module is configured to generate an answer corresponding to the input content based on the target concept.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executed by the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores computer instructions for causing the computer to perform the method according to any one of claims 1 to 7.