A multi-agent dynamic task integrated allocation method and system

By constructing an emotion-memory resonance map and intention attraction field, and dynamically identifying psychological states, the problem of insufficient response of the existing psychological dialogue system in the face of complex situations is solved, and flexible coordination and precise intervention of multi-agent systems are achieved.

CN120336035BActive Publication Date: 2025-08-19GUANGDONG DIGITAL IND INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510819838.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-08-19
Estimated Expiration
2045-06-19

AI Technical Summary

Technical Problem

When facing the interweaving situations of user's multiple emotions and multiple cognitive goals, existing psychological dialogue systems are difficult to dynamically identify the task evolution path, and lack multi-agent response marshalling mechanism, resulting in dull response, insufficient personalization, and limited intervention effects.

Method used

By constructing an emotion-memory resonance map, identifying emotional island areas, memory high-frequency activation fragments or memory-emotional conflict paths, activate the function-driven marshalling unit, and performing agent scheduling in combination with the intention attraction force field, realizing multi-task dynamic flow and priority sorting.

Benefits of technology

It improves the system's understanding of the user's psychological state, improves the ability to identify potential task intentions in multiple rounds of dialogue, avoids task mismatch and response delays, and enhances the system's intelligence and user satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120336035B_ABST
    Figure CN120336035B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of intelligent psychological consultation and provides a multi-agent dynamic task integrated allocation method and system, including extracting user historical semantic memory fragments by a long-term memory agent and constructing a memory node set; obtaining the user's current and historical emotional state by a sentiment analysis agent and constructing an emotion node set; constructing an emotion-memory resonance map based on the semantic correlation and emotion similarity between the memory node set and the emotion node set; activating the corresponding function-driven grouping unit according to the type of resonance pattern in the map; constructing an intention attraction field according to the state change of the resonance map in the time dimension, which is used to dynamically guide the task flow to the currently most active intention node, and scheduling and allocating the corresponding agents in the function-driven grouping unit based on the attraction field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent psychological consultation, and specifically relates to a multi-agent dynamic task integrated allocation method and system. Background Art

[0002] In recent years, with the advancement of artificial intelligence, natural language processing, and human-computer interaction technologies, intelligent dialogue systems for mental health have been gradually applied to scenarios such as emotion recognition, psychological assessment, and emotional counseling. These systems are particularly rapidly developing in psychological support, assessment, and intervention services for primary and secondary school students. Multi-round dialogue and continuous interaction have become important means of acquiring user psychological information, assessing emotional changes, and generating intervention recommendations, driving the shift of intelligent psychological services from static assessment to dynamic companionship.

[0003] In existing technologies, common psychological dialogue systems often employ a single model architecture, combining keyword matching, sentiment classification, and rule-based recommendation to achieve preliminary mental state assessment and generate recommendations. For example, some systems use sentiment dictionaries and emotion recognition models to identify the type of emotion expressed by the user, then combine templates to generate comforting messages or recommend meditation practice resources. Some systems divide emotion recognition, semantic analysis, and resource recommendation into multiple modules, executing each task sequentially through a fixed process, forming a basic psychological dialogue process.

[0004] However, existing technologies generally suffer from problems such as a single modeling approach to user psychological states and insufficient support for multi-task scheduling mechanisms. Specifically, current systems struggle to simultaneously handle the intertwined context of multiple emotions and diverse cognitive objectives expressed by users. They lack the ability to integrate emotional states with historical semantic information, are unable to dynamically identify task evolution paths, and lack a scheduling mechanism for multi-agent response grouping based on psychological state changes. This results in rigid responses, insufficient personalization, and limited intervention effectiveness in multi-round conversations. Summary of the Invention

[0005] In order to solve the problems in the prior art, the present invention provides a multi-agent dynamic task integrated allocation method, comprising the following steps:

[0006] Step S10: The long-term memory agent extracts the user's historical semantic memory fragments and constructs a memory node set; the sentiment analysis agent obtains the user's current and historical emotional state and constructs an emotion node set;

[0007] Step S20: constructing an emotion-memory resonance graph based on the semantic relevance and emotion similarity between the memory node set and the emotion node set. The resonance graph is a heterogeneous graph structure including memory nodes and emotion nodes, and the weight of its edges represents the psychological resonance strength between the connected nodes.

[0008] Step S30: Identify emotion island regions, memory high-frequency activation segments, or memory-emotion conflict paths in the resonance spectrum, and activate corresponding function-driven grouping units based on the type of resonance pattern in the spectrum, wherein the function-driven grouping units include at least two functionally heterogeneous intelligent agents;

[0009] Step S40: construct an intention attraction field according to the state changes of the resonance graph in the time dimension, which is used to dynamically guide the task flow to the most active intention node at present, and schedule and allocate the corresponding intelligent agents in the function-driven grouping unit based on the attraction field.

[0010] Furthermore, step S10 includes the following sub-steps:

[0011] Step S101: The long-term memory agent extracts the user's past conversation data, encodes the semantic content with psychological significance, and generates a semantic representation vector;

[0012] Step S102: Screen representative semantic segments through semantic clustering or attention mechanism to form a candidate set of memory nodes;

[0013] Step S103: The sentiment analysis agent identifies the user's emotional state in the current input and historical input, and constructs an emotion embedding vector;

[0014] Step S104: classify the emotion information based on the timestamp, emotion category and expression intensity to generate an emotion node set, where the emotion node includes at least one emotion label and its corresponding emotion intensity index.

[0015] Furthermore, step S20 includes the following sub-steps:

[0016] Step S201: Calculate the semantic similarity and emotion co-occurrence factor between each memory node and emotion node;

[0017] Step S202: constructing a connection edge based on semantic similarity and emotion co-occurrence factor, and calculating the psychological resonance intensity using a weighted formula;

[0018] Step S203: Memory nodes and emotion nodes are used as a heterogeneous node set, and psychological resonance intensity is used as an edge weight to construct an emotion-memory resonance graph in the form of a heterogeneous graph structure.

[0019] Furthermore, step S30 includes the following sub-steps:

[0020] Step S301: Identify emotion nodes with fewer connected edges than a set threshold in the resonance graph and mark them as emotion island nodes;

[0021] Step S302: Identify memory nodes that are frequently activated in the past N conversations. If the node forms a high-resonance connection with multiple emotion nodes, mark it as a memory high-frequency activation segment.

[0022] Step S303: compare the historical emotion polarities of multiple memory nodes associated with a single emotion node. If there is an obvious emotion conflict, construct a memory-emotion conflict path.

[0023] Step S304: activating a function-driven grouping unit of a corresponding type according to the identified graph resonance mode type, wherein the grouping unit includes at least two intelligent agents with different task response capabilities.

[0024] Furthermore, step S40 includes the following sub-steps:

[0025] Step S401: construct a sequence graph set by slicing the resonance graph in time, and extract the activity change of each node;

[0026] Step S402: cluster the nodes based on activity changes to form a candidate task intent region and identify an intent node set;

[0027] Step S403: Calculate the attraction value of each intention node. The attraction function includes the weighted sum of the resonance intensity mean, the node activity increment, and the user feedback priority.

[0028] Step S404: Sort by attraction value, select the intention node with the greatest attraction as the current task target, and dispatch the intelligent agent with corresponding capabilities in the function-driven marshaling unit to execute the task response.

[0029] Another aspect of the present invention provides a multi-agent dynamic task integrated allocation system, which includes the following modules:

[0030] The memory and emotion node construction module is used by the long-term memory agent to extract the user's historical semantic memory fragments to construct a memory node set, and the sentiment analysis agent to obtain the user's current and historical emotional state to construct an emotion node set;

[0031] a resonance graph construction module, configured to construct an emotion-memory resonance graph based on the semantic relevance and emotion similarity between the memory node set and the emotion node set, wherein the resonance graph is a heterogeneous graph structure comprising memory nodes and emotion nodes, and the weight of its edges represents the strength of psychological resonance between the connected nodes;

[0032] a resonance pattern recognition and grouping module, configured to identify emotion island regions, high-frequency memory activation segments, or memory-emotion conflict paths in the resonance spectrum, and activate corresponding function-driven grouping units based on the type of resonance pattern in the spectrum, wherein the function-driven grouping units include at least two functionally heterogeneous intelligent agents;

[0033] The intention attraction and agent scheduling module is used to construct an intention attraction field according to the state changes of the resonance graph in the time dimension, dynamically guide the task flow to the most active intention node, and schedule and allocate the corresponding agents in the function-driven grouping unit based on the attraction field.

[0034] Furthermore, the memory and emotion node building blocks include:

[0035] The semantic encoding module is used by the long-term memory agent to extract the user's past multi-round dialogue data, encode the semantic content with psychological meaning, and generate a semantic representation vector;

[0036] Semantic screening module, which is used to screen representative semantic fragments through semantic clustering or attention mechanism to form a candidate set of memory nodes;

[0037] The emotion recognition module is used by the sentiment analysis agent to identify the user's emotional state in the current input and historical input, and construct an emotion embedding vector;

[0038] The emotion classification module is used to classify emotion information based on timestamp, emotion category and expression intensity, and generate an emotion node set. The emotion node contains at least one emotion label and its corresponding emotion intensity index.

[0039] Furthermore, the resonance spectrum building block includes:

[0040] Similarity calculation module, used to calculate the semantic similarity and emotion co-occurrence factor between each memory node and emotion node;

[0041] The resonance strength calculation module is used to construct connection edges based on semantic similarity and emotional co-occurrence factors, and calculate the psychological resonance strength using a weighted formula;

[0042] The heterogeneous graph generation module is used to construct an emotion-memory resonance graph in the form of a heterogeneous graph structure, using memory nodes and emotion nodes as a heterogeneous node set and psychological resonance intensity as edge weight.

[0043] Furthermore, the resonance pattern recognition and grouping module includes:

[0044] The emotion island identification module is used to identify emotion nodes with fewer connected edges than a set threshold in the resonance graph and mark them as emotion island nodes;

[0045] The high-frequency memory recognition module is used to identify memory nodes that are frequently activated in the past N conversations. If the node forms a high-resonance connection with multiple emotion nodes, it is marked as a high-frequency memory activation segment;

[0046] The conflict path identification module is used to compare the historical emotion polarities of multiple memory nodes associated with a single emotion node. If there is an obvious emotion conflict, a memory-emotion conflict path is constructed;

[0047] The grouping unit activation module is used to activate the corresponding type of function-driven grouping unit according to the identified graph resonance mode type, and the grouping unit includes at least two intelligent agents with different task response capabilities.

[0048] Furthermore, the intention attraction and agent scheduling module includes:

[0049] The graph slice analysis module is used to construct a sequence graph set in the form of time slices of the resonance graph and extract the activity changes of each node;

[0050] The intent clustering module is used to cluster nodes based on activity changes, form candidate regions for task intent, and identify sets of intent nodes;

[0051] The attraction calculation module is used to calculate the attraction value of each intent node. The attraction function includes the weighted sum of the resonance intensity mean, the node activity increment, and the user feedback priority.

[0052] The target selection module is used to sort the intention nodes according to their attractiveness values and select the most attractive intention node as the current task target;

[0053] The intelligent agent scheduling module is used to schedule the intelligent agents with corresponding capabilities in the marshalling unit to perform task responses.

[0054] By constructing an emotion-memory resonance graph, this paper achieves a structured representation of the linkage between a user's emotional state and historical semantic memory. This enables the system to gain a deeper understanding of the user's psychological evolution and improves its ability to identify potential task intent in multi-round conversations. By analyzing the graph resonance between memory nodes and emotion nodes, the system can dynamically capture key trigger points in psychological states, providing a clear basis for task generation and response.

[0055] Furthermore, the present invention introduces an intention attraction field mechanism that accurately locates the most psychologically responsive intention nodes based on the temporal evolution of the graph, thereby enabling dynamic multi-task flow and prioritization. This mechanism effectively avoids problems such as task mismatches and response delays, improving the accuracy and efficiency of agent task scheduling.

[0056] Furthermore, the function-driven grouping unit constructed in this invention implements a flexible collaborative response mechanism among multiple functionally heterogeneous agents, enabling them to adaptively combine and participate in task execution based on different psychological resonance patterns. This mechanism enhances the system's adaptability to complex psychological states and its intervention coverage, helping to improve the intelligence, stability, and user satisfaction of the psychological dialogue system. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0058] Figure 1 is a flow chart of the method of the present invention;

[0059] Figure 2 It is a system block diagram of the present invention. DETAILED DESCRIPTION

[0060] The invention is preferably described below in conjunction with the accompanying drawings and specific embodiments.

[0061] This embodiment solves the above problem through the following steps:

[0062] In one embodiment, reference Figure 1 The present invention provides a multi-agent dynamic task integration allocation method, which realizes the dynamic identification, scheduling and joint execution of complex psychological tasks or cognitive tasks with the collaborative participation of multiple types of agents.

[0063] In this paper, an agent refers to a functional module capable of autonomous perception, task execution, and collaborative interaction, used to complete specific subtasks within an AI psychological dialogue system. Each agent independently analyzes and processes user input by invoking its own embedded models, algorithms, or knowledge base. It also exchanges information and collaborates with other agents based on task requirements, thereby jointly assessing the user's psychological state, intervening, and generating recommendations.

[0064] In the present invention, in order to realize a multi-agent dynamic task integrated allocation method, it is specifically implemented through the following steps:

[0065] Step S10: The long-term memory agent extracts the user's historical semantic memory fragments and constructs a memory node set; the sentiment analysis agent obtains the user's current and historical emotional state and constructs an emotion node set.

[0066] In a multi-agent psychological dialogue system, to achieve personalized task generation and precise agent matching, it is necessary to jointly model the user's historical semantic information and emotional state. To do this, a "memory node set" representing the user's long-term memory information and an "emotion node set" describing the user's current psychological state must be constructed separately. This provides semantic-emotional dual-mode support for subsequent task graph construction, intent prediction, and agent scheduling. This processing step transforms historical semantic content and current emotional state into nodes in a graph structure, achieving a structured representation of multidimensional psychological states. This in turn supports the system's temporal modeling of the user's psychological trajectory and multi-agent grouping response.

[0067] In this step, the long-term memory agent refers to an intelligent module in a multi-agent system that is specifically used to store, manage, and call long-term user interaction information. Its core function is to extract user historical semantic content, establish a memory representation structure, and retrieve related memories and provide supporting information when needed, so as to improve the system's ability to understand user behavior patterns and psychological states, and enhance the personalization and contextual relevance of dialogue generation or task recommendations.

[0068] The long-term memory agent imitates the cognitive mechanism of "long-term memory" in the human memory system and records the user's historical semantic data in multiple rounds of interaction, such as:

[0069] Description of typical events (e.g., “I experienced bullying in elementary school”);

[0070] recurring themes (e.g., “I’m afraid to face the exam”);

[0071] The association between emotions and semantics (e.g., “I feel depressed every time I mention my mother”).

[0072] During the operation of the system, the agent can retrieve the historical content most relevant to the current context based on the current input information, and provide it to other agents (such as CBT dialogue models, sentiment analysis agents, and recommendation agents) in the form of vectors, prompt words, summary fragments, etc. as a basis for decision-making or language generation assistance.

[0073] A memory node refers to a semantic unit extracted by a long-term memory agent to represent psychologically indicative meaning in a user's historical interaction content, including but not limited to key events, conversation summaries, topic fragments, etc.

[0074] Emotional nodes refer to emotional labels or emotional embedding vectors identified by the sentiment analysis agent to characterize the emotional fluctuation characteristics of the user's current or historical conversations, and can reflect the evolution of the user's mental state.

[0075] In one implementation of step S10, the following sub-steps are included:

[0076] In step S101, the long-term memory agent acquires historical user interaction data. Natural language processing techniques (such as pre-trained language models like BERT and RoBERTa) are used to semantically encode the historical conversation text and extract key semantic content. Specifically, a sliding window mechanism is used to traverse multiple rounds of user conversation fragments. Each semantically significant text segment is represented as a semantic vector. Semantic similarity is calculated and clustered by topic to obtain representative semantic cluster centers, which serve as candidate memory nodes.

[0077] In step S102, candidate memory nodes are screened. A weight threshold is set based on factors such as the semantic match with the current input and user usage frequency. Semantic units that meet the criteria are selected to form the final set of memory nodes. Optional implementations include: using an attention mechanism to calculate the importance of each node to the current input and selecting the top-K score items as memory nodes; or using semantic distribution based on topic models (such as LDA) to select high-confidence semantic topics.

[0078] In step S103, the sentiment analysis agent models the user's current input and historical emotion sequences. It uses a fine-grained sentiment classification model (such as a TextCNN+BiLSTM architecture) to label each round of speech or text input and extract sentiment embedding vectors. Emotion categories include, but are not limited to, anxiety, happiness, frustration, depression, anger, and confusion.

[0079] In step S104, each emotion embedding vector is used as a feature representation of an emotion node. A clustering algorithm (such as DBSCAN) is used to divide the emotion trend regions and construct an emotion node set. The emotion node not only retains the original emotion type but also includes the corresponding timestamp and contextual association strength.

[0080] Step S105 : uniformly number, vectorize, and format the generated memory node set and emotion node set into a graph structure input format for use in subsequent graph construction and resonance analysis.

[0081] The advantage of this step is that the independent modeling of memory nodes and emotion nodes not only improves the system's ability to understand the user's long-term interaction context, but also enhances the structural and computational efficiency of multi-dimensional psychological state expression through parallel processing, thereby providing a clear and highly interpretable semantic and emotional basis for the construction of resonance maps and intelligent agent scheduling mechanisms.

[0082] For example, using the user "Xiao Lin" as an example, they repeatedly mentioned "school anxiety," "social avoidance," and "academic pressure" in five previous conversations. The system then extracted three core memory nodes through the long-term memory agent, labeling them M1 (school anxiety), M2 (social avoidance), and M3 (academic pressure). Simultaneously, the sentiment analysis agent identified a "depressed" emotional trend in the user's current input, along with the tone and textual expression. Combined with historical records, it identified a long-term "anxiety-depression alternation" emotional pattern, forming the emotion node sets E1 (depression) and E2 (anxiety).

[0083] Step S20: constructing an emotion-memory resonance graph based on the semantic relevance and emotion similarity between the memory node set and the emotion node set. The resonance graph is a heterogeneous graph structure including memory nodes and emotion nodes, and the weight of its edges represents the psychological resonance strength between the connected nodes.

[0084] In a multi-agent psychological dialogue system, to effectively perceive, express, and coordinate responses to a user's psychological state, a structured psychological state representation is necessary to reveal the correlation between a user's long-term semantic memory and emotional fluctuations. This step aims to jointly model the previously constructed memory node set and emotion node set, expressing the coupling strength between the two through a graph structure to form an "emotion-memory resonance map." This map not only reflects the emotional activation state in the current conversation but also reveals the ability of specific emotions to evoke past memories, thereby supporting the prediction of subsequent task intentions and multi-agent scheduling decisions.

[0085] In this step, the intensity of psychological resonance refers to the degree of linkage between a memory node and an emotion node in the current semantic context, reflecting the possibility that the memory content is activated by the current emotion.

[0086] The emotion-memory resonance map is a graphical model proposed in this invention for structured representation of the linkage relationship between emotional factors in the user's psychological state and long-term semantic memory. It aims to achieve the computational basis for the accurate perception of the user's psychological trajectory by multiple intelligent agents and the collaborative scheduling of tasks.

[0087] The graph constructs "memory nodes" and "emotion nodes" as two types of core nodes in a heterogeneous graph, and establishes weighted connecting edges based on the semantic correlation and emotion activation relationship between the two, forming a multidimensional graph structure with semantic-emotional coupling characteristics, thereby expressing the dynamic resonance pattern between the user's current psychological state and past psychological events.

[0088] Human psychological states are characterized by a high degree of interconnectedness between long-term memories and short-term emotions. For example, specific emotional states (such as anxiety and anger) often activate memories of related past events. In psychological intervention tasks, if the system can accurately identify the memories evoked by a specific emotion, it can provide more personalized conversational strategies and intervention suggestions.

[0089] Based on this cognitive mechanism, the present invention designs an emotion-memory resonance graph, which uses a graph structure to depict the resonance intensity between the current emotional state and historical semantic fragments, driving subsequent task generation, intention recognition, and collaborative execution of intelligent agent grouping.

[0090] In one implementation of step S20, the following sub-steps are included:

[0091] Step S201: Based on the memory node set generated in step S10, extract the semantic representation vector of each memory node. Specifically, a pre-trained language model (such as BERT, RoBERTa, ERNIE, etc.) can be used to encode the original semantic text to obtain a high-dimensional vector representation of each node. The semantic vector is recorded as Where d represents the vector dimension and m represents the memory node number.

[0092] Step S202: Based on the set of emotion nodes generated in step S10, the emotion embedding vector of each emotion node is extracted. The emotion embedding can be generated by a multi-label emotion recognition model (such as BiLSTM-CNN+attention or RoBERTa+MLP classifier) to perform emotion recognition on the user's current input, and the representation vector before the intermediate layer or classification output layer of the model is used as the emotion embedding vector, representing , where e represents the emotion node number, and the vector dimension is consistent with the memory vector.

[0093] For example, the historical conversation fragment of user "Xiao Lin" is: "I always can't sleep before the exam, and I get anxious when I think about the exam tomorrow", and the current conversation is: "My sleep has become worse recently, and I started to worry about the future."

[0094] When obtaining the memory node vector, input "I always can't sleep before the exam, and I get anxious when I think about the exam tomorrow" into the BERT model; obtain the CLS memory node vector output.

[0095] When obtaining the emotion node vector, based on the sentence "My sleep has deteriorated again recently, and I'm starting to worry about the future," the sentiment analysis model predicts its emotion label as "anxiety" and extracts the emotion embedding vector output.

[0096] Step S203: Calculate the psychological resonance strength of each pair of memory node m and emotion node e. .

[0097] The resonance intensity is calculated by the following weighted formula:

[0098]

[0099] in,

[0100] sim(⋅,⋅) represents the cosine similarity function, which is used to measure the similarity between two vectors in the semantic space, with a value range of [−1,1]; Indicates whether the memory node and the emotion node have a co-occurrence relationship in time. The value is 0 or 1, which can be determined by the time window strategy.

[0101] α and β are adjustable weight coefficients, satisfying α+β=1.

[0102] Optional implementations include: using dot product instead of cosine similarity function to enhance resonance directionality, or dynamically learning weights α and β through the Transformer attention mechanism.

[0103] Step S204: establish a graph structure connection between all memory nodes and emotion nodes. The memory nodes and emotion nodes are regarded as a node set of a heterogeneous graph. The edge weight between the nodes is the resonance strength. The constructed graph structure is recorded as ,in

[0104] is the memory node set,

[0105] is a set of emotion nodes,

[0106] Represents a set of weighted edges.

[0107] Step S205: Normalize the graph structure, including node encoding, edge weight normalization, and graph representation format conversion. Normalization can be done using max-min or softmax normalization, allowing for subsequent use in graph convolution calculations or task scheduling strategies.

[0108] The emotion-memory resonance graph constructed through the above steps effectively expresses the interconnected relationships between different dimensions of user psychological structures. This not only improves the system's ability to structure and model complex psychological states, but also enhances the accuracy of subsequent agent task grouping and intent prediction. The introduction of this graph structure empowers the system with a global contextual understanding, facilitating the evolutionary representation of tasks and the structured scheduling of multiple agents.

[0109] For example, the user "Xiao Lin" mentioned "anxiety caused by failure in the exam" in his historical semantic memory node M1, and the emotion node E1 in the current conversation is identified as "anxiety" by the sentiment analysis agent. , E1 and M1 co-occur in time, then , if α=0.7, β=0.3, the final resonance intensity Based on this, the system establishes a high-strength connection between M1 and E1, and uses it in subsequent task intention recognition and agent scheduling.

[0110] Step S30: Identify emotional island areas, memory high-frequency activation segments, or memory-emotion conflict paths in the resonance spectrum, and activate corresponding function-driven grouping units based on the type of resonance pattern in the spectrum, wherein the function-driven grouping units include at least two functionally heterogeneous intelligent agents.

[0111] To improve the multi-agent psychological dialogue system's ability to respond to users' complex psychological states, it is necessary to identify the current potential psychological task type based on the structural features of the "emotion-memory resonance map" and dynamically activate an adaptive agent cluster based on the identification results. The core of this step is to determine the current user's psychological state structural pattern through graph pattern recognition, such as the presence of isolated high-risk emotions, repeatedly activated cognitive themes, or inconsistent paths between emotions and memories. Based on different psychological state types, the system selects agents with complementary functions to form functionally driven grouping units, thereby completing the division of labor and collaborative execution of subsequent tasks. This mechanism ensures that the system has the ability to respond agilely and intervene precisely when faced with different types of psychological tasks.

[0112] In the present invention, an emotion island region refers to an emotion node in the resonance map that is connected to only a small number of or no memory nodes, and usually indicates a user's short-term, high-intensity emotion fluctuation that is not supported by cognitive content.

[0113] High-frequency memory activation fragments refer to memory nodes that are repeatedly connected to multiple emotional nodes, reflecting cognitive themes that are highly sensitive or repeatedly thought about in the user's psychological activities.

[0114] The memory-emotion conflict path refers to a memory node connecting multiple emotion nodes and the corresponding emotion labels have contradictions or drastic changes, which may indicate decoupling or conflict between cognition and emotion.

[0115] A function-driven grouping unit refers to a temporary collaborative task execution cluster composed of multiple functionally heterogeneous intelligent agents, which is used to execute differentiated task processes according to different psychological resonance patterns. For example, isolated island areas, high-frequency memory activation fragments, and memory-emotion conflict paths correspond to different function-driven grouping units.

[0116] In one implementation of step S30, the following sub-steps are included:

[0117] Step S301: traverse and analyze the emotion-memory resonance graph, counting the number of edges and the sum of edge weights between each emotion node and each memory node. Emotion nodes with an edge count less than a set threshold τ and an edge weight sum lower than the average μ are marked as emotion island nodes. The system defines the subgraph region to which the node belongs as an emotion island region.

[0118] Step S302: Analyze the outgoing edge weight distribution of the memory node. If a memory node has a strong connection with the current emotion node in the last k conversations, that is, the resonance strength If both are greater than a preset threshold θ, and the node is connected to multiple different emotion nodes, it is marked as a memory high-frequency activation segment. Optional implementation schemes include: using a sliding window mechanism to count node activity frequencies or using an exponential decay function to weight activation frequency updates.

[0119] Step S303: For the same emotion node, if the emotion labels of multiple memory nodes connected to it have significant emotional polarity differences (e.g., "positive" and "negative"), it is determined to be a memory-emotion conflict path. The specific determination method is to calculate the Euclidean distance between the emotion labels. , when D>δ, it is considered a conflict relationship, where δ is the preset difference threshold.

[0120] Step S304: Determine the corresponding functional drive grouping unit type according to the identified spectrum resonance mode type:

[0121] For emotional island areas, a guidance grouping unit including sentiment analysis agents and recommendation agents is activated to guide emotional expression.

[0122] For memorizing high-frequency activation segments, a focused grouping unit including long-term memory agents and summarizing agents is activated to integrate historical themes.

[0123] For the memory-emotion conflict pathway, a reconciliation grouping unit consisting of an emotion analysis agent and a long-term memory agent is activated to identify cognitive conflicts and generate emotion regulation suggestions.

[0124] The grouping unit includes at least two functionally different intelligent agents, which complete division of labor and cooperation through asynchronous or synchronous communication mechanisms during task execution.

[0125] Through these steps, the system can identify areas of psychological imbalance within the structure of the emotion-memory resonance map and automatically select appropriate agent combinations for targeted treatment. This significantly improves the multi-agent system's flexibility, adaptability, and intervention accuracy in dealing with complex psychological states. This approach avoids the shortcomings of traditional psychological dialogue systems that rely solely on single emotion judgments or static semantic matching, achieving a closed-loop scheduling chain of "emotion triggering - structure recognition - agent collaboration."

[0126] For example, in the psychological dialogue case of "Xiao Lin," the system detected that the current anxiety node E1 had only a weak connection with one historical memory node, M2. No other memory nodes formed a resonant relationship, and the edge weights of the connections were below the system average. This phenomenon was labeled an "emotional island." Further analysis revealed that the historical semantic themes represented by M2 and M4, connected to E1, were "excessive stress caused by failing an exam" and "winning applause at a successful sports meet," respectively. Their corresponding historical emotion labels were "depression" and "pride," respectively. The emotional polarity between these two was significantly opposite, leading the system to determine that a "memory-emotion conflict path" existed in the current graph structure. Based on this, the system identified the presence of both "emotional island" and "conflict path" resonance patterns in the user's current psychological state. It automatically activated a reconciliation unit, consisting of an emotion analysis agent and a recommendation agent, to perform a joint task focusing on emotion clarification and emotional resource guidance. The system also generated the guiding phrase, "You mentioned your recent anxiety, but you also have many experiences you're proud of. Perhaps we can use these positive experiences as a starting point to work together to manage your current stressful emotions."

[0127] Step S40: construct an intention attraction field according to the state changes of the resonance graph in the time dimension, which is used to dynamically guide the task flow to the most active intention node at present, and schedule and allocate the corresponding intelligent agents in the function-driven grouping unit based on the attraction field.

[0128] In multi-agent psychological dialogue systems, users' psychological states exhibit distinct dynamic evolutionary characteristics. Their emotions and cognitive structures continuously change as the dialogue progresses, leading to changes in the types of tasks and psychological goals the system must respond to over different time periods. To achieve dynamic adaptation and prioritization of task allocation, a task-driven mechanism based on the temporal evolution of the resonance graph is required. To this end, this step constructs an "intention attraction field" to model the attractiveness of all potential task goals, identifying the intention nodes with the highest psychological response value at the current stage. This information is then used to drive optimal scheduling and resource allocation for the agents in the functional drive unit.

[0129] The intention attraction field refers to a vector field calculated by the system based on factors such as the user's current psychological state, resonance strength, and node activity. It is used to measure the attraction of each intention node to the task flow. The larger the value, the more suitable the node is for priority scheduling as a task execution target.

[0130] An intention node refers to a highly resonant concentrated area in the resonance map that represents a specific task goal. It is usually formed by specific emotion nodes or memory nodes connected to each other within a certain threshold. For example, "generating counseling suggestions", "reviewing historical experiences", "pushing mindfulness resources", etc. can all be regarded as intention nodes.

[0131] In a specific implementation, step S40 includes the following sub-steps:

[0132] Step S401: Sequence the emotion-memory resonance spectrum constructed in the previous step according to the time axis to form multiple time slices , where each time point t corresponds to a graph state. By comparing the changes in the resonance intensity of each node in the graph, the activity trend of the node can be identified. Activity It can be calculated by the following formula:

[0133]

[0134] in,

[0135] represents the activity increment of node i at time t;

[0136] represents the set of adjacent nodes connected to node i; Represents the resonance strength between nodes i and j at time t.

[0137] Step S402: Based on the activity index, a group of nodes that meet the activity growth threshold are screened out and constructed as an intent candidate set. These candidate nodes are clustered in the semantic space to form an intent node set. .

[0138] Optional implementations of clustering methods include: using the KMeans algorithm to partition node vector representations, or performing density partitioning based on the connected subgraph structure of the graph.

[0139] Step S403: Construct an intention attraction field Φ, which is a scalar function defined on a set of intention nodes and is used to represent the degree of attraction of each intention node to the current task flow. The attraction can be calculated using the following function:

[0140]

[0141] in,

[0142] Intent Node The average resonance strength of all edges in ;

[0143] Indicates the activity changes of the intention node in the time dimension;

[0144] Indicates the user feedback priority or historical effect rating of the task corresponding to the intent;

[0145] is the normalized weight, satisfying .

[0146] In step S404, the group of intent nodes with the highest current attractiveness is selected as the task target within the intent attraction field. The task types bound to these intent nodes are mapped to the corresponding function-driven grouping units. Based on this mapping, agents of the corresponding types are scheduled into the task scheduling pool. Agents required for the most attractive targets are prioritized for scheduling, with the remaining agents being considered as candidates and sorted in descending order.

[0147] In step S405, the intention node with the highest current attractiveness is output to the task assignment module, which performs parameter initialization and context binding on the activated agent to complete the task collaboration preparation.

[0148] By constructing an intention attraction field based on time changes, it is not only possible to dynamically track the focus of the user's current psychological goal, but also to achieve continuous control and priority sorting of task flow, effectively avoiding the response delays, task mismatches or resource redundancies of intelligent agents in traditional systems, and improving the intelligent response capabilities, real-time intervention capabilities and task execution efficiency of multi-agent systems in dynamic psychological scenarios.

[0149] For example, in the psychological dialogue scene of "Xiao Lin", in the previous round, the system identified that the resonance intensity between the memory node M2 and the emotion node E1 increased rapidly. At the same time, the system found that the user repeatedly mentioned keywords such as "future" and "worry". This topic constitutes a densely connected subgraph in the semantic graph. Based on this, the system identified this area as the intention node I1. Another topic is "past failure experience", which corresponds to the intention node I2, and its activity changes little. The system calculates the attraction function , Based on this, it is judged that the task the user currently needs most is "future-oriented emotional counseling". The system automatically schedules the sentiment analysis agent and the recommendation agent to enter the task collaborative execution process and generates a system prompt: "You just talked about feeling worried about the future. This may be related to changes in recent experiences. You might want to try some methods to help reduce uncertainty. We can look at suitable practice resources together."

[0150] See also Figure 2 In another embodiment, the present invention further provides a multi-agent dynamic task integrated allocation system, comprising:

[0151] The memory and emotion node construction module is used by the long-term memory agent to extract the user's historical semantic memory fragments to construct a memory node set, and the sentiment analysis agent to obtain the user's current and historical emotional state to construct an emotion node set;

[0152] a resonance graph construction module, configured to construct an emotion-memory resonance graph based on the semantic relevance and emotion similarity between the memory node set and the emotion node set, wherein the resonance graph is a heterogeneous graph structure comprising memory nodes and emotion nodes, and the weight of its edges represents the strength of psychological resonance between the connected nodes;

[0153] a resonance pattern recognition and grouping module, configured to identify emotion island regions, high-frequency memory activation segments, or memory-emotion conflict paths in the resonance spectrum, and activate corresponding function-driven grouping units based on the type of resonance pattern in the spectrum, wherein the function-driven grouping units include at least two functionally heterogeneous intelligent agents;

[0154] The intention attraction and agent scheduling module is used to construct an intention attraction field according to the state changes of the resonance graph in the time dimension, dynamically guide the task flow to the most active intention node, and schedule and allocate the corresponding agents in the function-driven grouping unit based on the attraction field.

[0155] In a further implementation, the memory and emotion node building module includes:

[0156] The semantic encoding module is used by the long-term memory agent to extract the user's past multi-round dialogue data, encode the semantic content with psychological meaning, and generate a semantic representation vector;

[0157] Semantic screening module, which is used to screen representative semantic fragments through semantic clustering or attention mechanism to form a candidate set of memory nodes;

[0158] The emotion recognition module is used by the sentiment analysis agent to identify the user's emotional state in the current input and historical input, and construct an emotion embedding vector;

[0159] The emotion classification module is used to classify emotion information based on timestamp, emotion category and expression intensity, and generate an emotion node set. The emotion node contains at least one emotion label and its corresponding emotion intensity index.

[0160] In a further implementation, the resonance map building module includes:

[0161] Similarity calculation module, used to calculate the semantic similarity and emotion co-occurrence factor between each memory node and emotion node;

[0162] The resonance strength calculation module is used to construct connection edges based on semantic similarity and emotional co-occurrence factors, and calculate the psychological resonance strength using a weighted formula;

[0163] The heterogeneous graph generation module is used to construct an emotion-memory resonance graph in the form of a heterogeneous graph structure, using memory nodes and emotion nodes as a heterogeneous node set and psychological resonance intensity as edge weight.

[0164] In a further implementation, the resonance pattern identification and grouping module includes:

[0165] The emotion island identification module is used to identify emotion nodes with fewer connected edges than a set threshold in the resonance graph and mark them as emotion island nodes;

[0166] The high-frequency memory recognition module is used to identify memory nodes that are frequently activated in the past N conversations. If the node forms a high-resonance connection with multiple emotion nodes, it is marked as a high-frequency memory activation segment;

[0167] The conflict path identification module is used to compare the historical emotion polarities of multiple memory nodes associated with a single emotion node. If there is an obvious emotion conflict, a memory-emotion conflict path is constructed;

[0168] The grouping unit activation module is used to activate the corresponding type of function-driven grouping unit according to the identified graph resonance mode type, and the grouping unit includes at least two intelligent agents with different task response capabilities.

[0169] In a further implementation, the intention attraction and agent scheduling module includes:

[0170] The graph slice analysis module is used to construct a sequence graph set in the form of time slices of the resonance graph and extract the activity changes of each node;

[0171] The intent clustering module is used to cluster nodes based on activity changes, form candidate regions for task intent, and identify sets of intent nodes;

[0172] The attraction calculation module is used to calculate the attraction value of each intent node. The attraction function includes the weighted sum of the resonance intensity mean, the node activity increment, and the user feedback priority.

[0173] The target selection module is used to sort the intention nodes according to their attractiveness values and select the most attractive intention node as the current task target;

[0174] The intelligent agent scheduling module is used to schedule the intelligent agents with corresponding capabilities in the marshalling unit to perform task responses.

[0175] It should be noted that the explanation of the aforementioned embodiment of the multi-agent dynamic task integrated allocation method is also applicable to the device of the embodiment of the present application and will not be repeated here.

[0176] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented using a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0177] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0178] In the several embodiments provided in this application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of this application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), magnetic disk or optical disk, and other media that can store program code.

[0179] The above is only a specific embodiment of the present application. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in this application, which should be included in the scope of protection of this application. For some module structures that are not particularly clear in the present invention, the content recorded in the prior art shall prevail. The prior art mentioned in the above background technology section and the specific embodiment section of the present invention can be regarded as part of the present invention and is used to understand the meaning of some technical features or parameters.

Claims

1. A multi-agent dynamic task integrated allocation method, characterized in that: The method comprises the following steps: Step S10: The long-term memory agent extracts the user's historical semantic memory fragments and constructs a memory node set; the sentiment analysis agent obtains the user's current and historical emotional state and constructs an emotion node set; Step S20: constructing an emotion-memory resonance graph based on the semantic relevance and emotion similarity between the memory node set and the emotion node set. The resonance graph is a heterogeneous graph structure including memory nodes and emotion nodes, and the weight of its edges represents the psychological resonance strength between the connected nodes. Step S30: Identify emotion island regions, memory high-frequency activation segments, or memory-emotion conflict paths in the resonance spectrum, and activate corresponding function-driven grouping units based on the type of resonance pattern in the spectrum, wherein the function-driven grouping units include at least two functionally heterogeneous intelligent agents; Step S40: constructing an intention attraction field based on the state changes of the resonance graph in the time dimension, which is used to dynamically guide the task flow to the most active intention node, and scheduling and allocating the corresponding intelligent agents in the function-driven marshaling unit based on the attraction field; Step S10 includes the following sub-steps: Step S101: The long-term memory agent extracts the user's past conversation data, encodes the semantic content with psychological significance, and generates a semantic representation vector; Step S102: Screen representative semantic segments through semantic clustering or attention mechanism to form a candidate set of memory nodes; Step S103: The sentiment analysis agent identifies the user's emotional state in the current input and historical input, and constructs an emotion embedding vector; Step S104: classify the emotion information based on the timestamp, emotion category and expression intensity to generate an emotion node set, where the emotion node includes at least one emotion label and its corresponding emotion intensity index.

2. The multi-agent dynamic task integrated allocation method according to claim 1 is characterized in that: The step S20 includes the following sub-steps: Step S201: Calculate the semantic similarity and emotion co-occurrence factor between each memory node and emotion node; Step S202: constructing a connection edge based on semantic similarity and emotion co-occurrence factor, and calculating the psychological resonance intensity using a weighted formula; Step S203: Memory nodes and emotion nodes are used as a heterogeneous node set, and psychological resonance intensity is used as an edge weight to construct an emotion-memory resonance graph in the form of a heterogeneous graph structure.

3. The multi-agent dynamic task integrated allocation method according to claim 1 is characterized in that: The step S30 includes the following sub-steps: Step S301: Identify emotion nodes with fewer connected edges than a set threshold in the resonance graph and mark them as emotion island nodes; Step S302: Identify memory nodes that are frequently activated in the past N conversations. If the node forms a high-resonance connection with multiple emotion nodes, mark it as a memory high-frequency activation segment. Step S303: compare the historical emotion polarities of multiple memory nodes associated with a single emotion node. If there is an obvious emotion conflict, construct a memory-emotion conflict path. Step S304: activating a function-driven grouping unit of a corresponding type according to the identified graph resonance mode type, wherein the grouping unit includes at least two intelligent agents with different task response capabilities.

4. The multi-agent dynamic task integrated allocation method according to claim 1 is characterized in that: The step S40 includes the following sub-steps: Step S401: construct a sequence graph set by slicing the resonance graph in time, and extract the activity change of each node; Step S402: cluster the nodes based on activity changes to form a candidate task intent region and identify an intent node set; Step S403: Calculate the attraction value of each intention node. The attraction function includes the weighted sum of the resonance intensity mean, the node activity increment, and the user feedback priority. Step S404: Sort by attraction value, select the intention node with the greatest attraction as the current task target, and dispatch the intelligent agent with corresponding capabilities in the function-driven marshaling unit to execute the task response.

5. A multi-agent dynamic task integrated allocation system, characterized in that: The system includes the following modules: The memory and emotion node construction module is used by the long-term memory agent to extract the user's historical semantic memory fragments to construct a memory node set, and the sentiment analysis agent to obtain the user's current and historical emotional state to construct an emotion node set; a resonance graph construction module, configured to construct an emotion-memory resonance graph based on the semantic relevance and emotion similarity between the memory node set and the emotion node set, wherein the resonance graph is a heterogeneous graph structure comprising memory nodes and emotion nodes, and the weight of its edges represents the strength of psychological resonance between the connected nodes; a resonance pattern recognition and grouping module, configured to identify emotion island regions, high-frequency memory activation segments, or memory-emotion conflict paths in the resonance spectrum, and activate corresponding function-driven grouping units based on the type of resonance pattern in the spectrum, wherein the function-driven grouping units include at least two functionally heterogeneous intelligent agents; The intention attraction and agent scheduling module is used to construct an intention attraction field based on the state changes of the resonance graph in the time dimension, dynamically guide the task flow to the most active intention node, and schedule and allocate the corresponding agents in the function-driven marshaling unit based on the attraction field; The memory and emotion node building module includes: The semantic encoding module is used by the long-term memory agent to extract the user's past multi-round dialogue data, encode the semantic content with psychological meaning, and generate a semantic representation vector; Semantic screening module, which is used to screen representative semantic fragments through semantic clustering or attention mechanism to form a candidate set of memory nodes; The emotion recognition module is used by the sentiment analysis agent to identify the user's emotional state in the current input and historical input, and construct an emotion embedding vector; The emotion classification module is used to classify emotion information based on timestamp, emotion category and expression intensity, and generate an emotion node set. The emotion node contains at least one emotion label and its corresponding emotion intensity index.

6. The multi-agent dynamic task integrated allocation system according to claim 5, characterized in that: The resonance spectrum building block includes: Similarity calculation module, used to calculate the semantic similarity and emotion co-occurrence factor between each memory node and emotion node; The resonance strength calculation module is used to construct connection edges based on semantic similarity and emotional co-occurrence factors, and calculate the psychological resonance strength using a weighted formula; The heterogeneous graph generation module is used to construct an emotion-memory resonance graph in the form of a heterogeneous graph structure, using memory nodes and emotion nodes as a heterogeneous node set and psychological resonance intensity as edge weight.

7. The multi-agent dynamic task integrated allocation system according to claim 5, characterized in that: The resonance mode identification and grouping module includes: The emotion island identification module is used to identify emotion nodes with fewer connected edges than a set threshold in the resonance graph and mark them as emotion island nodes; The high-frequency memory recognition module is used to identify memory nodes that are frequently activated in the past N conversations. If the node forms a high-resonance connection with multiple emotion nodes, it is marked as a high-frequency memory activation segment; The conflict path identification module is used to compare the historical emotion polarities of multiple memory nodes associated with a single emotion node. If there is an obvious emotion conflict, a memory-emotion conflict path is constructed; The grouping unit activation module is used to activate the corresponding type of function-driven grouping unit according to the identified graph resonance mode type, and the grouping unit includes at least two intelligent agents with different task response capabilities.

8. The multi-agent dynamic task integrated allocation system according to claim 5, characterized in that: The intention attraction and agent scheduling module includes: The graph slice analysis module is used to construct a sequence graph set in the form of time slices of the resonance graph and extract the activity changes of each node; The intent clustering module is used to cluster nodes based on activity changes, form candidate regions for task intent, and identify sets of intent nodes; The attraction calculation module is used to calculate the attraction value of each intent node. The attraction function includes the weighted sum of the resonance intensity mean, the node activity increment, and the user feedback priority. The target selection module is used to sort the intention nodes according to their attractiveness values and select the most attractive intention node as the current task target; The intelligent agent scheduling module is used to schedule the intelligent agents with corresponding capabilities in the marshalling unit to perform task responses.

Citation Information

Patent Citations

  • Man-machine interaction emotion guiding method based on graph neural network

    CN117807207A

  • Interactive artificial intelligence value alignment method, system and related system

    CN118536539A